Article View: linux.kernel.netdev
Article #24657Re: [PATCH net-next v16 14/15] net: dsa: realtek: rtl8365mb: use PCP numbering on family D
From: netdev-bot+sashiko
Date: Mon, 30 Nov 2026 15:12
Date: Mon, 30 Nov 2026 15:12
116 lines
12601 bytes
12601 bytes
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
Technical Details
Message-ID:
<179605157117.3146.2830146229051174566@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374267-linux-kernel-netdev=dewy.ruReferences:
<f8403d48-39c9-45c8-977f-f029c04b3f02@yahoo.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374267-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev 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 Organization: Usenet Network Message-ID: <179605157117.3146.2830146229051174566@kernel.org> References: <f8403d48-39c9-45c8-977f-f029c04b3f02@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1453985"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:SN5HJrGe7iyt2fbXPaFObpTJXgU= sha256:FUUAGOoM0ImYM7Er//vR7CwCub8vkdU9pW8u/5W/VLo= sha1:wsX5knkA36ARxrJK4L0swLVjs4c= sha256:U1VTY1eDpTFqlZco0vjOHOq7UgugCMV2tqTNF/9Q9Bk= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id E62E9125FF3; Mon, 30 Nov 2026 18:14:16 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a4pzdmP0lI8U; Mon, 30 Nov 2026 18:14:12 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-374267-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 0798C125FED; Mon, 30 Nov 2026 18:14:04 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id B76BF32E8B; Mon, 30 Nov 2026 15:12:56 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796051573; b=g1zS/vo2VATWgMbmfVqIdZ7hb1Yrj7qC7z4orhpJlBnnyeYW2EkOG7uWae2Ybsr1xCPc Pd26qWEc2deHEwhH2Mj18VePFb2XxKF9Rx7unwQ6nUJT5pdR+TpUwFNUpcjxt+/0JS8PJ wSXXBMrL7PY9wu9Gb8DpPC7wJUnF/gXMgOY3PzoHpIMUulw15Gw3wBw3CtD4FTQJqFQuR wIfkXk6zsZeHqa1LtcrsKaxWbMqpsCs34L776m1b7yOMOca3IJvGjoqGjaBuDePJi3ogJ XoVEf3MLCjNOOnHbFzofdE6c5LgB8aXRFpRmZoFEGkYHm3dd+s9ZzfTI9WBOYHQ6hoA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796051573; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=iqwjgpb6vr/hoFguxy6vxn6/eKmrTQYV0YMjJ8FDPCc=; b=k8r4hXNP466LCiBMKcOuzc+T+wLw98wRQYFd7HvkIZ9d5mYuRe/xjeIgioBOmcDppCfA D7KAM6NnvWPzusJ2oTu/93D9tmlqfKtjgKKVxHvyZ/UtZVeBVlgfYRazQrBaK27zMRVl9 GsKTwHMbtHsQI3wKXE0v69kT6UYVCv3Wu44qmMUGHN49Fgg9SaJTNaUe7ZV7Tf/yxLst7 vVZWnaZI6rIrefzKwTxCr6GnyGL2YSeriQKFWHacre7KtvWOQ/ySCQ0rjlUvV/9sYUhs9 RFnE1Q+4x9wGS59nW4/28Bzg6V1cPObY9YYLqXUd1OG9vJ9yZayaIwubBaulrx7t69w== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=E+NYuWuz; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D853E606A6A2; Mon, 30 Nov 2026 15:12:53 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=E+NYuWuz X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796051573; b=RRZ6eYBqwau134wCILouNOV/7u33/mtCd32fD+yPeoNn+m13WgRwk7zPEP51qic+gQlS 0syiD3tyvOEnHjbyw//8/p9BlEy92svED4pDFVNP/G8Uz/eI/YgeYWcZZnbogHTAmztPM tSRBgQUhQnzlDGaKLF4LLVL0JvyzG+FeKDcLSTcX6zpUd0AsUA3B7X00SNJtrxZBUPNZn R/1Q2qjP3OxZWrkBJLeLRr8pokAbkwXyhu8ra9PBr2+Uy2yIyQk3Jkm/b4TJNKAcrvdiL Ur6ECkTPmv7QTKnZMw6hTJbywbOIw8vfAObnjazSVXPgC7sWIxtqLjZZm5c8NFANMGg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796051573; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=iqwjgpb6vr/hoFguxy6vxn6/eKmrTQYV0YMjJ8FDPCc=; b=aK3NCQ1dg8g2m1Gk/8oZZjb8dcSzMdLH3frcVMk9mi43ufKKefZ2AMNoy24qlcmp2WqM tdKd5mTknHgUEx4c5hprDtVeUlCWNqBr78w1+ZGqqQlIM6ZyD5wZbWiIAk9adQUK6SAN0 HhCbVfXWTdO0QWFkpWoJQxvGhRSwxttvfiCJGXBuvzsKyvtWALyTInlXRXumSb1QXbbek qJbayBK1vyXOjWKwDd1W6RxXMIoLMBk0I8rr08n6OkkymnknRWS5OsPB/NYdJ/pZyT7Gw J4kinbFfynygpml2iIsRIpkd9dLCQ/57JzxANdl4j4XkQ8dcOa3ewMlaCxhkzZIKW5g== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=E+NYuWuz; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05A5F606A338; Mon, 30 Nov 2026 15:12:53 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 932711F00930; Mon, 30 Nov 2026 15:12:51 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796051572; bh=iqwjgpb6vr/hoFguxy6vxn6/eKmrTQYV0YMjJ8FDPCc=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=E+NYuWuz3bIzlnTtYCWOFetm27jFkc+3USx2mLERWm1OQP+OMCMoT07V5IXn3/aSV JdfMviJoDfF0laJCgcBx69ci3YutwhBPXZJgFH9NgoHV2TubNXTg1LKN3LMxHL91du F7jXFnvnCf9P60JSANliEtlQ77iG3PUVGa08hDkyyvTAuGlWGhXSqdFc5RJO81VuHO Z7YA4QVse3wkujJNWfdpv40Y5cX6lQhQnqYuOBsZTUye8Jc5XwpomIVpncFNpnDIar YbgNGBc53x8XUnWOizhRrQr98mh6q2PxMr9CY20wAciNRBFJFgx32o2f3YDWF5wDdR P6L7e1lYAXhSA== X-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 X-In-Reply-To: <f8403d48-39c9-45c8-977f-f029c04b3f02@yahoo.com> X-sashiko-severity: Low X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list