aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/sched/sch_fq_codel.c
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2025-04-03 14:16:31 -0700
committerPaolo Abeni <pabeni@redhat.com>2025-04-08 10:57:56 +0200
commit342debc12183b51773b3345ba267e9263bdfaaef (patch)
tree38252179638d18fb43c74823dab589f83b810b11 /net/sched/sch_fq_codel.c
parentsch_ets: make est_qlen_notify() idempotent (diff)
downloadwireguard-linux-342debc12183b51773b3345ba267e9263bdfaaef.tar.xz
wireguard-linux-342debc12183b51773b3345ba267e9263bdfaaef.zip
codel: remove sch->q.qlen check before qdisc_tree_reduce_backlog()
After making all ->qlen_notify() callbacks idempotent, now it is safe to remove the check of qlen!=0 from both fq_codel_dequeue() and codel_qdisc_dequeue(). Reported-by: Gerrard Tai <gerrard.tai@starlabs.sg> Fixes: 4b549a2ef4be ("fq_codel: Fair Queue Codel AQM") Fixes: 76e3cc126bb2 ("codel: Controlled Delay AQM") Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250403211636.166257-1-xiyou.wangcong@gmail.com Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/sched/sch_fq_codel.c')
-rw-r--r--net/sched/sch_fq_codel.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
index 799f5397ad4c..6c9029f71e88 100644
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
@@ -315,10 +315,8 @@ begin:
}
qdisc_bstats_update(sch, skb);
flow->deficit -= qdisc_pkt_len(skb);
- /* We cant call qdisc_tree_reduce_backlog() if our qlen is 0,
- * or HTB crashes. Defer it for next round.
- */
- if (q->cstats.drop_count && sch->q.qlen) {
+
+ if (q->cstats.drop_count) {
qdisc_tree_reduce_backlog(sch, q->cstats.drop_count,
q->cstats.drop_len);
q->cstats.drop_count = 0;