Skip to content

Commit

Permalink
Update 7260 MMU and ECN settings (sonic-net#11449)
Browse files Browse the repository at this point in the history
Signed-off-by: Neetha John <nejo@microsoft.com>

Why I did it
Improve throughput and latency for 7260 deployments

How I did it
Update the dynamic threshold to 0 and ECN settings as 2mb/10mb/5%

How to verify it
Updated unit tests to use the modified values for 7260 ecn settings.
  • Loading branch information
neethajohn authored and yxieca committed Jul 22, 2022
1 parent e13df58 commit f92e3e8
Show file tree
Hide file tree
Showing 13 changed files with 97 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# PG lossless profiles.
# speed cable size xon xoff threshold xon_offset
50000 5m 1248 1248 56160 -3 2496
100000 5m 1248 1248 96928 -3 2496
50000 40m 1248 1248 96096 -3 2496
100000 40m 1248 1248 177632 -3 2496
50000 300m 1248 1248 141856 -3 2496
100000 300m 1248 1248 268736 -3 2496
50000 5m 1248 1248 56160 0 2496
100000 5m 1248 1248 96928 0 2496
50000 40m 1248 1248 96096 0 2496
100000 40m 1248 1248 177632 0 2496
50000 300m 1248 1248 141856 0 2496
100000 300m 1248 1248 268736 0 2496
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
{%- 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" : "10000000",
"green_min_threshold" : "2000000",
"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 %}

{%- include 'qos_config.j2' %}
18 changes: 9 additions & 9 deletions device/common/profiles/th2/7260/BALANCED/pg_profile_lookup.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# PG lossless profiles.
# speed cable size xon xoff threshold xon_offset
100000 5m 1248 1248 54080 -3 2496
100000 40m 1248 1248 59696 -3 2496
100000 300m 1248 1248 101088 -3 2496
50000 5m 1248 1248 54080 -3 2496
50000 40m 1248 1248 59696 -3 2496
50000 300m 1248 1248 101088 -3 2496
40000 5m 1248 1248 29536 -3 2496
40000 40m 1248 1248 31616 -3 2496
40000 300m 1248 1248 48256 -3 2496
100000 5m 1248 1248 54080 0 2496
100000 40m 1248 1248 59696 0 2496
100000 300m 1248 1248 101088 0 2496
50000 5m 1248 1248 54080 0 2496
50000 40m 1248 1248 59696 0 2496
50000 300m 1248 1248 101088 0 2496
40000 5m 1248 1248 29536 0 2496
40000 40m 1248 1248 31616 0 2496
40000 300m 1248 1248 48256 0 2496
20 changes: 20 additions & 0 deletions device/common/profiles/th2/7260/BALANCED/qos.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,24 @@
{%- endmacro %}
{% endif %}

{%- 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" : "10000000",
"green_min_threshold" : "2000000",
"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 %}

{%- include 'qos_config.j2' %}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# PG lossless profiles.
# speed cable size xon xoff threshold xon_offset
100000 5m 1248 1248 54080 -3 2496
100000 40m 1248 1248 59696 -3 2496
100000 300m 1248 1248 101088 -3 2496
50000 5m 1248 1248 54080 -3 2496
50000 40m 1248 1248 59696 -3 2496
50000 300m 1248 1248 101088 -3 2496
40000 5m 1248 1248 29536 -3 2496
40000 40m 1248 1248 31616 -3 2496
40000 300m 1248 1248 48256 -3 2496
100000 5m 1248 1248 54080 0 2496
100000 40m 1248 1248 59696 0 2496
100000 300m 1248 1248 101088 0 2496
50000 5m 1248 1248 54080 0 2496
50000 40m 1248 1248 59696 0 2496
50000 300m 1248 1248 101088 0 2496
40000 5m 1248 1248 29536 0 2496
40000 40m 1248 1248 31616 0 2496
40000 300m 1248 1248 48256 0 2496
20 changes: 20 additions & 0 deletions device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,24 @@
{%- endmacro %}
{% endif %}

{%- 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" : "10000000",
"green_min_threshold" : "2000000",
"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 %}

{%- include 'qos_config.j2' %}
Original file line number Diff line number Diff line change
Expand Up @@ -636,8 +636,8 @@
"wred_yellow_enable" : "true",
"wred_red_enable" : "true",
"ecn" : "ecn_all",
"green_max_threshold" : "2097152",
"green_min_threshold" : "1048576",
"green_max_threshold" : "10000000",
"green_min_threshold" : "2000000",
"yellow_max_threshold" : "2097152",
"yellow_min_threshold" : "1048576",
"red_max_threshold" : "2097152",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,8 @@
"wred_yellow_enable" : "true",
"wred_red_enable" : "true",
"ecn" : "ecn_all",
"green_max_threshold" : "2097152",
"green_min_threshold" : "1048576",
"green_max_threshold" : "10000000",
"green_min_threshold" : "2000000",
"yellow_max_threshold" : "2097152",
"yellow_min_threshold" : "1048576",
"red_max_threshold" : "2097152",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@
"wred_yellow_enable" : "true",
"wred_red_enable" : "true",
"ecn" : "ecn_all",
"green_max_threshold" : "2097152",
"green_min_threshold" : "1048576",
"green_max_threshold" : "10000000",
"green_min_threshold" : "2000000",
"yellow_max_threshold" : "2097152",
"yellow_min_threshold" : "1048576",
"red_max_threshold" : "2097152",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@
"wred_yellow_enable" : "true",
"wred_red_enable" : "true",
"ecn" : "ecn_all",
"green_max_threshold" : "2097152",
"green_min_threshold" : "1048576",
"green_max_threshold" : "10000000",
"green_min_threshold" : "2000000",
"yellow_max_threshold" : "2097152",
"yellow_min_threshold" : "1048576",
"red_max_threshold" : "2097152",
Expand Down
3 changes: 3 additions & 0 deletions src/sonic-config-engine/tests/test_j2files.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ def test_qos_dell9332_render_template(self):
def test_qos_dell6100_render_template(self):
self._test_qos_render_template('dell', 'x86_64-dell_s6100_c2538-r0', 'Force10-S6100', 'sample-dell-6100-t0-minigraph.xml', 'qos-dell6100.json')

def test_qos_arista7260_render_template(self):
self._test_qos_render_template('arista', 'x86_64-arista_7260cx3_64', 'Arista-7260CX3-D96C16', 'sample-arista-7260-t1-minigraph-remap-disabled.xml', 'qos-arista7260.json')

def _test_qos_render_template(self, vendor, platform, sku, minigraph, expected):
file_exist, dir_exist = self.create_machine_conf(platform, vendor)
dir_path = os.path.join(self.test_dir, '..', '..', '..', 'device', vendor, platform, sku)
Expand Down

0 comments on commit f92e3e8

Please sign in to comment.