]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: always do stats accounting according to TCQ_F_CPUSTATS
authorPaolo Abeni <pabeni@redhat.com>
Wed, 10 Apr 2019 12:32:39 +0000 (14:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Apr 2019 19:20:46 +0000 (12:20 -0700)
commitf7dc4b45b015cab5c40b7a9bad0a79458e363e80
tree4e19b6073b77bf2a028579253b1ea7206763e783
parentff0c88307ea9dc03319c5c8538fe7296c7c19fbd
net: sched: always do stats accounting according to TCQ_F_CPUSTATS

The core sched implementation checks independently for NOLOCK flag
to acquire/release the root spin lock and for qdisc_is_percpu_stats()
to account per CPU values in many places.

This change update the last few places checking the TCQ_F_NOLOCK to
do per CPU stats accounting according to qdisc_is_percpu_stats()
value.

The above allows to clean dev_requeue_skb() implementation a bit
and makes stats update always consistent with a single flag.

v1 -> v2:
 - do not move qdisc_is_empty definition, fix build issue

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sch_generic.h
net/sched/sch_generic.c