Thread View: linux.kernel.netdev
2 messages
2 total messages
Started by Stijn Cleynhens
Fri, 06 Nov 2026 15:01
Re: [PATCH net 1/2] net: dsa: realtek: rtl8365mb: use IVL in VLAN 0
Author: Stijn Cleynhens
Date: Fri, 06 Nov 2026 15:01
Date: Fri, 06 Nov 2026 15:01
26 lines
12286 bytes
12286 bytes
On Wed, Nov 04, 2026 at 04:22:58PM +0100, Alvin Šipraga wrote: > Yes, all this makes sense. I actually remember doing basically the same > thing back when I was working on this, but it seems not to have survived > the final work by Luiz. It would be good to get his input on why. Luiz, do you remember a reason the IVL setup of VID 0 was dropped? I could not find one, and the switch only matches the driver's VID 0 entries with it. > So I'm not sure I like this function being added to the vlan.c > library. Semantically it makes more sense to me for the main.c driver to > actually call rtl8365mb_vlan4k_port_add() for each port, so as to > explicitly say: "all ports are, one way or another, members of this > neutral VLAN". Then you would get IVL automatically. I kept it out of rtl8365mb_vlan_4k_port_add() on purpose: making every port a member of VID 0 also sets the member mask, which the ingress filter of a VLAN-aware port then checks. I only wanted to change the learning mode, not which frames a filtering port accepts. > Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com> Thanks! Stijn
Re: [PATCH net 1/2] net: dsa: realtek: rtl8365mb: use IVL in VLAN 0
Author: Luiz Angelo Daros de Luca
Date: Mon, 09 Nov 2026 21:20
Date: Mon, 09 Nov 2026 21:20
54 lines
14185 bytes
14185 bytes
> > Yes, all this makes sense. I actually remember doing basically the same
> > thing back when I was working on this, but it seems not to have survived
> > the final work by Luiz. It would be good to get his input on why.
>
> Luiz, do you remember a reason the IVL setup of VID 0 was dropped? I
> could not find one, and the switch only matches the driver's VID 0
> entries with it.
Yes, it was there:
/* Add all ports to VLAN0. Not sure if needed. But at least for
* learning, we need to set the ivl_en bit to 1 so that the switch
* learns with {VID, MAC, EFID} rather than {FID, MAC, EFID}.
*/
// TODO find right place for this
{
struct rtl8365mb_vlan4k vlan4k = { 0 };
ret = rtl8365mb_vlan_get_vlan4k(priv, 0, &vlan4k);
if (ret)
return ret;
vlan4k.member |= RTL8365MB_PORTMASK;
vlan4k.ivl_en = true;
ret = rtl8365mb_vlan_set_vlan4k(priv, &vlan4k);
if (ret)
return ret;
}
I missed that one. I might have focused too much on filtered VLAN and
missed the vlan unaware bridges.
On any vlan4k write, IVL is always enabled. It is just vlan ID 0 was
never written by the driver. We would just need to write it once.
Another way (untested) to get the same result would be to call
rtl8365mb_vlan_4k_port_del() on any port for VID=0 during setup.
Reviewed-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Best regards,
Luiz
> > So I'm not sure I like this function being added to the vlan.c
> > library. Semantically it makes more sense to me for the main.c driver to
> > actually call rtl8365mb_vlan4k_port_add() for each port, so as to
> > explicitly say: "all ports are, one way or another, members of this
> > neutral VLAN". Then you would get IVL automatically.
>
> I kept it out of rtl8365mb_vlan_4k_port_add() on purpose: making every
> port a member of VID 0 also sets the member mask, which the ingress
> filter of a VLAN-aware port then checks. I only wanted to change the
> learning mode, not which frames a filtering port accepts.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads