linux/net/rds
Sowmini Varadhan bd7c5f983f RDS: TCP: Synchronize accept() and connect() paths on t_conn_lock.
An arbitration scheme for duelling SYNs is implemented as part of
commit 241b271952 ("RDS-TCP: Reset tcp callbacks if re-using an
outgoing socket in rds_tcp_accept_one()") which ensures that both nodes
involved will arrive at the same arbitration decision. However, this
needs to be synchronized with an outgoing SYN to be generated by
rds_tcp_conn_connect(). This commit achieves the synchronization
through the t_conn_lock mutex in struct rds_tcp_connection.

The rds_conn_state is checked in rds_tcp_conn_connect() after acquiring
the t_conn_lock mutex.  A SYN is sent out only if the RDS connection is
not already UP (an UP would indicate that rds_tcp_accept_one() has
completed 3WH, so no SYN needs to be generated).

Similarly, the rds_conn_state is checked in rds_tcp_accept_one() after
acquiring the t_conn_lock mutex. The only acceptable states (to
allow continuation of the arbitration logic) are UP (i.e., outgoing SYN
was SYN-ACKed by peer after it sent us the SYN) or CONNECTING (we sent
outgoing SYN before we saw incoming SYN).

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-05-03 16:03:44 -04:00
..
Kconfig RDS: Drop stale iWARP RDMA transport 2016-03-02 14:13:17 -05:00
Makefile RDS: IB: Support Fastreg MR (FRMR) memory registration mode 2016-03-02 14:13:19 -05:00
af_rds.c RDS: Add support for SO_TIMESTAMP for incoming messages 2016-03-02 14:13:17 -05:00
bind.c RDS: convert bind hash table to re-sizable hashtable 2015-11-02 15:36:23 -05:00
cong.c RDS: Fix the atomicity for congestion map update 2016-04-16 19:01:05 -04:00
connection.c RDS: fix race condition when sending a message on unbound socket 2015-11-24 17:20:09 -05:00
ib.c RDS: IB: add Fastreg MR (FRMR) detection support 2016-03-02 14:13:19 -05:00
ib.h RDS: IB: Support Fastreg MR (FRMR) memory registration mode 2016-03-02 14:13:19 -05:00
ib_cm.c RDS: fix endianness for dp_ack_seq 2016-04-16 19:01:05 -04:00
ib_fmr.c RDS: IB: move FMR code to its own file 2016-03-02 14:13:18 -05:00
ib_frmr.c RDS: IB: Support Fastreg MR (FRMR) memory registration mode 2016-03-02 14:13:19 -05:00
ib_mr.h RDS: IB: Support Fastreg MR (FRMR) memory registration mode 2016-03-02 14:13:19 -05:00
ib_rdma.c RDS: IB: Support Fastreg MR (FRMR) memory registration mode 2016-03-02 14:13:19 -05:00
ib_recv.c RDS: fix congestion map corruption for PAGE_SIZE > 4k 2016-04-07 16:58:28 -04:00
ib_ring.c RDS/IW+IB: Set recv ring low water mark to 1/2 full. 2009-04-09 17:21:14 -07:00
ib_send.c RDS: IB: Remove the RDS_IB_SEND_OP dependency 2016-03-02 14:13:17 -05:00
ib_stats.c RDS: IB: add mr reused stats 2016-03-02 14:13:19 -05:00
ib_sysctl.c net: Convert uses of typedef ctl_table to struct ctl_table 2013-06-13 02:36:09 -07:00
info.c rds: fix an integer overflow test in rds_info_getsockopt() 2015-08-03 15:20:16 -07:00
info.h RDS: Info and stats 2009-02-26 23:39:25 -08:00
loop.c RDS: use gfp flags from caller in conn_alloc() 2012-03-22 19:29:58 -04:00
loop.h RDS: loopback 2009-02-26 23:39:26 -08:00
message.c rds: Make rds_message_copy_from_user() return 0 on success. 2015-02-07 22:41:56 -08:00
page.c RDS: memory allocated must be align to 8 2016-04-07 16:58:27 -04:00
rdma.c RDS: Fix rds MR reference count in rds_rdma_unuse() 2015-08-25 16:28:10 -07:00
rdma_transport.c RDS: IB: handle the RDMA CM time wait event 2016-03-02 14:13:19 -05:00
rdma_transport.h RDS: Drop stale iWARP RDMA transport 2016-03-02 14:13:17 -05:00
rds.h RDS: Add support for SO_TIMESTAMP for incoming messages 2016-03-02 14:13:17 -05:00
recv.c RDS: Add support for SO_TIMESTAMP for incoming messages 2016-03-02 14:13:17 -05:00
send.c RDS: fix race condition when sending a message on unbound socket 2015-11-24 17:20:09 -05:00
stats.c net/rds: zero last byte for strncpy 2013-03-08 00:35:44 -05:00
sysctl.c net: rds: use correct size for max unacked packets and bytes 2015-02-04 16:07:27 -08:00
tcp.c RDS: TCP: Synchronize accept() and connect() paths on t_conn_lock. 2016-05-03 16:03:44 -04:00
tcp.h RDS: TCP: Synchronize accept() and connect() paths on t_conn_lock. 2016-05-03 16:03:44 -04:00
tcp_connect.c RDS: TCP: Synchronize accept() and connect() paths on t_conn_lock. 2016-05-03 16:03:44 -04:00
tcp_listen.c RDS: TCP: Synchronize accept() and connect() paths on t_conn_lock. 2016-05-03 16:03:44 -04:00
tcp_recv.c RDS-TCP: Recover correctly from pskb_pull()/pksb_trim() failure in rds_tcp_data_recv 2015-10-27 19:46:34 -07:00
tcp_send.c RDS-TCP: Set up MSG_MORE and MSG_SENDPAGE_NOTLAST as appropriate in rds_tcp_xmit 2015-10-05 03:34:53 -07:00
tcp_stats.c net: rds: fix const array syntax 2011-07-01 16:16:19 -07:00
threads.c RDS: use rds_send_xmit() state instead of RDS_LL_SEND_FULL 2015-10-05 11:19:01 -07:00
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