]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
libeth, idpf: use truesize as XDP RxQ info frag_size
authorLarysa Zaremba <larysa.zaremba@intel.com>
Thu, 5 Mar 2026 11:12:48 +0000 (12:12 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 Mar 2026 16:02:05 +0000 (08:02 -0800)
commit75d9228982f23d68066ca0b7d87014c3eb8ddc85
tree19a61716e1289e779feb690fc73f0465c9684090
parentc69d22c6c46a1d792ba8af3d8d6356fdc0e6f538
libeth, idpf: use truesize as XDP RxQ info frag_size

The only user of frag_size field in XDP RxQ info is
bpf_xdp_frags_increase_tail(). It clearly expects whole buffer size instead
of DMA write size. Different assumptions in idpf driver configuration lead
to negative tailroom.

To make it worse, buffer sizes are not actually uniform in idpf when
splitq is enabled, as there are several buffer queues, so rxq->rx_buf_size
is meaningless in this case.

Use truesize of the first bufq in AF_XDP ZC, as there is only one. Disable
growing tail for regular splitq.

Fixes: ac8a861f632e ("idpf: prepare structures to support XDP")
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Link: https://patch.msgid.link/20260305111253.2317394-8-larysa.zaremba@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/idpf/xdp.c
drivers/net/ethernet/intel/idpf/xsk.c
drivers/net/ethernet/intel/libeth/xsk.c
include/net/libeth/xsk.h