Message ID | 20231204163528.1797565-9-ioana.ciornei@nxp.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | dpaa2-switch: small improvements | expand |
On Mon, 4 Dec 2023 18:35:28 +0200 Ioana Ciornei wrote: > In case a switch interface is joining a bridge, its FDB might change. In > case this happens, we have to recreate the egress flood setup of the FDB > that we just left. For this to happen, keep track of the old FDB and > just call dpaa2_switch_fdb_set_egress_flood() on it. Is this not a fix? FWIW the commit message is a bit hard to parse, rephrasing would help..
On Tue, Dec 05, 2023 at 08:04:55PM -0800, Jakub Kicinski wrote: > On Mon, 4 Dec 2023 18:35:28 +0200 Ioana Ciornei wrote: > > In case a switch interface is joining a bridge, its FDB might change. In > > case this happens, we have to recreate the egress flood setup of the FDB > > that we just left. For this to happen, keep track of the old FDB and > > just call dpaa2_switch_fdb_set_egress_flood() on it. > > Is this not a fix? FWIW the commit message is a bit hard to parse, > rephrasing would help.. This is not actually fixing up an issue which can be seen but maybe it's better to just have it through the net tree. I will split the patch set and send some of them through net. I'll rephrase the commit message and add a bit more information.
On Tue, 12 Dec 2023 14:09:43 +0200 Ioana Ciornei wrote: > > Is this not a fix? FWIW the commit message is a bit hard to parse, > > rephrasing would help.. > > This is not actually fixing up an issue which can be seen but maybe it's > better to just have it through the net tree. I will split the patch set > and send some of them through net. > > I'll rephrase the commit message and add a bit more information. Same goes for all the other changes. You don't have to send the patches to net if there's not user visible impact, just please add the explanations to the commit messages.
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c index dd878e87eef1..35f71c3668ba 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c @@ -2008,6 +2008,7 @@ static int dpaa2_switch_port_bridge_join(struct net_device *netdev, { struct ethsw_port_priv *port_priv = netdev_priv(netdev); struct ethsw_core *ethsw = port_priv->ethsw_data; + struct dpaa2_switch_fdb *old_fdb = port_priv->fdb; bool learn_ena; int err; @@ -2028,6 +2029,11 @@ static int dpaa2_switch_port_bridge_join(struct net_device *netdev, if (err) goto err_egress_flood; + /* Recreate the egress flood domain of the FDB that we just left. */ + err = dpaa2_switch_fdb_set_egress_flood(ethsw, old_fdb->fdb_id); + if (err) + goto err_egress_flood; + err = switchdev_bridge_port_offload(netdev, netdev, NULL, &dpaa2_switch_port_switchdev_nb, &dpaa2_switch_port_switchdev_blocking_nb,
In case a switch interface is joining a bridge, its FDB might change. In case this happens, we have to recreate the egress flood setup of the FDB that we just left. For this to happen, keep track of the old FDB and just call dpaa2_switch_fdb_set_egress_flood() on it. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> --- drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c | 6 ++++++ 1 file changed, 6 insertions(+)