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>