We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18afa2a commit 110406cCopy full SHA for 110406c
net/sched/sch_hfsc.c
@@ -1648,10 +1648,16 @@ hfsc_dequeue(struct Qdisc *sch)
1648
if (cl->qdisc->q.qlen != 0) {
1649
/* update ed */
1650
next_len = qdisc_peek_len(cl->qdisc);
1651
- if (realtime)
1652
- update_ed(cl, next_len);
1653
- else
1654
- update_d(cl, next_len);
+ /* Check queue length again since some qdisc implementations
+ * (e.g., netem/codel) might empty the queue during the peek
+ * operation.
+ */
1655
+ if (cl->qdisc->q.qlen != 0) {
1656
+ if (realtime)
1657
+ update_ed(cl, next_len);
1658
+ else
1659
+ update_d(cl, next_len);
1660
+ }
1661
} else {
1662
/* the class becomes passive */
1663
eltree_remove(cl);
0 commit comments