Re: [PATCH net v5] net: dsa: qca8k: preserve port state across MTU changes

From: Yongzhao Chen

Date: Mon Oct 19 2026 - 15:02:02 EST


On Mon, 19 Oct 2026 11:02:30 +0000 netdev-bot+sashiko@xxxxxxxxxx wrote:
> That path only reverts the conduit MTU. Does the switch-global
> MAX_FRAME_SIZE register then keep the new value, while DSA and the
> conduit keep the old MTU? Nothing seems to write the old frame size
> back.

Yes. With v5, a failed restore after a successful frame-size write
leaves the new frame size in the switch while DSA keeps the old MTU.
On a fixed-link CPU port the same failure can keep the MAC off until
a link flap or reboot.

> Two options: keep returning success once MAX_FRAME_SIZE has been
> written, or roll MAX_FRAME_SIZE back on failure. Either way, should a
> failed restore stop being treated as the saved state on later calls?

v6 takes the first option: it returns the result of the frame-size
write, and a later restore failure no longer replaces it. A failed
PORT_STATUS write now keeps its target and is retried every second
from delayed work, so a fixed-link port does not depend on another
mac_link_up(). Newer port decisions replace the pending bits. The
next MTU change first recovers pending writes on ports 0 and 6 and
returns an error if that fails, so a failed restore is not taken as
the saved state.

A userspace harness that compiles the driver functions and
dsa_user_change_mtu() now covers both cases, and v5 fails it. v6 has
not been tested on hardware. I will send it separately.

Thanks,
Yongzhao Chen

pw-bot: cr