kernel-ark/net/rds
Sowmini Varadhan 3b20fc3897 RDS: Use a single TCP socket for both send and receive.
Commit f711a6ae06 ("net/rds: RDS-TCP: Always create a new rds_sock
for an incoming connection.") modified rds-tcp so that an incoming SYN
would ignore an existing "client" TCP connection which had the local
port set to the transient port.  The motivation for ignoring the existing
"client" connection in f711a6ae was to avoid race conditions and an
endless duel of reconnect attempts triggered by a restart/abort of one
of the nodes in the TCP connection.

However, having separate sockets for active and passive sides
is avoidable, and the simpler model of a single TCP socket for
both send and receives of all RDS connections associated with
that tcp socket makes for easier observability. We avoid the race
conditions from f711a6ae by attempting reconnects in rds_conn_shutdown
if, and only if, the (new) c_outgoing bit is set for RDS_TRANS_TCP.
The c_outgoing bit is initialized in __rds_conn_create().

A side-effect of re-using the client rds_connection for an incoming
SYN is the potential of encountering duelling SYNs, i.e., we
have an outgoing RDS_CONN_CONNECTING socket when we get the incoming
SYN. The logic to arbitrate this criss-crossing SYN exchange in
rds_tcp_accept_one() has been modified to emulate the BGP state
machine: the smaller IP address should back off from the connection attempt.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-05 03:34:51 -07:00
..
af_rds.c RDS: add a sock_destruct callback debug aid 2015-08-25 13:35:30 -07:00
bind.c RDS-TCP: Make RDS-TCP work correctly when it is set up in a netns other than init_net 2015-08-07 11:29:57 -07:00
cong.c
connection.c RDS: Use a single TCP socket for both send and receive. 2015-10-05 03:34:51 -07:00
ib_cm.c Changes for 4.3 2015-09-09 08:33:31 -07:00
ib_rdma.c RDS: remove superfluous from rds_ib_alloc_fmr() 2015-08-25 16:28:11 -07:00
ib_recv.c Changes for 4.3 2015-09-09 08:33:31 -07:00
ib_ring.c
ib_send.c Changes for 4.3 2015-09-09 08:33:31 -07:00
ib_stats.c
ib_sysctl.c
ib.c Changes for 4.3 2015-09-09 08:33:31 -07:00
ib.h Changes for 4.3 2015-09-09 08:33:31 -07:00
info.c rds: fix an integer overflow test in rds_info_getsockopt() 2015-08-03 15:20:16 -07:00
info.h
iw_cm.c RDS-TCP: Make RDS-TCP work correctly when it is set up in a netns other than init_net 2015-08-07 11:29:57 -07:00
iw_rdma.c RDS: Convert to ib_alloc_mr 2015-08-30 18:08:46 -04:00
iw_recv.c
iw_ring.c
iw_send.c RDS: Convert to ib_alloc_mr 2015-08-30 18:08:46 -04:00
iw_stats.c
iw_sysctl.c
iw.c Changes for 4.3 2015-09-09 08:33:31 -07:00
iw.h
Kconfig
loop.c
loop.h
Makefile
message.c
page.c
rdma_transport.c RDS: check for valid cm_id before initiating connection 2015-08-25 13:35:31 -07:00
rdma_transport.h
rdma.c RDS: Fix rds MR reference count in rds_rdma_unuse() 2015-08-25 16:28:10 -07:00
rds.h RDS: Use a single TCP socket for both send and receive. 2015-10-05 03:34:51 -07:00
recv.c
send.c RDS: return EMSGSIZE for oversize requests before processing/queueing 2015-08-25 13:35:31 -07:00
stats.c
sysctl.c
tcp_connect.c RDS-TCP: Support multiple RDS-TCP listen endpoints, one per netns. 2015-08-07 11:29:58 -07:00
tcp_listen.c RDS: Use a single TCP socket for both send and receive. 2015-10-05 03:34:51 -07:00
tcp_recv.c
tcp_send.c
tcp_stats.c
tcp.c RDS-TCP: Support multiple RDS-TCP listen endpoints, one per netns. 2015-08-07 11:29:58 -07:00
tcp.h RDS-TCP: Support multiple RDS-TCP listen endpoints, one per netns. 2015-08-07 11:29:58 -07:00
threads.c
transport.c RDS-TCP: Make RDS-TCP work correctly when it is set up in a netns other than init_net 2015-08-07 11:29:57 -07:00