diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-11-10 23:42:00 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-16 19:15:08 (GMT) |
commit | 4af429d29b341bb1735f04c2fb960178ed5d52e7 (patch) | |
tree | b5179224883dc56cde57058014480e4bcf22b75b /net/8021q/vlan.c | |
parent | 8ffab51b3dfc54876f145f15b351c41f3f703195 (diff) | |
download | linux-4af429d29b341bb1735f04c2fb960178ed5d52e7.tar.xz |
vlan: lockless transmit path
vlan is a stacked device, like tunnels. We should use the lockless
mechanism we are using in tunnels and loopback.
This patch completely removes locking in TX path.
tx stat counters are added into existing percpu stat structure, renamed
from vlan_rx_stats to vlan_pcpu_stats.
Note : this partially reverts commit 2e59af3dcbdf (vlan: multiqueue vlan
device)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q/vlan.c')
-rw-r--r-- | net/8021q/vlan.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 55d2135..dc10713 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -272,13 +272,11 @@ static int register_vlan_device(struct net_device *real_dev, u16 vlan_id) snprintf(name, IFNAMSIZ, "vlan%.4i", vlan_id); } - new_dev = alloc_netdev_mq(sizeof(struct vlan_dev_info), name, - vlan_setup, real_dev->num_tx_queues); + new_dev = alloc_netdev(sizeof(struct vlan_dev_info), name, vlan_setup); if (new_dev == NULL) return -ENOBUFS; - netif_copy_real_num_queues(new_dev, real_dev); dev_net_set(new_dev, net); /* need 4 bytes for extra VLAN header info, * hope the underlying device can handle it. |