From: netdev-bot+sashiko@kernel.org
To: namiltd@yahoo.com
Cc: linusw@kernel.org, andrew@lunn.ch, olteanv@gmail.com,
kuba@kernel.org, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, linux@armlinux.org.uk, luizluca@gmail.com,
maxime.chevallier@bootlin.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 5/9] net: dsa: realtek: rtl8365mb: set and get vlan 4k for family D
Date: Sun, 11 Oct 2026 19:51:25 +0000 [thread overview]
Message-ID: <179174828532.434549.7339327413845979862@kernel.org> (raw)
In-Reply-To: <22c20407-e6bc-4171-92b5-33650de94a49@yahoo.com>
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] In rtl8365mb_vlan_4k_write()
(drivers/net/dsa/realtek/rtl8365mb_vlan.c), the family-D branch sets…
--
net: dsa: realtek: rtl8365mb: set and get vlan 4k for family D
This commit gives family D its own two-word pack/unpack for the CVLAN
(VLAN4k) table entry in rtl8365mb_vlan_4k_read() and
rtl8365mb_vlan_4k_write(). Family C keeps its three-word layout. On
family D the FID is narrowed to 2 bits and the write path forces the
IVL selection bits.
> diff --git a/drivers/net/dsa/realtek/rtl8365mb_vlan.c b/drivers/net/dsa/realtek/rtl8365mb_vlan.c
> index 8d49ffadce926..2c4c5baf93f10 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_vlan.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_vlan.c
[ ... ]
> @@ -244,36 +284,59 @@ static int rtl8365mb_vlan_4k_write(struct realtek_priv *priv,
> val = FIELD_GET(RTL8365MB_CVLAN_UNTAG_LO_MASK, vlan4k->untag);
> data[0] |= FIELD_PREP(RTL8365MB_CVLAN_ENTRY_D0_UNTAG_MASK, val);
>
[ ... ]
> + if (is_d) {
> + /* The chip supports both IVL and SVL, but the caller (see
> + * rtl8365mb_vlan_4k_port_set()) never requests SVL, so both
> + * IVL/SVL selector bits are forced here rather than threaded
> + * through from vlan4k->ivl_en, which family C does honor.
> + */
> + data[1] |= FIELD_PREP(RTL8365MB_D_CVLAN_ENTRY_D1_IVL_EN_MASK,
> + 1) |
> + FIELD_PREP(RTL8365MB_D_CVLAN_ENTRY_D1_SVLAN_CHK_IVL_SVL_MASK,
> + 1);
[Severity: Low]
This doesn't change runtime behavior today, because
rtl8365mb_vlan_4k_port_set() always sets vlan4k.ivl_en = true. However,
the commit message and comments no longer match the code.
The commit message says:
so that control bit is forced here to match existing driver behavior,
not a hardware limitation.
Two bits are forced here, though: IVL_EN (bit 3) and SVLAN_CHK_IVL_SVL
(bit 2). Could the commit message mention the second bit and say why 1
is the right value for it?
Family D writes ignore vlan4k->ivl_en, but rtl8365mb_vlan_4k_read()
still reports the field from hardware:
vlan4k->ivl_en =
FIELD_GET(RTL8365MB_D_CVLAN_ENTRY_D1_IVL_EN_MASK,
data[1]);
So the read path and the write path handle the field differently.
Some comments in the file are also out of date for family D. The
kernel-doc for struct rtl8365mb_vlan4k still says:
* @ivl_en: enable IVL instead of default SVL
The file header still says VLAN4k entries can choose between IVL and
SVL.
The layout comment above the new size define still says u16[3]:
/* CVLAN (i.e. VLAN4k) table entry layout, u16[3] */
#define RTL8365MB_CVLAN_ENTRY_SIZE 3 /* 48-bits */
#define RTL8365MB_D_CVLAN_ENTRY_SIZE 2 /* 32-bits */
The family D D1 masks are also mixed in with the family C masks under
that comment. Later patches in the series don't update any of these
comments either.
Should these comments be updated to describe the family D layout and
the forced IVL bits?
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/e84d76ee-03df-49b0-8c9a-b289dfae8728%40yahoo.com
next prev parent reply other threads:[~2026-10-11 19:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <e84d76ee-03df-49b0-8c9a-b289dfae8728.ref@yahoo.com>
2026-10-10 19:36 ` [PATCH net-next v3 0/9] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Mieczyslaw Nalewaj
2026-10-10 19:38 ` [PATCH net-next v3 1/9] dt-bindings: net: dsa: realtek: add RTL8367S-VB Mieczyslaw Nalewaj
2026-10-11 19:51 ` netdev-bot+sashiko
2026-10-10 19:39 ` [PATCH net-next v3 2/9] net: dsa: realtek: rtl8365mb: add chip family infrastructure Mieczyslaw Nalewaj
2026-10-10 19:39 ` [PATCH net-next v3 3/9] net: dsa: realtek: rtl8365mb: set speed for family D Mieczyslaw Nalewaj
2026-10-11 19:51 ` netdev-bot+sashiko
2026-10-10 19:40 ` [PATCH net-next v3 4/9] net: dsa: realtek: rtl8365mb: set RGMII mode " Mieczyslaw Nalewaj
2026-10-11 19:51 ` netdev-bot+sashiko
2026-10-10 19:41 ` [PATCH net-next v3 5/9] net: dsa: realtek: rtl8365mb: set and get vlan 4k " Mieczyslaw Nalewaj
2026-10-11 19:51 ` netdev-bot+sashiko [this message]
2026-10-10 19:42 ` [PATCH net-next v3 6/9] net: dsa: realtek: rtl8365mb: use raw VID for PVID on " Mieczyslaw Nalewaj
2026-10-11 19:51 ` netdev-bot+sashiko
2026-10-10 19:43 ` [PATCH net-next v3 7/9] net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support Mieczyslaw Nalewaj
2026-10-11 19:51 ` netdev-bot+sashiko
2026-10-10 19:44 ` [PATCH net-next v3 8/9] net: dsa: realtek: rtl8365mb: re-latch the family D SerDes Mieczyslaw Nalewaj
2026-10-11 19:51 ` netdev-bot+sashiko
2026-10-10 19:44 ` [PATCH net-next v3 9/9] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Mieczyslaw Nalewaj
2026-10-11 19:51 ` netdev-bot+sashiko
2026-10-11 23:32 ` Mieczyslaw Nalewaj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179174828532.434549.7339327413845979862@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=luizluca@gmail.com \
--cc=maxime.chevallier@bootlin.com \
--cc=namiltd@yahoo.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®