diff options
author | Hangbin Liu <liuhangbin@gmail.com> | 2023-08-21 18:10:08 +0800 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-08-22 15:10:35 +0200 |
commit | 691b2bf1494620ff8c292626e4967c57e5705a8b (patch) | |
tree | 70ee659359aca3fee50db8e3b094bbe240f7eed4 /drivers/net/bonding | |
parent | 43c2817225fce05701f062a996255007481935e2 (diff) | |
download | lwn-691b2bf1494620ff8c292626e4967c57e5705a8b.tar.gz lwn-691b2bf1494620ff8c292626e4967c57e5705a8b.zip |
bonding: update port speed when getting bond speed
Andrew reported a bonding issue that if we put an active-back bond on top
of a 802.3ad bond interface. When the 802.3ad bond's speed/duplex changed
dynamically. The upper bonding interface's speed/duplex can't be changed at
the same time, which will show incorrect speed.
Fix it by updating the port speed when calling ethtool.
Reported-by: Andrew Schorr <ajschorr@alumni.princeton.edu>
Closes: https://lore.kernel.org/netdev/ZEt3hvyREPVdbesO@Laptop-X1/
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Link: https://lore.kernel.org/r/20230821101008.797482-1-liuhangbin@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index f398bec78457..ed7212e61c54 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -5718,6 +5718,7 @@ static int bond_ethtool_get_link_ksettings(struct net_device *bond_dev, */ bond_for_each_slave(bond, slave, iter) { if (bond_slave_can_tx(slave)) { + bond_update_speed_duplex(slave); if (slave->speed != SPEED_UNKNOWN) { if (BOND_MODE(bond) == BOND_MODE_BROADCAST) speed = bond_mode_bcast_speed(slave, |