]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests/bpf: Fix xdp_pull_data failure with 64K page
authorYonghong Song <yonghong.song@linux.dev>
Fri, 23 Jan 2026 05:51:28 +0000 (21:51 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 25 Jan 2026 00:51:22 +0000 (16:51 -0800)
commitc7900f225a102219f5fe2c1c93a7dec5467315ee
treed9f62f3271d46dfe858f640be8a78a4d3be9e3b5
parentd8df878140506e7938928195f540c10b1089fdaf
selftests/bpf: Fix xdp_pull_data failure with 64K page

If the argument 'pull_len' of run_test() is 'PULL_MAX' or
'PULL_MAX | PULL_PLUS_ONE', the eventual pull_len size
will close to the page size. On arm64 systems with 64K pages,
the pull_len size will be close to 64K. But the existing buffer
will be close to 9000 which is not enough to pull.

For those failed run_tests(), make buff size to
  pg_sz + (pg_sz / 2)
This way, there will be enough buffer space to pull
regardless of page size.

Tested-by: Alan Maguire <alan.maguire@oracle.com>
Cc: Amery Hung <ameryhung@gmail.com>
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Acked-by: Amery Hung <ameryhung@gmail.com>
Link: https://lore.kernel.org/r/20260123055128.495265-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/xdp_pull_data.c