From: "Nicolas de Pesloüan" <nicolas.2p.debian@gmail.com>
To: Jiri Pirko <jpirko@redhat.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
shemminger@linux-foundation.org, kaber@trash.net,
fubar@us.ibm.com, eric.dumazet@gmail.com
Subject: Re: [patch net-next-2.6] net: make dev->master general
Date: Mon, 14 Feb 2011 15:11:14 +0100 [thread overview]
Message-ID: <4D593802.8090508@gmail.com> (raw)
In-Reply-To: <20110214090133.GB2746@psychotron.redhat.com>
Le 14/02/2011 10:01, Jiri Pirko a écrit :
> Mon, Feb 14, 2011 at 09:48:44AM CET, nicolas.2p.debian@gmail.com wrote:
>> Le 12/02/2011 17:48, Jiri Pirko a écrit :
>>> dev->master is now tightly connected to bonding driver. This patch makes
>>> this pointer more general and ready to be used by others.
>>>
>>> - netdev_set_master() - bond specifics moved to new function
>>> netdev_set_bond_master()
>>> - introduced netif_is_bond_slave() to check if device is a bonding slave
>>>
>>> Signed-off-by: Jiri Pirko<jpirko@redhat.com>
>>
>> Hi Jiri,
>>
>> Even if DaveM already applied your patch, I'm not comfortable with it.
>>
>> What is the rational behind it? Do you have anything in mind to use
>> the now "more general" master field of net_device?
>>
>> Of course, I won't advocate for every fields having only a single
>> possible usage, but, using master for several different things might
>> jeopardize our ability to share an interface between several logical
>> interface systems:
>>
>> Due to the current usage of the rx_handler field in net_device, the
>> code suggest that an interface cannot be part of a bridge and of a
>> macvlan at the same time. Even if bridge provide an hook for ebtables
>> to ignore an skb and allow other to get it, macvlan cannot be
>> registered on the same lower interface as a bridge, because
>> rx_handler can only hold a single value.
>>
>> By giving master a more general meaning, I think we might face a
>> similar problem. It might disallow an interface to be enslaved to
>> bonding and part of another logical interface at the same time, if
>> such logical interface also use the master field.
>
> That is true. I think that it makes no sense to have iface enslaved in
> bond and bridge at the same time. Do you have a scenario where it makes
> sense?
Agreed for bonding/bridge, because both tend to eat all skb, even if bridge has a way to give skb to
others, as stated above. Bonding might/should do the same.
But, for macvlan or vlan for example, it is different. They will ignore skb not matching the correct
dst_mac (macvlan) or vlan_id (vlan) and give a chance to other to use the skb.
Many setups involving several logical ifaces sharing a physical iface make sense:
- bridge+vlan (see "2.6.37 regression: adding main interface to a bridge breaks vlan interface RX")
- bride+macvlan (In particular because bridge might no know about the other dst_macs that should be
considered local. I didn't check that particular point in detail.)
- bonding+vlan
- bonding+macvlan
So, would master be used only for ifaces that "eat all skb"?
Nicolas.
next prev parent reply other threads:[~2011-02-14 14:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-12 16:48 [patch net-next-2.6] net: make dev->master general Jiri Pirko
2011-02-13 19:08 ` David Miller
2011-02-14 8:48 ` Nicolas de Pesloüan
2011-02-14 9:01 ` Jiri Pirko
2011-02-14 14:11 ` Nicolas de Pesloüan [this message]
2011-02-14 16:27 ` Patrick McHardy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D593802.8090508@gmail.com \
--to=nicolas.2p.debian@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=fubar@us.ibm.com \
--cc=jpirko@redhat.com \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.