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>
This commit is contained in:

committed by
David S. Miller

parent
869cec99b4
commit
959466588a
@@ -1428,8 +1428,7 @@ static void qfq_qlen_notify(struct Qdisc *sch, unsigned long arg)
|
||||
struct qfq_sched *q = qdisc_priv(sch);
|
||||
struct qfq_class *cl = (struct qfq_class *)arg;
|
||||
|
||||
if (cl->qdisc->q.qlen == 0)
|
||||
qfq_deactivate_class(q, cl);
|
||||
qfq_deactivate_class(q, cl);
|
||||
}
|
||||
|
||||
static int qfq_init_qdisc(struct Qdisc *sch, struct nlattr *opt)
|
||||
|
Reference in New Issue
Block a user