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]
Date:	Sun, 30 Dec 2012 23:08:50 +0100
From:	Jiri Pirko <jiri@...nulli.us>
To:	Ben Greear <greearb@...delatech.com>
Cc:	netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
	bhutchings@...arflare.com, faisal.latif@...el.com,
	shemminger@...tta.com, fbl@...hat.com, roland@...nel.org,
	sean.hefty@...el.com, hal.rosenstock@...il.com, fubar@...ibm.com,
	andy@...yhouse.net, divy@...lsio.com, jitendra.kalsaria@...gic.com,
	sony.chacko@...gic.com, linux-driver@...gic.com, kaber@...sh.net,
	ursula.braun@...ibm.com, blaschka@...ux.vnet.ibm.com,
	schwidefsky@...ibm.com, heiko.carstens@...ibm.com,
	ebiederm@...ssion.com, joe@...ches.com, amwang@...hat.com,
	nhorman@...driver.com, john.r.fastabend@...el.com,
	pablo@...filter.org
Subject: Re: [patch net-next 01/15] net: introduce upper device lists

Sun, Dec 30, 2012 at 07:00:42PM CET, greearb@...delatech.com wrote:
>On 12/30/2012 03:58 AM, Jiri Pirko wrote:
>>This lists are supposed to serve for storing pointers to all upper devices.
>>Eventually it will replace dev->master pointer which is used for
>>bonding, bridge, team but it cannot be used for vlan, macvlan where
>>there might be multiple upper present. In case the upper link is
>>replacement for dev->master, it is marked with "master" flag.
>
>This is confusing and full of grammatical errors.  For instance, the 'it'
>in "team but it cannot be used"...you are talking about the list this
>patch introduces, or the old dev->master?

Sorry for my grammar, it stinks...

dev->master cannot be used for for vlan, macvlan. More upper devices
might be present for this type of devices and dev->master would not cover it.

So, In case there is only *one* upper device, "master" flag is used.

I Hope I cleared this one for you.


>
>>
>>New upper device list resolves this limitation. Also, the information
>>stored in lists is used for preventing looping setups like
>>"bond->somethingelse->samebond"
>>
>>Signed-off-by: Jiri Pirko <jiri@...nulli.us>
>>---
>>  include/linux/netdevice.h |  14 +++
>>  net/core/dev.c            | 237 +++++++++++++++++++++++++++++++++++++++++++++-
>>  2 files changed, 247 insertions(+), 4 deletions(-)
>>
>>diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
>>index 6835b58..52d1146 100644
>>--- a/include/linux/netdevice.h
>>+++ b/include/linux/netdevice.h
>>@@ -1172,6 +1172,8 @@ struct net_device {
>>  					  * which this device is member of.
>>  					  */
>>
>>+	struct list_head	upper_dev_list; /* List of upper devices */
>>+
>
>Unless I mis-understand, this is often contains 'lower' devices instead,
>and could contain a mixture.
>Maybe this could use a rename, or at least a lot more comments?

I'm terribly sorry, but I believe this is the case when I do not
understand your grammar. For example "this is often contains 'lower'
devices instead".

But in any case, no, list of upper devices contains only "upper" devices.
Meaning the set of devices which are using the original one as "lower".
Never the other way.

And to reply to your comment to patch "[patch net-next 04/15] rtnetlink:
remove usage of dev->master" as well:

upper dev is the device that is somehow using the lower dev for its
work. For bonding, you may call that lower device "slave", for bridge,
"port". And macvlan is also linked to it's lower device, the one on what
it is hooked on by rx_handler.


I hope this clears this for you a bit.

Thanks

Jiri.

>
>Thanks,
>Ben
>
>-- 
>Ben Greear <greearb@...delatech.com>
>Candela Technologies Inc  http://www.candelatech.com
>
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ