Le Mon, 9 May 2022 19:08:13 +0300, Vladimir Oltean <olteanv@xxxxxxxxx> a écrit : > On Mon, May 09, 2022 at 03:18:54PM +0200, Clément Léger wrote: > > Add Renesas RZ/N1 advanced 5 port switch driver. This switch > > handles 5 ports including 1 CPU management port. A MDIO bus is also > > exposed by this switch and allows to communicate with PHYs > > connected to the ports. Each switch port (except for the CPU > > management ports) is connected to the MII converter. > > > > This driver includes basic bridging support, more support will be > > added later (vlan, etc). > > > > Suggested-by: Jean-Pierre Geslin <jean-pierre.geslin@xxxxxxxxxx> > > Suggested-by: Phil Edworthy <phil.edworthy@xxxxxxxxxxx> > > Signed-off-by: Clément Léger <clement.leger@xxxxxxxxxxx> > > --- > > +static int a5psw_port_bridge_join(struct dsa_switch *ds, int port, > > + struct dsa_bridge bridge, > > + bool *tx_fwd_offload, > > + struct netlink_ext_ack *extack) > > +{ > > + struct a5psw *a5psw = ds->priv; > > + > > + /* We only support 1 bridge device */ > > + if (a5psw->br_dev && bridge.dev != a5psw->br_dev) { > > + NL_SET_ERR_MSG_MOD(extack, > > + "Forwarding offload supported > > for a single bridge"); > > I don't think I saw the dsa_slave_changeupper() patch that avoids > overwriting the extack when dsa_port_bridge_join() returns > -EOPNOTSUPP. Ok, I did not understood that dsa_slave_changeupper() *did* needed to be modified. I'll do that. > > > + return -EOPNOTSUPP; > > + } > > + > > + a5psw->br_dev = bridge.dev; > > + a5psw_flooding_set_resolution(a5psw, port, true); > > + a5psw_port_mgmtfwd_set(a5psw, port, false); > > + > > + return 0; > > By the way, does this switch pass > tools/testing/selftests/drivers/net/dsa/no_forwarding.sh? Unfortunately, the board I have only has 2 ports availables and thus, I can only test one bridge or two separated ports at a time... I *should* receive a 4 ports one in a near future but that not yet sure.