From: Wengang Wang <wen.gang.wang@oracle.com>
To: David Miller <davem@davemloft.net>, jay.vosburgh@canonical.com
Cc: ogerlitz@mellanox.com, netdev@vger.kernel.org,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH] bonding: move ipoib_header_ops to vmlinux
Date: Wed, 03 Dec 2014 09:50:40 +0800 [thread overview]
Message-ID: <547E6C70.7040809@oracle.com> (raw)
In-Reply-To: <54752D4C.7000603@oracle.com>
Hi David and Jay,
Then about about the change in this patch?
thanks,
wengang
在 2014年11月26日 09:30, Wengang 写道:
> 于 2014年11月26日 02:44, David Miller 写道:
>> From: Jay Vosburgh <jay.vosburgh@canonical.com>
>> Date: Tue, 25 Nov 2014 10:41:17 -0800
>>
>>> Or Gerlitz <ogerlitz@mellanox.com> wrote:
>>>
>>>> On 11/25/2014 8:07 AM, David Miller wrote:
>>>>> IPOIB should not work over bonding as it requires that the device
>>>>> use ARPHRD_ETHER.
>>>> Hi Dave,
>>>>
>>>> IPoIB devices can be enslaved to both bonding and teaming in their
>>>> HA mode,
>>>> the bond device type becomes ARPHRD_INFINIBAND when this happens.
>>> The point was that pktgen disallows ARPHRD_INFINIBAND, not that
>>> bonding does.
>>>
>>> Pktgen specifically checks for type != ARPHRD_ETHER, so the
>>> IPoIB bond should not be able to be used with pkgten. My suspicion is
>>> that pktgen is being configured on the bond first, then an IPoIB slave
>>> is added to the bond; this would change its type in a way that pktgen
>>> wouldn't notice.
>> +1
>
> I think it go this way:
>
> 1) bond_master is ready
> 2) bond_enslave enslave a IPOIB interface calling bond_setup_by_slave
> 3) then bond_setup_by_slave set change master type to ARPHRD_INFINIBAND.
>
> code is like this:
>
> 1 /* enslave device <slave> to bond device <master> */
> 2 int bond_enslave(struct net_device *bond_dev, struct net_device
> *slave_dev)
> 3 {
> 4 <snip>...
> 5 /* set bonding device ether type by slave - bonding netdevices are
> 6 * created with ether_setup, so when the slave type is not ARPHRD_ETHER
> 7 * there is a need to override some of the type dependent attribs/funcs.
> 8 *
> 9 * bond ether type mutual exclusion - don't allow slaves of dissimilar
> 10 * ether type (eg ARPHRD_ETHER and ARPHRD_INFINIBAND) share the same
> bond
> 11 */
> 12 if (!bond_has_slaves(bond)) {
> 13 if (bond_dev->type != slave_dev->type) {
> 14 <snip>...
> 15 if (slave_dev->type != ARPHRD_ETHER)
> 16 bond_setup_by_slave(bond_dev, slave_dev);
> 17 else {
> 18 ether_setup(bond_dev);
> 19 bond_dev->priv_flags &= ~IFF_TX_SKB_SHARING;
> 20 }
> 21
> 22 call_netdevice_notifiers(NETDEV_POST_TYPE_CHANGE,
> 23 bond_dev);
> 24 }
> 25 <snip>...
> 26 }
> 27
> 28 static void bond_setup_by_slave(struct net_device *bond_dev,
> 29 struct net_device *slave_dev)
> 30 {
> 31 bond_dev->header_ops = slave_dev->header_ops;
> 32
> 33 bond_dev->type = slave_dev->type;
> 34 bond_dev->hard_header_len = slave_dev->hard_header_len;
> 35 bond_dev->addr_len = slave_dev->addr_len;
> 36
> 37 memcpy(bond_dev->broadcast, slave_dev->broadcast,
> 38 slave_dev->addr_len);
> 39 }
> 40
>
> thanks
> wengang
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-12-03 1:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 5:36 [PATCH] bonding: move ipoib_header_ops to vmlinux Wengang Wang
[not found] ` <1416893768-21369-1-git-send-email-wen.gang.wang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-11-25 6:07 ` David Miller
[not found] ` <20141125.010741.450666241983239119.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2014-11-25 7:19 ` Or Gerlitz
[not found] ` <54742D6E.9030605-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-11-25 18:41 ` Jay Vosburgh
2014-11-25 18:44 ` David Miller
[not found] ` <20141125.134450.1265438298771389292.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2014-11-26 1:30 ` Wengang
2014-12-03 1:50 ` Wengang Wang [this message]
[not found] ` <547E6C70.7040809-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-12-15 1:12 ` Wengang
2014-12-22 1:14 ` Wengang
2014-12-29 7:13 ` Wengang
[not found] ` <54A0FEA4.1080302@oracle.com>
[not found] ` <54A0FEA4.1080302-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-12-29 18:36 ` David Miller
2014-12-29 21:32 ` Cong Wang
[not found] ` <CAHA+R7M-Nm_R-AaKQ0nX4L3O=BN5_m1v-8sWJSaE_UmGyo8zwA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-12-30 3:01 ` Wengang
[not found] ` <54A21596.7000706-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-12-30 4:25 ` David Miller
2014-12-30 8:26 ` Wengang
-- strict thread matches above, loose matches on Subject: below --
2014-12-30 3:04 Wengang Wang
[not found] ` <1419908682-17012-1-git-send-email-wen.gang.wang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-12-30 4:23 ` David Miller
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=547E6C70.7040809@oracle.com \
--to=wen.gang.wang@oracle.com \
--cc=davem@davemloft.net \
--cc=jay.vosburgh@canonical.com \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).