Vladimir Oltean 47d75f7822 net: dsa: report and change port dscp priority using dcbnl
Similar to the port-based default priority, IEEE 802.1Q-2018 allows the
Application Priority Table to define QoS classes (0 to 7) per IP DSCP
value (0 to 63).

In the absence of an app table entry for a packet with DSCP value X,
QoS classification for that packet falls back to other methods (VLAN PCP
or port-based default). The presence of an app table for DSCP value X
with priority Y makes the hardware classify the packet to QoS class Y.

As opposed to the default-prio where DSA exposes only a "set" in
dsa_switch_ops (because the port-based default is the fallback, it
always exists, either implicitly or explicitly), for DSCP priorities we
expose an "add" and a "del". The addition of a DSCP entry means trusting
that DSCP priority, the deletion means ignoring it.

Drivers that already trust (at least some) DSCP values can describe
their configuration in dsa_switch_ops :: port_get_dscp_prio(), which is
called for each DSCP value from 0 to 63.

Again, there can be more than one dcbnl app table entry for the same
DSCP value, DSA chooses the one with the largest configured priority.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-03-14 10:36:15 +00:00
..
2022-03-07 09:48:55 +01:00
2022-01-22 08:33:37 +02:00
2022-03-07 11:40:41 +00:00
2022-03-04 12:02:19 +00:00
2022-03-04 12:02:19 +00:00
2022-01-27 13:53:27 +00:00
2022-01-26 07:44:01 +01:00
2022-03-11 13:00:17 -08:00
2022-02-10 15:29:39 +00:00
2022-03-07 11:40:41 +00:00
2022-03-11 13:00:17 -08:00
2022-03-03 09:55:28 +00:00