summaryrefslogtreecommitdiff
path: root/net/rds/tcp_listen.c
diff options
context:
space:
mode:
authorSowmini Varadhan <sowmini.varadhan@oracle.com>2017-06-21 13:40:12 -0700
committerDavid S. Miller <davem@davemloft.net>2017-06-22 11:34:04 -0400
commit69b92b5b7419846e2a0d61a097b11b17a089e046 (patch)
treedc21d77a3eed374fb5be93efaa1c0b2ebd2d81b9 /net/rds/tcp_listen.c
parent6d659237657c64e9e2a930865da4c777239b678e (diff)
rds: tcp: send handshake ping-probe from passive endpoint
The RDS handshake ping probe added by commit 5916e2c1554f ("RDS: TCP: Enable multipath RDS for TCP") is sent from rds_sendmsg() before the first data packet is sent to a peer. If the conversation is not bidirectional (i.e., one side is always passive and never invokes rds_sendmsg()) and the passive side restarts its rds_tcp module, a new HS ping probe needs to be sent, so that the number of paths can be re-established. This patch achieves that by sending a HS ping probe from rds_tcp_accept_one() when c_npaths is 0 (i.e., we have not done a handshake probe with this peer yet). Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Tested-by: Jenny Xu <jenny.x.xu@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/tcp_listen.c')
-rw-r--r--net/rds/tcp_listen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/rds/tcp_listen.c b/net/rds/tcp_listen.c
index df291ac245d6..6089e9a8e00a 100644
--- a/net/rds/tcp_listen.c
+++ b/net/rds/tcp_listen.c
@@ -192,6 +192,8 @@ int rds_tcp_accept_one(struct socket *sock)
}
new_sock = NULL;
ret = 0;
+ if (conn->c_npaths == 0)
+ rds_send_ping(cp->cp_conn, cp->cp_index);
goto out;
rst_nsk:
/* reset the newly returned accept sock and bail.