๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by netdev-bot+sashiko Tue, 01 Dec 2026 21:22
Re: [PATCH net-next v17 14/15] net: dsa: realtek: rtl8365mb: use PCP numbering on family D
#25470
Author: netdev-bot+sashiko
Date: Tue, 01 Dec 2026 21:22
71 lines
10903 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] In rtl83xx_port_set_apptrust() (drivers/net/dsa/realtek/rtl83xx-
  qos.c), the error message changes from "unsupported apptrust order;โ€ฆ

--

net: dsa: realtek: rtl8365mb: use PCP numbering on family D

This commit adds family D hooks that convert between 802.1Q traffic
types and the chip's PCP-style internal priority numbering. It makes the
qos_set_untag_pcp hook optional and rejects PCP apptrust on families
that do not provide it. It also changes the apptrust ordering error
message in the shared rtl83xx QoS layer.

Closes: https://github.com/openwrt/openwrt/pull/19644#issuecomment-7067296792

> diff --git a/drivers/net/dsa/realtek/rtl83xx-qos.c b/drivers/net/dsa/realtek/rtl83xx-qos.c
> index f294222987eff..9454a5d318128 100644
> --- a/drivers/net/dsa/realtek/rtl83xx-qos.c
> +++ b/drivers/net/dsa/realtek/rtl83xx-qos.c
> @@ -196,7 +196,7 @@ int rtl83xx_port_set_apptrust(struct dsa_switch *ds, int port, const u8 *sel,
>
>  		if (slot < 0 || slot <= prev) {
>  			dev_err(priv->dev,
> -				"unsupported apptrust order; supported: dscp, pcp, dscp pcp\n");
> +				"unsupported apptrust order; dscp must precede pcp\n");
>  			return -EOPNOTSUPP;
>  		}

[Severity: Low]

This branch also handles unknown selectors, not only bad ordering. Will
the new message mislead users in that case?

rtl83xx_apptrust_sel_to_slot() returns -EINVAL for any selector that is
not in rtl83xx_apptrust_sel[], which lists only DSCP and PCP:

drivers/net/dsa/realtek/rtl83xx-qos.c:rtl83xx_apptrust_sel_to_slot() {
	for (slot = 0; slot < ARRAY_SIZE(rtl83xx_apptrust_sel); slot++)
		if (rtl83xx_apptrust_sel[slot] == sel)
			return slot;

	return -EINVAL;
}

dcbnl_ieee_set() rejects duplicate selectors before calling the driver.
It still passes through valid selectors that this driver does not
support, such as ethertype, stream-port or dgram.

For example, "dcb apptrust set dev swpX order ethtype" reaches the
slot < 0 branch here and logs "dscp must precede pcp", which has nothing
to do with the selector that was rejected. The old message listed the
accepted orderings, so it still helped in that case.

The commit message does not mention this change either. The message
changes for existing family C users right away, while the commit
message says "this patch changes no behaviour yet". The likely reason
for dropping the "supported:" list is the new PCP rejection in
rtl8365mb_qos_set_apptrust() on families without qos_set_untag_pcp.

Could the message also cover unknown selectors, and could the commit
message note this change?

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/236d002f-5ca5-4f12-bf5b-0ed6442e5c9a%40yahoo.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads