Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: dsa: return -EOPNOTSUPP when driver does not implement .port_lag_join

The DSA core has a layered structure, and even though we end up
returning 0 (success) to user space when setting a bonding/team upper
that can't be offloaded, some parts of the framework actually need to
know that we couldn't offload that.

For example, if dsa_switch_lag_join returns 0 as it currently does,
dsa_port_lag_join has no way to tell a successful offload from a
software fallback, and it will call dsa_port_bridge_join afterwards.
Then we'll think we're offloading the bridge master of the LAG, when in
fact we're not even offloading the LAG. In turn, this will make us set
skb->offload_fwd_mark = true, which is incorrect and the bridge doesn't
like it.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Vladimir Oltean and committed by
David S. Miller
b71d0987 e6a16043

+2 -2
+2 -2
net/dsa/switch.c
··· 427 427 info->port, info->lag, 428 428 info->info); 429 429 430 - return 0; 430 + return -EOPNOTSUPP; 431 431 } 432 432 433 433 static int dsa_switch_lag_leave(struct dsa_switch *ds, ··· 440 440 return ds->ops->crosschip_lag_leave(ds, info->sw_index, 441 441 info->port, info->lag); 442 442 443 - return 0; 443 + return -EOPNOTSUPP; 444 444 } 445 445 446 446 static int dsa_switch_mdb_add(struct dsa_switch *ds,