Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH net 0/2] net/mlx5e: Fix channel stall on affinity change
@ 2026-12-02 11:02 Tariq Toukan
  2026-12-02 11:02 ` [PATCH net 1/2] net/mlx5e: RX, Drop ICOSQ padding NOPs on UMR allocation failure Tariq Toukan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tariq Toukan @ 2026-12-02 11:02 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	netdev, Paolo Abeni, Willem de Bruijn
  Cc: Aya Levin, Dragos Tatulea, Gal Pressman, Jiri Pirko,
	Jonathan Corbet, Josef Bacik, Leon Romanovsky, linux-doc,
	linux-rdma, Mark Bloch, Randy Dunlap, Saeed Mahameed,
	Saeed Mahameed, Shuah Khan, Simon Horman, Tariq Toukan,
	Tariq Toukan

Hi,

This series fixes a channel stall in mlx5e_napi_poll(), reported by
Josef Bacik with threaded NAPI [1].

When the poll has more work but runs on a CPU outside the IRQ's
affinity mask, it completes NAPI and re-arms the CQs, counting on the
arm to raise an event that reschedules NAPI on the right CPU. The
device raises no event when all the unconsumed CQEs were already
reported, and the channel stalls.

Patch 1 drops the ICOSQ padding NOPs when a UMR allocation fails. It
fixes a timeout in the ICOSQ recovery flow, and patch 2 relies on it.

Patch 2 fixes the stall: before the arm, it makes sure that an event is
still to come on the ICOSQ CQ, posting a NOP if needed.

Not handled here, left for net-next:
- Threaded NAPI still takes this path on every poll with more work
  outside the mask, paying a NOP and an interrupt each time, although
  the interrupt cannot move the poll thread. Josef's patch [1] skips
  the path there.
- With deferred hard IRQs, napi_complete_done() returns false after the
  NOP was posted, so the NOP is wasted and NAPI does not move either. A
  core helper that tells whether a poll follows the IRQ would cover
  both cases.

[1]
https://lore.kernel.org/all/20261021-b4-mlx5e-threaded-napi-stall-v1-1-d719c17b3ec4@toxicpanda.com/

Regards,
Tariq

Tariq Toukan (2):
  net/mlx5e: RX, Drop ICOSQ padding NOPs on UMR allocation failure
  net/mlx5e: Fix channel stall after NAPI moves to another CPU

 .../ethernet/mellanox/mlx5/counters.rst       |  7 ++--
 .../net/ethernet/mellanox/mlx5/core/en_rx.c   |  7 +++-
 .../net/ethernet/mellanox/mlx5/core/en_txrx.c | 39 +++++++++++++++----
 3 files changed, 41 insertions(+), 12 deletions(-)


base-commit: b6c8f45ed340f00bf2004d407cf7316fe3e24c48
-- 
2.44.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-12-02 11:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 11:02 [PATCH net 0/2] net/mlx5e: Fix channel stall on affinity change Tariq Toukan
2026-12-02 11:02 ` [PATCH net 1/2] net/mlx5e: RX, Drop ICOSQ padding NOPs on UMR allocation failure Tariq Toukan
2026-12-02 11:02 ` [PATCH net 2/2] net/mlx5e: Fix channel stall after NAPI moves to another CPU Tariq Toukan
2026-12-02 11:16 ` [PATCH net 0/2] net/mlx5e: Fix channel stall on affinity change sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox