77652c55fd
* Unify qos config with qos_config.j2 template Signed-off-by: Wenda <wenni@microsoft.com> * Change 7050 to use qos config template Signed-off-by: Wenda <wenni@microsoft.com> modified: device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/qos.json.j2 modified: device/arista/x86_64-arista_7050_qx32s/Arista-7050-QX-32S/qos.json.j2 * Change a7060, a7260, s6000, s6100, z9100 to use qos config template Signed-off-by: Wenda <wenni@microsoft.com> * Change mlnx devices to use qos config template Signed-off-by: Wenda <wenni@microsoft.com> modified: ../../../mellanox/x86_64-mlnx_msn2100-r0/ACS-MSN2100/qos.json.j2 modified: ../../../mellanox/x86_64-mlnx_msn2410-r0/ACS-MSN2410/qos.json.j2 modified: ../../../mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/qos.json.j2 modified: ../../../mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/qos.json.j2 * Change barefoot devices to use qos config template Signed-off-by: Wenda <wenni@microsoft.com> modified: barefoot/x86_64-accton_wedge100bf_32x-r0/montara/qos.json.j2 modified: barefoot/x86_64-accton_wedge100bf_65x-r0/mavericks/qos.json.j2 * Change accton as7212 to use qos config template Signed-off-by: Wenda <wenni@microsoft.com> modified: accton/x86_64-accton_as7212_54x-r0/AS7212-54x/qos.json.j2 * Apply PORT_QOS_MAP to active ports only Signed-off-by: Wenda <wenni@microsoft.com> * Update qos config test with qos_config.j2 template Signed-off-by: Wenda <wenni@microsoft.com> * Update sample output of qos-dell6100.json Signed-off-by: Wenda <wenni@microsoft.com> * Remove generating the default port name and index list, i.e., remove the generate_port_lists macro, because PORT is always defined Signed-off-by: Wenda <wenni@microsoft.com> * Include pfc_to_pg_map according to platform asic type obtained from /etc/sonic/sonic_version.yml rather than specifying per hwsku Signed-off-by: Wenda Ni <wenni@microsoft.com> * Customize TC_TO_PRIORITY_GROUP_MAP and PFC_PRIORITY_TO_PRIORITY_GROUP_MAP for barefoot Signed-off-by: Wenda <wenni@microsoft.com> * Unify PFC_PRIORITY_TO_PRIORITY_GROUP_MAP: remove "0":"0", "1":"1" as these two pgs do not generate PFC frames. Signed-off-by: Wenda <wenni@microsoft.com>
215 lines
5.3 KiB
Django/Jinja
215 lines
5.3 KiB
Django/Jinja
{%- set PORT_ALL = [] %}
|
|
{%- for port in PORT %}
|
|
{%- if PORT_ALL.append(port) %}{% endif %}
|
|
{%- endfor %}
|
|
{%- if PORT_ALL | sort_by_port_index %}{% endif %}
|
|
|
|
{%- set port_names_list_all = [] %}
|
|
{%- for port in PORT_ALL %}
|
|
{%- if port_names_list_all.append(port) %}{% endif %}
|
|
{%- endfor %}
|
|
{%- set port_names_all = port_names_list_all | join(',') -%}
|
|
|
|
|
|
{%- set PORT_ACTIVE = [] %}
|
|
{%- if DEVICE_NEIGHBOR is not defined %}
|
|
{%- set PORT_ACTIVE = PORT_ALL %}
|
|
{%- else %}
|
|
{%- for port in DEVICE_NEIGHBOR.keys() %}
|
|
{%- if PORT_ACTIVE.append(port) %}{%- endif %}
|
|
{%- endfor %}
|
|
{%- endif %}
|
|
{%- if PORT_ACTIVE | sort_by_port_index %}{% endif %}
|
|
|
|
{%- set port_names_list_active = [] %}
|
|
{%- for port in PORT_ACTIVE %}
|
|
{%- if port_names_list_active.append(port) %}{%- endif %}
|
|
{%- endfor %}
|
|
{%- set port_names_active = port_names_list_active | join(',') -%}
|
|
|
|
|
|
{%- set pfc_to_pg_map_supported_asics = ['mellanox', 'barefoot', 'marvell'] -%}
|
|
|
|
|
|
{
|
|
{% if generate_tc_to_pg_map is defined %}
|
|
{{- generate_tc_to_pg_map() }}
|
|
{% else %}
|
|
"TC_TO_PRIORITY_GROUP_MAP": {
|
|
"AZURE": {
|
|
"0": "0",
|
|
"1": "1",
|
|
"2": "2",
|
|
"3": "3",
|
|
"4": "4",
|
|
"5": "5",
|
|
"6": "6",
|
|
"7": "7"
|
|
}
|
|
},
|
|
{% endif %}
|
|
"MAP_PFC_PRIORITY_TO_QUEUE": {
|
|
"AZURE": {
|
|
"0": "0",
|
|
"1": "1",
|
|
"2": "2",
|
|
"3": "3",
|
|
"4": "4",
|
|
"5": "5",
|
|
"6": "6",
|
|
"7": "7"
|
|
}
|
|
},
|
|
"TC_TO_QUEUE_MAP": {
|
|
"AZURE": {
|
|
"0": "0",
|
|
"1": "1",
|
|
"2": "2",
|
|
"3": "3",
|
|
"4": "4",
|
|
"5": "5",
|
|
"6": "6",
|
|
"7": "7"
|
|
}
|
|
},
|
|
"DSCP_TO_TC_MAP": {
|
|
"AZURE": {
|
|
"0" : "0",
|
|
"1" : "0",
|
|
"2" : "0",
|
|
"3" : "3",
|
|
"4" : "4",
|
|
"5" : "0",
|
|
"6" : "0",
|
|
"7" : "0",
|
|
"8" : "1",
|
|
"9" : "0",
|
|
"10": "0",
|
|
"11": "0",
|
|
"12": "0",
|
|
"13": "0",
|
|
"14": "0",
|
|
"15": "0",
|
|
"16": "0",
|
|
"17": "0",
|
|
"18": "0",
|
|
"19": "0",
|
|
"20": "0",
|
|
"21": "0",
|
|
"22": "0",
|
|
"23": "0",
|
|
"24": "0",
|
|
"25": "0",
|
|
"26": "0",
|
|
"27": "0",
|
|
"28": "0",
|
|
"29": "0",
|
|
"30": "0",
|
|
"31": "0",
|
|
"32": "0",
|
|
"33": "0",
|
|
"34": "0",
|
|
"35": "0",
|
|
"36": "0",
|
|
"37": "0",
|
|
"38": "0",
|
|
"39": "0",
|
|
"40": "0",
|
|
"41": "0",
|
|
"42": "0",
|
|
"43": "0",
|
|
"44": "0",
|
|
"45": "0",
|
|
"46": "0",
|
|
"47": "0",
|
|
"48": "0",
|
|
"49": "0",
|
|
"50": "0",
|
|
"51": "0",
|
|
"52": "0",
|
|
"53": "0",
|
|
"54": "0",
|
|
"55": "0",
|
|
"56": "0",
|
|
"57": "0",
|
|
"58": "0",
|
|
"59": "0",
|
|
"60": "0",
|
|
"61": "0",
|
|
"62": "0",
|
|
"63": "0"
|
|
}
|
|
},
|
|
"SCHEDULER": {
|
|
"scheduler.0": {
|
|
"type" : "DWRR",
|
|
"weight": "25"
|
|
},
|
|
"scheduler.1": {
|
|
"type" : "DWRR",
|
|
"weight": "30"
|
|
},
|
|
"scheduler.2": {
|
|
"type" : "DWRR",
|
|
"weight": "20"
|
|
}
|
|
},
|
|
{% if asic_type in pfc_to_pg_map_supported_asics %}
|
|
"PFC_PRIORITY_TO_PRIORITY_GROUP_MAP": {
|
|
"AZURE": {
|
|
"3": "3",
|
|
"4": "4"
|
|
}
|
|
},
|
|
{% endif %}
|
|
"PORT_QOS_MAP": {
|
|
"{{ port_names_active }}": {
|
|
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
|
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
|
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
|
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
|
{% if asic_type in pfc_to_pg_map_supported_asics %}
|
|
"pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP|AZURE]",
|
|
{% endif %}
|
|
"pfc_enable" : "3,4"
|
|
}
|
|
},
|
|
"WRED_PROFILE": {
|
|
"AZURE_LOSSLESS" : {
|
|
"wred_green_enable" : "true",
|
|
"wred_yellow_enable" : "true",
|
|
"wred_red_enable" : "true",
|
|
"ecn" : "ecn_all",
|
|
"green_max_threshold" : "312000",
|
|
"green_min_threshold" : "104000",
|
|
"yellow_max_threshold": "312000",
|
|
"yellow_min_threshold": "104000",
|
|
"red_max_threshold" : "312000",
|
|
"red_min_threshold" : "104000"
|
|
}
|
|
},
|
|
"QUEUE": {
|
|
{% for port in PORT_ACTIVE %}
|
|
"{{ port }}|3": {
|
|
"scheduler": "[SCHEDULER|scheduler.0]"
|
|
},
|
|
{% endfor %}
|
|
{% for port in PORT_ACTIVE %}
|
|
"{{ port }}|4": {
|
|
"scheduler": "[SCHEDULER|scheduler.0]"
|
|
},
|
|
{% endfor %}
|
|
{% for port in PORT_ACTIVE %}
|
|
"{{ port }}|0": {
|
|
"scheduler": "[SCHEDULER|scheduler.1]"
|
|
},
|
|
{% endfor %}
|
|
{% for port in PORT_ACTIVE %}
|
|
"{{ port }}|1": {
|
|
"scheduler": "[SCHEDULER|scheduler.2]"
|
|
}{% if not loop.last %},{% endif %}
|
|
|
|
{% endfor %}
|
|
}
|
|
}
|