linux-yocto/tools
Yonghong Song 2cc929275d bpf: Fix an issue in bpf_prog_test_run_xdp when page size greater than 4K
[ Upstream commit 4fc012daf9 ]

The bpf selftest xdp_adjust_tail/xdp_adjust_frags_tail_grow failed on
arm64 with 64KB page:
   xdp_adjust_tail/xdp_adjust_frags_tail_grow:FAIL

In bpf_prog_test_run_xdp(), the xdp->frame_sz is set to 4K, but later on
when constructing frags, with 64K page size, the frag data_len could
be more than 4K. This will cause problems in bpf_xdp_frags_increase_tail().

To fix the failure, the xdp->frame_sz is set to be PAGE_SIZE so kernel
can test different page size properly. With the kernel change, the user
space and bpf prog needs adjustment. Currently, the MAX_SKB_FRAGS default
value is 17, so for 4K page, the maximum packet size will be less than 68K.
To test 64K page, a bigger maximum packet size than 68K is desired. So two
different functions are implemented for subtest xdp_adjust_frags_tail_grow.
Depending on different page size, different data input/output sizes are used
to adapt with different page size.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20250612035032.2207498-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Stable-dep-of: e558cca21779 ("bpf, test_run: Subtract size of xdp_frame from allowed metadata size")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-01-17 16:39:33 +01:00
..
accounting
arch asm-generic: partially revert "Unify uapi bitsperlong.h for arm64, riscv and loongarch" 2025-12-07 06:12:36 +09:00
bootconfig
bpf bpftool: Fix -Wuninitialized-const-pointer warnings with clang >= 21 2025-12-07 06:12:16 +09:00
build tools build: Align warning options with perf 2025-10-19 16:23:09 +02:00
certs
cgroup
counter
debugging
edid
firewire
firmware
gpio tools: gpio: remove the include directory on make clean 2025-09-09 18:54:24 +02:00
hv
iio
include tools/nolibc/stdio: let perror work when NOLIBC_IGNORE_ERRNO is set 2026-01-11 15:18:20 +01:00
io_uring
kvm/kvm_stat
laptop
leds
lib tools: lib: thermal: use pkg-config to locate libnl3 2025-12-07 06:12:28 +09:00
memory-model
objtool objtool: Fix weak symbol detection 2026-01-11 15:18:18 +01:00
pci
pcmcia
perf perf tools: Fix split kallsyms DSO counting 2026-01-11 15:18:34 +01:00
power tools/power x86_energy_perf_policy: Prefer driver HWP limits 2025-12-07 06:12:17 +09:00
rcu
scripts tools/build: Fix s390(x) cross-compilation with clang 2025-08-28 16:25:53 +02:00
spi
testing bpf: Fix an issue in bpf_prog_test_run_xdp when page size greater than 4K 2026-01-17 16:39:33 +01:00
thermal
time
tracing tracing/tools: Fix incorrcet short option in usage text for --threads 2025-12-07 06:12:40 +09:00
usb
verification
virtio
vm
wmi
Makefile