summaryrefslogtreecommitdiff
path: root/include/net/netns
diff options
context:
space:
mode:
authorD. Wythe <alibuda@linux.alibaba.com>2025-11-07 06:56:31 +0300
committerMartin KaFai Lau <martin.lau@kernel.org>2025-11-10 22:19:41 +0300
commit15f295f55656658e65bdbc9b901d6b2e49d68d72 (patch)
tree9ed5919603e8caf148a619f10388736cc776f561 /include/net/netns
parent07c428ece3222832bdbfcc4ffa8b8d3991c5eb39 (diff)
downloadlinux-15f295f55656658e65bdbc9b901d6b2e49d68d72.tar.xz
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
Diffstat (limited to 'include/net/netns')
-rw-r--r--include/net/netns/smc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/netns/smc.h b/include/net/netns/smc.h
index 6ceb12baec24..ed24c9f638ee 100644
--- a/include/net/netns/smc.h
+++ b/include/net/netns/smc.h
@@ -17,6 +17,9 @@ struct netns_smc {
#ifdef CONFIG_SYSCTL
struct ctl_table_header *smc_hdr;
#endif
+#if IS_ENABLED(CONFIG_SMC_HS_CTRL_BPF)
+ struct smc_hs_ctrl __rcu *hs_ctrl;
+#endif /* CONFIG_SMC_HS_CTRL_BPF */
unsigned int sysctl_autocorking_size;
unsigned int sysctl_smcr_buf_type;
int sysctl_smcr_testlink_time;