Skip to content

Commit 9fe17b7

Browse files
Saket Kumar Bhaskarborkmann
authored andcommitted
selftests/bpf: Fix test_xdp_adjust_tail_grow2 selftest on powerpc
On powerpc cache line size is 128 bytes, so skb_shared_info must be aligned accordingly. Signed-off-by: Saket Kumar Bhaskar <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent be339dd commit 9fe17b7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ static void test_xdp_adjust_tail_grow2(void)
8282
/* SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) */
8383
#if defined(__s390x__)
8484
int tailroom = 512;
85+
#elif defined(__powerpc__)
86+
int tailroom = 384;
8587
#else
8688
int tailroom = 320;
8789
#endif

tools/testing/selftests/bpf/progs/test_xdp_adjust_tail_grow.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ int _xdp_adjust_tail_grow(struct xdp_md *xdp)
1010
/* SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) */
1111
#if defined(__TARGET_ARCH_s390)
1212
int tailroom = 512;
13+
#elif defined(__TARGET_ARCH_powerpc)
14+
int tailroom = 384;
1315
#else
1416
int tailroom = 320;
1517
#endif

0 commit comments

Comments
 (0)