]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net/rds: determine active/passive connection with IP addresses
authorWei Lin Guay <wei.lin.guay@oracle.com>
Mon, 15 May 2017 11:42:56 +0000 (13:42 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 23 Jun 2017 04:30:08 +0000 (21:30 -0700)
commit1f2ea7a020a1e2ecf4c732352fb348b62934bea9
tree20e8e3d178edadf94171f2fde1fc1ba3a66a892a
parentad7312bb8b8eae249ba2e9926754fc905ab8007a
net/rds: determine active/passive connection with IP addresses

This patch changes RDS to use randomize backoff only in the first attempt
to reconnect. This means both ends try to be active by sending out REQ to
its peer in random t seconds. If the connection can't be established due to
a race, the peer IP addresses comparison is used to determine
active/passive connection establishment. (e.g IP_A > IP_B)

The following description illustrates the connection establishment,

t1randA: 192.168.1.A (active)  --------------> 192.168.1.B (passive)
t1randB: 192.168.1.A (passive) <-------------  192.168.1.B (active)
t2     : 192.168.1.A (active) ---------------> REJ
t3     : 192.168.1.B (active) ---------------> REJ
t4     : Connection between A,B is not up.
t5     : 192.168.1.A (active) --------------> 192.168.1.B (passive)

Orabug: 25521901

Signed-off-by: Wei Lin Guay <wei.lin.guay@oracle.com>
Reviewed-by: Håkon Bugge <haakon.bugge@oracle.com>
Suggested-by : Håkon Bugge <haakon.bugge@oracle.com>
Tested-by: Dib Chatterjee <dib.chatterjee@oracle.com>
Tested-by: Rosa Isela Lopez Romero <rosa.lopez@oracle.com>
net/rds/ib_cm.c
net/rds/rds.h
net/rds/threads.c