net/sched: sch_cake: fix autorate reconfiguration throttling
Subsystems (4)
PATCH v3 1/1 net/sched: sch_cake: fix autorate reconfiguration throttling
CAKE's autorate-ingress path intends to limit shaper reconfiguration to once per 250 ms, but last_reconfig_time is only checked and never updated. Since the field stays zero, every qualifying capacity-estimate window can call cake_reconfigure(), causing avoidable rate churn and scheduler work under bursty traffic.
Store the current timestamp when autorate actually reconfigures the qdisc so the guard enforces the intended interval.
---
v3: resend via git send-email; v2 went out through a mail client that
mangled whitespace and does not apply
v2: spell out my full name in From/Signed-off-by (Paolo Abeni)
net/sched/sch_cake.c | 1 + 1 file changed, 1 insertion(+)
net/sched/sch_cake.c +1 -0
@@ -1907,6 +1907,7 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch, ktime_add_ms(q->last_reconfig_time, 250))) { q->config->rate_bps = (q->avg_peak_bandwidth *15 ) >>4 ; + q->last_reconfig_time = now;cake_reconfigure (sch); } }
base-commit: 24ef02f934eeb48830cff6b739abc3c62b1d107b
Signature · 1 line
2.54.0
Quoted 6 lines · Giuseppe Piscitelli
CAKE's autorate-ingress path intends to limit shaper reconfiguration to once per 250 ms, but
last_reconfig_timeis only checked and never updated. Since the field stays zero, every qualifying capacity-estimate window can callcake_reconfigure(), causing avoidable rate churn and scheduler work under bursty traffic.
Quoted 6 lines
Store the current timestamp when autorate actually reconfigures the qdisc so the guard enforces the intended interval.
Fixes 7298de9cd725 ("sch_cake: Add ingress mode")Assisted-by Codex:gpt-5.5Signed-off-by Giuseppe Piscitelli <[email protected]>
Please retain ACKs when reposting.
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 10 lines · On Thu, 20 Aug 2026 17:45:03 +0200 you wrote:
CAKE's autorate-ingress path intends to limit shaper reconfiguration to once per 250 ms, but
last_reconfig_timeis only checked and never updated. Since the field stays zero, every qualifying capacity-estimate window can callcake_reconfigure(), causing avoidable rate churn and scheduler work under bursty traffic.Store the current timestamp when autorate actually reconfigures the qdisc so the guard enforces the intended interval.
[...]
Here is the summary with links:
- [net,v3] net/sched: sch_cake: fix autorate reconfiguration throttling
https://git.kernel.org/netdev/net/c/7cbfb180945c
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html