[202012] Configure different map between uplink and downlink on t1 switch in dual ToR scenario (#11299)
- Why I did it Configure different DSCP_TO_TC_MAP between uplink and downlink on T1 switch in dual ToR scenario On T1 uplink, both DSCP 2/6 will be mapped to TC 1 for the purpose of avoiding such traffic occupying lossless buffers. On T1 downlink, they will be mapped to TC 2/6 respectively. (unchanged) - How I did it For vendors who want to configure different DSCP_TO_TC_MAP between uplinks and downlinks on T1, they should Define generate_dscp_to_tc_map macro in SKU's qos.json.j2 file Define map AZURE for downlink and AZURE_UPLINK for uplink Define jinja2 variable different_dscp_to_tc_map as True Signed-off-by: Stephen Sun <stephens@nvidia.com>
This commit is contained in:
parent
d766e7022e
commit
fe6be5da92
@ -1,4 +1,5 @@
|
|||||||
{% if ('type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter') %}
|
{% if ('type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter') %}
|
||||||
|
{% set different_dscp_to_tc_map = true %}
|
||||||
{%- macro generate_dscp_to_tc_map() %}
|
{%- macro generate_dscp_to_tc_map() %}
|
||||||
"DSCP_TO_TC_MAP": {
|
"DSCP_TO_TC_MAP": {
|
||||||
"AZURE": {
|
"AZURE": {
|
||||||
@ -66,6 +67,72 @@
|
|||||||
"61": "1",
|
"61": "1",
|
||||||
"62": "1",
|
"62": "1",
|
||||||
"63": "1"
|
"63": "1"
|
||||||
|
},
|
||||||
|
"AZURE_UPLINK": {
|
||||||
|
"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": "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 %}
|
{%- endmacro %}
|
||||||
|
@ -233,8 +233,12 @@
|
|||||||
"{{ port }}": {
|
"{{ port }}": {
|
||||||
{% 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' %}
|
{% 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" : "[DOT1P_TO_TC_MAP|AZURE]",
|
"dot1p_to_tc_map" : "[DOT1P_TO_TC_MAP|AZURE]",
|
||||||
|
{% else %}
|
||||||
|
{% if different_dscp_to_tc_map and port not in port_names_list_extra_queues and tunnel_qos_remap_enable %}
|
||||||
|
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]",
|
||||||
{% else %}
|
{% else %}
|
||||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||||
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||||
"AZURE": {
|
"AZURE": {
|
||||||
@ -101,6 +102,72 @@
|
|||||||
"61": "1",
|
"61": "1",
|
||||||
"62": "1",
|
"62": "1",
|
||||||
"63": "1"
|
"63": "1"
|
||||||
|
},
|
||||||
|
"AZURE_UPLINK": {
|
||||||
|
"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": "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"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"SCHEDULER": {
|
"SCHEDULER": {
|
||||||
@ -115,7 +182,7 @@
|
|||||||
},
|
},
|
||||||
"PORT_QOS_MAP": {
|
"PORT_QOS_MAP": {
|
||||||
"Ethernet0": {
|
"Ethernet0": {
|
||||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]",
|
||||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||||
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
||||||
@ -123,7 +190,7 @@
|
|||||||
"pfcwd_sw_enable" : "3,4"
|
"pfcwd_sw_enable" : "3,4"
|
||||||
},
|
},
|
||||||
"Ethernet4": {
|
"Ethernet4": {
|
||||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]",
|
||||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||||
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
||||||
@ -131,7 +198,7 @@
|
|||||||
"pfcwd_sw_enable" : "3,4"
|
"pfcwd_sw_enable" : "3,4"
|
||||||
},
|
},
|
||||||
"Ethernet16": {
|
"Ethernet16": {
|
||||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]",
|
||||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||||
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
||||||
@ -139,7 +206,7 @@
|
|||||||
"pfcwd_sw_enable" : "3,4"
|
"pfcwd_sw_enable" : "3,4"
|
||||||
},
|
},
|
||||||
"Ethernet20": {
|
"Ethernet20": {
|
||||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]",
|
||||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||||
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
||||||
@ -147,7 +214,7 @@
|
|||||||
"pfcwd_sw_enable" : "3,4"
|
"pfcwd_sw_enable" : "3,4"
|
||||||
},
|
},
|
||||||
"Ethernet64": {
|
"Ethernet64": {
|
||||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]",
|
||||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||||
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
||||||
@ -155,7 +222,7 @@
|
|||||||
"pfcwd_sw_enable" : "3,4"
|
"pfcwd_sw_enable" : "3,4"
|
||||||
},
|
},
|
||||||
"Ethernet68": {
|
"Ethernet68": {
|
||||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]",
|
||||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||||
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
||||||
@ -163,7 +230,7 @@
|
|||||||
"pfcwd_sw_enable" : "3,4"
|
"pfcwd_sw_enable" : "3,4"
|
||||||
},
|
},
|
||||||
"Ethernet80": {
|
"Ethernet80": {
|
||||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]",
|
||||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||||
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
||||||
@ -171,7 +238,7 @@
|
|||||||
"pfcwd_sw_enable" : "3,4"
|
"pfcwd_sw_enable" : "3,4"
|
||||||
},
|
},
|
||||||
"Ethernet84": {
|
"Ethernet84": {
|
||||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]",
|
||||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||||
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
||||||
|
Reference in New Issue
Block a user