Re: [PATCH net-next v4 5/9] net: dsa: realtek: rtl8365mb: set and get vlan 4k for family D

From: netdev-bot+sashiko

Date: Mon Oct 12 2026 - 21:10:00 EST


Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] Commit message wording (rejected by baseline, kept only because
requires_validation=true).

--

net: dsa: realtek: rtl8365mb: set and get vlan 4k for family D

The commit gives family D its own two-word CVLAN (VLAN4k) table layout
in rtl8365mb_vlan_4k_read() and rtl8365mb_vlan_4k_write(). It narrows
FID to 2 bits and drops the priority/meter fields. It also forces both
the IVL_EN and SVLAN_CHK_IVL_SVL bits to 1 on write.

> Reusing the three-word family C layout unconditionally means the third
> word is read from and written back to the register that holds it on
> family C, but does not exist as a distinct table word on family D's
> die; whatever data happens to be there gets folded into member/untag
> bits [10:8] on read, and re-written on every read-modify-write cycle
> in rtl8365mb_vlan_4k_port_set(). Give family D its own two-word
> pack/unpack instead.

[Severity: Low]
This isn't a bug, but could this paragraph say that the new path can't
run yet at this commit?

Every entry in rtl8365mb_chip_infos is still tagged RTL8365MB_FAMILY_C,
and rtl8365mb_detect() only matches entries in that table. So
rtl8365mb_get_family() never returns RTL8365MB_FAMILY_D here, and this
check is always false:

bool is_d = rtl8365mb_get_family(priv) == RTL8365MB_FAMILY_D;

The first FAMILY_D chip entry appears later, in "add support for
RTL8367S-VB". Until then, the is_d branches in rtl8365mb_vlan_4k_read()
and rtl8365mb_vlan_4k_write() are unreachable.

Would a short note on this help readers who see the paragraph above and
take it as a description of current runtime behavior?

--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/38872e6f-1264-4a93-9f81-8212173e909d%40yahoo.com