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, alvin.sipraga@analog.com,
gusfmora@gmail.com, kuncy7@gmail.com, fabianotassotti@gmail.com,
gabonpivovich@gmail.com, contact@c127.dev,
o.rempel@pengutronix.de
Subject: Re: [PATCH net-next v16 14/15] net: dsa: realtek: rtl8365mb: use PCP numbering on family D
Date: Mon, 30 Nov 2026 15:12:51 +0000 [thread overview]
Message-ID: <179605157117.3146.2830146229051174566@kernel.org> (raw)
In-Reply-To: <f8403d48-39c9-45c8-977f-f029c04b3f02@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] The commit message says dal_rtl8367d_qos_init() "maps each PCP to
the same internal priority, sets the port priority to 0 and keeps 1p…
- [Low] rtl83xx_port_set_apptrust() in drivers/net/dsa/realtek/rtl83xx-
qos.c only checks the order of the selectors.
--
net: dsa: realtek: rtl8365mb: use PCP numbering on family D
On family D, this patch converts between 802.1Q traffic types and the
chip's PCP-style priority numbering wherever the driver touches a QoS
register. It makes the qos_set_untag_pcp hook optional and leaves it
unset on family D. When that hook is missing, PCP apptrust is rejected.
Closes: https://github.com/openwrt/openwrt/pull/19644#issuecomment-7067296792
> The vendor API numbers family D internal priorities like PCP values:
> dal_rtl8367d_qos_init() maps each PCP to the same internal priority, sets
> the port priority to 0 and keeps 1p remarking disabled. Do the same.
[Severity: Low]
Is the last part of this accurate? The PCP mapping and port priority are
handled through rtl8365mb_d_qos_iprio_to_hw() and
rtl8365mb_d_qos_hw_to_iprio(). Nothing in the driver programs 802.1p
remarking, either in this commit or later in the series.
The remark enable bit is defined in rtl8365mb_main.c but never used:
#define RTL8365MB_PORT_MISC_CFG_DOT1Q_REMARK_ENABLE_MASK BIT(12)
The only write to RTL8365MB_PORT_MISC_CFG_REG(port) is in
rtl8365mb_port_set_vlan_egress_mode(), and it is masked to the egress
mode bits:
val = FIELD_PREP(RTL8365MB_PORT_MISC_CFG_VLAN_EGRESS_MODE_MASK, mode);
return regmap_update_bits(priv->map,
RTL8365MB_PORT_MISC_CFG_REG(port),
RTL8365MB_PORT_MISC_CFG_VLAN_EGRESS_MODE_MASK, val);
The later "add support for RTL8367S-VB" commit leaves jam_table NULL for
family D and does not add a remark write either. Bit 12 therefore stays
at whatever the reset, EEPROM or bootloader state left behind.
Two statements in the message depend on remarking being off. One is
that tagged frames keep their PCP. The other is that the PCP of a newly
inserted tag follows the traffic type. The EX511 v2 test suggests the
default is off on that board.
If a board comes up with remarking on, would tagged frames be rewritten
from the internal priority? With port-only trust, every tagged frame
would then get the port's default PCP.
Should family D clear DOT1Q_REMARK_ENABLE explicitly? Or should the
commit message say that it relies on the hardware default?
> diff --git a/drivers/net/dsa/realtek/rtl8365mb_qos.c b/drivers/net/dsa/realtek/rtl8365mb_qos.c
> index d422955f112cd..a525fabdf2e43 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_qos.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_qos.c
[ ... ]
> @@ -531,10 +551,20 @@ int rtl8365mb_qos_set_apptrust(struct realtek_priv *priv, int port,
> if (n != ARRAY_SIZE(rtl8365mb_qos_apptrust_src))
> return -EINVAL;
>
> + fi = rtl8365mb_get_family_info(priv);
> +
> ret = rtl8365mb_qos_check_port(priv, port);
> if (ret)
> return ret;
>
> + /* Without a configurable PCP for untagged frames, the switch cannot
> + * assign the requested PCP before 802.1Q priority classification.
> + */
> + if (!fi->qos_set_untag_pcp && trust[RTL83XX_APPTRUST_PCP]) {
> + dev_err(priv->dev, "PCP apptrust is not supported on this chip\n");
> + return -EOPNOTSUPP;
> + }
[Severity: Low]
Once rtl8365mb_family_d is wired up later in the series, it leaves
qos_set_untag_pcp NULL. This check then rejects any trust set that
includes PCP on that family.
The shared layer still lists PCP as supported when the selector order is
wrong. In rtl83xx_port_set_apptrust() in rtl83xx-qos.c:
if (slot < 0 || slot <= prev) {
dev_err(priv->dev,
"unsupported apptrust order; supported: dscp, pcp, dscp pcp\n");
return -EOPNOTSUPP;
}
Take a user on a family D switch who requests "pcp dscp". The message
says "pcp" and "dscp pcp" are supported, but this new check rejects
both of them.
The realtek.h kernel-doc was updated to say that such hardware must
reject PCP trust. This string stays the same through the end of the
series. Could it be updated, or made to depend on the backend, so it
matches what family D accepts?
> for (i = 0; i < n; i++)
> any |= trust[i];
>
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/aebcc7f6-d5f8-4157-b63a-e2e707d9859b%40yahoo.com
next prev parent reply other threads:[~2026-11-30 15:12 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <aebcc7f6-d5f8-4157-b63a-e2e707d9859b.ref@yahoo.com>
2026-11-29 15:02 ` [PATCH net-next v16 00/15] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Mieczyslaw Nalewaj
2026-11-29 15:06 ` [PATCH net-next v16 01/15] dt-bindings: net: dsa: realtek: add RTL8367S-VB Mieczyslaw Nalewaj
2026-11-29 15:06 ` [PATCH net-next v16 02/15] net: dsa: realtek: rtl8365mb: add chip family infrastructure Mieczyslaw Nalewaj
2026-11-29 15:06 ` [PATCH net-next v16 03/15] net: dsa: realtek: rtl8365mb: refactor forcemode handling Mieczyslaw Nalewaj
2026-11-29 15:07 ` [PATCH net-next v16 04/15] net: dsa: realtek: rtl8365mb: set speed for family D Mieczyslaw Nalewaj
2026-11-29 15:07 ` [PATCH net-next v16 05/15] net: dsa: realtek: rtl8365mb: set RGMII mode " Mieczyslaw Nalewaj
2026-11-29 22:47 ` Linus Walleij
2026-11-30 15:12 ` netdev-bot+sashiko
2026-11-29 15:07 ` [PATCH net-next v16 06/15] net: dsa: realtek: rtl8365mb: refactor VLAN 4k handling Mieczyslaw Nalewaj
2026-11-29 15:07 ` [PATCH net-next v16 07/15] net: dsa: realtek: rtl8365mb: set and get VLAN 4k for family D Mieczyslaw Nalewaj
2026-11-29 22:48 ` Linus Walleij
2026-11-30 15:12 ` netdev-bot+sashiko
2026-11-30 19:26 ` Mieczyslaw Nalewaj
2026-11-29 15:07 ` [PATCH net-next v16 08/15] net: dsa: realtek: rtl8365mb: refactor PVID handling Mieczyslaw Nalewaj
2026-11-29 15:11 ` [PATCH net-next v16 09/15] net: dsa: realtek: rtl8365mb: use raw VID for PVID on family D Mieczyslaw Nalewaj
2026-11-29 15:11 ` [PATCH net-next v16 10/15] net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support Mieczyslaw Nalewaj
2026-11-30 15:12 ` netdev-bot+sashiko
2026-11-30 19:27 ` Mieczyslaw Nalewaj
2026-11-29 15:11 ` [PATCH net-next v16 11/15] net: dsa: realtek: rtl8365mb: refactor L2 MAC handling Mieczyslaw Nalewaj
2026-11-29 15:11 ` [PATCH net-next v16 12/15] net: dsa: realtek: rtl8365mb: make L2/LUT access work on family D Mieczyslaw Nalewaj
2026-11-30 15:12 ` netdev-bot+sashiko
2026-11-29 15:12 ` [PATCH net-next v16 13/15] net: dsa: realtek: rtl8365mb: refactor QoS priority handling Mieczyslaw Nalewaj
2026-11-29 22:51 ` Linus Walleij
2026-11-29 15:12 ` [PATCH net-next v16 14/15] net: dsa: realtek: rtl8365mb: use PCP numbering on family D Mieczyslaw Nalewaj
2026-11-29 22:52 ` Linus Walleij
2026-11-30 15:12 ` netdev-bot+sashiko [this message]
2026-11-29 15:12 ` [PATCH net-next v16 15/15] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB 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=179605157117.3146.2830146229051174566@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=alvin.sipraga@analog.com \
--cc=andrew@lunn.ch \
--cc=contact@c127.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fabianotassotti@gmail.com \
--cc=gabonpivovich@gmail.com \
--cc=gusfmora@gmail.com \
--cc=kuba@kernel.org \
--cc=kuncy7@gmail.com \
--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=o.rempel@pengutronix.de \
--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®