public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net_sched: sch_fq: clear q->band_pkt_count[] in fq_reset()
@ 2026-03-04  1:56 Eric Dumazet
  2026-03-04  2:09 ` Neal Cardwell
  2026-03-05  2:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Dumazet @ 2026-03-04  1:56 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, Jamal Hadi Salim, Jiri Pirko, netdev, eric.dumazet,
	Eric Dumazet, Praveen Kaligineedi, Willem de Bruijn

When/if a NIC resets, queues are deactivated by dev_deactivate_many(),
then reactivated when the reset operation completes.

fq_reset() removes all the skbs from various queues.

If we do not clear q->band_pkt_count[], these counters keep growing
and can eventually reach sch->limit, preventing new packets to be queued.

Many thanks to Praveen for discovering the root cause.

Fixes: 29f834aa326e ("net_sched: sch_fq: add 3 bands and WRR scheduling")
Diagnosed-by: Praveen Kaligineedi <pkaligineedi@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
---
 net/sched/sch_fq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c
index 80235e85f8440ee83032f171cf28df6f161473db..05084c9af48e1c7254a695b30293806a8ac78632 100644
--- a/net/sched/sch_fq.c
+++ b/net/sched/sch_fq.c
@@ -827,6 +827,7 @@ static void fq_reset(struct Qdisc *sch)
 	for (idx = 0; idx < FQ_BANDS; idx++) {
 		q->band_flows[idx].new_flows.first = NULL;
 		q->band_flows[idx].old_flows.first = NULL;
+		q->band_pkt_count[idx] = 0;
 	}
 	q->delayed		= RB_ROOT;
 	q->flows		= 0;
-- 
2.53.0.473.g4a7958ca14-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net] net_sched: sch_fq: clear q->band_pkt_count[] in fq_reset()
  2026-03-04  1:56 [PATCH net] net_sched: sch_fq: clear q->band_pkt_count[] in fq_reset() Eric Dumazet
@ 2026-03-04  2:09 ` Neal Cardwell
  2026-03-04  2:26   ` Willem de Bruijn
  2026-03-05  2:20 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Neal Cardwell @ 2026-03-04  2:09 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: David S . Miller, Jakub Kicinski, Paolo Abeni, Simon Horman,
	Jamal Hadi Salim, Jiri Pirko, netdev, eric.dumazet,
	Praveen Kaligineedi, Willem de Bruijn

On Tue, Mar 3, 2026 at 5:56 PM Eric Dumazet <edumazet@google.com> wrote:
>
> When/if a NIC resets, queues are deactivated by dev_deactivate_many(),
> then reactivated when the reset operation completes.
>
> fq_reset() removes all the skbs from various queues.
>
> If we do not clear q->band_pkt_count[], these counters keep growing
> and can eventually reach sch->limit, preventing new packets to be queued.
>
> Many thanks to Praveen for discovering the root cause.
>
> Fixes: 29f834aa326e ("net_sched: sch_fq: add 3 bands and WRR scheduling")
> Diagnosed-by: Praveen Kaligineedi <pkaligineedi@google.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Willem de Bruijn <willemb@google.com>
> ---

Reviewed-by: Neal Cardwell <ncardwell@google.com>

Thanks, Eric and Praveen!

neal

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net] net_sched: sch_fq: clear q->band_pkt_count[] in fq_reset()
  2026-03-04  2:09 ` Neal Cardwell
@ 2026-03-04  2:26   ` Willem de Bruijn
  0 siblings, 0 replies; 4+ messages in thread
From: Willem de Bruijn @ 2026-03-04  2:26 UTC (permalink / raw)
  To: Neal Cardwell, Eric Dumazet
  Cc: David S . Miller, Jakub Kicinski, Paolo Abeni, Simon Horman,
	Jamal Hadi Salim, Jiri Pirko, netdev, eric.dumazet,
	Praveen Kaligineedi, Willem de Bruijn

Neal Cardwell wrote:
> On Tue, Mar 3, 2026 at 5:56 PM Eric Dumazet <edumazet@google.com> wrote:
> >
> > When/if a NIC resets, queues are deactivated by dev_deactivate_many(),
> > then reactivated when the reset operation completes.
> >
> > fq_reset() removes all the skbs from various queues.
> >
> > If we do not clear q->band_pkt_count[], these counters keep growing
> > and can eventually reach sch->limit, preventing new packets to be queued.
> >
> > Many thanks to Praveen for discovering the root cause.
> >
> > Fixes: 29f834aa326e ("net_sched: sch_fq: add 3 bands and WRR scheduling")
> > Diagnosed-by: Praveen Kaligineedi <pkaligineedi@google.com>
> > Signed-off-by: Eric Dumazet <edumazet@google.com>
> > Cc: Willem de Bruijn <willemb@google.com>
> > ---
> 
> Reviewed-by: Neal Cardwell <ncardwell@google.com>

Reviewed-by: Willem de Bruijn <willemb@google.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net] net_sched: sch_fq: clear q->band_pkt_count[] in fq_reset()
  2026-03-04  1:56 [PATCH net] net_sched: sch_fq: clear q->band_pkt_count[] in fq_reset() Eric Dumazet
  2026-03-04  2:09 ` Neal Cardwell
@ 2026-03-05  2:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-05  2:20 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: davem, kuba, pabeni, horms, jhs, jiri, netdev, eric.dumazet,
	pkaligineedi, willemb

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed,  4 Mar 2026 01:56:40 +0000 you wrote:
> When/if a NIC resets, queues are deactivated by dev_deactivate_many(),
> then reactivated when the reset operation completes.
> 
> fq_reset() removes all the skbs from various queues.
> 
> If we do not clear q->band_pkt_count[], these counters keep growing
> and can eventually reach sch->limit, preventing new packets to be queued.
> 
> [...]

Here is the summary with links:
  - [net] net_sched: sch_fq: clear q->band_pkt_count[] in fq_reset()
    https://git.kernel.org/netdev/net/c/a4c2b8be2e53

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-05  2:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04  1:56 [PATCH net] net_sched: sch_fq: clear q->band_pkt_count[] in fq_reset() Eric Dumazet
2026-03-04  2:09 ` Neal Cardwell
2026-03-04  2:26   ` Willem de Bruijn
2026-03-05  2:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox