Skip to content

Commit f24a49a

Browse files
IoanaCiorneikuba-moo
authored andcommitted
dpaa2-switch: do not ask for MDB, VLAN and FDB replay
Starting with commit 4e51bf4 ("net: bridge: move the switchdev object replay helpers to "push" mode") the switchdev_bridge_port_offload() helper was extended with the intention to provide switchdev drivers easy access to object addition and deletion replays. This works by calling the replay helpers with non-NULL notifier blocks. In the same commit, the dpaa2-switch driver was updated so that it passes valid notifier blocks to the helper. At that moment, no regression was identified through testing. In the meantime, the blamed commit changed the behavior in terms of which ports get hit by the replay. Before this commit, only the initial port which identified itself as offloaded through switchdev_bridge_port_offload() got a replay of all port objects and FDBs. After this, the newly joining port will trigger a replay of objects on all bridge ports and on the bridge itself. This behavior leads to errors in dpaa2_switch_port_vlans_add() when a VLAN gets installed on the same interface multiple times. The intended mechanism to address this is to pass a non-NULL ctx to the switchdev_bridge_port_offload() helper and then check it against the port's private structure. But since the driver does not have any use for the replayed port objects and FDBs until it gains support for LAG offload, it's better to fix the issue by reverting the dpaa2-switch driver to not ask for replay. The pointers will be added back when we are prepared to ignore replays on unrelated ports. Fixes: b28d580 ("net: bridge: switchdev: replay all VLAN groups") Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/20231212164326.2753457-3-ioana.ciornei@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 2aad7d4 commit f24a49a

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,9 +1998,6 @@ static int dpaa2_switch_port_attr_set_event(struct net_device *netdev,
19981998
return notifier_from_errno(err);
19991999
}
20002000

2001-
static struct notifier_block dpaa2_switch_port_switchdev_nb;
2002-
static struct notifier_block dpaa2_switch_port_switchdev_blocking_nb;
2003-
20042001
static int dpaa2_switch_port_bridge_join(struct net_device *netdev,
20052002
struct net_device *upper_dev,
20062003
struct netlink_ext_ack *extack)
@@ -2043,9 +2040,7 @@ static int dpaa2_switch_port_bridge_join(struct net_device *netdev,
20432040
goto err_egress_flood;
20442041

20452042
err = switchdev_bridge_port_offload(netdev, netdev, NULL,
2046-
&dpaa2_switch_port_switchdev_nb,
2047-
&dpaa2_switch_port_switchdev_blocking_nb,
2048-
false, extack);
2043+
NULL, NULL, false, extack);
20492044
if (err)
20502045
goto err_switchdev_offload;
20512046

@@ -2079,9 +2074,7 @@ static int dpaa2_switch_port_restore_rxvlan(struct net_device *vdev, int vid, vo
20792074

20802075
static void dpaa2_switch_port_pre_bridge_leave(struct net_device *netdev)
20812076
{
2082-
switchdev_bridge_port_unoffload(netdev, NULL,
2083-
&dpaa2_switch_port_switchdev_nb,
2084-
&dpaa2_switch_port_switchdev_blocking_nb);
2077+
switchdev_bridge_port_unoffload(netdev, NULL, NULL, NULL);
20852078
}
20862079

20872080
static int dpaa2_switch_port_bridge_leave(struct net_device *netdev)

0 commit comments

Comments
 (0)