aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorChangli Gao <xiaosuo@gmail.com>2010-05-02 01:42:16 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-03 01:26:57 -0400
commitdee42870a423ad485129f43cddfe7275479f11d8 (patch)
treee30433d3b55ee248eb672765fe6705be160d882c /net/sched
parent7ef527377b88ff05fb122a47619ea506c631c914 (diff)
net: fix softnet_stat
Per cpu variable softnet_data.total was shared between IRQ and SoftIRQ context without any protection. And enqueue_to_backlog should update the netdev_rx_stat of the target CPU. This patch renames softnet_data.total to softnet_data.processed: the number of packets processed in uppper levels(IP stacks). softnet_stat data is moved into softnet_data. Signed-off-by: Changli Gao <xiaosuo@gmail.com> ---- include/linux/netdevice.h | 17 +++++++---------- net/core/dev.c | 26 ++++++++++++-------------- net/sched/sch_generic.c | 2 +- 3 files changed, 20 insertions(+), 25 deletions(-) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_generic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index aeddabfb8e4e..a969b111bd76 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -94,7 +94,7 @@ static inline int handle_dev_cpu_collision(struct sk_buff *skb,
94 * Another cpu is holding lock, requeue & delay xmits for 94 * Another cpu is holding lock, requeue & delay xmits for
95 * some time. 95 * some time.
96 */ 96 */
97 __get_cpu_var(netdev_rx_stat).cpu_collision++; 97 __get_cpu_var(softnet_data).cpu_collision++;
98 ret = dev_requeue_skb(skb, q); 98 ret = dev_requeue_skb(skb, q);
99 } 99 }
100 100