aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-09-26 16:02:19 -0400
committerDavid S. Miller <davem@davemloft.net>2013-09-26 16:02:19 -0400
commitaae8c287e664d49df4aa315ad263c33b9a2af3e1 (patch)
treedc71bea5d018fdcc1f68af27ea8af52be02628e5 /net/8021q/vlan.c
parentnet: neighbour: use source address of last enqueued packet for solicitation (diff)
parentnet: create sysfs symlinks for neighbour devices (diff)
downloadlinux-dev-aae8c287e664d49df4aa315ad263c33b9a2af3e1.tar.xz
linux-dev-aae8c287e664d49df4aa315ad263c33b9a2af3e1.zip
Merge branch 'bonding_neighbours'
bonding: use neighbours instead of own lists Veaceslav Falico says: ==================== This patchset introduces all the needed infrastructure, on top of current adjacent lists, to be able to remove bond's slave_list/slave->list. The overhead in memory/CPU is minimal, and after the patchset bonding can rely on its slave-related functions, given the proper locking. I've done some netperf benchmarks on a vm, and the delta was about 0.1gbps for 35gbps as a whole, so no speed fluctuations. It also automatically creates lower/upper and master symlinks in dev's sysfs directory. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q/vlan.c')
-rw-r--r--net/8021q/vlan.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 61fc573f1142..b3d17d1c49c3 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -98,14 +98,14 @@ void unregister_vlan_dev(struct net_device *dev, struct list_head *head)
vlan_gvrp_request_leave(dev);
vlan_group_set_device(grp, vlan->vlan_proto, vlan_id, NULL);
+
+ netdev_upper_dev_unlink(real_dev, dev);
/* Because unregister_netdevice_queue() makes sure at least one rcu
* grace period is respected before device freeing,
* we dont need to call synchronize_net() here.
*/
unregister_netdevice_queue(dev, head);
- netdev_upper_dev_unlink(real_dev, dev);
-
if (grp->nr_vlan_devs == 0) {
vlan_mvrp_uninit_applicant(real_dev);
vlan_gvrp_uninit_applicant(real_dev);
@@ -169,13 +169,13 @@ int register_vlan_dev(struct net_device *dev)
if (err < 0)
goto out_uninit_mvrp;
- err = netdev_upper_dev_link(real_dev, dev);
- if (err)
- goto out_uninit_mvrp;
-
err = register_netdevice(dev);
if (err < 0)
- goto out_upper_dev_unlink;
+ goto out_uninit_mvrp;
+
+ err = netdev_upper_dev_link(real_dev, dev);
+ if (err)
+ goto out_unregister_netdev;
/* Account for reference in struct vlan_dev_priv */
dev_hold(real_dev);
@@ -191,8 +191,8 @@ int register_vlan_dev(struct net_device *dev)
return 0;
-out_upper_dev_unlink:
- netdev_upper_dev_unlink(real_dev, dev);
+out_unregister_netdev:
+ unregister_netdevice(dev);
out_uninit_mvrp:
if (grp->nr_vlan_devs == 0)
vlan_mvrp_uninit_applicant(real_dev);