net: dsa: tag_ocelot: use traffic class to map priority on injected header
authorXiaoliang Yang <xiaoliang.yang_1@nxp.com>
Thu, 23 Dec 2021 07:22:11 +0000 (15:22 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 23 Dec 2021 17:44:59 +0000 (09:44 -0800)
commitae2778a64724f77fd6cad674461a045fb3307df7
treeef9606e81ddbf84c052fc16c82cb5bcd8e09a391
parent9695b7de5b4760ed22132aca919570c0190cb0ce
net: dsa: tag_ocelot: use traffic class to map priority on injected header

For Ocelot switches, the CPU injected frames have an injection header
where it can specify the QoS class of the packet and the DSA tag, now it
uses the SKB priority to set that. If a traffic class to priority
mapping is configured on the netdevice (with mqprio for example ...), it
won't be considered for CPU injected headers. This patch make the QoS
class aligned to the priority to traffic class mapping if it exists.

Fixes: 8dce89aa5f32 ("net: dsa: ocelot: add tagger for Ocelot/Felix switches")
Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
Signed-off-by: Marouen Ghodhbane <marouen.ghodhbane@nxp.com>
Link: https://lore.kernel.org/r/20211223072211.33130-1-xiaoliang.yang_1@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/dsa/tag_ocelot.c