selftests/bpf: Fix xdp_do_redirect failure with 64KB page size
authorYonghong Song <yonghong.song@linux.dev>
Thu, 12 Jun 2025 03:50:42 +0000 (20:50 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 13 Jun 2025 02:07:51 +0000 (19:07 -0700)
commit44df9e0d4eec45060ccee72217f56fe3178074a5
treeb6ed79585a05c80c8e26c27e11053c6e487221ab
parent96fcf7e7a71c2b21c002e9ba9362d88f8beac09a
selftests/bpf: Fix xdp_do_redirect failure with 64KB page size

On arm64 with 64KB page size, the selftest xdp_do_redirect failed like
below:
  ...
  test_xdp_do_redirect:PASS:pkt_count_tc 0 nsec
  test_max_pkt_size:PASS:prog_run_max_size 0 nsec
  test_max_pkt_size:FAIL:prog_run_too_big unexpected prog_run_too_big: actual -28 != expected -22

With 64KB page size, the xdp frame size will be much bigger so
the existing test will fail.

Adjust various parameters so the test can also work on 64K page size.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20250612035042.2208630-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/xdp_do_redirect.c