summaryrefslogtreecommitdiffstats
path: root/net/smc/smc.h
diff options
context:
space:
mode:
authorD. Wythe <alibuda@linux.alibaba.com>2024-06-13 20:00:28 +0200
committerDavid S. Miller <davem@davemloft.net>2024-06-17 14:14:09 +0200
commitd0e35656d83458d668593930f1568d464dde429c (patch)
treec87938cd45462248048f7467c045ee64abe7478e /net/smc/smc.h
parentnet: make for_each_netdev_dump() a little more bug-proof (diff)
downloadlinux-d0e35656d83458d668593930f1568d464dde429c.tar.xz
linux-d0e35656d83458d668593930f1568d464dde429c.zip
net/smc: refactoring initialization of smc sock
This patch aims to isolate the shared components of SMC socket allocation by introducing smc_sk_init() for sock initialization and __smc_create_clcsk() for the initialization of clcsock. This is in preparation for the subsequent implementation of the AF_INET version of SMC. Signed-off-by: D. Wythe <alibuda@linux.alibaba.com> Reviewed-by: Tony Lu <tonylu@linux.alibaba.com> Reviewed-by: Wenjia Zhang <wenjia@linux.ibm.com> Reviewed-by: Dust Li <dust.li@linux.alibaba.com> Tested-by: Niklas Schnelle <schnelle@linux.ibm.com> Tested-by: Wenjia Zhang <wenjia@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc.h')
-rw-r--r--net/smc/smc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/smc/smc.h b/net/smc/smc.h
index 18c8b7870198..3edec1e133d8 100644
--- a/net/smc/smc.h
+++ b/net/smc/smc.h
@@ -34,6 +34,11 @@
extern struct proto smc_proto;
extern struct proto smc_proto6;
+/* smc sock initialization */
+void smc_sk_init(struct net *net, struct sock *sk, int protocol);
+/* clcsock initialization */
+int smc_create_clcsk(struct net *net, struct sock *sk, int family);
+
#ifdef ATOMIC64_INIT
#define KERNEL_HAS_ATOMIC64
#endif