Skip to content

Commit ab0768e

Browse files
Update WRED profile on system ports (#15612) (#15914)
* Update WRED profile on system ports Co-authored-by: vmittal-msft <[email protected]>
1 parent c369e1f commit ab0768e

13 files changed

+27653
-2420
lines changed

files/build_templates/qos_config.j2

+61
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
{%- set PORT_ALL = [] %}
22
{%- set PORT_BP = [] %}
3+
{%- set SYSTEM_PORT_ALL = [] %}
4+
5+
{%- set voq_chassis = false %}
6+
{%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost']['switch_type'] is defined and DEVICE_METADATA['localhost']['switch_type'] == 'voq' %}
7+
{%- set voq_chassis = true %}
8+
{%- endif -%}
9+
10+
{%- if voq_chassis %}
11+
{%- for system_port in SYSTEM_PORT %}
12+
{% if '|' not in system_port %}
13+
{%- set system_port_name = system_port|join("|") %}
14+
{% else %}
15+
{%- set system_port_name = system_port %}
16+
{% endif %}
17+
{%- if 'cpu' not in system_port_name.lower() and 'IB' not in system_port_name and 'Rec' not in system_port_name %}
18+
{%- if SYSTEM_PORT_ALL.append(system_port_name) %}{%- endif %}
19+
{%- endif %}
20+
{%- endfor %}
21+
{%- endif %}
322
{%- for port in PORT %}
423
{%- if not port.startswith('Ethernet-Rec') and not port.startswith('Ethernet-IB') %}
524
{%- if PORT_ALL.append(port) %}{% endif %}
@@ -307,7 +326,48 @@
307326
}
308327
},
309328
{% endif %}
329+
{% if voq_chassis %}
310330
"QUEUE": {
331+
{% for system_port in SYSTEM_PORT_ALL %}
332+
"{{ system_port }}|3": {
333+
"scheduler" : "scheduler.1",
334+
"wred_profile": "AZURE_LOSSLESS"
335+
},
336+
{% endfor %}
337+
{% for system_port in SYSTEM_PORT_ALL %}
338+
"{{ system_port }}|4": {
339+
"scheduler" : "scheduler.1",
340+
"wred_profile": "AZURE_LOSSLESS"
341+
},
342+
{% endfor %}
343+
{% for system_port in SYSTEM_PORT_ALL %}
344+
"{{ system_port }}|0": {
345+
"scheduler": "scheduler.0"
346+
},
347+
{% endfor %}
348+
{% for system_port in SYSTEM_PORT_ALL %}
349+
"{{ system_port }}|1": {
350+
"scheduler": "scheduler.0"
351+
},
352+
{% endfor %}
353+
{% for system_port in SYSTEM_PORT_ALL %}
354+
"{{ system_port }}|2": {
355+
"scheduler": "scheduler.0"
356+
},
357+
{% endfor %}
358+
{% for system_port in SYSTEM_PORT_ALL %}
359+
"{{ system_port }}|5": {
360+
"scheduler": "scheduler.0"
361+
},
362+
{% endfor %}
363+
{% for system_port in SYSTEM_PORT_ALL %}
364+
"{{ system_port }}|6": {
365+
"scheduler": "scheduler.0"
366+
}{% if not loop.last %},{% endif %}
367+
{% endfor %}
368+
}
369+
{% else %}
370+
"QUEUE": {
311371
{% for port in PORT_ACTIVE %}
312372
"{{ port }}|3": {
313373
"scheduler" : "scheduler.1",
@@ -372,4 +432,5 @@
372432

373433
{% endfor %}
374434
}
435+
{% endif %}
375436
}

0 commit comments

Comments
 (0)