• Vladimir Oltean's avatar
    net: mscc: ocelot: rebalance LAGs on link up/down events · 23ca3b72
    Vladimir Oltean authored
    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>
    23ca3b72
ocelot.h 24.2 KB