From: Veaceslav Falico <vfalico@redhat.com>
To: Vlad Yasevich <vyasevic@redhat.com>
Cc: Jiri Pirko <jiri@resnulli.us>,
netdev@vger.kernel.org, Jay Vosburgh <fubar@us.ibm.com>,
Andy Gospodarek <andy@greyhouse.net>
Subject: Re: [PATCH net-next v1 5/9] bonding: convert bond_has_this_ip() to use upper devices
Date: Wed, 28 Aug 2013 18:32:46 +0200 [thread overview]
Message-ID: <20130828163246.GL1992@redhat.com> (raw)
In-Reply-To: <521E0FA0.5070506@redhat.com>
On Wed, Aug 28, 2013 at 10:56:32AM -0400, Vlad Yasevich wrote:
...snip...
>I've been playing with approach 2 for some work I am doing for
>macvtap-over-bond, but I like you idea for 3 better.
>
>It would make things simpler in the long run.
I've just sent the third version of the 3rd approach, which implements
lower/upper device lists for every device that are guaranteed, under RCU,
tu have all the upper/lower devices linked to the device. It also permits
to distinguish the 'neighbour' devices (i.e. linked on the first level,
i.e. direct-linked) from the 'distant' ones, which are not directly linked
but rather inherited.
It also implements the first function (and the only one that I've needed
to get rid of vlan lists in bonding) - netdev_for_each_upper_dev_rcu(),
which can be used as a loop:
struct net_device *upper;
struct list_head *iter;
rcu_read_lock();
netdev_for_each_upper_dev_rcu(dev, upper, iter) {
... do whatever you want with the upper dev ...
}
rcu_read_unlock();
In case you'll need, you can easily implement the same way
netdev_for_each_lower_dev_rcu().
Hope that helps.
>
>-vlad
next prev parent reply other threads:[~2013-08-28 16:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-26 20:32 [PATCH net-next v1 0/9] bonding: remove vlan special handling Veaceslav Falico
2013-08-26 20:32 ` [PATCH net-next v1 1/9] net: add netdev_upper_get_next_dev(dev, iter) Veaceslav Falico
2013-08-26 20:57 ` Jiri Pirko
2013-08-27 10:42 ` Veaceslav Falico
2013-08-26 20:32 ` [PATCH net-next v1 2/9] net: add netdev_for_each_upper_dev() Veaceslav Falico
2013-08-26 20:32 ` [PATCH net-next v1 3/9] bonding: use netdev_upper list in bond_vlan_used Veaceslav Falico
2013-08-26 20:32 ` [PATCH net-next v1 4/9] bonding: make bond_arp_send_all use upper device list Veaceslav Falico
2013-08-26 20:32 ` [PATCH net-next v1 5/9] bonding: convert bond_has_this_ip() to use upper devices Veaceslav Falico
2013-08-26 20:53 ` Jiri Pirko
2013-08-27 11:16 ` Veaceslav Falico
2013-08-27 11:25 ` Jiri Pirko
2013-08-27 11:53 ` Veaceslav Falico
2013-08-27 18:10 ` Veaceslav Falico
2013-08-28 12:00 ` Veaceslav Falico
2013-08-28 14:56 ` Vlad Yasevich
2013-08-28 16:32 ` Veaceslav Falico [this message]
2013-08-26 20:32 ` [PATCH net-next v1 6/9] bonding: use vlan_uses_dev() in __bond_release_one() Veaceslav Falico
2013-08-26 20:32 ` [PATCH net-next v1 7/9] bonding: split alb_send_learning_packets() Veaceslav Falico
2013-08-26 20:32 ` [PATCH net-next v1 8/9] bonding: make alb_send_learning_packets() use upper dev list Veaceslav Falico
2013-08-26 20:32 ` [PATCH net-next v1 9/9] bonding: remove vlan_list/current_alb_vlan 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=20130828163246.GL1992@redhat.com \
--to=vfalico@redhat.com \
--cc=andy@greyhouse.net \
--cc=fubar@us.ibm.com \
--cc=jiri@resnulli.us \
--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).