Re: [PATCH net-next v10 11/12] net: dsa: realtek: rtl8365mb: make L2/LUT access work on family D

From: Mieczyslaw Nalewaj

Date: Tue Nov 17 2026 - 01:33:14 EST


Subject: Re: [PATCH net-next v10 11/12] net: dsa: realtek: rtl8365mb: make L2/LUT access work on family D

Hi,

Thanks for the review. Replying to the point about a MAC learned in FID 0 on an offloaded bridge port taking over lookups for frames entering a standalone port.

The mechanism is as described, and the commit message already documents it as a known limitation, including the case of a host on an offloaded port refreshing a forged entry. I would like to keep it as a documented limitation in this series, for these reasons:

1. Private FID for the offloaded bridge. The family D VLAN4K entry has a FID field, but it is only 2 bits wide, and I cannot confirm from the vendor API alone which FID the chip uses for learning when a standalone port or a VLAN-unaware bridge classifies traffic into a VLAN. Without fdb_isolation DSA also zeroes db.bridge.num, so fdb_add/del cannot tell bridge entries from port entries by EFID. Doing this properly needs hardware experiments that I cannot do reliably, and a wrong FID would break the VLAN-unaware case that was tested.

2. Disabling hardware learning on bridge ports. This does avoid the problem (it was the workaround in the report), but it turns all unicast on the offloaded bridge into flooding, which defeats the point of offloading.

3. Not offloading VLAN-unaware bridges. This removes the offload for the default OpenWrt br-lan configuration, which is the main use of the boards this series was tested on.

The impact is limited: an attacker needs a host on the local L2 segment of an offloaded port, and the effect is dropping traffic for one MAC on a standalone port until the entry ages out. Given max_num_bridges = 1 and no EFID, I think a documented limitation is the right trade-off for now. If someone with datasheet access can confirm how FID is used for learning on this chip, a per-bridge FID would be a reasonable follow-up.

Best regards,
Mieczyslaw Nalewaj