net_sched: sch_fq: fix incorrect behavior for small weights
Subsystems (3)
PATCH 1/1 net_sched: sch_fq: fix incorrect behavior for small weights
fq_dequeue() has a complex logic to find packets in one of the 3 bands.
As Neal found out, it is possible that one band has a deficit smaller than its weight. fq_dequeue() can return NULL while some packets are elligible for immediate transmit.
In this case, more than one iteration is needed to refill pband->credit.
With default parameters (weights 589824 196608 65536) bug can trigger if large BIG TCP packets are sent to the lowest priority band.
--- net/sched/sch_fq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/sched/sch_fq.c +3 -1
@@ -663,7 +663,9 @@ static struct sk_buff *fq_dequeue(struct Qdisc *sch) pband = &q->band_flows[q->band_nr]; pband->credit =min (pband->credit + pband->quantum, pband->quantum); - goto begin; +if (pband->credit >0 ) + goto begin; + retry =0 ; }if (q->time_next_delayed_flow != ~0ULL ) qdisc_watchdog_schedule_range_ns(&q->watchdog,
Signature · 1 line
2.46.0.295.g3b9ea8a38a-goog
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Sat, 24 Aug 2024 18:19:01 +0000 you wrote:
fq_dequeue()has a complex logic to find packets in one of the 3 bands.As Neal found out, it is possible that one band has a deficit smaller than its weight.
fq_dequeue()can return NULL while some packets are elligible for immediate transmit.In this case, more than one iteration is needed to refill
pband->credit.[...]
Here is the summary with links:
- [net] net_sched: sch_fq: fix incorrect behavior for small weights
https://git.kernel.org/netdev/net/c/bc21000e99f9
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html