Subject: Re: [patch net-next 01/15] net: introduce upper device lists

From: Ben Greear <[email-masked]>
Date: Sun, 30 Dec 2012 10:00:42 -0800

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?

>
> 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 <[email-masked]>
> ---
>   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?

Thanks,
Ben

-- 
Ben Greear <[email-masked]>
Candela Technologies Inc  http://www.candelatech.com