Re: [net-next PATCH v2 6/8] net: dsa: realtek: rtl8365mb: add port_bridge_{join,leave}
From: Linus Walleij
Date: Tue May 05 2026 - 08:33:20 EST
On Sun, May 3, 2026 at 8:19 AM Luiz Angelo Daros de Luca
<luizluca@xxxxxxxxx> wrote:
> From: Alvin Šipraga <alsi@xxxxxxxxxxxxxxx>
>
> Implement hardware offloading of bridge functionality. This is achieved
> by using the per-port isolation registers, which contain a forwarding
> port mask. The switch will refuse to forward packets ingressed on a
> given port to a port which is not in its forwarding mask.
>
> For each bridge that is offloaded, use the DSA-provided bridge number
> for the Extended Filtering ID (EFID). When using Independent VLAN
> Learning (IVL), the forwarding database is keyed with the tuple
> {VID, MAC, EFID}. There are 8 EFIDs available (0~7), but we reserve the
> default EFID 0 for standalone ports where learning is disabled. This
> fits nicely because DSA indexes the bridge number starting from 1.
>
> Because of the limited number of EFIDs, we have to set the
> max_num_bridges property of our switch to 7: we can't offload more than
> that or we will fail to offer IVL as at least two bridges would end up
> having to share an EFID.
>
> Co-developed-by: Alvin Šipraga <alsi@xxxxxxxxxxxxxxx>
> Signed-off-by: Alvin Šipraga <alsi@xxxxxxxxxxxxxxx>
> Signed-off-by: Luiz Angelo Daros de Luca <luizluca@xxxxxxxxx>
Sweet, exactly like this! Good work.
Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>
Yours,
Linus Walleij