netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Veaceslav Falico <vfalico@redhat.com>
To: Vlad Yasevich <vyasevic@redhat.com>
Cc: netdev@vger.kernel.org, Jay Vosburgh <fubar@us.ibm.com>,
	Andy Gospodarek <andy@greyhouse.net>
Subject: Re: [PATCH net-next v3 07/13] bonding: make bond_arp_send_all use upper device list
Date: Wed, 28 Aug 2013 20:11:01 +0200	[thread overview]
Message-ID: <20130828181101.GA13390@redhat.com> (raw)
In-Reply-To: <20130828172335.GM1992@redhat.com>

On Wed, Aug 28, 2013 at 07:23:35PM +0200, Veaceslav Falico wrote:
>On Wed, Aug 28, 2013 at 12:45:38PM -0400, Vlad Yasevich wrote:
>>On 08/28/2013 12:03 PM, Veaceslav Falico wrote:
>...snip...
>>>+		/* search for upper device, like vlan/bridge/team/etc */
>>>+		rcu_read_lock();
>>>+		netdev_for_each_upper_dev_rcu(bond->dev, upper, iter) {
>>>+			if (upper == rt->dst.dev) {
>>>+				/* if it's a vlan - get its VID */
>>>+				if (is_vlan_dev(rt->dst.dev))
>>>+					vlan_id = vlan_dev_vlan_id(rt->dst.dev);
>>>+
>>>+				rcu_read_unlock();
>>>+				goto found;
>>>+			}
>>
>>How does this work in the following config:
>>	eth0,eth1 <--- bond <--- vlans 1,2,3 <---- bridge (ip address)
>
>Great catch, it won't work. I'm not sure if the old code does work (cause
>bond->dev already has vlans on top of it, so it has the ->vlan_info, and
>thus __vlan_find_dev_deep() won't go recursive, but rather check the
>bond->dev for the ip address, though I might be wrong), but I'll try to
>take a look at the new code to make it work.
>
>First what comes to mind (untested, not compiled):

(sorry for the spam - I've sent the mail from android and because it still
can't send anything but html email it bounced from netdev list)

actually, we should just go through the upper list
twice - first looking at all upper vlan's master devices
via __vlan_find_dev_deep(), and if found - get the tag,
and then loop through all devices.

i'll test it and send the next version, if nothing else
comes up.

thanks for the catch and the review.

  reply	other threads:[~2013-08-28 18:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-28 16:03 [PATCH net-next v3 0/13] bonding: remove vlan special handling Veaceslav Falico
2013-08-28 16:03 ` [PATCH net-next v3 01/13] net: rename netdev_upper to netdev_adjacent Veaceslav Falico
2013-08-28 16:03 ` [PATCH net-next v3 02/13] net: add lower_dev_list to net_device and make a full mesh Veaceslav Falico
2013-08-28 16:03 ` [PATCH net-next v3 03/13] net: remove search_list from netdev_adjacent Veaceslav Falico
2013-08-28 16:03 ` [PATCH net-next v3 04/13] net: add netdev_upper_get_next_dev_rcu(dev, iter) Veaceslav Falico
2013-08-28 16:03 ` [PATCH net-next v3 05/13] net: add netdev_for_each_upper_dev_rcu() Veaceslav Falico
2013-08-28 16:03 ` [PATCH net-next v3 06/13] bonding: use netdev_upper list in bond_vlan_used Veaceslav Falico
2013-08-28 16:03 ` [PATCH net-next v3 07/13] bonding: make bond_arp_send_all use upper device list Veaceslav Falico
2013-08-28 16:45   ` Vlad Yasevich
2013-08-28 17:23     ` Veaceslav Falico
2013-08-28 18:11       ` Veaceslav Falico [this message]
2013-08-28 16:03 ` [PATCH net-next v3 08/13] bonding: convert bond_has_this_ip() to use upper devices Veaceslav Falico
2013-08-28 16:03 ` [PATCH net-next v3 09/13] bonding: use vlan_uses_dev() in __bond_release_one() Veaceslav Falico
2013-08-28 16:03 ` [PATCH net-next v3 10/13] bonding: split alb_send_learning_packets() Veaceslav Falico
2013-08-28 16:04 ` [PATCH net-next v3 11/13] bonding: make alb_send_learning_packets() use upper dev list Veaceslav Falico
2013-08-28 16:04 ` [PATCH net-next v3 12/13] bonding: remove vlan_list/current_alb_vlan Veaceslav Falico
2013-08-28 16:04 ` [PATCH net-next v3 13/13] bonding: pr_debug instead of pr_warn in bond_arp_send_all Veaceslav Falico
2013-08-28 16:15   ` Joe Perches
2013-08-28 16:22     ` Veaceslav Falico
2013-08-28 21:24 ` [PATCH net-next v3 0/13] bonding: remove vlan special handling Veaceslav Falico

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=20130828181101.GA13390@redhat.com \
    --to=vfalico@redhat.com \
    --cc=andy@greyhouse.net \
    --cc=fubar@us.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=vyasevic@redhat.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).