From df1e0d0309acc18fe507412b3e0c84dd3c7624ee Mon Sep 17 00:00:00 2001 From: Neetha John Date: Tue, 12 Jul 2022 14:29:20 -0700 Subject: [PATCH 1/3] Update MMU and ecn settings Signed-off-by: Neetha John --- .../pg_profile_lookup.ini | 12 +++++------ .../Arista-7260CX3-D96C16/qos.json.j2 | 20 +++++++++++++++++++ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D96C16/pg_profile_lookup.ini b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D96C16/pg_profile_lookup.ini index ed0005610b71..a12e306278cc 100644 --- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D96C16/pg_profile_lookup.ini +++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D96C16/pg_profile_lookup.ini @@ -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 diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D96C16/qos.json.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D96C16/qos.json.j2 index 3e548325ea30..3e1d8df928c9 100644 --- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D96C16/qos.json.j2 +++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D96C16/qos.json.j2 @@ -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' %} From 0a3dc95a65d3a0674bc59b0711dc73cfc31a3f51 Mon Sep 17 00:00:00 2001 From: Neetha John Date: Tue, 12 Jul 2022 14:39:28 -0700 Subject: [PATCH 2/3] Add unit tests Signed-off-by: Neetha John --- .../tests/sample_output/py2/qos-arista7260.json | 1 + .../tests/sample_output/py3/qos-arista7260.json | 1 + src/sonic-config-engine/tests/test_j2files.py | 3 +++ 3 files changed, 5 insertions(+) create mode 120000 src/sonic-config-engine/tests/sample_output/py2/qos-arista7260.json create mode 120000 src/sonic-config-engine/tests/sample_output/py3/qos-arista7260.json diff --git a/src/sonic-config-engine/tests/sample_output/py2/qos-arista7260.json b/src/sonic-config-engine/tests/sample_output/py2/qos-arista7260.json new file mode 120000 index 000000000000..9362bae62029 --- /dev/null +++ b/src/sonic-config-engine/tests/sample_output/py2/qos-arista7260.json @@ -0,0 +1 @@ +../py3/qos-arista7260-t1-remap-disabled.json \ No newline at end of file diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260.json new file mode 120000 index 000000000000..bb3adcf3a9a9 --- /dev/null +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260.json @@ -0,0 +1 @@ +qos-arista7260-t1-remap-disabled.json \ No newline at end of file diff --git a/src/sonic-config-engine/tests/test_j2files.py b/src/sonic-config-engine/tests/test_j2files.py index 9e840a154c19..ab2bf32c6ec5 100644 --- a/src/sonic-config-engine/tests/test_j2files.py +++ b/src/sonic-config-engine/tests/test_j2files.py @@ -238,6 +238,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('dell', '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) From c1dfe143d744f847aa10e85a82090ca0d459e9e8 Mon Sep 17 00:00:00 2001 From: Neetha John Date: Tue, 12 Jul 2022 17:15:17 -0700 Subject: [PATCH 3/3] Fix vendor info Signed-off-by: Neetha John --- src/sonic-config-engine/tests/test_j2files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-config-engine/tests/test_j2files.py b/src/sonic-config-engine/tests/test_j2files.py index ab2bf32c6ec5..a307a4cdd6d8 100644 --- a/src/sonic-config-engine/tests/test_j2files.py +++ b/src/sonic-config-engine/tests/test_j2files.py @@ -239,7 +239,7 @@ 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('dell', 'x86_64-arista_7260cx3_64', 'Arista-7260CX3-D96C16', 'sample-arista-7260-t1-minigraph-remap-disabled.xml', 'qos-arista7260.json') + 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)