Re: [PATCH net-next v16 07/15] net: dsa: realtek: rtl8365mb: set and get VLAN 4k for family D

From: Mieczyslaw Nalewaj

Date: Mon Nov 30 2026 - 14:27:16 EST


> > + dsa_switch_for_each_user_port(dp, ds)
> > + rtl83xx_port_fast_age(ds, dp->index);
> > +
> > + return 0;
>
> [Severity: Low]
> Can a failed flush go unnoticed here? The commit message says:
>
> After a successful switch-wide IVL_EN change, flush the dynamically
> learned L2 entries on every user port, so that none learned with the
> previous SVL/IVL key remains ... Such entries must not occupy LUT
> slots or become visible again after a later toggle.
>
> rtl83xx_port_fast_age() returns void. When l2_flush fails, it only logs
> the error:
[...]
> Should this path also flush the user ports? And should a flush failure
> be returned to the caller rather than only logged?

rtl83xx_port_fast_age() implements DSA's .port_fast_age callback, which
returns void by design across the DSA subsystem (any underlying bus/timeout
errors are logged internally). Additionally, if a flush error occurred after
all active 4K VLAN entries have already been updated, rolling back the
VLAN table state wouldn't reliably recover from it either. Keeping the
standard DSA fast-age helper here is intentional.