diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2023-01-28 01:06:29 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-10 09:33:06 +0100 |
commit | 026ba2f7760e06c348695242928f8129d8a1ee67 (patch) | |
tree | 5102844d59222f503cc67701734d99a3d654569f /tools | |
parent | 678ea18d6240299fd77d7000c8b1d7e5f274c8af (diff) | |
download | linux-stable-026ba2f7760e06c348695242928f8129d8a1ee67.tar.gz linux-stable-026ba2f7760e06c348695242928f8129d8a1ee67.tar.bz2 linux-stable-026ba2f7760e06c348695242928f8129d8a1ee67.zip |
selftests/bpf: Fix xdp_do_redirect on s390x
[ Upstream commit 06c1865b0b0c7820ea53af2394dd7aff31100295 ]
s390x cache line size is 256 bytes, so skb_shared_info must be aligned
on a much larger boundary than for x86. This makes the maximum packet
size smaller.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/r/20230128000650.1516334-11-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Stable-dep-of: 6c20822fada1 ("bpf, test_run: fix &xdp_frame misplacement for LIVE_FRAMES")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/xdp_do_redirect.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_do_redirect.c b/tools/testing/selftests/bpf/prog_tests/xdp_do_redirect.c index 9ac6f6a268db..15ad33669161 100644 --- a/tools/testing/selftests/bpf/prog_tests/xdp_do_redirect.c +++ b/tools/testing/selftests/bpf/prog_tests/xdp_do_redirect.c @@ -65,7 +65,11 @@ static int attach_tc_prog(struct bpf_tc_hook *hook, int fd) /* The maximum permissible size is: PAGE_SIZE - sizeof(struct xdp_page_head) - * sizeof(struct skb_shared_info) - XDP_PACKET_HEADROOM = 3368 bytes */ +#if defined(__s390x__) +#define MAX_PKT_SIZE 3176 +#else #define MAX_PKT_SIZE 3368 +#endif static void test_max_pkt_size(int fd) { char data[MAX_PKT_SIZE + 1] = {}; |