lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <CH3PR21MB43989123B48D11E16B78802FCE362@CH3PR21MB4398.namprd21.prod.outlook.com>
Date: Tue, 3 Dec 2024 19:52:51 +0000
From: Long Li <longli@...rosoft.com>
To: Jakub Kicinski <kuba@...nel.org>, "longli@...uxonhyperv.com"
	<longli@...uxonhyperv.com>
CC: KY Srinivasan <kys@...rosoft.com>, Haiyang Zhang <haiyangz@...rosoft.com>,
	Wei Liu <wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>, "David S.
 Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo
 Abeni <pabeni@...hat.com>, Shradha Gupta <shradhagupta@...ux.microsoft.com>,
	Simon Horman <horms@...nel.org>, Konstantin Taranov
	<kotaranov@...rosoft.com>, Souradeep Chakrabarti
	<schakrabarti@...ux.microsoft.com>, Erick Archer <erick.archer@...look.com>,
	"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Stephen
 Hemminger <stephen@...workplumber.org>
Subject: RE: [EXTERNAL] Re: [PATCH] hv_netvsc: Set device flags for properly
 indicating bonding

> Subject: [EXTERNAL] Re: [PATCH] hv_netvsc: Set device flags for properly
> indicating bonding
> 
> On Wed, 27 Nov 2024 11:42:50 -0800 longli@...uxonhyperv.com wrote:
> > hv_netvsc uses a subset of bonding features in that the master always
> > has only one active slave. But it never properly setup those flags.
> >
> > Other kernel APIs (e.g those in "include/linux/netdevice.h") check for
> > IFF_MASTER, IFF_SLAVE and IFF_BONDING for determing if those are used
> > in a master/slave setup.
> 
> I feel like this has been nacked 10 times already?
> IFF_BONDING means the bonding driver.
> There is more than one driver in the tree providing link aggregation and only
> bonding uses IFF_BONDING. If some user is buggy fix the user.
> --
> pw-bot: reject

Sorry I didn't know this has been discussed in other threads. As far as I know, this is probably the 1st time it is discussed in the context of netvsc.

My understanding is that netvsc is a special use-case of bonding which is implemented as an emulated device in drivers/net/bonding. It is the only non-emulated driver that sets IFF_MASTER and IFF_SLAVE flags on netdevs. After the master/slave devices are set up in this way, the behavior is very similar to that of the bonding device with a single active bonded slave.

There are code that use netif_is_bond_master() and netif_is_bond_slave() to decide how a netdev should be used when it is in a master/slave setup. One example is "drivers/infiniband/core/roce_gid_mgmt.c". Their use case is relevant to netvsc and its slave device setup.

I haven't found a good way to communicate the relationship of netvsc and its slave netdev to those code. The best solution I can think of is to use the IFF_BONDING, as it is the closest representation of this relationship. Another way would be adding a new IFF flag (e.g. IFF_PERMSLAVE) to netdev_priv_flags. I feel this is not needed for this special use-case in netvsc.

Thanks,

Long

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ