net: fix softnet_stat
authorChangli Gao <xiaosuo@gmail.com>
Sun, 2 May 2010 05:42:16 +0000 (05:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 May 2010 05:26:57 +0000 (22:26 -0700)
commitdee42870a423ad485129f43cddfe7275479f11d8
treee30433d3b55ee248eb672765fe6705be160d882c
parent7ef527377b88ff05fb122a47619ea506c631c914
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>
include/linux/netdevice.h
net/core/dev.c
net/sched/sch_generic.c