Thread (25 messages) 25 messages, 4 authors, 2013-01-02

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

From: Ben Greear <hidden>
Date: 2012-12-30 18:02:22

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?
quoted hunk ↗ jump to hunk
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@resnulli.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?

Thanks,
Ben

-- 
Ben Greear [off-list ref]
Candela Technologies Inc  http://www.candelatech.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help