summaryrefslogtreecommitdiff
path: root/net/smc/smc.h
diff options
context:
space:
mode:
authorUrsula Braun <ubraun@linux.vnet.ibm.com>2017-01-09 16:55:16 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-09 16:07:39 -0500
commita046d57da19f812216f393e7c535f5858f793ac3 (patch)
tree9b3c535ff6cd3da3cf06b3164cd727839df25f38 /net/smc/smc.h
parent6812baabf24d5c299c13223366a23c269408f4d0 (diff)
smc: CLC handshake (incl. preparation steps)
* CLC (Connection Layer Control) handshake Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc.h')
-rw-r--r--net/smc/smc.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/net/smc/smc.h b/net/smc/smc.h
index e87d79867099..5946aaecdebf 100644
--- a/net/smc/smc.h
+++ b/net/smc/smc.h
@@ -28,6 +28,12 @@ enum smc_state { /* possible states of an SMC socket */
struct smc_sock { /* smc sock container */
struct sock sk;
struct socket *clcsock; /* internal tcp socket */
+ struct sockaddr *addr; /* inet connect address */
+ struct smc_sock *listen_smc; /* listen parent */
+ struct work_struct tcp_listen_work;/* handle tcp socket accepts */
+ struct work_struct smc_listen_work;/* prepare new accept socket */
+ struct list_head accept_q; /* sockets to be accepted */
+ spinlock_t accept_q_lock; /* protects accept_q */
bool use_fallback; /* fallback to tcp */
};
@@ -40,4 +46,20 @@ static inline struct smc_sock *smc_sk(const struct sock *sk)
extern u8 local_systemid[SMC_SYSTEMID_LEN]; /* unique system identifier */
+#ifdef CONFIG_XFRM
+static inline bool using_ipsec(struct smc_sock *smc)
+{
+ return (smc->clcsock->sk->sk_policy[0] ||
+ smc->clcsock->sk->sk_policy[1]) ? 1 : 0;
+}
+#else
+static inline bool using_ipsec(struct smc_sock *smc)
+{
+ return 0;
+}
+#endif
+
+int smc_netinfo_by_tcpsk(struct socket *clcsock, __be32 *subnet,
+ u8 *prefix_len);
+
#endif /* __SMC_H */