Skip to contentSkip to conversation

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

PATCH Applied Eric Dumazet 3 participants 3 messages Oct 20, 2023 – Oct 23, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 29f834aa326e ("net_sched: sch_fq: add 3 bands and WRR scheduling")
Cc Willem de Bruijn <[email protected]>
Cc Soheil Hassas Yeganeh <[email protected]>
Cc Dave Taht <[email protected]>
Cc Toke Høiland-Jørgensen <[email protected]>
---
 net/sched/sch_fq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/sched/sch_fq.c +1 -1
index 8eacdb54e72f4412af1834bfdb2c387d41516349..f6fd0de293e583ad6ba505060ce12c74f349a1a2 100644
@@ -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];
Signature · 1 line
2.42.0.655.g421f12c284-goog
Tested-by on v1 1/1
#1 lore raw
Quoted 4 lines · Eric Dumazet

A last minute change went wrong.

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

Quoted 8 lines
Fixes 29f834aa326e ("net_sched: sch_fq: add 3 bands and WRR scheduling")
Cc Willem de Bruijn <[email protected]>
Cc Soheil Hassas Yeganeh <[email protected]>
Cc Dave Taht <[email protected]>
Cc Toke Høiland-Jørgensen <[email protected]>
#2 lore raw
In reply to Eric Dumazet
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 13 lines · On Fri, 20 Oct 2023 20:00:53 +0000 you wrote:

A last minute change went wrong.

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

Fixes 29f834aa326e ("net_sched: sch_fq: add 3 bands and WRR scheduling")
Cc Willem de Bruijn <[email protected]>
Cc Soheil Hassas Yeganeh <[email protected]>
Cc Dave Taht <[email protected]>
Cc Toke Høiland-Jørgensen <[email protected]>
Quoted 1 line

[...]

Here is the summary with links:
- [net-next] net_sched: sch_fq: fix off-by-one error in fq_dequeue()

    https://git.kernel.org/netdev/net-next/c/06e4dd18f868

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html