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

From: Samuel Moelius

Date: Wed Jun 10 2026 - 15:04:02 EST


On Tue, Jun 9, 2026 at 11:28 PM Eric Dumazet <edumazet@xxxxxxxxxx> wrote:
>
> 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

I am getting ready to travel and I will address this when I return in
about two weeks. Thank you for understanding.