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 3df275e commit 6ccbda4Copy full SHA for 6ccbda4
net/sched/sch_hfsc.c
@@ -1641,10 +1641,16 @@ hfsc_dequeue(struct Qdisc *sch)
1641
if (cl->qdisc->q.qlen != 0) {
1642
/* update ed */
1643
next_len = qdisc_peek_len(cl->qdisc);
1644
- if (realtime)
1645
- update_ed(cl, next_len);
1646
- else
1647
- 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.
+ */
1648
+ if (cl->qdisc->q.qlen != 0) {
1649
+ if (realtime)
1650
+ update_ed(cl, next_len);
1651
+ else
1652
+ update_d(cl, next_len);
1653
+ }
1654
} else {
1655
/* the class becomes passive */
1656
eltree_remove(cl);
0 commit comments