]> git.baikalelectronics.ru Git - kernel.git/commit
net: ocelot: fix switchdev objects synced for wrong netdev with LAG offload
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 13 Jul 2021 09:33:50 +0000 (12:33 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Jul 2021 16:30:46 +0000 (09:30 -0700)
commit8b25b0a7b77eec579570ade5c94b81a960f4d6e4
tree76fdf4b19d4c1957b1a9af0622a4ab59f8c46880
parent42f5e21083e8b3cdfbd989e7004f9165b2170f0b
net: ocelot: fix switchdev objects synced for wrong netdev with LAG offload

The point with a *dev and a *brport_dev is that when we have a LAG net
device that is a bridge port, *dev is an ocelot net device and
*brport_dev is the bonding/team net device. The ocelot net device
beneath the LAG does not exist from the bridge's perspective, so we need
to sync the switchdev objects belonging to the brport_dev and not to the
dev.

Fixes: 96b87d5ca459 ("net: ocelot: replay switchdev events when joining bridge")
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