summaryrefslogtreecommitdiff
path: root/net/smc/smc.h
diff options
context:
space:
mode:
authorUrsula Braun <ubraun@linux.ibm.com>2019-04-12 12:57:23 +0200
committerDavid S. Miller <davem@davemloft.net>2019-04-12 10:50:56 -0700
commit50717a37db032ce783f50685a73bb2ac68471a5a (patch)
tree8dd3d8070e52163f0c3fbfdadcb4224e3860915d /net/smc/smc.h
parent6dc400af216a79c10cb082f25a7337bcbf532045 (diff)
net/smc: nonblocking connect rework
For nonblocking sockets move the kernel_connect() from the connect worker into the initial smc_connect part to return kernel_connect() errors other than -EINPROGRESS to user space. Reviewed-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: Ursula Braun <ubraun@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.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/net/smc/smc.h b/net/smc/smc.h
index adbdf195eb08..878313f8d6c1 100644
--- a/net/smc/smc.h
+++ b/net/smc/smc.h
@@ -190,18 +190,11 @@ struct smc_connection {
u64 peer_token; /* SMC-D token of peer */
};
-struct smc_connect_info {
- int flags;
- int alen;
- struct sockaddr addr;
-};
-
struct smc_sock { /* smc sock container */
struct sock sk;
struct socket *clcsock; /* internal tcp socket */
struct smc_connection conn; /* smc connection */
struct smc_sock *listen_smc; /* listen parent */
- struct smc_connect_info *connect_info; /* connect address & flags */
struct work_struct connect_work; /* handle non-blocking connect*/
struct work_struct tcp_listen_work;/* handle tcp socket accepts */
struct work_struct smc_listen_work;/* prepare new accept socket */
@@ -219,6 +212,10 @@ struct smc_sock { /* smc sock container */
* started, waiting for unsent
* data to be sent
*/
+ u8 connect_nonblock : 1;
+ /* non-blocking connect in
+ * flight
+ */
struct mutex clcsock_release_lock;
/* protects clcsock of a listen
* socket