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 f7be39e commit cdbe8faCopy full SHA for cdbe8fa
net/sched/sch_hfsc.c
@@ -1633,10 +1633,16 @@ hfsc_dequeue(struct Qdisc *sch)
1633
if (cl->qdisc->q.qlen != 0) {
1634
/* update ed */
1635
next_len = qdisc_peek_len(cl->qdisc);
1636
- if (realtime)
1637
- update_ed(cl, next_len);
1638
- else
1639
- 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.
+ */
1640
+ if (cl->qdisc->q.qlen != 0) {
1641
+ if (realtime)
1642
+ update_ed(cl, next_len);
1643
+ else
1644
+ update_d(cl, next_len);
1645
+ }
1646
} else {
1647
/* the class becomes passive */
1648
eltree_remove(cl);
0 commit comments