OSDN Git Service

net: ocelot: call ocelot_netdevice_bridge_join when joining a bridged LAG
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 22 Mar 2021 23:51:51 +0000 (01:51 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Mar 2021 21:49:06 +0000 (14:49 -0700)
commit81ef35e7619a04b902ca457d60594f956154b9f2
tree8b5b9479e42438c1828e67e67d2744859cd2062d
parent010e269f91be8fc1436c753bfbbd9ce561151e71
net: ocelot: call ocelot_netdevice_bridge_join when joining a bridged LAG

Similar to the DSA situation, ocelot supports LAG offload but treats
this scenario improperly:

ip link add br0 type bridge
ip link add bond0 type bond
ip link set bond0 master br0
ip link set swp0 master bond0

We do the same thing as we do there, which is to simulate a 'bridge join'
on 'lag join', if we detect that the bonding upper has a bridge upper.

Again, same as DSA, ocelot supports software fallback for LAG, and in
that case, we should avoid calling ocelot_netdevice_changeupper.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot_net.c