From: "Nikhil P. Rao" <nikhil.rao@amd.com>
To: <netdev@vger.kernel.org>
Cc: <nikhil.rao@amd.com>, <magnus.karlsson@intel.com>,
<maciej.fijalkowski@intel.com>, <sdf@fomichev.me>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <horms@kernel.org>,
<kerneljasonxing@gmail.com>
Subject: [PATCH net v4 0/2] xsk: Fixes for AF_XDP fragment handling
Date: Tue, 17 Feb 2026 21:08:49 +0000 [thread overview]
Message-ID: <20260217211019.48280-1-nikhil.rao@amd.com> (raw)
This series fixes two issues in AF_XDP zero-copy fragment handling:
Patch 1 fixes a buffer leak caused by incorrect list node handling after
commit b692bf9a7543. The list_node field is now reused for both the xskb
pool list and the buffer free list. Using list_del() instead of
list_del_init() causes list_empty() checks in xp_free() to fail, preventing
buffers from being added to the free list.
Patch 2 fixes partial packet delivery to userspace. In the zero-copy path,
if the Rx queue fills up while enqueuing fragments, the remaining fragments
are dropped, causing the application to receive incomplete packets. The fix
ensures the Rx queue has sufficient space for all fragments before starting
to enqueue them.
v4 changes:
- Patch 1: Carried Acked-by tags from v2 on patch 1
- Patch 2:
* Fix uninitialized err when sufficient space for all
all fragments is not available [2]
v3 changes:
- Patch 1: Carried Acked-by tags from v2 on patch 1
- Patch 2:
* Check for free space only for the multi-buffer case, this preserves
single buffer performance (Maciej)
* Fix return without freeing buffer when sufficient space for all
all fragments is not available
v2 changes:
- Fix indentation issue reported by kernel test robot [1]
[1] https://lore.kernel.org/oe-kbuild-all/202602051720.YfZO23pZ-lkp@intel.com/
[2] https://lore.kernel.org/oe-kbuild-all/202602172046.vf9DtpdF-lkp@intel.com/
Nikhil P. Rao (2):
xsk: Fix fragment node deletion to prevent buffer leak
xsk: Fix zero-copy AF_XDP fragment drop
include/net/xdp_sock_drv.h | 6 +++---
net/xdp/xsk.c | 25 ++++++++++++++++---------
2 files changed, 19 insertions(+), 12 deletions(-)
--
2.43.0
next reply other threads:[~2026-02-17 21:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 21:08 Nikhil P. Rao [this message]
2026-02-17 21:08 ` [PATCH net v4 1/2] xsk: Fix fragment node deletion to prevent buffer leak Nikhil P. Rao
2026-02-17 21:08 ` [PATCH net v4 2/2] xsk: Fix zero-copy AF_XDP fragment drop Nikhil P. Rao
2026-02-19 22:55 ` Jakub Kicinski
2026-02-20 12:37 ` Maciej Fijalkowski
2026-02-20 20:38 ` Jakub Kicinski
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=20260217211019.48280-1-nikhil.rao@amd.com \
--to=nikhil.rao@amd.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kerneljasonxing@gmail.com \
--cc=kuba@kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
/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