summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mscc/ocelot.c
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-02-06 00:02:12 +0200
committerJakub Kicinski <kuba@kernel.org>2021-02-06 14:51:50 -0800
commit583cbbe3eed95cadd347b5dfe28e5d02f92ed109 (patch)
tree7335ce80a66c7d32ff062bd9477a5393c3c5f12c /drivers/net/ethernet/mscc/ocelot.c
parent41e66fa28fefc055ad2bf7acd1fbcfa94490ac97 (diff)
net: mscc: ocelot: don't refuse bonding interfaces we can't offload
Since switchdev/DSA exposes network interfaces that fulfill many of the same user space expectations that dedicated NICs do, it makes sense to not deny bonding interfaces with a bonding policy that we cannot offload, but instead allow the bonding driver to select the egress interface in software. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/mscc/ocelot.c')
-rw-r--r--drivers/net/ethernet/mscc/ocelot.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index 5f21799ad85b..33274d4fc5af 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -1316,12 +1316,16 @@ static void ocelot_setup_lag(struct ocelot *ocelot, int lag)
}
int ocelot_port_lag_join(struct ocelot *ocelot, int port,
- struct net_device *bond)
+ struct net_device *bond,
+ struct netdev_lag_upper_info *info)
{
struct net_device *ndev;
u32 bond_mask = 0;
int lag, lp;
+ if (info->tx_type != NETDEV_LAG_TX_TYPE_HASH)
+ return -EOPNOTSUPP;
+
rcu_read_lock();
for_each_netdev_in_bond_rcu(bond, ndev) {
struct ocelot_port_private *priv = netdev_priv(ndev);