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

From
Stephen Hemminger <hidden>
Date
2012-12-31 19:23:40
Reply to
Jiri Pirko, 2012-12-30
On Sun, 30 Dec 2012 12:58:08 +0100
Jiri Pirko [off-list ref] 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.

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>
I like the concept of knowing the topology of layered network devices.
The name "upper device lists" is a little confusing to me.
Also, the amount of additional data structures and book keeping
seems more than needed; but not sure how to reduce it down to the
least code.

For simple case of detecting loops, just using existing master
pointer is sufficient.
       ethernet --> bonding --> bridge --+
                       ^                 |
                       |                 |
                       +-----------------+
This is the simple case of detecting if singularly linked list
is a loop.

The only device where multiple upper devices is possible seems
to be macvlan. Could the special case code be limited to there?
Thread (25 messages) 25 messages, 4 authors, last reply 2013-01-02
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help