Skip to contentSkip to conversation

selftests/bpf: Fix test_xdp_adjust_tail_grow2 selftest on powerpc

PATCH Applied Saket Kumar Bhaskar 2 participants 2 messages Jan 10, 2025 – Jan 15, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c      | 2 ++
 tools/testing/selftests/bpf/progs/test_xdp_adjust_tail_grow.c | 2 ++
 2 files changed, 4 insertions(+)
tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c +2 -0
index 53d6ad8c2257..b2b2d85dbb1b 100644
@@ -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
tools/testing/selftests/bpf/progs/test_xdp_adjust_tail_grow.c +2 -0
index 81bb38d72ced..dc74d8cf9e3f 100644
@@ -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
Signature · 1 line
2.43.5
#1 lore raw
This patch was applied to bpf/bpf-next.git (master) by Daniel Borkmann <[email protected]>:

Hello:

This patch was applied to bpf/bpf-next.git (master) by Daniel Borkmann <[email protected]>:

Quoted 8 lines · On Fri, 10 Jan 2025 16:01:09 +0530 you wrote:

On powerpc cache line size is 128 bytes, so skb_shared_info must be aligned accordingly.

---
 tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c      | 2 ++
 tools/testing/selftests/bpf/progs/test_xdp_adjust_tail_grow.c | 2 ++
 2 files changed, 4 insertions(+)

Here is the summary with links:
- selftests/bpf: Fix test_xdp_adjust_tail_grow2 selftest on powerpc

    https://git.kernel.org/bpf/bpf-next/c/9fe17b7466f6

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html