From: Tariq Toukan <tariqt@nvidia.com>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, <netdev@vger.kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Willem de Bruijn <willemb@google.com>
Cc: Aya Levin <ayal@mellanox.com>,
Dragos Tatulea <dtatulea@nvidia.com>,
"Gal Pressman" <gal@nvidia.com>, Jiri Pirko <jiri@resnulli.us>,
Jonathan Corbet <corbet@lwn.net>,
Josef Bacik <josef@toxicpanda.com>,
Leon Romanovsky <leon@kernel.org>, <linux-doc@vger.kernel.org>,
<linux-rdma@vger.kernel.org>, Mark Bloch <mbloch@nvidia.com>,
Randy Dunlap <rdunlap@infradead.org>,
"Saeed Mahameed" <saeedm@mellanox.com>,
Saeed Mahameed <saeedm@nvidia.com>,
"Shuah Khan" <skhan@linuxfoundation.org>,
Simon Horman <horms@kernel.org>,
"Tariq Toukan" <tariqt@mellanox.com>,
Tariq Toukan <tariqt@nvidia.com>
Subject: [PATCH net 0/2] net/mlx5e: Fix channel stall on affinity change
Date: Wed, 2 Dec 2026 13:02:05 +0200 [thread overview]
Message-ID: <20261202110207.3387859-1-tariqt@nvidia.com> (raw)
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
next reply other threads:[~2026-12-02 11:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 11:02 Tariq Toukan [this message]
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
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=20261202110207.3387859-1-tariqt@nvidia.com \
--to=tariqt@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=ayal@mellanox.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=edumazet@kernel.org \
--cc=gal@nvidia.com \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=josef@toxicpanda.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
--cc=saeedm@mellanox.com \
--cc=saeedm@nvidia.com \
--cc=skhan@linuxfoundation.org \
--cc=tariqt@mellanox.com \
--cc=willemb@google.com \
/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