]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests/bpf: Fix sockopt selftest failure on powerpc
authorSaket Kumar Bhaskar <skb99@linux.ibm.com>
Tue, 11 Mar 2025 08:46:47 +0000 (14:16 +0530)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 15 Mar 2025 18:49:24 +0000 (11:49 -0700)
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>
tools/testing/selftests/bpf/progs/bpf_tracing_net.h

index 59843b430f76aae153fc8c17063cc5d85f1d8ec0..bcd44d5018bf75ca9346e228efe54a5734fd2645 100644 (file)
 #define SO_KEEPALIVE           9
 #define SO_PRIORITY            12
 #define SO_REUSEPORT           15
+#if defined(__TARGET_ARCH_powerpc)
+#define SO_RCVLOWAT            16
+#else
 #define SO_RCVLOWAT            18
+#endif
 #define SO_BINDTODEVICE                25
 #define SO_MARK                        36
 #define SO_MAX_PACING_RATE     47