From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 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== 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== 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 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) 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 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 932711F00930; Mon, 30 Nov 2026 15:12:51 +0000 (UTC) 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== Subject: Re: [PATCH net-next v16 14/15] net: dsa: realtek: rtl8365mb: use PCP numbering on family D 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 Date: Mon, 30 Nov 2026 15:12:51 +0000 Message-ID: <179605157117.3146.2830146229051174566@kernel.org> In-Reply-To: References: X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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