OSDN Git Service

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)
commit9c01c9f1f2a3ddbddbf3b233cc6bfa86f5a59af0
tree4e19b6073b77bf2a028579253b1ea7206763e783
parent1f5e6fdd6aec7929e67afad1e42e35d894a119ae
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