Skip to content

Commit

Permalink
Update ECN settings for storage backend (#12855)
Browse files Browse the repository at this point in the history
Signed-off-by: Neetha John <[email protected]>

Why I did it
ECN parameters need to be updated for storage backend

How I did it
Included the check for storage backend devices to update qos configs

How to verify it
Verified that the new ecn settings are applied on storage backend device.
Verified that the old ecn settings are applied for storage frontend, non storage frontend/backend devices
  • Loading branch information
neethajohn authored and StormLiangMS committed Dec 10, 2022
1 parent 6759ad2 commit 93ca0ca
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 1 deletion.
22 changes: 22 additions & 0 deletions device/common/profiles/td2/gen/BALANCED/qos.json.j2
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
{% if ('type' in DEVICE_METADATA['localhost'] and 'BackEnd' in DEVICE_METADATA['localhost']['type'] and 'storage_device' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['storage_device'] == 'true') %}
{%- macro generate_wred_profiles() %}
"WRED_PROFILE": {
"AZURE_LOSSLESS" : {
"wred_green_enable" : "true",
"wred_yellow_enable" : "true",
"wred_red_enable" : "true",
"ecn" : "ecn_all",
"green_max_threshold" : "12000144",
"green_min_threshold" : "1048576",
"yellow_max_threshold" : "2097152",
"yellow_min_threshold" : "1048576",
"red_max_threshold" : "2097152",
"red_min_threshold" : "1048576",
"green_drop_probability" : "5",
"yellow_drop_probability": "5",
"red_drop_probability" : "5"
}
},
{%- endmacro %}
{% endif %}

{%- include 'qos_config.j2' %}
22 changes: 22 additions & 0 deletions device/common/profiles/td2/gen/RDMA-CENTRIC/qos.json.j2
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
{% if ('type' in DEVICE_METADATA['localhost'] and 'BackEnd' in DEVICE_METADATA['localhost']['type'] and 'storage_device' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['storage_device'] == 'true') %}
{%- macro generate_wred_profiles() %}
"WRED_PROFILE": {
"AZURE_LOSSLESS" : {
"wred_green_enable" : "true",
"wred_yellow_enable" : "true",
"wred_red_enable" : "true",
"ecn" : "ecn_all",
"green_max_threshold" : "12000144",
"green_min_threshold" : "1048576",
"yellow_max_threshold" : "2097152",
"yellow_min_threshold" : "1048576",
"red_max_threshold" : "2097152",
"red_min_threshold" : "1048576",
"green_drop_probability" : "5",
"yellow_drop_probability": "5",
"red_drop_probability" : "5"
}
},
{%- endmacro %}
{% endif %}

{%- include 'qos_config.j2' %}
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,11 @@
<a:Reference i:nil="true"/>
<a:Value>10.0.0.16</a:Value>
</a:DeviceProperty>
<a:DeviceProperty>
<a:Name>ResourceType</a:Name>
<a:Reference i:nil="true"/>
<a:Value>Storage</a:Value>
</a:DeviceProperty>
</a:Properties>
</a:DeviceMetadata>
</Devices>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"wred_yellow_enable" : "true",
"wred_red_enable" : "true",
"ecn" : "ecn_all",
"green_max_threshold" : "2097152",
"green_max_threshold" : "12000144",
"green_min_threshold" : "1048576",
"yellow_max_threshold" : "2097152",
"yellow_min_threshold" : "1048576",
Expand Down

0 comments on commit 93ca0ca

Please sign in to comment.