Skip to content

Commit

Permalink
selftests/bpf: Fix test_xdp_adjust_tail_grow2 selftest on powerpc
Browse files Browse the repository at this point in the history
On powerpc cache line size is 128 bytes, so skb_shared_info must be
aligned accordingly.

Signed-off-by: Saket Kumar Bhaskar <[email protected]>
  • Loading branch information
Saket Kumar Bhaskar authored and Kernel Patches Daemon committed Jan 10, 2025
1 parent ffc879e commit a652e70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ static void test_xdp_adjust_tail_grow2(void)
/* SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) */
#if defined(__s390x__)
int tailroom = 512;
#elif defined(__powerpc__)
int tailroom = 384;
#else
int tailroom = 320;
#endif
Expand Down
2 changes: 2 additions & 0 deletions tools/testing/selftests/bpf/progs/test_xdp_adjust_tail_grow.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ int _xdp_adjust_tail_grow(struct xdp_md *xdp)
/* SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) */
#if defined(__TARGET_ARCH_s390)
int tailroom = 512;
#elif defined(__TARGET_ARCH_powerpc)
int tailroom = 384;
#else
int tailroom = 320;
#endif
Expand Down

0 comments on commit a652e70

Please sign in to comment.