Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests/bpf: Fix sockopt selftest failure on powerpc

The SO_RCVLOWAT option is defined as 18 in the selftest header,
which matches the generic definition. However, on powerpc,
SO_RCVLOWAT is defined as 16. This discrepancy causes
sol_socket_sockopt() to fail with the default switch case on powerpc.

This commit fixes by defining SO_RCVLOWAT as 16 for powerpc.

Signed-off-by: Saket Kumar Bhaskar <skb99@linux.ibm.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Link: https://lore.kernel.org/bpf/20250311084647.3686544-1-skb99@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Saket Kumar Bhaskar and committed by
Alexei Starovoitov
8c10109a de07b182

+4
+4
tools/testing/selftests/bpf/progs/bpf_tracing_net.h
··· 15 15 #define SO_KEEPALIVE 9 16 16 #define SO_PRIORITY 12 17 17 #define SO_REUSEPORT 15 18 + #if defined(__TARGET_ARCH_powerpc) 19 + #define SO_RCVLOWAT 16 20 + #else 18 21 #define SO_RCVLOWAT 18 22 + #endif 19 23 #define SO_BINDTODEVICE 25 20 24 #define SO_MARK 36 21 25 #define SO_MAX_PACING_RATE 47