Re: [PATCH net-next v2 2/2] net: dsa: yt921x: Add DCB/priority support
From: Oleksij Rempel <o.rempel@pengutronix.de>
Date: 2026-01-24 10:02:45
Also in:
lkml
On Sat, Jan 24, 2026 at 01:47:59AM +0200, Vladimir Oltean wrote:
quoted
+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 |