Thread (3 messages) 3 messages, 2 authors, 1d ago

Re: [PATCH net-next V3] selftests: drv-net: Test queue stall upon reconfig

From: Mohsin Bashir <hidden>
Date: 2026-07-24 20:08:04
Also in: linux-kselftest


On 7/24/26 6:37 AM, Jakub Kicinski wrote:
On Thu, 23 Jul 2026 16:48:55 -0700 Mohsin Bashir wrote:
quoted
Add a reconfig_tx_stall test that detects the possibility of a TX stall
after ring reconfiguration. The key observation is that drivers using
netif_tx_start_all_queues() are prone to experiencing a stall when
reconfiguration completes compared to drivers using
netif_tx_wake_all_queues(). start_all_queues only clears DRV_XOFF, while
wake_all_queues also calls __netif_schedule() to kick the qdisc. Without
the kick, qdisc backlog present at reconfig time can stay stuck until a
new trigger is issued.
AI CI says:

The new `reconfig_tx_stall` test introduced by this patch is failing in
the NIPA CI on the netdevsim-based test environment (both regular and
debug kernels):

   not ok 3 ring_reconfig.reconfig_tx_stall

   Exception|   File ".../ring_reconfig.py", line 331, in reconfig_tx_stall
   Exception|     raise KsftFailEx("failed to build qdisc backlog")

The failure is a precondition failure — the test sends three bursts of
128 SO_TXTIME packets at +100ms, +200ms, and +500ms delays and after each
burst checks whether a qdisc backlog has formed on the target TX queue.
No backlog appears after any of the three attempts.

The test never reaches the actual ring-reconfig assertion; it fails
because the required qdisc backlog cannot be built on netdevsim under CI
conditions. This is likely because netdevsim drains its TX rings
(and/or releases SO_TXTIME packets) fast enough that no backlog
accumulates within the allotted windows, even with napi_defer_hard_irqs
set to 100 and the ring capped at 64 entries.

The other two sub-tests (ring_reconfig.channels and
ring_reconfig.ringparam) continue to pass.

Could you look into why the backlog-building phase does not work on
netdevsim? Possible approaches:
  - Add a check/xfail if the backlog cannot be built after N attempts,
    converting it from a hard failure to a xfail on virtual drivers
    (prefer xfail over skip)
Yeah, looks like netdevsim is not providing back-pressure on the TX 
path. I will change the fail to xfail in V4.
  - Adjust the parameters (ring size, packet count, delay) so the
    condition is more reliably triggered
  - Mark the test as requiring a real NIC (nsim_test=False) if the
    technique fundamentally doesn't work on virtual devices
    and move it to the hw/ directory

https://netdev-ctrl.bots.linux.dev/logview.html?f=/logs/vmksft/net-drv/results/747522/8-ring-reconfig-py/stdout
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help