net: sched: introduce and use qdisc tree flush/purge helpers
authorPaolo Abeni <pabeni@redhat.com>
Thu, 28 Mar 2019 15:53:13 +0000 (16:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Apr 2019 21:50:13 +0000 (14:50 -0700)
commite5f0e8f8e456589d56e4955154ed5d468cd6d286
tree394e064316a0965588c3784a36a24fca3a7b352d
parent5dd431b6b92c0db324d134d2a4006dd4f87f2261
net: sched: introduce and use qdisc tree flush/purge helpers

The same code to flush qdisc tree and purge the qdisc queue
is duplicated in many places and in most cases it does not
respect NOLOCK qdisc: the global backlog len is used and the
per CPU values are ignored.

This change addresses the above, factoring-out the relevant
code and using the helpers introduced by the previous patch
to fetch the correct backlog len.

Fixes: c5ad119fb6c0 ("net: sched: pfifo_fast use skb_array")
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_cbq.c
net/sched/sch_drr.c
net/sched/sch_hfsc.c
net/sched/sch_htb.c
net/sched/sch_multiq.c
net/sched/sch_prio.c
net/sched/sch_qfq.c
net/sched/sch_red.c
net/sched/sch_sfb.c
net/sched/sch_tbf.c