net: mscc: ocelot: rebalance LAGs on link up/down events
At present there is an issue when ocelot is offloading a bonding interface, but one of the links of the physical ports goes down. Traffic keeps being hashed towards that destination, and of course gets dropped on egress. Monitor the netdev notifier events emitted by the bonding driver for changes in the physical state of lower interfaces, to determine which ports are active and which ones are no longer. Then extend ocelot_get_bond_mask to return either the configured bonding interfaces, or the active ones, depending on a boolean argument. The code that does rebalancing only needs to do so among the active ports, whereas the bridge forwarding mask and the logical port IDs still need to look at the permanently bonded ports. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> (cherry picked from commit 23ca3b72) Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> [Xulin: Original patch taken from https://github.com/vladimiroltean/linux/commits/felix-dsa-tag-vlan-stable ] Signed-off-by: Xulin Sun <xulin.sun@windriver.com>
Please register or sign in to comment