netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] bonding: fix active-backup transition after link failure
@ 2019-12-06 23:44 Mahesh Bandewar
  2019-12-07 22:09 ` Jay Vosburgh
  0 siblings, 1 reply; 9+ messages in thread
From: Mahesh Bandewar @ 2019-12-06 23:44 UTC (permalink / raw)
  To: Jay Vosburgh, Andy Gospodarek, Veaceslav Falico, David Miller
  Cc: Netdev, Mahesh Bandewar, Mahesh Bandewar, Jay Vosburgh

After the recent fix 1899bb325149 ("bonding: fix state transition
issue in link monitoring"), the active-backup mode with miimon
initially come-up fine but after a link-failure, both members
transition into backup state.

Following steps to reproduce the scenario (eth1 and eth2 are the
slaves of the bond):

    ip link set eth1 up
    ip link set eth2 down
    sleep 1
    ip link set eth2 up
    ip link set eth1 down
    cat /sys/class/net/eth1/bonding_slave/state
    cat /sys/class/net/eth2/bonding_slave/state

Fixes: 1899bb325149 ("bonding: fix state transition issue in link monitoring")
CC: Jay Vosburgh <jay.vosburgh@canonical.com>
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
---
 drivers/net/bonding/bond_main.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index fcb7c2f7f001..ad9906c102b4 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2272,9 +2272,6 @@ static void bond_miimon_commit(struct bonding *bond)
 			} else if (BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP) {
 				/* make it immediately active */
 				bond_set_active_slave(slave);
-			} else if (slave != primary) {
-				/* prevent it from being the active one */
-				bond_set_backup_slave(slave);
 			}
 
 			slave_info(bond->dev, slave->dev, "link status definitely up, %u Mbps %s duplex\n",
-- 
2.24.0.393.g34dc348eaf-goog


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-12-15 20:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06 23:44 [PATCH net] bonding: fix active-backup transition after link failure Mahesh Bandewar
2019-12-07 22:09 ` Jay Vosburgh
2019-12-09 18:41   ` Mahesh Bandewar (महेश बंडेवार)
2019-12-11 20:10     ` Mahesh Bandewar (महेश बंडेवार)
2019-12-12  6:38     ` Jay Vosburgh
2019-12-12 18:28       ` Mahesh Bandewar (महेश बंडेवार)
2019-12-13 20:28         ` Jay Vosburgh
2019-12-15  0:29           ` Jakub Kicinski
2019-12-15 20:18             ` Mahesh Bandewar (महेश बंडेवार)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).