mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 06:04:44 +01:00
If CONFIG_BPF_SYSCALL=y, but CONFIG_BPF_JIT=n:
net/smc/smc_hs_bpf.c: In function ‘bpf_smc_hs_ctrl_init’:
include/linux/bpf.h:2068:50: error: statement with no effect [-Werror=unused-value]
2068 | #define register_bpf_struct_ops(st_ops, type) ({ (void *)(st_ops); 0; })
| ^~~~~~~~~~~~~~~~
net/smc/smc_hs_bpf.c:139:16: note: in expansion of macro ‘register_bpf_struct_ops’
139 | return register_bpf_struct_ops(&bpf_smc_hs_ctrl_ops, smc_hs_ctrl);
| ^~~~~~~~~~~~~~~~~~~~~~~
While this compile error is caused by a bug in <linux/bpf.h>, none of
the code in net/smc/smc_hs_bpf.c becomes effective if CONFIG_BPF_JIT is
not enabled. Hence add a dependency on BPF_JIT.
While at it, add the missing newline at the end of the file.
Fixes: 15f295f556 ("net/smc: bpf: Introduce generic hook for handshake flow")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/988c61e5fea280872d81b3640f1f34d0619cfbbf.1764843951.git.geert@linux-m68k.org
31 lines
1.1 KiB
Text
31 lines
1.1 KiB
Text
# SPDX-License-Identifier: GPL-2.0-only
|
|
config SMC
|
|
tristate "SMC socket protocol family"
|
|
depends on INET && INFINIBAND && DIBS
|
|
help
|
|
SMC-R provides a "sockets over RDMA" solution making use of
|
|
RDMA over Converged Ethernet (RoCE) technology to upgrade
|
|
AF_INET TCP connections transparently.
|
|
The Linux implementation of the SMC-R solution is designed as
|
|
a separate socket family SMC.
|
|
|
|
Select this option if you want to run SMC socket applications
|
|
|
|
config SMC_DIAG
|
|
tristate "SMC: socket monitoring interface"
|
|
depends on SMC
|
|
help
|
|
Support for SMC socket monitoring interface used by tools such as
|
|
smcss.
|
|
|
|
if unsure, say Y.
|
|
|
|
config SMC_HS_CTRL_BPF
|
|
bool "Generic eBPF hook for SMC handshake flow"
|
|
depends on SMC && BPF_JIT && BPF_SYSCALL
|
|
default y
|
|
help
|
|
SMC_HS_CTRL_BPF enables support to register generic eBPF hook for SMC
|
|
handshake flow, which offer much greater flexibility in modifying the behavior
|
|
of the SMC protocol stack compared to a complete kernel-based approach. Select
|
|
this option if you want filtring the handshake process via eBPF programs.
|