summaryrefslogtreecommitdiff
path: root/include/soc
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-02-06 00:02:19 +0200
committerJakub Kicinski <kuba@kernel.org>2021-02-06 14:51:51 -0800
commit23ca3b727ee6b432166391607b614d3a6beb6784 (patch)
tree3dd53f46f04d8e8d9dc9dad7a3b12d356c3d5a1b /include/soc
parent21357b614d3fcf8203b32468d1c8e6332ea25aa1 (diff)
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>
Diffstat (limited to 'include/soc')
-rw-r--r--include/soc/mscc/ocelot.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h
index 089e552719e0..6e806872cd24 100644
--- a/include/soc/mscc/ocelot.h
+++ b/include/soc/mscc/ocelot.h
@@ -613,6 +613,7 @@ struct ocelot_port {
bool is_dsa_8021q_cpu;
struct net_device *bond;
+ bool lag_tx_active;
};
struct ocelot {