diff options
author | Oleksij Rempel <o.rempel@pengutronix.de> | 2024-05-03 15:13:50 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-05-08 10:35:11 +0100 |
commit | c2e722657f18272a8b8711e94b29466f253715e6 (patch) | |
tree | f3460df4cbb6c1672cfd12d91698108d6c88c548 /drivers/net/dsa/microchip/ksz_common.c | |
parent | 5f5109af47535bc613c12a089dded425a373a12f (diff) |
net: dsa: microchip: add support DSCP priority mapping
Microchip KSZ and LAN variants do not have per port DSCP priority
configuration. Instead there is a global DSCP mapping table.
This patch provides write access to this global DSCP map. In case entry
is "deleted", we map corresponding DSCP entry to a best effort prio,
which is expected to be the default priority for all untagged traffic.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.c')
-rw-r--r-- | drivers/net/dsa/microchip/ksz_common.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index 996e8e893b66..bbf9925c98d9 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -2360,6 +2360,7 @@ static int ksz_setup(struct dsa_switch *ds) ksz_init_mib_timer(dev); ds->configure_vlan_while_not_filtering = false; + ds->dscp_prio_mapping_is_global = true; if (dev->dev_ops->setup) { ret = dev->dev_ops->setup(ds); @@ -3989,6 +3990,8 @@ static const struct dsa_switch_ops ksz_switch_ops = { .port_get_default_prio = ksz_port_get_default_prio, .port_set_default_prio = ksz_port_set_default_prio, .port_get_dscp_prio = ksz_port_get_dscp_prio, + .port_add_dscp_prio = ksz_port_add_dscp_prio, + .port_del_dscp_prio = ksz_port_del_dscp_prio, .port_get_apptrust = ksz_port_get_apptrust, .port_set_apptrust = ksz_port_set_apptrust, }; |