- MPLS TC to TC map
- 1. Table of Content
- 2. Revision
- 3. Scope
- 4. Definitions/Abbreviations
- 5. Overview
- 6. Requirements
- 7. Architecture Design
- 8. High-Level Design
- 9. SAI API
- 10. Configuration and management
- 11. Warmboot and Fastboot Design Impact
- 12. Restrictions/Limitations
- 13. Testing Requirements/Design
- 14. Open/Action items - if any
Rev | Date | Author | Change Description |
---|---|---|---|
0.1 | 16/08/2021 | Alexandru Banu | Initial version |
0.2 | 21/09/2021 | Alexandru Banu | Renamed MPLS EXP to MPLS TC per RFC 5462 |
0.3 | 22/09/2021 | Alexandru Banu | Added per-port binding configuration |
This HLD extends SONiC to support MPLS TC to TC mappings.
TC = Traffic Class QoS = Quality of Service
This new enhancement adds support to SONiC for MPLS TC to TC map which allows QoS to work on MPLS packets.
User can configure MPLS TC to TC map at start-of-day via configuration file. CLI support will exist to offer the same amount of support as for DSCP to TC map.
The overall SONiC architecture will not be changed and no new sub-modules will be introduced.
The CONFIG DB will be updated to include a new "MPLS_TC_TO_TC_MAP" similar to the existing "DSCP_TO_TC_MAP". This will have the following format:
### MPLS_TC_TO_TC_MAP
; MPLS TC to TC map
;SAI mapping - qos_map object with SAI_QOS_MAP_ATTR_TYPE == sai_qos_map_type_t::SAI_QOS_MAP_MPLS_EXP_TO_TC
key = "MPLS_TC_TO_TC_MAP|"name
;field value
mpls_tc_value = 1*DIGIT
tc_value = 1*DIGIT
Example:
127.0.0.1:6379> hgetall "MPLS_TC_TO_TC_MAP|Mpls_tc_to_tc_map1"
1) "3" ;mpls tc
2) "3" ;tc
3) "6"
4) "5"
5) "7"
6) "5"
In order to allow a user to bind such a map to a port, the existing PORT_QOS_MAP
table will be enhanced to allow a new field-value pair, where the field is going to be named mpls_tc_to_tc_map
and the value will be the MPLS_TC_TO_TC_MAP.key
of the map to use.
sonic-swss-common's schema will be updated to include a CFG_MPLS_TC_TO_TC_MAP_TABLE_NAME define for the new table name.
sonic-swss's QoS orch will be updated to include a new handler for MPLS TC to TC map, similar to the existing DSCP to TC map but with extra input validations, checking that the values are in the correct numeric range and that no MPLS TC value is mapped to more than one TC value. Among debugging logs, appropriate error logs will be introduced to let the user know if they miss-configured a map.
Also, the QoS orch will be enhanced to configure the new field-value pair in PORT_QOS_MAP
mentioned at section 8.1.
sonic-utilities will be updated to offer the same amount of support for CLI commands that DSCP to TC map already provide.
There are no other implications. SAI and sairedis already support for MPLS TC to TC map. In terms of warm restart / fastboot / scalability / performance and so on, this should not represent an impact.
MPLS TC to TC map are already supported in SAI.
CLI config commands will be updated to include the same level of support for MPLS TC to TC maps as for DSCP to TC maps. Namely, config reload
and config clear
will be updated to include the new mapping table as well.
The relevant changes have been described in HLD's DB sub-section.
Not impacted by the changes.
- User can't configure MPLS TC to TC map via CLI (only via reload command).
- User can't configure per-switch or per-inseg MPLS TC to TC maps.
The QoS UTs present in sonic-swss will be extended to accommodate the new MPLS TC to TC map. These will largely follow the DSCP to TC map example but will add input validation checks as well. The new code will have full code coverage as far as the UT framework allows it.
No system test cases will be added.
N/A