Re: [PATCH net-next 1/2] net: dsa: rzn1-a5psw: enable DPBU for CPU port and fix STP states

From: Clément Léger
Date: Thu Mar 30 2023 - 11:01:11 EST


Le Thu, 30 Mar 2023 17:56:23 +0300,
Vladimir Oltean <olteanv@xxxxxxxxx> a écrit :

> On Thu, Mar 30, 2023 at 10:48:28AM +0200, Clément Léger wrote:
> > Actually, after leaving a bridge, it seems like the DSA core put the
> > port in STP DISABLED state. Which means it will potentially leave that
> > port with TX disable... Since this TX enable is applying not only on
> > bridge port but also on standalone port, it seems like this also needs
> > to be reenabled in bridge_leave().
>
> That's... not true? dsa_port_switchdev_unsync_attrs() has:
>
> /* Port left the bridge, put in BR_STATE_DISABLED by the bridge layer,
> * so allow it to be in BR_STATE_FORWARDING to be kept functional
> */
> dsa_port_set_state_now(dp, BR_STATE_FORWARDING, true);
>
> a dump_stack() could help explain what's going on in your system?

Indeed, I was referring to the messages displayed by the STP setp state
function (br0: port 2(lan1) entered disabled state). But the DSA core
indeed calls the stp_set_state() to enable forwarding which then
reenables the Tx path so I guess we are all good with this series.
Sorry for that.

--
Clément Léger,
Embedded Linux and Kernel engineer at Bootlin
https://bootlin.com