Skip to content

Commit

Permalink
[config] Add EXP-to-TC map to clear_qos (sonic-net#1875)
Browse files Browse the repository at this point in the history
What I did
Added EXP to TC map to tables affected by clear_qos command

How I did it
Found references to DSCP to TC map, added EXP to TC map in same place

How to verify it
Run clear_qos with EXP to TC map present
  • Loading branch information
TACappleman authored Nov 2, 2021
1 parent ca728b8 commit 474bdbf
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 16 deletions.
1 change: 1 addition & 0 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ def _clear_qos():
'MAP_PFC_PRIORITY_TO_QUEUE',
'TC_TO_QUEUE_MAP',
'DSCP_TO_TC_MAP',
'MPLS_TC_TO_TC_MAP',
'SCHEDULER',
'PFC_PRIORITY_TO_PRIORITY_GROUP_MAP',
'PORT_QOS_MAP',
Expand Down
34 changes: 18 additions & 16 deletions doc/Command-Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -7189,16 +7189,17 @@ This command is used to clear all the QoS configuration from all the following Q
2) MAP_PFC_PRIORITY_TO_QUEUE,
3) TC_TO_QUEUE_MAP,
4) DSCP_TO_TC_MAP,
5) SCHEDULER,
6) PFC_PRIORITY_TO_PRIORITY_GROUP_MAP,
7) PORT_QOS_MAP,
8) WRED_PROFILE,
9) QUEUE,
10) CABLE_LENGTH,
11) BUFFER_POOL,
12) BUFFER_PROFILE,
13) BUFFER_PG,
14) BUFFER_QUEUE
5) MPLS_TC_TO_TC_MAP,
6) SCHEDULER,
7) PFC_PRIORITY_TO_PRIORITY_GROUP_MAP,
8) PORT_QOS_MAP,
9) WRED_PROFILE,
10) QUEUE,
11) CABLE_LENGTH,
12) BUFFER_POOL,
13) BUFFER_PROFILE,
14) BUFFER_PG,
15) BUFFER_QUEUE
- Usage:
```
Expand Down Expand Up @@ -7233,12 +7234,13 @@ Some of the example QOS configurations that users can modify are given below.
2) MAP_PFC_PRIORITY_TO_QUEUE
3) TC_TO_QUEUE_MAP
4) DSCP_TO_TC_MAP
5) SCHEDULER
6) PFC_PRIORITY_TO_PRIORITY_GROUP_MAP
7) PORT_QOS_MAP
8) WRED_PROFILE
9) CABLE_LENGTH
10) BUFFER_QUEUE
5) MPLS_TC_TO_TC_MAP
6) SCHEDULER
7) PFC_PRIORITY_TO_PRIORITY_GROUP_MAP
8) PORT_QOS_MAP
9) WRED_PROFILE
10) CABLE_LENGTH
11) BUFFER_QUEUE
- Usage:
```
Expand Down
12 changes: 12 additions & 0 deletions tests/qos_config_input/config_qos.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,18 @@
"63": "1"
}
},
"MPLS_TC_TO_TC_MAP": {
"AZURE": {
"0" : "1",
"1" : "1",
"2" : "1",
"3" : "3",
"4" : "4",
"5" : "2",
"6" : "1",
"7" : "1"
}
},
"SCHEDULER": {
"scheduler.0": {
"type" : "DWRR",
Expand Down
12 changes: 12 additions & 0 deletions tests/qos_config_input/qos_config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,18 @@
"63": "1"
}
},
"MPLS_TC_TO_TC_MAP": {
"AZURE": {
"0" : "1",
"1" : "1",
"2" : "1",
"3" : "3",
"4" : "4",
"5" : "2",
"6" : "1",
"7" : "1"
}
},
{% endif %}
"SCHEDULER": {
"scheduler.0": {
Expand Down

0 comments on commit 474bdbf

Please sign in to comment.