Skip to content

Commit f1e0e0e

Browse files
tlfalconSomasundaram Krishnasamy
authored andcommitted
bonding: Force slave speed check after link state recovery for 802.3ad
Orabug: 31730609 The following scenario was encountered during testing of logical partition mobility on pseries partitions with bonded ibmvnic adapters in LACP mode. 1. Driver receives a signal that the device has been swapped, and it needs to reset to initialize the new device. 2. Driver reports loss of carrier and begins initialization. 3. Bonding driver receives NETDEV_CHANGE notifier and checks the slave's current speed and duplex settings. Because these are unknown at the time, the bond sets its link state to BOND_LINK_FAIL and handles the speed update, clearing AD_PORT_LACP_ENABLE. 4. Driver finishes recovery and reports that the carrier is on. 5. Bond receives a new notification and checks the speed again. The speeds are valid but miimon has not altered the link state yet. AD_PORT_LACP_ENABLE remains off. Because the slave's link state is still BOND_LINK_FAIL, no further port checks are made when it recovers. Though the slave devices are operational and have valid speed and duplex settings, the bond will not send LACPDU's. The simplest fix I can see is to force another speed check in bond_miimon_commit. This way the bond will update AD_PORT_LACP_ENABLE if needed when transitioning from BOND_LINK_FAIL to BOND_LINK_UP. CC: Jarod Wilson <[email protected]> CC: Jay Vosburgh <[email protected]> CC: Veaceslav Falico <[email protected]> CC: Andy Gospodarek <[email protected]> Signed-off-by: Thomas Falcon <[email protected]> Signed-off-by: David S. Miller <[email protected]> (cherry picked from commit 12185df) Signed-off-by: Brian Maly <[email protected]> Reviewed-by: Jack Vogel <[email protected]> Reviewed-by: Venkat Venkatsubra <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]>
1 parent dedfd8d commit f1e0e0e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2153,6 +2153,15 @@ static void bond_miimon_commit(struct bonding *bond)
21532153
bond_for_each_slave(bond, slave, iter) {
21542154
switch (slave->new_link) {
21552155
case BOND_LINK_NOCHANGE:
2156+
/* For 802.3ad mode, check current slave speed and
2157+
* duplex again in case its port was disabled after
2158+
* invalid speed/duplex reporting but recovered before
2159+
* link monitoring could make a decision on the actual
2160+
* link status
2161+
*/
2162+
if (BOND_MODE(bond) == BOND_MODE_8023AD &&
2163+
slave->link == BOND_LINK_UP)
2164+
bond_3ad_adapter_speed_duplex_changed(slave);
21562165
continue;
21572166

21582167
case BOND_LINK_UP:

0 commit comments

Comments
 (0)