Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update qos template to support SYSTEM_DEFAULT table #10936

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% if (SYSTEM_DEFAULTS is defined) and ('tunnel_qos_remap' in SYSTEM_DEFAULTS) and (SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled') %}
{% if 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %}
{%- macro generate_dscp_to_tc_map() %}
"DSCP_TO_TC_MAP": {
Expand Down Expand Up @@ -35,7 +36,7 @@
"30": "1",
"31": "1",
"32": "1",
"33": "2",
"33": "8",
"34": "1",
"35": "1",
"36": "1",
Expand Down Expand Up @@ -101,7 +102,7 @@
"30": "1",
"31": "1",
"32": "1",
"33": "2",
"33": "8",
"34": "1",
"35": "1",
"36": "1",
Expand Down Expand Up @@ -140,12 +141,13 @@
"AZURE": {
"0": "0",
"1": "0",
"2": "0",
"2": "2",
"3": "3",
"4": "4",
"5": "0",
"6": "0",
"7": "7"
"6": "6",
"7": "7",
"8": "0"
},
"AZURE_TUNNEL": {
"0": "0",
Expand All @@ -155,7 +157,8 @@
"4": "6",
"5": "0",
"6": "0",
"7": "0"
"7": "0",
"8": "0"
}
},
{%- endmacro %}
Expand All @@ -169,7 +172,8 @@
"4": "4",
"5": "5",
"6": "6",
"7": "7"
"7": "7",
"8": "1"
},
"AZURE_TUNNEL": {
"0": "0",
Expand All @@ -179,7 +183,8 @@
"4": "6",
"5": "5",
"6": "1",
"7": "7"
"7": "7",
"8": "1"
}
},
{%- endmacro %}
Expand All @@ -188,15 +193,17 @@
"AZURE_TUNNEL": {
"0": "8",
"1": "0",
"2": "33",
"2": "0",
"3": "2",
"4": "6",
"5": "46",
"6": "0",
"7": "48"
"7": "48",
"8": "33"
}
},
{%- endmacro %}
{% endif %}
{% endif %}

{%- include 'qos_config.j2' %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% if (SYSTEM_DEFAULTS is defined) and ('tunnel_qos_remap' in SYSTEM_DEFAULTS) and (SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled') %}
{% if ('type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter') %}
{%- macro generate_dscp_to_tc_map() %}
"DSCP_TO_TC_MAP": {
Expand Down Expand Up @@ -120,7 +121,7 @@
"30": "1",
"31": "1",
"32": "1",
"33": "2",
"33": "8",
"34": "1",
"35": "1",
"36": "1",
Expand Down Expand Up @@ -186,7 +187,7 @@
"30": "1",
"31": "1",
"32": "1",
"33": "2",
"33": "8",
"34": "1",
"35": "1",
"36": "1",
Expand Down Expand Up @@ -225,12 +226,13 @@
"AZURE": {
"0": "0",
"1": "0",
"2": "0",
"2": "2",
"3": "3",
"4": "4",
"5": "0",
"6": "0",
"7": "7"
"6": "6",
"7": "7",
"8": "0"
},
"AZURE_TUNNEL": {
"0": "0",
Expand All @@ -240,7 +242,8 @@
"4": "6",
"5": "0",
"6": "0",
"7": "0"
"7": "0",
"8": "0"
}
},
{%- endmacro %}
Expand All @@ -254,7 +257,8 @@
"4": "4",
"5": "5",
"6": "6",
"7": "7"
"7": "7",
"8": "1"
},
"AZURE_TUNNEL": {
"0": "0",
Expand All @@ -264,7 +268,8 @@
"4": "6",
"5": "5",
"6": "1",
"7": "7"
"7": "7",
"8": "1"
}
},
{%- endmacro %}
Expand All @@ -273,15 +278,17 @@
"AZURE_TUNNEL": {
"0": "8",
"1": "0",
"2": "33",
"2": "0",
"3": "2",
"4": "6",
"5": "46",
"6": "0",
"7": "48"
"7": "48",
"8": "33"
}
},
{%- endmacro %}
{% endif %}

{%- include 'qos_config.j2' %}
{% endif %}
neethajohn marked this conversation as resolved.
Show resolved Hide resolved
20 changes: 10 additions & 10 deletions files/build_templates/qos_config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@

{%- set port_names_list_extra_queues = [] %}
{%- for port in PORT_ACTIVE %}
{% if (generate_dscp_to_tc_map is defined) and ('type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter' and DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR[port].name in DEVICE_NEIGHBOR_METADATA and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[port].name].type == 'ToRRouter') or
('subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' and DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR[port].name in DEVICE_NEIGHBOR_METADATA and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[port].name].type == 'LeafRouter') %}
{% if (generate_dscp_to_tc_map is defined) and (('type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter' and DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR[port].name in DEVICE_NEIGHBOR_METADATA and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[port].name].type == 'ToRRouter') or
('subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' and DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR[port].name in DEVICE_NEIGHBOR_METADATA and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[port].name].type == 'LeafRouter')) %}
{%- if port_names_list_extra_queues.append(port) %}{%- endif %}
{% endif %}
{% endif %}
{%- endfor %}

{%- set pfc_to_pg_map_supported_asics = ['mellanox', 'barefoot', 'marvell'] -%}
Expand Down Expand Up @@ -289,12 +289,12 @@
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|2": {
{% if port in port_names_list_extra_queues %}
{% if port in port_names_list_extra_queues %}
"scheduler" : "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
{% else %}
{% else %}
"scheduler": "scheduler.0"
{% endif %}
{% endif %}
},
{% endfor %}
{% for port in PORT_ACTIVE %}
Expand All @@ -304,12 +304,12 @@
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|6": {
{% if port in port_names_list_extra_queues %}
{% if port in port_names_list_extra_queues %}
"scheduler" : "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
{% else %}
"wred_profile": "AZURE_LOSSLESS"
{% else %}
"scheduler": "scheduler.0"
{% endif %}
{% endif %}
}{% if not loop.last %},{% endif %}

{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2339,6 +2339,14 @@
</Devices>
<Properties xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
</MetadataDeclaration>
<SystemDefaultsDeclaration>
<a:SystemDefaults xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
<a:SystemDefault>
<a:Name>TunnelQosRemapEnabled</a:Name>
<a:Value>True</a:Value>
</a:SystemDefault>
</a:SystemDefaults>
</SystemDefaultsDeclaration>
<LinkMetadataDeclaration>
<Link xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
<a:LinkMetadata>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4605,6 +4605,14 @@
</Devices>
<Properties xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
</MetadataDeclaration>
<SystemDefaultsDeclaration>
<a:SystemDefaults xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
<a:SystemDefault>
<a:Name>TunnelQosRemapEnabled</a:Name>
<a:Value>True</a:Value>
</a:SystemDefault>
</a:SystemDefaults>
</SystemDefaultsDeclaration>
<LinkMetadataDeclaration>
<Link xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
<a:LinkMetadata>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2486,6 +2486,14 @@
</Devices>
<Properties xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
</MetadataDeclaration>
<SystemDefaultsDeclaration>
<a:SystemDefaults xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
<a:SystemDefault>
<a:Name>TunnelQosRemapEnabled</a:Name>
<a:Value>True</a:Value>
</a:SystemDefault>
</a:SystemDefaults>
</SystemDefaultsDeclaration>
<Hostname>str-7260cx3-acs-7</Hostname>
<HwSku>Arista-7260CX3-C64</HwSku>
</DeviceMiniGraph>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"4": "4",
"5": "5",
"6": "6",
"7": "7"
"7": "7",
"8": "1"
},
"AZURE_TUNNEL": {
"0": "0",
Expand All @@ -30,7 +31,8 @@
"4": "6",
"5": "5",
"6": "1",
"7": "7"
"7": "7",
"8": "1"
}
},
"DSCP_TO_TC_MAP": {
Expand Down Expand Up @@ -68,7 +70,7 @@
"30": "1",
"31": "1",
"32": "1",
"33": "2",
"33": "8",
"34": "1",
"35": "1",
"36": "1",
Expand Down Expand Up @@ -134,7 +136,7 @@
"30": "1",
"31": "1",
"32": "1",
"33": "2",
"33": "8",
"34": "1",
"35": "1",
"36": "1",
Expand Down Expand Up @@ -171,12 +173,13 @@
"AZURE": {
"0": "0",
"1": "0",
"2": "0",
"2": "2",
"3": "3",
"4": "4",
"5": "0",
"6": "0",
"7": "7"
"6": "6",
"7": "7",
"8": "0"
},
"AZURE_TUNNEL": {
"0": "0",
Expand All @@ -186,19 +189,21 @@
"4": "6",
"5": "0",
"6": "0",
"7": "0"
"7": "0",
"8": "0"
}
},
"TC_TO_DSCP_MAP": {
"AZURE_TUNNEL": {
"0": "8",
"1": "0",
"2": "33",
"2": "0",
"3": "2",
"4": "6",
"5": "46",
"6": "0",
"7": "48"
"7": "48",
"8": "33"
}
},
"SCHEDULER": {
Expand Down
Loading