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 2afe456 commit cb0160dCopy full SHA for cb0160d
net/sched/sch_hfsc.c
@@ -1647,10 +1647,16 @@ hfsc_dequeue(struct Qdisc *sch)
1647
if (cl->qdisc->q.qlen != 0) {
1648
/* update ed */
1649
next_len = qdisc_peek_len(cl->qdisc);
1650
- if (realtime)
1651
- update_ed(cl, next_len);
1652
- else
1653
- 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.
+ */
1654
+ if (cl->qdisc->q.qlen != 0) {
1655
+ if (realtime)
1656
+ update_ed(cl, next_len);
1657
+ else
1658
+ update_d(cl, next_len);
1659
+ }
1660
} else {
1661
/* the class becomes passive */
1662
eltree_remove(cl);
0 commit comments