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>
This commit is contained in:

committed by
David S. Miller

parent
6dc400af21
commit
50717a37db
@@ -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
|
||||
|
Reference in New Issue
Block a user