Skip to content

Commit 6176407

Browse files
authored
[action] [PR:22253] [Mellanox] Update ECN configuration for SN5600/SN5610n/SN5640 SKUs (sonic-net#993)
<!-- Please make sure you've read and understood our contributing guidelines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md failure_prs.log Make sure all your commits include a signature generated with `git commit -s` ** If this is a bug fix, make sure your description includes "fixes #xxxx", or "closes #xxxx" or "resolves #xxxx" Please provide the following information: --> #### Why I did it Update for ECN for Mellanox SN5600/SN5610n/SN5640 SKUs ##### Work item tracking - Microsoft ADO **(number only)**: #### How I did it #### How to verify it Manually test <!-- If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012. --> #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 - [ ] 202205 - [ ] 202211 - [ ] 202305 #### Tested branch (Please provide the tested image version) <!-- - Please provide tested image version - e.g. - [x] 20201231.100 --> - [ ] <!-- image version 1 --> - [ ] <!-- image version 2 --> #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> <!-- Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU. --> #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md --> #### A picture of a cute animal (not mandatory but encouraged)
1 parent 121ee1e commit 6176407

1 file changed

Lines changed: 54 additions & 10 deletions

File tree

  • device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1

device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/qos.json.j2

Lines changed: 54 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,16 @@
124124
"scheduler": "scheduler.4"
125125
},
126126
"{{ port }}|1": {
127-
"scheduler": "scheduler.8"
127+
"scheduler": "scheduler.8",
128+
"wred_profile": "AZURE_LOSSY_Q1"
128129
},
129130
"{{ port }}|2": {
130-
"scheduler": "scheduler.18"
131+
"scheduler": "scheduler.18",
132+
"wred_profile": "AZURE_LOSSY_Q2"
131133
},
132134
"{{ port }}|3": {
133-
"scheduler": "scheduler.22"
135+
"scheduler": "scheduler.22",
136+
"wred_profile": "AZURE_LOSSY_Q3"
134137
},
135138
"{{ port }}|4": {
136139
"scheduler": "scheduler.22"
@@ -148,18 +151,59 @@
148151
{%- endmacro %}
149152

150153
{%- macro generate_wred_profiles() %}
154+
{%- set max_threshold = "282624" %}
155+
{%- set min_threshold = "166912" %}
156+
157+
{%- if 'type' in DEVICE_METADATA['localhost'] %}
158+
{%- if DEVICE_METADATA['localhost']['type'] == 'ToRRouter' %}
159+
{%- set max_threshold = "282624" %}
160+
{%- elif DEVICE_METADATA['localhost']['type'] == 'LeafRouter' %}
161+
{%- set max_threshold = "239616" %}
162+
{%- endif %}
163+
{%- endif %}
164+
151165
"WRED_PROFILE": {
152-
"AZURE_LOSSLESS" : {
166+
"AZURE_LOSSY_Q1" : {
167+
"wred_green_enable" : "true",
168+
"wred_yellow_enable" : "true",
169+
"wred_red_enable" : "true",
170+
"ecn" : "ecn_all",
171+
"green_max_threshold" : "{{ max_threshold }}",
172+
"green_min_threshold" : "{{ min_threshold }}",
173+
"yellow_max_threshold" : "{{ max_threshold }}",
174+
"yellow_min_threshold" : "{{ min_threshold }}",
175+
"red_max_threshold" : "{{ max_threshold }}",
176+
"red_min_threshold" : "{{ min_threshold }}",
177+
"green_drop_probability" : "5",
178+
"yellow_drop_probability": "5",
179+
"red_drop_probability" : "5"
180+
},
181+
"AZURE_LOSSY_Q2" : {
182+
"wred_green_enable" : "true",
183+
"wred_yellow_enable" : "true",
184+
"wred_red_enable" : "true",
185+
"ecn" : "ecn_all",
186+
"green_max_threshold" : "{{ max_threshold }}",
187+
"green_min_threshold" : "{{ min_threshold }}",
188+
"yellow_max_threshold" : "{{ max_threshold }}",
189+
"yellow_min_threshold" : "{{ min_threshold }}",
190+
"red_max_threshold" : "{{ max_threshold }}",
191+
"red_min_threshold" : "{{ min_threshold }}",
192+
"green_drop_probability" : "5",
193+
"yellow_drop_probability": "5",
194+
"red_drop_probability" : "5"
195+
},
196+
"AZURE_LOSSY_Q3" : {
153197
"wred_green_enable" : "true",
154198
"wred_yellow_enable" : "true",
155199
"wred_red_enable" : "true",
156200
"ecn" : "ecn_all",
157-
"green_max_threshold" : "10000000",
158-
"green_min_threshold" : "2000000",
159-
"yellow_max_threshold" : "10000000",
160-
"yellow_min_threshold" : "2000000",
161-
"red_max_threshold" : "10000000",
162-
"red_min_threshold" : "2000000",
201+
"green_max_threshold" : "{{ max_threshold }}",
202+
"green_min_threshold" : "{{ min_threshold }}",
203+
"yellow_max_threshold" : "{{ max_threshold }}",
204+
"yellow_min_threshold" : "{{ min_threshold }}",
205+
"red_max_threshold" : "{{ max_threshold }}",
206+
"red_min_threshold" : "{{ min_threshold }}",
163207
"green_drop_probability" : "5",
164208
"yellow_drop_probability": "5",
165209
"red_drop_probability" : "5"

0 commit comments

Comments
 (0)