]> git.ipfire.org Git - thirdparty/linux.git/commit
net/smc: bpf: Introduce generic hook for handshake flow
authorD. Wythe <alibuda@linux.alibaba.com>
Fri, 7 Nov 2025 03:56:31 +0000 (11:56 +0800)
committerMartin KaFai Lau <martin.lau@kernel.org>
Mon, 10 Nov 2025 19:19:41 +0000 (11:19 -0800)
commit15f295f55656658e65bdbc9b901d6b2e49d68d72
tree9ed5919603e8caf148a619f10388736cc776f561
parent07c428ece3222832bdbfcc4ffa8b8d3991c5eb39
net/smc: bpf: Introduce generic hook for handshake flow

The introduction of IPPROTO_SMC enables eBPF programs to determine
whether to use SMC based on the context of socket creation, such as
network namespaces, PID and comm name, etc.

As a subsequent enhancement, to introduce a new generic hook that
allows decisions on whether to use SMC or not at runtime, including
but not limited to local/remote IP address or ports.

User can write their own implememtion via bpf_struct_ops now to choose
whether to use SMC or not before TCP 3rd handshake to be comleted.

Signed-off-by: D. Wythe <alibuda@linux.alibaba.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Reviewed-by: Dust Li <dust.li@linux.alibaba.com>
Link: https://patch.msgid.link/20251107035632.115950-3-alibuda@linux.alibaba.com
include/net/netns/smc.h
include/net/smc.h
net/ipv4/tcp_output.c
net/smc/Kconfig
net/smc/Makefile
net/smc/af_smc.c
net/smc/smc_hs_bpf.c [new file with mode: 0644]
net/smc/smc_hs_bpf.h [new file with mode: 0644]
net/smc/smc_sysctl.c