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 config to clear queues for bounced back traffic #10176

Merged

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1,102 @@
{% if 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %}
{%- macro generate_dscp_to_tc_map() %}
"DSCP_TO_TC_MAP": {
"AZURE": {
"0" : "1",
"1" : "1",
"2" : "1",
bingwang-ms marked this conversation as resolved.
Show resolved Hide resolved
"3" : "3",
"4" : "4",
"5" : "1",
"6" : "1",
bingwang-ms marked this conversation as resolved.
Show resolved Hide resolved
"7" : "1",
"8" : "0",
"9" : "1",
"10": "1",
"11": "1",
"12": "1",
"13": "1",
"14": "1",
"15": "1",
"16": "1",
"17": "1",
"18": "1",
"19": "1",
"20": "1",
"21": "1",
"22": "1",
"23": "1",
"24": "1",
"25": "1",
"26": "1",
"27": "1",
"28": "1",
"29": "1",
"30": "1",
"31": "1",
"32": "1",
"33": "2",
"34": "1",
"35": "1",
"36": "1",
"37": "1",
"38": "1",
"39": "1",
"40": "1",
"41": "1",
"42": "1",
"43": "1",
"44": "1",
"45": "1",
"46": "5",
"47": "1",
"48": "7",
"49": "1",
"50": "1",
"51": "1",
"52": "1",
"53": "1",
"54": "1",
"55": "1",
"56": "1",
"57": "1",
"58": "1",
"59": "1",
"60": "1",
"61": "1",
"62": "1",
"63": "1"
}
},
{%- endmacro %}
{%- macro generate_tc_to_pg_map() %}
"TC_TO_PRIORITY_GROUP_MAP": {
bingwang-ms marked this conversation as resolved.
Show resolved Hide resolved
"AZURE": {
"0": "0",
"1": "0",
"2": "0",
"3": "3",
"4": "4",
"5": "0",
"6": "0",
"7": "7"
}
},
{%- endmacro %}
{%- macro generate_tc_to_queue_map() %}
"TC_TO_QUEUE_MAP": {
"AZURE": {
"0": "0",
"1": "1",
"2": "1",
"3": "3",
"4": "4",
"5": "5",
"6": "6",
bingwang-ms marked this conversation as resolved.
Show resolved Hide resolved
"7": "7"
}
},
{%- endmacro %}
{% endif %}

{%- include 'qos_config.j2' %}
186 changes: 186 additions & 0 deletions device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/qos.json.j2
Original file line number Diff line number Diff line change
@@ -1 +1,187 @@
{% if ('type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter') %}
{%- macro generate_dscp_to_tc_map() %}
"DSCP_TO_TC_MAP": {
bingwang-ms marked this conversation as resolved.
Show resolved Hide resolved
"AZURE": {
"0" : "1",
"1" : "1",
"2" : "2",
"3" : "3",
"4" : "4",
"5" : "1",
"6" : "6",
"7" : "1",
"8" : "0",
"9" : "1",
"10": "1",
"11": "1",
"12": "1",
"13": "1",
"14": "1",
"15": "1",
"16": "1",
"17": "1",
"18": "1",
"19": "1",
"20": "1",
"21": "1",
"22": "1",
"23": "1",
"24": "1",
"25": "1",
"26": "1",
"27": "1",
"28": "1",
"29": "1",
"30": "1",
"31": "1",
"32": "1",
"33": "1",
"34": "1",
"35": "1",
"36": "1",
"37": "1",
"38": "1",
"39": "1",
"40": "1",
"41": "1",
"42": "1",
"43": "1",
"44": "1",
"45": "1",
"46": "5",
"47": "1",
"48": "7",
"49": "1",
"50": "1",
"51": "1",
"52": "1",
"53": "1",
"54": "1",
"55": "1",
"56": "1",
"57": "1",
"58": "1",
"59": "1",
"60": "1",
"61": "1",
"62": "1",
"63": "1"
}
},
{%- endmacro %}
{%- macro generate_tc_to_pg_map() %}
"TC_TO_PRIORITY_GROUP_MAP": {
"AZURE": {
"0": "0",
"1": "0",
"2": "2",
"3": "3",
"4": "4",
"5": "0",
"6": "6",
"7": "7"
}
},
{%- endmacro %}
{% elif ('subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR') %}
{%- macro generate_dscp_to_tc_map() %}
"DSCP_TO_TC_MAP": {
neethajohn marked this conversation as resolved.
Show resolved Hide resolved
"AZURE": {
"0" : "1",
"1" : "1",
"2" : "1",
"3" : "3",
"4" : "4",
"5" : "1",
"6" : "1",
"7" : "1",
"8" : "0",
"9" : "1",
"10": "1",
"11": "1",
"12": "1",
"13": "1",
"14": "1",
"15": "1",
"16": "1",
"17": "1",
"18": "1",
"19": "1",
"20": "1",
"21": "1",
"22": "1",
"23": "1",
"24": "1",
"25": "1",
"26": "1",
"27": "1",
"28": "1",
"29": "1",
"30": "1",
"31": "1",
"32": "1",
"33": "2",
"34": "1",
"35": "1",
"36": "1",
"37": "1",
"38": "1",
"39": "1",
"40": "1",
"41": "1",
"42": "1",
"43": "1",
"44": "1",
"45": "1",
"46": "5",
"47": "1",
"48": "7",
"49": "1",
"50": "1",
"51": "1",
"52": "1",
"53": "1",
"54": "1",
"55": "1",
"56": "1",
"57": "1",
"58": "1",
"59": "1",
"60": "1",
"61": "1",
"62": "1",
"63": "1"
}
},
{%- endmacro %}
{%- macro generate_tc_to_pg_map() %}
"TC_TO_PRIORITY_GROUP_MAP": {
"AZURE": {
"0": "0",
"1": "0",
"2": "0",
"3": "3",
"4": "4",
"5": "0",
"6": "0",
"7": "7"
}
},
{%- endmacro %}
{%- macro generate_tc_to_queue_map() %}
"TC_TO_QUEUE_MAP": {
"AZURE": {
"0": "0",
"1": "1",
"2": "1",
"3": "3",
"4": "4",
"5": "5",
"6": "6",
"7": "7"
}
},
{%- endmacro %}
{% endif %}

{%- include 'qos_config.j2' %}

This file was deleted.

This file was deleted.

30 changes: 29 additions & 1 deletion files/build_templates/qos_config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
{%- endfor %}
{%- set port_names_active = port_names_list_active | join(',') -%}

{%- 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 port_names_list_extra_queues.append(port) %}{%- endif %}
{% endif %}
{%- endfor %}

{%- set pfc_to_pg_map_supported_asics = ['mellanox', 'barefoot', 'marvell'] -%}
{%- set backend_device_types = ['BackEndToRRouter', 'BackEndLeafRouter'] -%}
Expand Down Expand Up @@ -64,6 +71,9 @@
"7": "7"
}
},
{% if generate_tc_to_queue_map is defined %}
{{- generate_tc_to_queue_map() }}
{% else %}
"TC_TO_QUEUE_MAP": {
"AZURE": {
"0": "0",
Expand All @@ -76,6 +86,7 @@
"7": "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' %}
"DOT1P_TO_TC_MAP": {
"AZURE": {
Expand All @@ -89,6 +100,8 @@
"7": "7"
}
},
{% elif generate_dscp_to_tc_map is defined %}
{{- generate_dscp_to_tc_map() }}
{% else %}
"DSCP_TO_TC_MAP": {
"AZURE": {
Expand Down Expand Up @@ -208,7 +221,12 @@
{% if asic_type in pfc_to_pg_map_supported_asics %}
"pfc_to_pg_map" : "AZURE",
{% endif %}
"pfc_enable" : "3,4"
{% if port in port_names_list_extra_queues %}
"pfc_enable" : "2,3,4,6",
{% else %}
"pfc_enable" : "3,4",
{% endif %}
"pfcwd_sw_enable" : "3,4"
}{% if not loop.last %},{% endif %}

{% endfor %}
Expand Down Expand Up @@ -268,7 +286,12 @@
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|2": {
{% if port in port_names_list_extra_queues %}
"scheduler" : "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
{% else %}
"scheduler": "scheduler.0"
{% endif %}
},
{% endfor %}
{% for port in PORT_ACTIVE %}
Expand All @@ -278,7 +301,12 @@
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|6": {
{% if port in port_names_list_extra_queues %}
"scheduler" : "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
bingwang-ms marked this conversation as resolved.
Show resolved Hide resolved
{% else %}
"scheduler": "scheduler.0"
{% endif %}
}{% if not loop.last %},{% endif %}

{% endfor %}
Expand Down
Loading