Skip to content

Commit 852dcb8

Browse files
Saket Kumar BhaskarKernel Patches Daemon
Saket Kumar Bhaskar
authored and
Kernel Patches Daemon
committed
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 <[email protected]> Tested-by: Venkat Rao Bagalkote <[email protected]>
1 parent 474f6ed commit 852dcb8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/testing/selftests/bpf/progs/bpf_tracing_net.h

+4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
#define SO_KEEPALIVE 9
1616
#define SO_PRIORITY 12
1717
#define SO_REUSEPORT 15
18+
#if defined(__TARGET_ARCH_powerpc)
19+
#define SO_RCVLOWAT 16
20+
#else
1821
#define SO_RCVLOWAT 18
22+
#endif
1923
#define SO_BINDTODEVICE 25
2024
#define SO_MARK 36
2125
#define SO_MAX_PACING_RATE 47

0 commit comments

Comments
 (0)