mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 19:13:47 +02:00
bonding: handle BOND_LINK_FAIL, BOND_LINK_BACK as valid link states
Before the fixed commit, we check slave->new_link during commit
state, which values are only BOND_LINK_{NOCHANGE, UP, DOWN}. After
the commit, we start using slave->link_new_state, which state also could
be BOND_LINK_{FAIL, BACK}.
For example, when we set updelay/downdelay, after a failover,
the slave->link_new_state could be set to BOND_LINK_{FAIL, BACK} in
bond_miimon_inspect(). And later in bond_miimon_commit(), it will treat
it as invalid and print an error, which would cause confusion for users.
[ 106.440254] bond0: (slave veth2): link status down for interface, disabling it in 200 ms
[ 106.440265] bond0: (slave veth2): invalid new link 1 on slave
[ 106.648276] bond0: (slave veth2): link status definitely down, disabling slave
[ 107.480271] bond0: (slave veth2): link status up, enabling it in 200 ms
[ 107.480288] bond0: (slave veth2): invalid new link 3 on slave
[ 107.688302] bond0: (slave veth2): link status definitely up, 10000 Mbps full duplex
Let's handle BOND_LINK_{FAIL, BACK} as valid link states.
Fixes: 1899bb3251 ("bonding: fix state transition issue in link monitoring")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://patch.msgid.link/20260304-b4-bond_updelay-v1-2-f72eb2e454d0@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
45fc134bcf
commit
3348be7978
|
|
@ -2801,8 +2801,14 @@ static void bond_miimon_commit(struct bonding *bond)
|
|||
|
||||
continue;
|
||||
|
||||
case BOND_LINK_FAIL:
|
||||
case BOND_LINK_BACK:
|
||||
slave_dbg(bond->dev, slave->dev, "link_new_state %d on slave\n",
|
||||
slave->link_new_state);
|
||||
continue;
|
||||
|
||||
default:
|
||||
slave_err(bond->dev, slave->dev, "invalid new link %d on slave\n",
|
||||
slave_err(bond->dev, slave->dev, "invalid link_new_state %d on slave\n",
|
||||
slave->link_new_state);
|
||||
bond_propose_link_state(slave, BOND_LINK_NOCHANGE);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user