From: Linus Walleij <linusw@kernel.org>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: "David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@kernel.org>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Simon Horman" <horms@kernel.org>,
"Luiz Angelo Daros de Luca" <luizluca@gmail.com>,
"Alvin Šipraga" <alvin.sipraga@analog.com>,
"Andrew Lunn" <andrew@lunn.ch>,
"Vladimir Oltean" <olteanv@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@pengutronix.de
Subject: Re: [PATCH net-next v2 09/10] net: dsa: realtek: rtl8365mb: offload DCB apptrust
Date: Thu, 12 Nov 2026 21:35:42 +0100 [thread overview]
Message-ID: <CAD++jL=EGaGXJCMGoTX-R5YU+OSU26NpbO3MBbr+yWBO0q6-yA@mail.gmail.com> (raw)
In-Reply-To: <20261112-rtl8365mb-dcb-ingress-v2-9-f8e6fbdf8c99@pengutronix.de>
On Thu, Nov 12, 2026 at 9:38 AM Oleksij Rempel <o.rempel@pengutronix.de> wrote:
> Wire up port_get_apptrust and port_set_apptrust. The admin can then
> choose through dcbnl apptrust which ingress classification a port trusts
> for its priority: 802.1p (PCP), DSCP or both. A port that trusts nothing
> keeps the port default priority.
>
> In the driver's model of the hardware, the trusted priority-decision
> table is switch-wide, so all ports that trust something must trust the
> same selectors. While another port trusts a set of selectors, a request
> to trust a different set is refused with -EBUSY.
>
> When both are trusted, DSCP must come first. When PCP is trusted, the
> switch classifies an untagged frame by the PCP given to untagged
> frames. A PCP source ranked above DSCP would then hide DSCP from
> untagged IP frames. Refuse the order pcp dscp and any unknown selector
> with -EOPNOTSUPP.
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
> Changes in v2:
> - move selector and precedence validation into rtl83xx-qos.c behind new
> qos_get/set_apptrust callbacks; weights and -EBUSY stay here (Linus)
> - use one-hot decision weights; in the driver's model, the v1 linear
> weights could tie PCP with DSCP (Linus)
> - define the apptrust slot order once (enum rtl83xx_apptrust_slot) for
> the shared selector table and the backend source table
> - write the PCP and DSCP weights with one register update, so a failed
> write cannot leave the trusted table half programmed (sashiko)
> - check that all apptrust sources share the one register that is updated
> - rank DSCP above PCP and refuse pcp dscp with -EOPNOTSUPP, because
> with PCP first, untagged IP frames never reach DSCP
Very thorough and resolves my issues!
Reviewed-by: Linus Walleij <linusw@kernel.org>
Yours,
Linus Walleij
next prev parent reply other threads:[~2026-11-12 20:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 8:37 [PATCH net-next v2 00/10] net: dsa: realtek: rtl8365mb: DCB ingress QoS offload Oleksij Rempel
2026-11-12 8:37 ` [PATCH net-next v2 01/10] net: ieee8021q: print traffic type and queue count with %u Oleksij Rempel
2026-11-12 8:37 ` [PATCH net-next v2 02/10] net: ieee8021q: add pcp_to_tt() Oleksij Rempel
2026-11-12 8:37 ` [PATCH net-next v2 03/10] net: ieee8021q: clarify the tt_to_tc() traffic-class mapping Oleksij Rempel
2026-11-12 8:37 ` [PATCH net-next v2 04/10] net: ieee8021q: add tt_to_pcp() Oleksij Rempel
2026-11-12 8:37 ` [PATCH net-next v2 05/10] net: dsa: realtek: rtl8365mb: describe the ports of each chip Oleksij Rempel
2026-11-12 15:08 ` Alvin Šipraga
2026-11-12 20:38 ` Linus Walleij
2026-11-12 8:37 ` [PATCH net-next v2 06/10] net: dsa: realtek: rtl8365mb: store the egress queue count per chip Oleksij Rempel
2026-11-12 8:37 ` [PATCH net-next v2 07/10] net: dsa: realtek: rtl8365mb: add QoS baseline and DCB default prio Oleksij Rempel
2026-11-12 20:31 ` Linus Walleij
2026-11-12 8:37 ` [PATCH net-next v2 08/10] net: dsa: realtek: rtl8365mb: program the PCP of untagged frames Oleksij Rempel
2026-11-12 20:33 ` Linus Walleij
2026-11-12 8:37 ` [PATCH net-next v2 09/10] net: dsa: realtek: rtl8365mb: offload DCB apptrust Oleksij Rempel
2026-11-12 20:35 ` Linus Walleij [this message]
2026-11-12 8:37 ` [PATCH net-next v2 10/10] net: dsa: realtek: rtl8365mb: report the DCB DSCP-to-priority map Oleksij Rempel
2026-11-12 20:36 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAD++jL=EGaGXJCMGoTX-R5YU+OSU26NpbO3MBbr+yWBO0q6-yA@mail.gmail.com' \
--to=linusw@kernel.org \
--cc=alvin.sipraga@analog.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luizluca@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®