Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Mohsin Bashir <mohsin.bashr@gmail.com>
Cc: netdev@vger.kernel.org, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	shuah@kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next V3] selftests: drv-net: Test queue stall upon reconfig
Date: Fri, 24 Jul 2026 06:37:44 -0700	[thread overview]
Message-ID: <20260724063744.7d0478da@kernel.org> (raw)
In-Reply-To: <20260723234857.2880270-1-mohsin.bashr@gmail.com>

On Thu, 23 Jul 2026 16:48:55 -0700 Mohsin Bashir wrote:
> 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)
 - 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

  reply	other threads:[~2026-07-24 13:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23 23:48 [PATCH net-next V3] selftests: drv-net: Test queue stall upon reconfig Mohsin Bashir
2026-07-24 13:37 ` Jakub Kicinski [this message]
2026-07-24 20:08   ` Mohsin Bashir

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260724063744.7d0478da@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mohsin.bashr@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox