Re: [PATCH net-next v2 07/10] net: dsa: realtek: rtl8365mb: add QoS baseline and DCB default prio

From: Luiz Angelo Daros de Luca

Date: Sat Nov 14 2026 - 15:15:31 EST


> > Add a shared rtl83xx-qos.c layer and the rtl8365mb backend behind it.
> > The backend programs the QoS classification tables and one
> > priority-to-queue table at setup instead of leaving them at their reset
> > state, and offloads the DCB default priority.
> >
> > The switch classifies traffic by the port default, by PCP and by DSCP.
> > Each source numbers its values on its own scale. Use the IEEE 802.1Q
> > traffic types as the meaning of the switch's 3-bit internal priority,
> > and map every source onto them. Best Effort then outranks Background,
> > instead of following the raw PCP number.
> >
> > Keep the driver-independent dcbnl handling and the ieee8021q priority
> > conversions in rtl83xx-qos.c. That layer programs the chip only through the
> > realtek_ops qos_* callbacks, so other realtek DSA backends can share one
> > dcbnl implementation and only program their own chip registers.
> >
> > The baseline trusts only the port default. PCP and DSCP stay untrusted;
> > classification by PCP or DSCP starts only once the port trusts it
> > through dcb apptrust, offloaded by "net: dsa: realtek: rtl8365mb:
> > offload DCB apptrust".
> >
> > Every port in use defaults to Best Effort, so all classified traffic
> > takes one egress queue.
> >
> > Select NET_IEEE8021Q_HELPERS from NET_DSA_REALTEK, but not DCB. The new
> > code calls no DCB-core function, and DSA installs the dcbnl ops only
> > when CONFIG_DCB is set. The QoS baseline is programmed either way.
> >
> > Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>

Reviewed-by: Luiz Angelo Daros de Luca <luizluca@xxxxxxxxx>