Re: [PATCH net v2 0/2] net: dsa: realtek: rtl8365mb: fix FDB lookups in VLAN-unaware bridges

From: Stijn Cleynhens

Date: Wed Nov 25 2026 - 08:14:02 EST


On Sun, 22 Nov 2026 15:04:47 +0100 Mieczyslaw Nalewaj wrote:
> Since you have family D hardware and work on FDB lookups in VLAN-unaware
> bridges, could you please take a look at two patches of it, and test them
> if you have time:
>
> - 7/14, which makes IVL_EN of the 4K VLAN entries follow the VLAN
> filtering state on family D;
> - 12/14, which handles the L2/LUT differences on family D: no EFID, so
> an offloaded VLAN-unaware bridge is put in FID 1 with the port-based FID
> registers while standalone ports stay in FID 0, plus the lookup-hit
> isolation fallback (0x0A10 bit 0).

Hi Mieczyslaw,

I tested v14, where these two are 7/15 and 12/15, on the RTL8367S-VB
of a TP-Link Deco X50-PoE (IPQ5018, CPU port on HSGMII), on OpenWrt's
6.18 with the rtl8365mb backports and the six DCB/QoS commits from
net-next that v14 builds on.

The chip on this board reports version 0x0050, which v14 does not
know, so I added an entry for it. Its port 7 also drives an RTL8221B
over the second SerDes (SDS1); I carry that as a separate patch and
can send it on top of your series once it is in.

- Boot: the CPU port came up and passed traffic on 6 of 6 boots,
without the re-latch work from your v8.

- A station that moves from behind a user port to behind the CPU
port, 10 pings each, the learned entry replaced by the static CPU
one each time:
untagged, VLAN filtering off: 10/10
untagged, VLAN filtering on: 10/10
tagged in VLAN 20, filtering off: 10/10

- With the bridge VLAN-unaware, 12/15 set PBFIDEN and FID 1 on both
user ports and left the CPU port out; with filtering back on, both
were cleared again. A host behind the RTL8221B port answered 10/10
through the other user port while unaware, so the hardware forwards
between the two in FID 1.

- A second bridge falls back to software bridging, as max_num_bridges
is 1 on family D; a host behind it answered 5/5 and was no longer
reachable from the first bridge. A standalone port with the same
MAC address as the bridge worked next to it, 15/15 on both at once.

I did not try to trigger the lookup-hit isolation fallback on purpose.

My v3 for the RTL8367S, not posted yet, touches the same things on
family C:

- 12/15 and my 2/3 both use the port-based FID registers
0x07AC/0x07AD and write the VID 0 entries in SVL with the FID of the
port. You use the fixed FID 1 for the one offloaded bridge, as
family D has no EFID; I keep the FID of a port equal to its EFID, so
each bridge has its own FID. You leave port-based FID off on the
CPU port, I enable it on all ports, with FID 0 on standalone ports
and the CPU port.

- 7/15 and my 3/3 both switch IVL_EN of the VLANs in use with the
filtering state and keep a bitmap of those VLANs. 7/15 does it for
the whole switch, IVL in all VLANs as soon as one user port filters;
my 3/3 does it per VLAN, IVL while one of the member ports of that
VLAN filters. Family C has the EFID, so per VLAN works there; I
have not tried it on family D.

As both write the same registers and both keep a bitmap of the VLANs
in use, I will base v3 on your series once it is in net-next: use your
vlan_4k_used bitmap, and add the family C paths next to your family D
ones in port_set_efid() and for IVL_EN, rather than a second copy.

Stijn