From: Jerome Tollet <jtollet@cisco.com>
To: netdev@vger.kernel.org
Cc: saeedm@nvidia.com, tariqt@nvidia.com, mbloch@nvidia.com,
leonro@nvidia.com, dtatulea@nvidia.com, daniel@iogearbox.net,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, ast@kernel.org,
hawk@kernel.org, john.fastabend@gmail.com, sdf@fomichev.me,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org, Jerome Tollet <jtollet@cisco.com>
Subject: [PATCH net v4 0/2] net/mlx5e: Prevent stale XSK buffer release on refill retries
Date: Mon, 24 Aug 2026 16:16:43 +0200 [thread overview]
Message-ID: <20260824141645.23700-1-jtollet@cisco.com> (raw)
In-Reply-To: <cover.1787347981.git.jtollet@cisco.com>
Prevent duplicate XSK buffer release when a deferred RX refill fails and
the same WQE is retried.
Patch 1 fixes legacy cyclic RQ. It is unchanged from v3 and retains
Dragos' Reviewed-by tag.
Patch 2 fixes the analogous striding-RQ MPWQE path. Following Dragos'
review, it now fills skip_release_bitmap in the common error path of
mlx5e_xsk_alloc_rx_mpwqe(), consistently with mlx5e_alloc_rx_mpwqe().
Targeted fault injection covered both an early allocation failure and a
partial 8-of-16-buffer unwind. With three consecutive failures for one
MPWQE, the original 16 XSK buffers were released only once, retries saw a
full bitmap, and a later successful allocation cleared it. A clean
20-second AF_XDP zero-copy pressure run exercised 1,575,262 buffer
allocation failures without invalid descriptors, WQE errors, or kernel
warnings.
Changes in v4:
- Keep patch 1 unchanged.
- Move the MPWQE bitmap update from the release loop to the common XSK
allocator error path, as suggested by Dragos.
- Validate both early and partial allocation failures and run an
additional zero-copy pressure test.
v3: https://lore.kernel.org/netdev/cover.1787347981.git.jtollet@cisco.com/
Jerome Tollet (2):
net/mlx5e: Prevent stale XSK buffer release on refill retry
net/mlx5e: Prevent stale XSK buffer release on MPWQE refill retry
drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c | 2 ++
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 7 +++++--
2 files changed, 7 insertions(+), 2 deletions(-)
base-commit: 4e15e89faac9f308baeb01f46c13a051814d2449
--
2.55.0
next prev parent reply other threads:[~2026-08-24 14:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 15:15 [PATCH net v2] net/mlx5e: Prevent stale XSK buffer release on refill retry Jerome Tollet
2026-08-21 21:37 ` [PATCH net v3 0/2] net/mlx5e: Prevent stale XSK buffer release on refill retries Jerome Tollet
2026-08-21 21:37 ` [PATCH net v3 1/2] net/mlx5e: Prevent stale XSK buffer release on refill retry Jerome Tollet
2026-08-21 21:37 ` [PATCH net v3 2/2] net/mlx5e: Prevent stale XSK buffer release on MPWQE " Jerome Tollet
2026-08-24 10:48 ` Dragos Tatulea
2026-08-24 14:09 ` Jerome Tollet
2026-08-24 17:42 ` Dragos Tatulea
2026-08-24 14:16 ` Jerome Tollet [this message]
2026-08-24 14:16 ` [PATCH net v4 1/2] net/mlx5e: Prevent stale XSK buffer release on " Jerome Tollet
2026-08-24 14:16 ` [PATCH net v4 2/2] net/mlx5e: Prevent stale XSK buffer release on MPWQE " Jerome Tollet
2026-08-24 17:41 ` Dragos Tatulea
2026-08-24 19:19 ` Jerome Tollet
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=20260824141645.23700-1-jtollet@cisco.com \
--to=jtollet@cisco.com \
--cc=andrew+netdev@lunn.ch \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=leonro@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=sdf@fomichev.me \
--cc=tariqt@nvidia.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