[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aXSYuOjo5EL4MeeU@pengutronix.de>
Date: Sat, 24 Jan 2026 11:02:32 +0100
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: Vladimir Oltean <olteanv@...il.com>
Cc: David Yang <mmyangfl@...il.com>,
Oleksij Rempel <linux@...pel-privat.de>, netdev@...r.kernel.org,
Andrew Lunn <andrew@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>,
Russell King <linux@...linux.org.uk>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2 2/2] net: dsa: yt921x: Add DCB/priority
support
On Sat, Jan 24, 2026 at 01:47:59AM +0200, Vladimir Oltean wrote:
> > +static int
> > +yt921x_dsa_port_del_dscp_prio(struct dsa_switch *ds, int port, u8 dscp, u8 prio)
> > +{
> > + struct yt921x_priv *priv = to_yt921x_priv(ds);
> > + int res;
> > +
> > + mutex_lock(&priv->reg_lock);
> > + res = yt921x_reg_write(priv, YT921X_IPM_DSCPn(dscp),
> > + ipm_ctrl(IEEE8021Q_TT_BK));
>
> Question regarding semantics, also for Oleksij: deleting the DSCP app
> table entry should cause that DSCP value to be mapped to bulk, as in
> your interpretation (or best effort for KSZ), or according to the next
> selector in line, as per trust order (for example port default priority,
> which may not be bulk)?
It maps to bulk.
My interpretation of this hardware is that it uses a direct lookup table
without a "valid/invalid" bit per entry. Once DSCP is enabled in the
trust order, the switch performs the lookup for every packet; it cannot
transparently skip a specific DSCP value to fall back to the next
selector.
Therefore, "deleting" an entry practically remaps it to the default
(Bulk/Best Effort) priority. This matches the logic we use in the KSZ
driver.
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists