Skip to content

Commit e9b651b

Browse files
authored
[Mellanox] Update ECN configuration for SN5600/SN5610n/SN5640 SKUs (#22253)
[Mellanox] Update ECN configuration for SN5600/SN5610n/SN5640 SKUs
1 parent d7fe017 commit e9b651b

File tree

1 file changed

+54
-10
lines changed
  • device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1

1 file changed

+54
-10
lines changed

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)