diff options
author | D. Wythe <alibuda@linux.alibaba.com> | 2024-06-13 20:00:28 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-06-17 14:14:09 +0200 |
commit | d0e35656d83458d668593930f1568d464dde429c (patch) | |
tree | c87938cd45462248048f7467c045ee64abe7478e /net/smc/smc.h | |
parent | net: make for_each_netdev_dump() a little more bug-proof (diff) | |
download | linux-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.h | 5 |
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 |