net/mlx5e: Fix channel stall on affinity change
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | net/mlx5e: RX, Drop ICOSQ padding NOPs on UMR allocation failuredrivers/ | +6 | 0 replies | |
| 2/2 | net/mlx5e: Fix channel stall after NAPI moves to another CPUDocumentation/ drivers/ | +35 | 0 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Dragos Tatulea |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net 0/2] net/mlx5e: Fix channel stall on affinity change
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
Signature · 1 line
2.44.0