diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2023-01-28 03:06:35 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-01-28 23:30:09 +0300 |
commit | 26e8a014947948387790a029b310276ac083971b (patch) | |
tree | a8910cfee8489bebe316b7519b4be1455b0d5300 /tools/testing/selftests/bpf/prog_tests | |
parent | 207612eb12b912cad40c0299fefcabf3d6cc1f3f (diff) | |
download | linux-26e8a014947948387790a029b310276ac083971b.tar.xz |
selftests/bpf: Fix test_xdp_adjust_tail_grow2 on s390x
s390x cache line size is 256 bytes, so skb_shared_info must be aligned
on a much larger boundary than for x86.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/r/20230128000650.1516334-17-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c b/tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c index 39973ea1ce43..f09505f8b038 100644 --- a/tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c +++ b/tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c @@ -76,10 +76,15 @@ static void test_xdp_adjust_tail_grow2(void) { const char *file = "./test_xdp_adjust_tail_grow.bpf.o"; char buf[4096]; /* avoid segfault: large buf to hold grow results */ - int tailroom = 320; /* SKB_DATA_ALIGN(sizeof(struct skb_shared_info))*/; struct bpf_object *obj; int err, cnt, i; int max_grow, prog_fd; + /* SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) */ +#if defined(__s390x__) + int tailroom = 512; +#else + int tailroom = 320; +#endif LIBBPF_OPTS(bpf_test_run_opts, tattr, .repeat = 1, |