Skip to content

Commit

Permalink
Merge pull request sonic-net#115 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 authored Sep 22, 2023
2 parents 37b9499 + 6cadf4e commit 5785cd5
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions files/build_templates/qos_config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@
{
{% if (generate_tc_to_pg_map is defined) and tunnel_qos_remap_enable %}
{{- generate_tc_to_pg_map() }}
{% elif (generate_tc_to_pg_map is defined) and
('type' in DEVICE_METADATA['localhost'] and
DEVICE_METADATA['localhost']['type'] in backend_device_types) and
('resource_type' in DEVICE_METADATA['localhost'] and
DEVICE_METADATA['localhost']['resource_type'] == 'Compute-AI') %}
{{- generate_tc_to_pg_map() }}
{% else %}
"TC_TO_PRIORITY_GROUP_MAP": {
"AZURE": {
Expand Down Expand Up @@ -137,6 +143,12 @@
},
{% elif (generate_dscp_to_tc_map is defined) and tunnel_qos_remap_enable %}
{{- generate_dscp_to_tc_map() }}
{% elif (generate_dscp_to_tc_map is defined) and
('type' in DEVICE_METADATA['localhost'] and
DEVICE_METADATA['localhost']['type'] in backend_device_types) and
('resource_type' in DEVICE_METADATA['localhost'] and
DEVICE_METADATA['localhost']['resource_type'] == 'Compute-AI') %}
{{- generate_dscp_to_tc_map() }}
{% else %}
"DSCP_TO_TC_MAP": {
"AZURE": {
Expand Down Expand Up @@ -225,6 +237,29 @@
"weight": "100"
}
},
{% elif (generate_tc_to_pg_map is defined) and
('type' in DEVICE_METADATA['localhost'] and
DEVICE_METADATA['localhost']['type'] in backend_device_types) and
('resource_type' in DEVICE_METADATA['localhost'] and
DEVICE_METADATA['localhost']['resource_type'] == 'Compute-AI') %}
"SCHEDULER": {
"scheduler.0": {
"type" : "DWRR",
"weight": "40"
},
"scheduler.1": {
"type" : "DWRR",
"weight": "30"
},
"scheduler.2": {
"type" : "DWRR",
"weight": "25"
},
"scheduler.3": {
"type" : "DWRR",
"weight": "5"
}
},
{% else %}
"SCHEDULER": {
"scheduler.0": {
Expand Down Expand Up @@ -368,6 +403,27 @@
}
{% else %}
"QUEUE": {
{% if 'type' in DEVICE_METADATA['localhost'] and
DEVICE_METADATA['localhost']['type'] in backend_device_types and
'resource_type' in DEVICE_METADATA['localhost'] and
DEVICE_METADATA['localhost']['resource_type'] == 'Compute-AI' %}
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
"scheduler": "scheduler.0"
},
"{{ port }}|1": {
"scheduler": "scheduler.1"
},
"{{ port }}|3": {
"scheduler" : "scheduler.2",
"wred_profile": "AZURE_LOSSLESS"
},
"{{ port }}|4": {
"scheduler" : "scheduler.3",
"wred_profile": "AZURE_LOSSLESS"
}{% if not loop.last %},{% endif %}
{% endfor %}
{% else %}
{% for port in PORT_ACTIVE %}
"{{ port }}|3": {
"scheduler" : "scheduler.1",
Expand Down Expand Up @@ -431,6 +487,7 @@
}{% if not loop.last %},{% endif %}

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

0 comments on commit 5785cd5

Please sign in to comment.