]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xsk: Fix zero-copy AF_XDP fragment drop
authorNikhil P. Rao <nikhil.rao@amd.com>
Wed, 25 Feb 2026 00:00:27 +0000 (00:00 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 28 Feb 2026 16:55:11 +0000 (08:55 -0800)
commitf7387d6579d65efd490a864254101cb665f2e7a7
treeefe2e3a637547b1c1dfb26c2e76b3f64dacafce4
parent60abb0ac11dccd6b98fd9182bc5f85b621688861
xsk: Fix zero-copy AF_XDP fragment drop

AF_XDP should ensure that only a complete packet is sent to application.
In the zero-copy case, if the Rx queue gets full as fragments are being
enqueued, the remaining fragments are dropped.

For the multi-buffer case, add a check to ensure that the Rx queue has
enough space for all fragments of a packet before starting to enqueue
them.

Fixes: 24ea50127ecf ("xsk: support mbuf on ZC RX")
Signed-off-by: Nikhil P. Rao <nikhil.rao@amd.com>
Link: https://patch.msgid.link/20260225000456.107806-3-nikhil.rao@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/xdp/xsk.c