Commit 06e4dd18 authored by Eric Dumazet's avatar Eric Dumazet Committed by Jakub Kicinski

net_sched: sch_fq: fix off-by-one error in fq_dequeue()

A last minute change went wrong.

We need to look for a packet in all 3 bands, not only two.

Fixes: 29f834aa ("net_sched: sch_fq: add 3 bands and WRR scheduling")
Reported-by: default avatarkernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202310201422.a22b0999-oliver.sang@intel.comSigned-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Soheil Hassas Yeganeh <soheil@google.com>
Cc: Dave Taht <dave.taht@gmail.com>
Cc: Toke Høiland-Jørgensen <toke@redhat.com>
Tested-by: default avatarWillem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20231020200053.675951-1-edumazet@google.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent d6e48462
......@@ -651,7 +651,7 @@ static struct sk_buff *fq_dequeue(struct Qdisc *sch)
begin:
head = fq_pband_head_select(pband);
if (!head) {
while (++retry < FQ_BANDS) {
while (++retry <= FQ_BANDS) {
if (++q->band_nr == FQ_BANDS)
q->band_nr = 0;
pband = &q->band_flows[q->band_nr];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment