diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-11-10 23:42:00 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-16 11:15:08 -0800 |
commit | 4af429d29b341bb1735f04c2fb960178ed5d52e7 (patch) | |
tree | b5179224883dc56cde57058014480e4bcf22b75b /net/8021q/vlan_core.c | |
parent | 8ffab51b3dfc54876f145f15b351c41f3f703195 (diff) | |
download | linux-4af429d29b341bb1735f04c2fb960178ed5d52e7.tar.gz linux-4af429d29b341bb1735f04c2fb960178ed5d52e7.tar.bz2 linux-4af429d29b341bb1735f04c2fb960178ed5d52e7.zip |
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_core.c')
-rw-r--r-- | net/8021q/vlan_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c index 69b2f79800a5..ce8e3ab3e7a5 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c @@ -9,7 +9,7 @@ bool vlan_hwaccel_do_receive(struct sk_buff **skbp) struct sk_buff *skb = *skbp; u16 vlan_id = skb->vlan_tci & VLAN_VID_MASK; struct net_device *vlan_dev; - struct vlan_rx_stats *rx_stats; + struct vlan_pcpu_stats *rx_stats; vlan_dev = vlan_find_dev(skb->dev, vlan_id); if (!vlan_dev) { @@ -26,7 +26,7 @@ bool vlan_hwaccel_do_receive(struct sk_buff **skbp) skb->priority = vlan_get_ingress_priority(vlan_dev, skb->vlan_tci); skb->vlan_tci = 0; - rx_stats = this_cpu_ptr(vlan_dev_info(vlan_dev)->vlan_rx_stats); + rx_stats = this_cpu_ptr(vlan_dev_info(vlan_dev)->vlan_pcpu_stats); u64_stats_update_begin(&rx_stats->syncp); rx_stats->rx_packets++; |