Re: [PATCH net-next] net: dsa: realtek: rtl8366rb: Fix up port isolation
From: Linus Walleij <linusw@kernel.org>
Date: 2026-07-11 21:33:35
On Sat, Jul 11, 2026 at 8:03 PM Luiz Angelo Daros de Luca [off-list ref] wrote:
quoted
- /* Start with all ports completely isolated */ - ret = rtl8366rb_port_set_isolation(priv, dp->index, 0); - if (ret) - return ret;If you don't isolate the ports, what is the default port status?
Hm as I wrote in the commit message:
"the next loop in the setup code, over the
user ports, isolate all the ports from each other, so only the CPU
port can see them."
It looks like this:
/* Configure user ports */
dsa_switch_for_each_port(dp, ds) {
if (!dsa_port_is_user(dp))
continue;
/* Forward only to the CPU, isolate from all other ports */
ret = rtl8366rb_port_set_isolation(priv, dp->index,
upports_mask);
if (ret)
return ret;
/* If we support cascade switches, it should also include the
* downstream DSA ports.
*/
downports_mask |= BIT(dp->index);
}
upports_mask is the bitmask for all CPU ports, so that should do what is
expected?
Yours,
Linus Walleij