]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
rds: ib: Remove superfluous add of address on fail-back device
authorHåkon Bugge <haakon.bugge@oracle.com>
Tue, 30 Oct 2018 13:09:07 +0000 (14:09 +0100)
committerBrian Maly <brian.maly@oracle.com>
Tue, 18 Dec 2018 00:44:34 +0000 (19:44 -0500)
During failover, we see in the ibacm log:

acm_ipnl_handler: Link added : ib0
acm_ipnl_handler: System address removed ib0 : 192.168.200.200
acm_ipnl_handler: New system address available ib1 : 192.168.200.200
acm_ipnl_handler: System address removed ib1 : 192.168.200.200
acm_ipnl_handler: New system address available ib1 : 192.168.200.200

and everything is OK. Fail-back:

acm_ipnl_handler: Link added : ib0
acm_ipnl_handler: New system address available ib0 : 192.168.200.200
acm_ipnl_handler: System address removed ib0 : 192.168.200.200
acm_ipnl_handler: New system address available ib0 : 192.168.200.200
acm_ipnl_handler: System address removed ib1 : 192.168.200.200

The address is moved from ib1 to ib0, thereafter deleted.

This implies that ibacm looses the address when it's moved back to the
original device.

With this patch, we see:

acm_ipnl_handler: System address removed ib0 : 192.168.200.200
acm_ipnl_handler: New system address available ib1 : 192.168.200.200
acm_ipnl_handler: System address removed ib1 : 192.168.200.200
acm_ipnl_handler: New system address available ib1 : 192.168.200.200
acm_ipnl_handler: Link added : ib0
acm_ipnl_handler: System address removed ib1 : 192.168.200.200
acm_ipnl_handler: New system address available ib0 : 192.168.200.200
acm_ipnl_handler: System address removed ib0 : 192.168.200.200
acm_ipnl_handler: New system address available ib0 : 192.168.200.200

The first lines are failover, after the "Link added : ib0", it's
fail-back (which is done 10 seconds after link up).

Now we see that the fail-back address is properly restored.

Orabug: 28860366

Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Sudhakar Dindukurti <sudhakar.dindukurti@oracle.com>
---

v1 -> v2:
   * Changed $Subject
   * Added Sudhakar's r-b

Signed-off-by: Brian Maly <brian.maly@oracle.com>
net/rds/ib.c

index 343051203e17dbcaf17df7116e4d72484382a3b8..04f4207c7b3b8a9a7e4bd553228be749f60dc057 100644 (file)
@@ -907,7 +907,7 @@ static int rds_ib_move_ip4(char                     *from_dev,
        sin->sin_family = AF_INET;
 
        /* Set the primary IP if it hasn't been set */
-       if (ip_config[to_port].ip_addr) {
+       if (ip_config[to_port].ip_addr && failover) {
                strcpy(ir->ifr_ifrn.ifrn_name, ip_config[to_port].dev->name);
                ret = inet_ioctl(rds_ib_inet_socket, SIOCGIFADDR,
                                 (unsigned long)ir);