From: Eric Dumazet <eric.dumazet@gmail.com>
To: Andy Gospodarek <andy@greyhouse.net>
Cc: Jay Vosburgh <fubar@us.ibm.com>, netdev@vger.kernel.org
Subject: Re: [PATCH net-next-2.6] bonding: allow arp_ip_targets to be on a separate vlan from bond device
Date: Mon, 07 Dec 2009 19:24:57 +0100 [thread overview]
Message-ID: <4B1D4879.3040809@gmail.com> (raw)
In-Reply-To: <20091207181349.GN1639@gospo.rdu.redhat.com>
Andy Gospodarek a écrit :
>> Jay,
>>
>> The issue was that that orig_dev was getting set to the active slave, so
>> your running tcpdump on the active slave made the conditional inside
>> this loop:
>>
>> list_for_each_entry_rcu(ptype, &ptype_all, list) {
>> if (ptype->dev == null_or_orig || ptype->dev == skb->dev ||
>> ptype->dev == orig_dev) {
>> if (pt_prev)
>> ret = deliver_skb(skb, pt_prev, orig_dev);
>> pt_prev = ptype;
>> }
>> }
>>
>> hit and deliver_skb was being called for all traffic coming toward
>> bond0.<vid>. I'm not completely happy with this solutoin, but I think
>> it resolves both the original problem I was trying to solve and the
>> regression you discovered with your original patch. Let me know if you
>> see everything working now like I do.
>>
>> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>> index 726bd75..b1e3b2f 100644
>> --- a/drivers/net/bonding/bond_main.c
>> +++ b/drivers/net/bonding/bond_main.c
>> @@ -2697,6 +2697,19 @@ static int bond_arp_rcv(struct sk_buff *skb, struct net_device *dev, struct pack
>> bond = netdev_priv(dev);
>> read_lock(&bond->lock);
>>
>> + /*
>> + * We may have dev passed in as a vlan device, so make sure to get to the
>> + * core netdev before continuing.
>> + */
>> + if (dev->priv_flags & IFF_802_1Q_VLAN) {
>> + dev = vlan_dev_real_dev(dev);
>> + /*
>> + * Don't necessarily trust passed in orig_dev since vlan accelerated
>> + * netdevs and bonding don't play well together.
>> + */
>> + orig_dev = __dev_get_by_index(dev_net(skb->dev),skb->skb_iif);
>> + }
>> +
>
> Any thoughts on the updated patch, Jay?
Unfortunately you still use __dev_get_by_index()
in a non safe context.
next prev parent reply other threads:[~2009-12-07 18:24 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-30 20:14 [PATCH net-next-2.6] bonding: allow arp_ip_targets to be on a separate vlan from bond device Andy Gospodarek
2009-11-30 20:22 ` Patrick McHardy
2009-11-30 20:53 ` Andy Gospodarek
2009-12-01 9:42 ` Patrick McHardy
2009-12-01 0:00 ` Jay Vosburgh
2009-12-01 1:21 ` Andy Gospodarek
2009-12-01 1:57 ` Jay Vosburgh
2009-12-01 14:44 ` Andy Gospodarek
2009-12-01 21:28 ` Jay Vosburgh
2009-12-01 23:07 ` Andy Gospodarek
2009-12-02 21:24 ` Andy Gospodarek
2009-12-07 18:13 ` Andy Gospodarek
2009-12-07 18:24 ` Eric Dumazet [this message]
2009-12-09 22:01 ` [PATCH net-next-2.6 v3] bonding: allow arp_ip_targets on separate vlans to use arp validation Andy Gospodarek
2009-12-11 5:17 ` Jay Vosburgh
2009-12-14 20:48 ` [PATCH net-next-2.6 v4] " Andy Gospodarek
2009-12-26 2:22 ` David Miller
2009-12-28 15:26 ` Andy Gospodarek
2009-12-28 15:33 ` David Miller
2009-12-28 21:55 ` Jay Vosburgh
2009-12-29 0:51 ` Andy Gospodarek
2010-01-04 5:19 ` David Miller
2009-12-01 4:11 ` [PATCH net-next-2.6] bonding: allow arp_ip_targets to be on a separate vlan from bond device Eric Dumazet
2009-12-02 5:13 ` Eric Dumazet
2009-12-02 16:38 ` Andy Gospodarek
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=4B1D4879.3040809@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=andy@greyhouse.net \
--cc=fubar@us.ibm.com \
--cc=netdev@vger.kernel.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 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).