Patchwork [net-next-2.6] vlan: use this_cpu_ptr() in vlan_skb_recv()

login
register
mail settings
Submitter Eric Dumazet
Date Sept. 27, 2010, 8:47 a.m.
Message ID <1285577229.10965.3.camel@edumazet-laptop>
Download mbox | patch
Permalink /patch/65819/
State Accepted
Delegated to: David Miller
Headers show

Comments

Eric Dumazet - Sept. 27, 2010, 8:47 a.m.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 net/8021q/vlan_dev.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Sept. 28, 2010, 4:51 a.m.
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 27 Sep 2010 10:47:09 +0200

> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 94a1fed..f6fbcc0 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -177,8 +177,8 @@  int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
 	} else {
 		skb->dev = vlan_dev;
 
-		rx_stats = per_cpu_ptr(vlan_dev_info(skb->dev)->vlan_rx_stats,
-					smp_processor_id());
+		rx_stats = this_cpu_ptr(vlan_dev_info(skb->dev)->vlan_rx_stats);
+
 		u64_stats_update_begin(&rx_stats->syncp);
 		rx_stats->rx_packets++;
 		rx_stats->rx_bytes += skb->len;