Skip to content

Commit

Permalink
Merge pull request sonic-net#69 from mssonicbld/sonicbld/202205-merge
Browse files Browse the repository at this point in the history
[code sync] Merge code from sonic-net/sonic-buildimage:202205 to 202205
  • Loading branch information
mssonicbld committed Jul 21, 2023
2 parents 1b844f3 + 5143859 commit 5d4f393
Show file tree
Hide file tree
Showing 14 changed files with 27,654 additions and 2,421 deletions.
61 changes: 61 additions & 0 deletions files/build_templates/qos_config.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
{%- set PORT_ALL = [] %}
{%- set PORT_BP = [] %}
{%- set SYSTEM_PORT_ALL = [] %}

{%- set voq_chassis = false %}
{%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost']['switch_type'] is defined and DEVICE_METADATA['localhost']['switch_type'] == 'voq' %}
{%- set voq_chassis = true %}
{%- endif -%}

{%- if voq_chassis %}
{%- for system_port in SYSTEM_PORT %}
{% if '|' not in system_port %}
{%- set system_port_name = system_port|join("|") %}
{% else %}
{%- set system_port_name = system_port %}
{% endif %}
{%- if 'cpu' not in system_port_name.lower() and 'IB' not in system_port_name and 'Rec' not in system_port_name %}
{%- if SYSTEM_PORT_ALL.append(system_port_name) %}{%- endif %}
{%- endif %}
{%- endfor %}
{%- endif %}
{%- for port in PORT %}
{%- if not port.startswith('Ethernet-Rec') and not port.startswith('Ethernet-IB') %}
{%- if PORT_ALL.append(port) %}{% endif %}
Expand Down Expand Up @@ -307,7 +326,48 @@
}
},
{% endif %}
{% if voq_chassis %}
"QUEUE": {
{% for system_port in SYSTEM_PORT_ALL %}
"{{ system_port }}|3": {
"scheduler" : "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
},
{% endfor %}
{% for system_port in SYSTEM_PORT_ALL %}
"{{ system_port }}|4": {
"scheduler" : "scheduler.1",
"wred_profile": "AZURE_LOSSLESS"
},
{% endfor %}
{% for system_port in SYSTEM_PORT_ALL %}
"{{ system_port }}|0": {
"scheduler": "scheduler.0"
},
{% endfor %}
{% for system_port in SYSTEM_PORT_ALL %}
"{{ system_port }}|1": {
"scheduler": "scheduler.0"
},
{% endfor %}
{% for system_port in SYSTEM_PORT_ALL %}
"{{ system_port }}|2": {
"scheduler": "scheduler.0"
},
{% endfor %}
{% for system_port in SYSTEM_PORT_ALL %}
"{{ system_port }}|5": {
"scheduler": "scheduler.0"
},
{% endfor %}
{% for system_port in SYSTEM_PORT_ALL %}
"{{ system_port }}|6": {
"scheduler": "scheduler.0"
}{% if not loop.last %},{% endif %}
{% endfor %}
}
{% else %}
"QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|3": {
"scheduler" : "scheduler.1",
Expand Down Expand Up @@ -372,4 +432,5 @@

{% endfor %}
}
{% endif %}
}
Loading

0 comments on commit 5d4f393

Please sign in to comment.