Skip to content
Commit 02d369f0 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by Xulin Sun
Browse files

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: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
(cherry picked from commit 23ca3b72)
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
[Xulin: Original patch taken from
https://github.com/vladimiroltean/linux/commits/felix-dsa-tag-vlan-stable

]
Signed-off-by: default avatarXulin Sun <xulin.sun@windriver.com>
parent e1b7b4e8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment