Skip to content

Commit 32d4c56

Browse files
wkzkuba-moo
authored andcommitted
net: bonding: Notify ports about their initial state
When creating a static bond (e.g. balance-xor), all ports will always be enabled. This is set, and the corresponding notification is sent out, before the port is linked to the bond upper. In the offloaded case, this ordering is hard to deal with. The lower will first see a notification that it can not associate with any bond. Then the bond is joined. After that point no more notifications are sent, so all ports remain disabled. This change simply sends an extra notification once the port has been linked to the upper to synchronize the initial state. Signed-off-by: Tobias Waldekranz <[email protected]> Acked-by: Jay Vosburgh <[email protected]> Tested-by: Vladimir Oltean <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent bb5c64c commit 32d4c56

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1922,6 +1922,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
19221922
goto err_unregister;
19231923
}
19241924

1925+
bond_lower_state_changed(new_slave);
1926+
19251927
res = bond_sysfs_slave_add(new_slave);
19261928
if (res) {
19271929
slave_dbg(bond_dev, slave_dev, "Error %d calling bond_sysfs_slave_add\n", res);

0 commit comments

Comments
 (0)