Re: [PATCH net 1/2] net: keep txq->trans_start on repeated netif_tx_stop_queue()

From: Curtis McBurney

Date: Thu Nov 19 2026 - 09:02:40 EST


On Thu, 19 Nov 2026 05:38:22 +0000, Sashiko AI review wrote:
> [Severity: Medium]
> Can this leave a newly stopped queue with a stale trans_start, and lead to
> a spurious "NETDEV WATCHDOG" timeout?

Yes. If netif_tx_wake_queue() clears DRV_XOFF between the test_bit()
and the set_bit(), the set_bit() stops the queue again with the
trans_start of the earlier stop. e1000e calls netif_stop_queue() from
the print_hang_task work item, so the caller can be preempted between
the two and the window has no bound. The sentence in the changelog that
a timeout is reported only if both stops together last longer than
watchdog_timeo is wrong.

v2 returns early when DRV_XOFF is already set, so such a stop writes
neither trans_start nor the bit. A racing wake then leaves the queue
running, as if it came after the stop, and the next stop writes a new
trans_start. netif_tx_stop_queue() is the only place that sets
DRV_XOFF, so every 0 to 1 transition of the bit follows a trans_start
write by the same caller. The early return issues smp_mb() to keep the
full barrier that netif_txq_try_stop() expects after the stop.

> [Severity: Low]
> Is this comment accurate?

No. v2 replaces the comment, and says "repeated" instead of
"recursive".

pw-bot: cr