Skip to content

Commit c5eb031

Browse files
authored
[202012] Add flag to control the generation of global level map (sonic-net#11451)
Why I did it This PR is to cherry-pick sonic-net#11448 to 202012 branch after resolving conflicts. There are conflicts in files/build_templates/qos_config.j2 src/sonic-config-engine/tests/test_j2files.py
1 parent 15cc046 commit c5eb031

File tree

4 files changed

+872
-4
lines changed

4 files changed

+872
-4
lines changed

files/build_templates/qos_config.j2

+4-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
{%- set backend_device_types = ['BackEndToRRouter', 'BackEndLeafRouter'] -%}
4646
{%- set apollo_resource_types = ['DL-NPU-Apollo'] -%}
4747

48+
{%- set require_global_dscp_to_tc_map = true -%}
49+
4850
{
4951
{% if (generate_tc_to_pg_map is defined) and tunnel_qos_remap_enable %}
5052
{{- generate_tc_to_pg_map() }}
@@ -91,6 +93,7 @@
9193
},
9294
{% endif %}
9395
{% if 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] in backend_device_types and 'storage_device' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['storage_device'] == 'true' %}
96+
{%- set require_global_dscp_to_tc_map = false %}
9497
"DOT1P_TO_TC_MAP": {
9598
"AZURE": {
9699
"0": "1",
@@ -224,7 +227,7 @@
224227
"PORT_QOS_MAP": {
225228
{% if generate_global_dscp_to_tc_map is defined %}
226229
{{- generate_global_dscp_to_tc_map() }}
227-
{% else %}
230+
{% elif require_global_dscp_to_tc_map %}
228231
"global": {
229232
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]"
230233
}{% if PORT_ACTIVE %},{% endif %}

0 commit comments

Comments
 (0)