[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <10902.1575756592@famine>
Date: Sat, 07 Dec 2019 14:09:52 -0800
From: Jay Vosburgh <jay.vosburgh@...onical.com>
To: Mahesh Bandewar <maheshb@...gle.com>
cc: Andy Gospodarek <andy@...yhouse.net>,
Veaceslav Falico <vfalico@...il.com>,
David Miller <davem@...emloft.net>,
Netdev <netdev@...r.kernel.org>,
Mahesh Bandewar <mahesh@...dewar.net>
Subject: Re: [PATCH net] bonding: fix active-backup transition after link failure
Mahesh Bandewar <maheshb@...gle.com> wrote:
>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@...onical.com>
>Signed-off-by: Mahesh Bandewar <maheshb@...gle.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);
How does this fix things? Doesn't bond_select_active_slave() ->
bond_change_active_slave() set the backup flag correctly via a call to
bond_set_slave_active_flags() when it sets a slave to be the active
slave? If this change resolves the problem, I'm not sure how this ever
worked correctly, even prior to 1899bb325149.
-J
> }
>
> slave_info(bond->dev, slave->dev, "link status definitely up, %u Mbps %s duplex\n",
>--
>2.24.0.393.g34dc348eaf-goog
>
---
-Jay Vosburgh, jay.vosburgh@...onical.com
Powered by blists - more mailing lists