mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net 0/2] net: keep txq->trans_start on repeated netif_tx_stop_queue()
@ 2026-11-16 14:37 Curtis McBurney
  2026-11-16 14:37 ` [PATCH net 1/2] " Curtis McBurney
  2026-11-16 14:37 ` [PATCH net 2/2] net: net_test: add tests for netif_tx_stop_queue() trans_start Curtis McBurney
  0 siblings, 2 replies; 3+ messages in thread
From: Curtis McBurney @ 2026-11-16 14:37 UTC (permalink / raw)
  To: netdev
  Cc: davem, edumazet, kuba, pabeni, horms, andrew+netdev, willemb,
	toke, linux-kernel, Curtis McBurney

Since commit 95ecba62e2fd ("net: fix races in
netdev_tx_sent_queue()/dev_watchdog()"), every netif_tx_stop_queue()
call writes txq->trans_start, also on a queue that is already stopped.
Drivers whose Tx hang check stops the queue again on each run (e1000,
e1000e, igb, igc) keep moving trans_start forward, dev_watchdog() never
times out, and the hung adapter is never reset.

Patch 1 writes trans_start only when the driver stops a running queue,
before set_bit() as in 95ecba62e2fd. Patch 2 adds KUnit tests for the
four cases; one of them fails without patch 1.

The issue was observed on a system in real use. I reproduced it and
tested the fix on an AlmaLinux 10 kernel (6.12.0-211.68.1.el10_2) with
e1000 on a VMware-emulated 82545EM, using a test-only module parameter
that forces the e1000 hang check to fire. Patch 1 has the details. The
KUnit tests ran on UML on the net tree.

I wrote the fix. Claude Code (Anthropic) reviewed it, wrote the KUnit
tests, the e1000 reproducer and the changelogs.

Curtis McBurney (2):
  net: keep txq->trans_start on repeated netif_tx_stop_queue()
  net: net_test: add tests for netif_tx_stop_queue() trans_start

 include/linux/netdevice.h |  11 +++-
 net/core/net_test.c       | 112 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 121 insertions(+), 2 deletions(-)


base-commit: aa40afa831ebfe45e40a23721711059f2ac584d4
-- 
2.52.0


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

end of thread, other threads:[~2026-11-16 14:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-16 14:37 [PATCH net 0/2] net: keep txq->trans_start on repeated netif_tx_stop_queue() Curtis McBurney
2026-11-16 14:37 ` [PATCH net 1/2] " Curtis McBurney
2026-11-16 14:37 ` [PATCH net 2/2] net: net_test: add tests for netif_tx_stop_queue() trans_start Curtis McBurney

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

all inboxes | Powered by JetHome®