Re: [PATCH net 0/2] net: keep txq->trans_start on repeated netif_tx_stop_queue()
From: Xia Yan
Date: Mon Nov 16 2026 - 22:11:50 EST
On 11/16/26 09:37, Curtis McBurney wrote:
> 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.
Each of the four drivers re-arms its hang check from a two-second
watchdog task and stops the queue again while the hang persists,
without waking it: e1000 and e1000e via netif_stop_queue() from
e1000_clean_tx_irq() and e1000_print_hw_hang(), igb and igc via
netif_stop_subqueue(). All four set watchdog_timeo to 5 seconds, so
with the unconditional write each repeat stop moves trans_start
another two seconds forward and dev_watchdog() never reaches
trans_start + watchdog_timeo.
The ordering of 95ecba62e2fd survives the gate: the WRITE_ONCE still
precedes the barrier and the set_bit(), and both of those remain
unconditional. A queue stopped only by BQL still gets a stamp, since
the gate tests DRV_XOFF alone. That case is the last of the KUnit
tests.
Reviewed-by: Xia Yan <yanxia@xxxxxxxxxxxxxxxxxxxx>