Skip to content

Commit

Permalink
[202012] Add flag to control the generation of global level map (soni…
Browse files Browse the repository at this point in the history
…c-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
  • Loading branch information
bingwang-ms authored Jul 15, 2022
1 parent 15cc046 commit c5eb031
Show file tree
Hide file tree
Showing 4 changed files with 872 additions and 4 deletions.
5 changes: 4 additions & 1 deletion files/build_templates/qos_config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
{%- set backend_device_types = ['BackEndToRRouter', 'BackEndLeafRouter'] -%}
{%- set apollo_resource_types = ['DL-NPU-Apollo'] -%}

{%- set require_global_dscp_to_tc_map = true -%}

{
{% if (generate_tc_to_pg_map is defined) and tunnel_qos_remap_enable %}
{{- generate_tc_to_pg_map() }}
Expand Down Expand Up @@ -91,6 +93,7 @@
},
{% endif %}
{% 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' %}
{%- set require_global_dscp_to_tc_map = false %}
"DOT1P_TO_TC_MAP": {
"AZURE": {
"0": "1",
Expand Down Expand Up @@ -224,7 +227,7 @@
"PORT_QOS_MAP": {
{% if generate_global_dscp_to_tc_map is defined %}
{{- generate_global_dscp_to_tc_map() }}
{% else %}
{% elif require_global_dscp_to_tc_map %}
"global": {
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]"
}{% if PORT_ACTIVE %},{% endif %}
Expand Down
Loading

0 comments on commit c5eb031

Please sign in to comment.