Re: [PATCH net-next v12 12/13] net: dsa: realtek: rtl8365mb: make L2/LUT access work on family D
From: Gustavo Foletto Mora
Date: Sat Nov 21 2026 - 13:26:34 EST
Hi Mieczyslaw,
Tested v13-pre2's port-based FID on a TP-Link EX511 v2 (RTL8367S-VB),
over loopback cables between bridge ports and standalone ports of the
same switch:
- 0x07AC/0x07AD read back as intended: FID 1 on the ports of the
VLAN-unaware bridge (the uplink included), nothing on the standalone
ports or the CPU port, nothing in a VLAN-aware bridge, set and
cleared again by live vlan_filtering toggles, and cleared once the
ports leave the bridge.
- What failed on v12 with the shared FID 0 now works: unicast between
two hosts on standalone ports through the VLAN-unaware bridge with
learning on (also when the bridge ports have a PVID, and with frames
tagged with a VID the bridge does not have), and static and group
entries without a VID no longer catch frames arriving on standalone
ports.
- Everything else gives the same results as on v12.
One limitation remains in VLAN-aware bridges, unchanged from v12 as far
as I can see: a frame tagged with one of the bridge's VIDs that enters
a standalone port is looked up in that VLAN. With VLAN 50 tagged on two
bridge ports and the hosts learned there, the frames that come back in
through the hosts' own standalone ports are sent towards the bridge
ports and dropped by the isolation; with learning off they reach the
CPU. Untagged access VLANs are not affected. This needs the same MAC on
a standalone port and in the bridge, so I think it is only a corner
case.
Family D seems to have a setting for it. The Realtek API in the stock
firmware has dal_rtl8367d_l2_lookupHitIsolationAction_set(), with no
family C counterpart, which writes bit 0 of 0x0A10. The reset value 0
drops a frame whose lookup hits a port outside the ingress port's
isolation mask. I tried two test-only changes on top of v13-pre2:
- 0x0A10 bit 0 set to 1: the case above works (20 of 20 replies), but
a frame for a host behind the port it came in on is flooded instead
of dropped, since the ingress port is not in its own mask. A static
entry or an MDB entry on the ingress port no longer cuts the traffic.
- the same, plus each port in its own isolation mask: the switch still
never sends a frame back out of its ingress port (I checked that with
a single loop cable first), the case above works, and the static
entry and MDB tests pass again.
That was a focused run only: the cabling check, isolation between
standalone ports, the VLAN-aware bridge tests (load included) and
unicast with learning in the VLAN-unaware bridge. If you want to make
this change, I will run the full set of tests on it.
Tested-by: Gustavo Foletto Mora <gusfmora@xxxxxxxxx>
Thanks,
Gustavo