From 5916e2c1554f3e36f770401c989c3c7fadf619ca Mon Sep 17 00:00:00 2001 From: Sowmini Varadhan Date: Thu, 14 Jul 2016 03:51:03 -0700 Subject: RDS: TCP: Enable multipath RDS for TCP Use RDS probe-ping to compute how many paths may be used with the peer, and to synchronously start the multiple paths. If mprds is supported, hash outgoing traffic to one of multiple paths in rds_sendmsg() when multipath RDS is supported by the transport. CC: Santosh Shilimkar Signed-off-by: Sowmini Varadhan Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller --- net/rds/tcp_connect.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'net/rds/tcp_connect.c') diff --git a/net/rds/tcp_connect.c b/net/rds/tcp_connect.c index c916715..05f61c5 100644 --- a/net/rds/tcp_connect.c +++ b/net/rds/tcp_connect.c @@ -34,7 +34,6 @@ #include #include -#include "rds_single_path.h" #include "rds.h" #include "tcp.h" @@ -82,6 +81,12 @@ int rds_tcp_conn_path_connect(struct rds_conn_path *cp) struct rds_connection *conn = cp->cp_conn; struct rds_tcp_connection *tc = cp->cp_transport_data; + /* for multipath rds,we only trigger the connection after + * the handshake probe has determined the number of paths. + */ + if (cp->cp_index > 0 && cp->cp_conn->c_npaths < 2) + return -EAGAIN; + mutex_lock(&tc->t_conn_path_lock); if (rds_conn_path_up(cp)) { -- cgit v1.1