mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> ---- 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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
7ef527377b
commit
dee42870a4
3 changed files with 20 additions and 25 deletions
|
|
@ -94,7 +94,7 @@ static inline int handle_dev_cpu_collision(struct sk_buff *skb,
|
|||
* Another cpu is holding lock, requeue & delay xmits for
|
||||
* some time.
|
||||
*/
|
||||
__get_cpu_var(netdev_rx_stat).cpu_collision++;
|
||||
__get_cpu_var(softnet_data).cpu_collision++;
|
||||
ret = dev_requeue_skb(skb, q);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue