Re: [PATCH] net/sched: codel: refresh CAN_BYPASS when limit changes

From: Eric Dumazet

Date: Tue Jun 09 2026 - 23:29:20 EST


On Mon, Jun 8, 2026 at 5:12 PM Samuel Moelius
<sam.moelius@xxxxxxxxxxxxxxx> wrote:
>
> sch_codel and sch_fq_codel update their packet limit without refreshing
> the queue bypass state. Changing the limit to zero can leave CAN_BYPASS
> set from the previous configuration.
>
> The enqueue path can then bypass limit enforcement even though the new
> limit should prevent queued packets.
>
> Recompute the bypass flag whenever the configured limit changes.
>
> Assisted-by: Codex:gpt-5.5-cyber-preview
> Signed-off-by: Samuel Moelius <sam.moelius@xxxxxxxxxxxxxxx>
> ---

We can't change sch->flags in a change() method even under qdisc
spinlock, look at __dev_xmit_skb() which reads q->flags locklessly.

pw-bot: cr