From ce413c199db9ea2bd8d733728b1466730cc75b71 Mon Sep 17 00:00:00 2001 From: Sonic Build Admin Date: Thu, 23 Jan 2025 19:39:55 +0000 Subject: [PATCH] Add buffer configs for TH5 C224 and C256 SKUs #### Why I did it ##### Work item tracking - Microsoft ADO **(number only)**: #### How I did it #### How to verify it #### Which release branch to backport (provide reason below if selected) - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 - [ ] 202205 - [ ] 202211 - [ ] 202305 #### Tested branch (Please provide the tested image version) - [ ] - [ ] #### Description for the changelog #### Link to config_db schema for YANG module changes #### A picture of a cute animal (not mandatory but encouraged) --- .../buffers_defaults_t0.j2 | 31 +++- .../buffers_defaults_t1.j2 | 31 +++- .../Arista-7060X6-64PE-C224O8/qos.json.j2 | 142 ++++++++++++++++++ .../th5-a7060x6-64pe.config.bcm | 9 ++ .../buffers_defaults_t0.j2 | 41 ++++- .../buffers_defaults_t1.j2 | 41 ++++- .../Arista-7060X6-64PE-C256S2/qos.json.j2 | 142 ++++++++++++++++++ .../th5-a7060x6-64pe.config.bcm | 9 ++ files/build_templates/qos_config.j2 | 2 + .../tests_config/qosmaps.json | 2 +- .../yang-models/sonic-tc-queue-map.yang | 2 +- 11 files changed, 446 insertions(+), 6 deletions(-) mode change 120000 => 100644 device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/buffers_defaults_t0.j2 mode change 120000 => 100644 device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/buffers_defaults_t1.j2 mode change 120000 => 100644 device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/buffers_defaults_t0.j2 mode change 120000 => 100644 device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/buffers_defaults_t1.j2 diff --git a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/buffers_defaults_t0.j2 deleted file mode 120000 index 9524e6a476..0000000000 --- a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/buffers_defaults_t0.j2 +++ /dev/null @@ -1 +0,0 @@ -BALANCED/buffers_defaults_t0.j2 \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/buffers_defaults_t0.j2 new file mode 100644 index 0000000000..30f7ef14a0 --- /dev/null +++ b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/buffers_defaults_t0.j2 @@ -0,0 +1,30 @@ +{%- set default_cable = '0m' %} + +{%- include 'buffer_ports.j2' %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossy_pool": { + "size": "166607744", + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossy_pool": { + "size": "166607744", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool": "ingress_lossy_pool", + "size": "0", + "static_th": "167546528" + }, + "egress_lossy_profile": { + "pool": "egress_lossy_pool", + "size": "1778", + "dynamic_th": "1" + } + }, +{%- endmacro %} diff --git a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/buffers_defaults_t1.j2 deleted file mode 120000 index c25cc95d6d..0000000000 --- a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/buffers_defaults_t1.j2 +++ /dev/null @@ -1 +0,0 @@ -BALANCED/buffers_defaults_t1.j2 \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/buffers_defaults_t1.j2 new file mode 100644 index 0000000000..30f7ef14a0 --- /dev/null +++ b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/buffers_defaults_t1.j2 @@ -0,0 +1,30 @@ +{%- set default_cable = '0m' %} + +{%- include 'buffer_ports.j2' %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossy_pool": { + "size": "166607744", + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossy_pool": { + "size": "166607744", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool": "ingress_lossy_pool", + "size": "0", + "static_th": "167546528" + }, + "egress_lossy_profile": { + "pool": "egress_lossy_pool", + "size": "1778", + "dynamic_th": "1" + } + }, +{%- endmacro %} diff --git a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/qos.json.j2 b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/qos.json.j2 index 3e548325ea..bf9563a944 100644 --- a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/qos.json.j2 +++ b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/qos.json.j2 @@ -1 +1,143 @@ +{%- macro generate_dscp_to_tc_map_per_sku() -%} + "DSCP_TO_TC_MAP": { + "AZURE": { + "0" : "0", + "1" : "1", + "2" : "2", + "3" : "3", + "4" : "4", + "5" : "4", + "6" : "4", + "7" : "0", + "8" : "0", + "9" : "0", + "10": "5", + "11": "0", + "12": "0", + "13": "0", + "14": "0", + "15": "0", + "16": "0", + "17": "0", + "18": "0", + "19": "0", + "20": "0", + "21": "0", + "22": "0", + "23": "0", + "24": "0", + "25": "0", + "26": "0", + "27": "0", + "28": "0", + "29": "0", + "30": "0", + "31": "0", + "32": "0", + "33": "0", + "34": "0", + "35": "0", + "36": "0", + "37": "0", + "38": "0", + "39": "0", + "40": "0", + "41": "0", + "42": "0", + "43": "0", + "44": "0", + "45": "0", + "46": "0", + "47": "0", + "48": "0", + "49": "0", + "50": "0", + "51": "0", + "52": "0", + "53": "0", + "54": "0", + "55": "0", + "56": "0", + "57": "0", + "58": "0", + "59": "0", + "60": "0", + "61": "0", + "62": "0", + "63": "0" + } + }, +{%- endmacro -%} + +{%- macro generate_tc_to_queue_map_per_sku() -%} + "TC_TO_QUEUE_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7", + "8": "8", + "9": "9" + } + }, +{%- endmacro -%} + +{%- macro generate_scheduler_per_sku() -%} + "SCHEDULER": { + "scheduler.0": { + "type" : "DWRR", + "weight": "1" + }, + "scheduler.1": { + "type" : "DWRR", + "weight": "10" + }, + "scheduler.2": { + "type" : "DWRR", + "weight": "20" + }, + "scheduler.3": { + "type" : "DWRR", + "weight": "30" + } + }, +{%- endmacro -%} + +{%- macro generate_single_queue_per_sku(port) -%} + "{{ port }}|0": { + "scheduler": "scheduler.0" + }, + "{{ port }}|1": { + "scheduler": "scheduler.1" + }, + "{{ port }}|2": { + "scheduler": "scheduler.2" + }, + "{{ port }}|3": { + "scheduler": "scheduler.3" + }, + "{{ port }}|4": { + "scheduler": "scheduler.1" + }, + "{{ port }}|5": { + "scheduler": "scheduler.1" + }, + "{{ port }}|6": { + "scheduler": "scheduler.1" + }, + "{{ port }}|7": { + "scheduler": "scheduler.1" + }, + "{{ port }}|8": { + "scheduler": "scheduler.1" + }, + "{{ port }}|9": { + "scheduler": "scheduler.1" + } +{%- endmacro -%} + {%- include 'qos_config.j2' %} diff --git a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/th5-a7060x6-64pe.config.bcm b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/th5-a7060x6-64pe.config.bcm index 4a218b1d58..c4558cbc11 100644 --- a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/th5-a7060x6-64pe.config.bcm +++ b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C224O8/th5-a7060x6-64pe.config.bcm @@ -1848,3 +1848,12 @@ device: DEVICE_CONFIG: AUTOLOAD_BOARD_SETTINGS: 0 ... +--- +device: + 0: + TM_THD_CONFIG: + SKIP_BUFFER_RESERVATION: 0 + THRESHOLD_MODE: LOSSY + TM_SCHEDULER_CONFIG: + NUM_MC_Q: NUM_MC_Q_2 +... diff --git a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/buffers_defaults_t0.j2 deleted file mode 120000 index 9524e6a476..0000000000 --- a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/buffers_defaults_t0.j2 +++ /dev/null @@ -1 +0,0 @@ -BALANCED/buffers_defaults_t0.j2 \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/buffers_defaults_t0.j2 new file mode 100644 index 0000000000..03081f4676 --- /dev/null +++ b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/buffers_defaults_t0.j2 @@ -0,0 +1,40 @@ +{%- set default_cable = '0m' %} + +{%- include 'buffer_ports.j2' %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossy_pool": { + "size": "166607744", + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossy_pool": { + "size": "166607744", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool": "ingress_lossy_pool", + "size": "0", + "static_th": "167546528" + }, + "egress_lossy_profile": { + "pool": "egress_lossy_pool", + "size": "1778", + "dynamic_th": "1" + } + }, +{%- endmacro %} +{%- macro generate_queue_buffers(ports) %} + "BUFFER_QUEUE": { + {% for port in ports.split(',') %} + "{{ port }}|0-9": { + "profile" : "egress_lossy_profile" + } + {%- if not loop.last -%},{% endif %} + {% endfor %} + } +{%- endmacro %} diff --git a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/buffers_defaults_t1.j2 deleted file mode 120000 index c25cc95d6d..0000000000 --- a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/buffers_defaults_t1.j2 +++ /dev/null @@ -1 +0,0 @@ -BALANCED/buffers_defaults_t1.j2 \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/buffers_defaults_t1.j2 new file mode 100644 index 0000000000..03081f4676 --- /dev/null +++ b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/buffers_defaults_t1.j2 @@ -0,0 +1,40 @@ +{%- set default_cable = '0m' %} + +{%- include 'buffer_ports.j2' %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossy_pool": { + "size": "166607744", + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossy_pool": { + "size": "166607744", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool": "ingress_lossy_pool", + "size": "0", + "static_th": "167546528" + }, + "egress_lossy_profile": { + "pool": "egress_lossy_pool", + "size": "1778", + "dynamic_th": "1" + } + }, +{%- endmacro %} +{%- macro generate_queue_buffers(ports) %} + "BUFFER_QUEUE": { + {% for port in ports.split(',') %} + "{{ port }}|0-9": { + "profile" : "egress_lossy_profile" + } + {%- if not loop.last -%},{% endif %} + {% endfor %} + } +{%- endmacro %} diff --git a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/qos.json.j2 b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/qos.json.j2 index 3e548325ea..bf9563a944 100644 --- a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/qos.json.j2 +++ b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/qos.json.j2 @@ -1 +1,143 @@ +{%- macro generate_dscp_to_tc_map_per_sku() -%} + "DSCP_TO_TC_MAP": { + "AZURE": { + "0" : "0", + "1" : "1", + "2" : "2", + "3" : "3", + "4" : "4", + "5" : "4", + "6" : "4", + "7" : "0", + "8" : "0", + "9" : "0", + "10": "5", + "11": "0", + "12": "0", + "13": "0", + "14": "0", + "15": "0", + "16": "0", + "17": "0", + "18": "0", + "19": "0", + "20": "0", + "21": "0", + "22": "0", + "23": "0", + "24": "0", + "25": "0", + "26": "0", + "27": "0", + "28": "0", + "29": "0", + "30": "0", + "31": "0", + "32": "0", + "33": "0", + "34": "0", + "35": "0", + "36": "0", + "37": "0", + "38": "0", + "39": "0", + "40": "0", + "41": "0", + "42": "0", + "43": "0", + "44": "0", + "45": "0", + "46": "0", + "47": "0", + "48": "0", + "49": "0", + "50": "0", + "51": "0", + "52": "0", + "53": "0", + "54": "0", + "55": "0", + "56": "0", + "57": "0", + "58": "0", + "59": "0", + "60": "0", + "61": "0", + "62": "0", + "63": "0" + } + }, +{%- endmacro -%} + +{%- macro generate_tc_to_queue_map_per_sku() -%} + "TC_TO_QUEUE_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7", + "8": "8", + "9": "9" + } + }, +{%- endmacro -%} + +{%- macro generate_scheduler_per_sku() -%} + "SCHEDULER": { + "scheduler.0": { + "type" : "DWRR", + "weight": "1" + }, + "scheduler.1": { + "type" : "DWRR", + "weight": "10" + }, + "scheduler.2": { + "type" : "DWRR", + "weight": "20" + }, + "scheduler.3": { + "type" : "DWRR", + "weight": "30" + } + }, +{%- endmacro -%} + +{%- macro generate_single_queue_per_sku(port) -%} + "{{ port }}|0": { + "scheduler": "scheduler.0" + }, + "{{ port }}|1": { + "scheduler": "scheduler.1" + }, + "{{ port }}|2": { + "scheduler": "scheduler.2" + }, + "{{ port }}|3": { + "scheduler": "scheduler.3" + }, + "{{ port }}|4": { + "scheduler": "scheduler.1" + }, + "{{ port }}|5": { + "scheduler": "scheduler.1" + }, + "{{ port }}|6": { + "scheduler": "scheduler.1" + }, + "{{ port }}|7": { + "scheduler": "scheduler.1" + }, + "{{ port }}|8": { + "scheduler": "scheduler.1" + }, + "{{ port }}|9": { + "scheduler": "scheduler.1" + } +{%- endmacro -%} + {%- include 'qos_config.j2' %} diff --git a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/th5-a7060x6-64pe.config.bcm b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/th5-a7060x6-64pe.config.bcm index a932662ac4..a26072725f 100644 --- a/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/th5-a7060x6-64pe.config.bcm +++ b/device/arista/x86_64-arista_7060x6_64pe/Arista-7060X6-64PE-C256S2/th5-a7060x6-64pe.config.bcm @@ -1937,3 +1937,12 @@ device: DEVICE_CONFIG: AUTOLOAD_BOARD_SETTINGS: 0 ... +--- +device: + 0: + TM_THD_CONFIG: + SKIP_BUFFER_RESERVATION: 0 + THRESHOLD_MODE: LOSSY + TM_SCHEDULER_CONFIG: + NUM_MC_Q: NUM_MC_Q_2 +... diff --git a/files/build_templates/qos_config.j2 b/files/build_templates/qos_config.j2 index 70ebf9e238..1ecd6dd7e8 100644 --- a/files/build_templates/qos_config.j2 +++ b/files/build_templates/qos_config.j2 @@ -120,6 +120,8 @@ }, {% if (generate_tc_to_queue_map is defined) and tunnel_qos_remap_enable %} {{- generate_tc_to_queue_map() }} +{% elif (generate_tc_to_queue_map_per_sku is defined) %} + {{ generate_tc_to_queue_map_per_sku() }} {% else %} "TC_TO_QUEUE_MAP": { "AZURE": { diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/qosmaps.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/qosmaps.json index 355187b497..ca6fa2c90d 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/qosmaps.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/qosmaps.json @@ -247,7 +247,7 @@ "TC_TO_QUEUE_MAP": [ { "tc": "1", - "qindex": "8" + "qindex": "10" }, { "tc":"2", diff --git a/src/sonic-yang-models/yang-models/sonic-tc-queue-map.yang b/src/sonic-yang-models/yang-models/sonic-tc-queue-map.yang index c70a3ffe7e..30ecd5c16f 100644 --- a/src/sonic-yang-models/yang-models/sonic-tc-queue-map.yang +++ b/src/sonic-yang-models/yang-models/sonic-tc-queue-map.yang @@ -54,7 +54,7 @@ module sonic-tc-queue-map { leaf qindex { type string { - pattern "[0-7]?" { + pattern "[0-9]?" { error-message "Invalid queue index"; error-app-tag queue-index-invalid; }