Re: [PATCH net-next v12 09/13] net: dsa: realtek: rtl8365mb: use raw VID for PVID on family D
From: netdev-bot+sashiko
Date: Mon Nov 23 2026 - 20:25:02 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] The PVID reset hook is split across two patches, and neither
commit message fully describes its own part of it.
--
net: dsa: realtek: rtl8365mb: use raw VID for PVID on family D
This adds family D versions of the PVID helpers. On family D the PVID is a
raw 12-bit VID in a per-port register, and there is no VLAN MC table. It
also clears the family D PVID registers from rtl8365mb_vlan_setup()
through a new vlan_port_reset_pvid hook in struct rtl8365mb_family_info.
> Add the family D implementations of the PVID helpers,
> rtl8365mb_d_vlan_port_get_pvid(), rtl8365mb_d_vlan_pvid_port_set() and
> rtl8365mb_d_vlan_pvid_port_clear(), which skip the MC table. They keep the
> family C frame filter handling and rollback on error. The shared code
> reaches them through the vlan_port_get_pvid, vlan_pvid_port_set and
> vlan_pvid_port_clear pointers in struct rtl8365mb_family_info, so it
> needs no is_d() check.
[Severity: Low]
This isn't a bug, but the list of new family D helpers leaves out
rtl8365mb_d_vlan_port_reset_pvid(). This patch also adds it to
rtl8365mb_vlan.c and exports it through rtl8365mb_vlan.h:
int rtl8365mb_d_vlan_port_reset_pvid(struct realtek_priv *priv, int port);
A later paragraph does describe clearing the PVID at setup. Could the
function and the vlan_port_reset_pvid pointer be added to this list as
well?
The hook is also split across two patches. The earlier patch "net: dsa:
realtek: rtl8365mb: refactor PVID handling" adds these pieces:
- the vlan_port_reset_pvid member of struct rtl8365mb_family_info
- the no-op rtl8365mb_c_vlan_port_reset_pvid()
- its prototype in rtl8365mb_vlan.h
- .vlan_port_reset_pvid = rtl8365mb_c_vlan_port_reset_pvid in the
family C info
The message of that patch lists only three pointers and says "No
functional change". Nothing calls the hook there. Its only caller arrives
in this patch, in rtl8365mb_vlan_setup():
> + ret = fi->vlan_port_reset_pvid(priv, dp->index);
Would it make sense to either move the hook and the family C stub into
this patch, or mention them in the refactor patch's commit message?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/bc42ae96-dc7e-4b6e-b9cc-64cde5dc51ce%40yahoo.com