Skip to content

Commit 47d7e5d

Browse files
authored
[202012] Apply separated DSCP_TO_TC_MAP and TC_TO_QUEUE_MAP on dualtor (#12792)
* Apply separated DSCP_TO_TC_MAP and TC_TO_QUEUE_MAP on dualtor
1 parent 6a74213 commit 47d7e5d

File tree

6 files changed

+439
-35
lines changed

6 files changed

+439
-35
lines changed

device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/BALANCED/qos.json.j2

+80-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{% if 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %}
2+
{% set different_dscp_to_tc_map = true %}
3+
{% set different_tc_to_queue_map = true %}
24
{%- macro generate_dscp_to_tc_map() %}
35
"DSCP_TO_TC_MAP": {
46
"AZURE": {
@@ -67,7 +69,73 @@
6769
"62": "1",
6870
"63": "1"
6971
},
70-
"AZURE_TUNNEL": {
72+
"AZURE_UPLINK": {
73+
"0" : "1",
74+
"1" : "1",
75+
"2" : "2",
76+
"3" : "3",
77+
"4" : "4",
78+
"5" : "1",
79+
"6" : "6",
80+
"7" : "1",
81+
"8" : "0",
82+
"9" : "1",
83+
"10": "1",
84+
"11": "1",
85+
"12": "1",
86+
"13": "1",
87+
"14": "1",
88+
"15": "1",
89+
"16": "1",
90+
"17": "1",
91+
"18": "1",
92+
"19": "1",
93+
"20": "1",
94+
"21": "1",
95+
"22": "1",
96+
"23": "1",
97+
"24": "1",
98+
"25": "1",
99+
"26": "1",
100+
"27": "1",
101+
"28": "1",
102+
"29": "1",
103+
"30": "1",
104+
"31": "1",
105+
"32": "1",
106+
"33": "8",
107+
"34": "1",
108+
"35": "1",
109+
"36": "1",
110+
"37": "1",
111+
"38": "1",
112+
"39": "1",
113+
"40": "1",
114+
"41": "1",
115+
"42": "1",
116+
"43": "1",
117+
"44": "1",
118+
"45": "1",
119+
"46": "5",
120+
"47": "1",
121+
"48": "7",
122+
"49": "1",
123+
"50": "1",
124+
"51": "1",
125+
"52": "1",
126+
"53": "1",
127+
"54": "1",
128+
"55": "1",
129+
"56": "1",
130+
"57": "1",
131+
"58": "1",
132+
"59": "1",
133+
"60": "1",
134+
"61": "1",
135+
"62": "1",
136+
"63": "1"
137+
},
138+
"AZURE_TUNNEL": {
71139
"0" : "1",
72140
"1" : "1",
73141
"2" : "1",
@@ -174,6 +242,17 @@
174242
"7": "7",
175243
"8": "1"
176244
},
245+
"AZURE_UPLINK": {
246+
"0": "0",
247+
"1": "1",
248+
"2": "2",
249+
"3": "3",
250+
"4": "4",
251+
"5": "5",
252+
"6": "6",
253+
"7": "7",
254+
"8": "1"
255+
},
177256
"AZURE_TUNNEL": {
178257
"0": "0",
179258
"1": "1",

device/common/profiles/th2/7260/BALANCED/qos.json.j2

+79
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@
151151
},
152152
{%- endmacro %}
153153
{% elif ('subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR') %}
154+
{% set different_dscp_to_tc_map = true %}
155+
{% set different_tc_to_queue_map = true %}
154156
{%- macro generate_dscp_to_tc_map() %}
155157
"DSCP_TO_TC_MAP": {
156158
"AZURE": {
@@ -219,6 +221,72 @@
219221
"62": "1",
220222
"63": "1"
221223
},
224+
"AZURE_UPLINK": {
225+
"0" : "1",
226+
"1" : "1",
227+
"2" : "2",
228+
"3" : "3",
229+
"4" : "4",
230+
"5" : "1",
231+
"6" : "6",
232+
"7" : "1",
233+
"8" : "0",
234+
"9" : "1",
235+
"10": "1",
236+
"11": "1",
237+
"12": "1",
238+
"13": "1",
239+
"14": "1",
240+
"15": "1",
241+
"16": "1",
242+
"17": "1",
243+
"18": "1",
244+
"19": "1",
245+
"20": "1",
246+
"21": "1",
247+
"22": "1",
248+
"23": "1",
249+
"24": "1",
250+
"25": "1",
251+
"26": "1",
252+
"27": "1",
253+
"28": "1",
254+
"29": "1",
255+
"30": "1",
256+
"31": "1",
257+
"32": "1",
258+
"33": "8",
259+
"34": "1",
260+
"35": "1",
261+
"36": "1",
262+
"37": "1",
263+
"38": "1",
264+
"39": "1",
265+
"40": "1",
266+
"41": "1",
267+
"42": "1",
268+
"43": "1",
269+
"44": "1",
270+
"45": "1",
271+
"46": "5",
272+
"47": "1",
273+
"48": "7",
274+
"49": "1",
275+
"50": "1",
276+
"51": "1",
277+
"52": "1",
278+
"53": "1",
279+
"54": "1",
280+
"55": "1",
281+
"56": "1",
282+
"57": "1",
283+
"58": "1",
284+
"59": "1",
285+
"60": "1",
286+
"61": "1",
287+
"62": "1",
288+
"63": "1"
289+
},
222290
"AZURE_TUNNEL": {
223291
"0" : "1",
224292
"1" : "1",
@@ -326,6 +394,17 @@
326394
"7": "7",
327395
"8": "1"
328396
},
397+
"AZURE_UPLINK": {
398+
"0": "0",
399+
"1": "1",
400+
"2": "2",
401+
"3": "3",
402+
"4": "4",
403+
"5": "5",
404+
"6": "6",
405+
"7": "7",
406+
"8": "1"
407+
},
329408
"AZURE_TUNNEL": {
330409
"0": "0",
331410
"1": "1",

device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2

+80
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{% if ('type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter') %}
2+
{% set different_dscp_to_tc_map = true %}
23
{%- macro generate_dscp_to_tc_map() %}
34
"DSCP_TO_TC_MAP": {
45
"AZURE": {
@@ -150,6 +151,8 @@
150151
},
151152
{%- endmacro %}
152153
{% elif ('subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR') %}
154+
{% set different_dscp_to_tc_map = true %}
155+
{% set different_tc_to_queue_map = true %}
153156
{%- macro generate_dscp_to_tc_map() %}
154157
"DSCP_TO_TC_MAP": {
155158
"AZURE": {
@@ -218,6 +221,72 @@
218221
"62": "1",
219222
"63": "1"
220223
},
224+
"AZURE_UPLINK": {
225+
"0" : "1",
226+
"1" : "1",
227+
"2" : "2",
228+
"3" : "3",
229+
"4" : "4",
230+
"5" : "1",
231+
"6" : "6",
232+
"7" : "1",
233+
"8" : "0",
234+
"9" : "1",
235+
"10": "1",
236+
"11": "1",
237+
"12": "1",
238+
"13": "1",
239+
"14": "1",
240+
"15": "1",
241+
"16": "1",
242+
"17": "1",
243+
"18": "1",
244+
"19": "1",
245+
"20": "1",
246+
"21": "1",
247+
"22": "1",
248+
"23": "1",
249+
"24": "1",
250+
"25": "1",
251+
"26": "1",
252+
"27": "1",
253+
"28": "1",
254+
"29": "1",
255+
"30": "1",
256+
"31": "1",
257+
"32": "1",
258+
"33": "8",
259+
"34": "1",
260+
"35": "1",
261+
"36": "1",
262+
"37": "1",
263+
"38": "1",
264+
"39": "1",
265+
"40": "1",
266+
"41": "1",
267+
"42": "1",
268+
"43": "1",
269+
"44": "1",
270+
"45": "1",
271+
"46": "5",
272+
"47": "1",
273+
"48": "7",
274+
"49": "1",
275+
"50": "1",
276+
"51": "1",
277+
"52": "1",
278+
"53": "1",
279+
"54": "1",
280+
"55": "1",
281+
"56": "1",
282+
"57": "1",
283+
"58": "1",
284+
"59": "1",
285+
"60": "1",
286+
"61": "1",
287+
"62": "1",
288+
"63": "1"
289+
},
221290
"AZURE_TUNNEL": {
222291
"0" : "1",
223292
"1" : "1",
@@ -325,6 +394,17 @@
325394
"7": "7",
326395
"8": "1"
327396
},
397+
"AZURE_UPLINK": {
398+
"0": "0",
399+
"1": "1",
400+
"2": "2",
401+
"3": "3",
402+
"4": "4",
403+
"5": "5",
404+
"6": "6",
405+
"7": "7",
406+
"8": "1"
407+
},
328408
"AZURE_TUNNEL": {
329409
"0": "0",
330410
"1": "1",

files/build_templates/qos_config.j2

+13-1
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,25 @@
238238
{% 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' %}
239239
"dot1p_to_tc_map" : "[DOT1P_TO_TC_MAP|AZURE]",
240240
{% else %}
241-
{% if different_dscp_to_tc_map and port not in port_names_list_extra_queues and tunnel_qos_remap_enable %}
241+
{# Apply separated DSCP_TO_TC_MAP to uplink ports on ToR and Leaf #}
242+
{% if different_dscp_to_tc_map and tunnel_qos_remap_enable %}
243+
{% if ('type' in DEVICE_METADATA['localhost']) and (DEVICE_METADATA['localhost']['type'] == 'LeafRouter') and (port not in port_names_list_extra_queues) %}
242244
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]",
245+
{% elif ('subtype' in DEVICE_METADATA['localhost']) and (DEVICE_METADATA['localhost']['subtype'] == 'DualToR') and (port in port_names_list_extra_queues) %}
246+
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]",
247+
{% else %}
248+
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
249+
{% endif %}
243250
{% else %}
244251
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
245252
{% endif %}
246253
{% endif %}
254+
{# Apply separated TC_TO_QUEUE_MAP to uplink ports on ToR #}
255+
{% if different_tc_to_queue_map and tunnel_qos_remap_enable and port in port_names_list_extra_queues %}
256+
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE_UPLINK]",
257+
{% else %}
247258
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
259+
{% endif %}
248260
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
249261
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
250262
{% if asic_type in pfc_to_pg_map_supported_asics %}

0 commit comments

Comments
 (0)