Re: [PATCH net v2 2/2] net: net_test: add tests for netif_tx_stop_queue() trans_start

From: Paolo Abeni

Date: Thu Nov 26 2026 - 10:08:35 EST


On 11/19/26 15:16, Curtis McBurney wrote:
Add KUnit tests for the txq->trans_start handling of
netif_tx_stop_queue(), which dev_watchdog() uses to detect a stuck
queue:

- a stop on a running queue writes trans_start
- a stop on a queue already stopped by the driver keeps trans_start
- a stop after netif_tx_start_queue() writes trans_start again
- a stop on a queue stopped only by BQL (__QUEUE_STATE_STACK_XOFF)
writes trans_start

txq_stop_keeps_stamp_stopped_queue fails without the previous patch.

The tests run on a single thread and do not cover a wake that races
with a stop. The previous patch removes that race by construction: a
stop that finds the bit set writes neither trans_start nor the bit.

Tested on UML with CONFIG_KUNIT, CONFIG_NET and CONFIG_NET_TEST:

tools/testing/kunit/kunit.py run --kunitconfig=<cfg> 'net_core.txq_*'

Claude Code (Anthropic) wrote these tests and this changelog.

Signed-off-by: Curtis McBurney <cmcburney@xxxxxxxxxxxxxxxx>
Does not apply cleanly. Please rebase and repost.

/P