diff options
author | Sowmini Varadhan <sowmini.varadhan@oracle.com> | 2016-07-14 03:51:03 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-15 11:36:58 -0700 |
commit | 5916e2c1554f3e36f770401c989c3c7fadf619ca (patch) | |
tree | e2f85d0d6ad83d6835b131956324d6e30c4eda3e /net/rds/tcp_connect.c | |
parent | ac3615e7f3cffe2a1a6b25172dfd09e138593d82 (diff) | |
download | linux-stable-5916e2c1554f3e36f770401c989c3c7fadf619ca.tar.gz linux-stable-5916e2c1554f3e36f770401c989c3c7fadf619ca.tar.bz2 linux-stable-5916e2c1554f3e36f770401c989c3c7fadf619ca.zip |
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 <santosh.shilimkar@oracle.com>
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>
Diffstat (limited to 'net/rds/tcp_connect.c')
-rw-r--r-- | net/rds/tcp_connect.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/rds/tcp_connect.c b/net/rds/tcp_connect.c index c916715fbe61..05f61c533ed3 100644 --- a/net/rds/tcp_connect.c +++ b/net/rds/tcp_connect.c @@ -34,7 +34,6 @@ #include <linux/in.h> #include <net/tcp.h> -#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)) { |