aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_drr.c
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>2017-08-15 16:39:59 +0300
committerDavid S. Miller <davem@davemloft.net>2017-08-16 10:55:34 -0700
commit959466588aa7f84ccf79ae36a1d89542eaf9aaec (patch)
tree92eb64dfd551fdcf0b9e09b113fe59bc3f178557 /net/sched/sch_drr.c
parentMerge branch 'liquidio-adding-support-for-ethtool-set-channels-feature' (diff)
downloadlinux-dev-959466588aa7f84ccf79ae36a1d89542eaf9aaec.tar.xz
linux-dev-959466588aa7f84ccf79ae36a1d89542eaf9aaec.zip
net_sched: call qlen_notify only if child qdisc is empty
This callback is used for deactivating class in parent qdisc. This is cheaper to test queue length right here. Also this allows to catch draining screwed backlog and prevent second deactivation of already inactive parent class which will crash kernel for sure. Kernel with print warning at destruction of child qdisc where no packets but backlog is not zero. Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_drr.c')
-rw-r--r--net/sched/sch_drr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c
index a413dc1c2098..1d2f6235dfcf 100644
--- a/net/sched/sch_drr.c
+++ b/net/sched/sch_drr.c
@@ -246,8 +246,7 @@ static void drr_qlen_notify(struct Qdisc *csh, unsigned long arg)
{
struct drr_class *cl = (struct drr_class *)arg;
- if (cl->qdisc->q.qlen == 0)
- list_del(&cl->alist);
+ list_del(&cl->alist);
}
static int drr_dump_class(struct Qdisc *sch, unsigned long arg,