diff --git a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C224O8/buffers_defaults_objects.j2 b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C224O8/buffers_defaults_objects.j2 deleted file mode 100644 index 05f6cd29a50..00000000000 --- a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C224O8/buffers_defaults_objects.j2 +++ /dev/null @@ -1,310 +0,0 @@ -{# - SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES - Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - SPDX-License-Identifier: Apache-2.0 - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -#} - -{%- macro generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) %} - "BUFFER_POOL": { - {% if dynamic_mode is not defined and port_names_inactive|length > 0 -%} - "ingress_zero_pool" : { - "mode": "static", - "type": "ingress", - "size": "0" - }, - {% endif -%} - "ingress_lossless_pool": { - {% if dynamic_mode is not defined -%} - "size": "{{ ingress_lossless_pool_size }}", - "xoff": "{{ ingress_lossless_pool_xoff }}", - {% endif -%} - "type": "ingress", - "mode": "dynamic" - }, - "egress_lossless_pool": { - "size": "{{ egress_lossless_pool_size }}", - "type": "egress", - "mode": "dynamic" - }, - "egress_lossy_pool": { - {% if dynamic_mode is not defined -%} - "size": "{{ egress_lossy_pool_size }}", - {% endif -%} - "type": "egress", - "mode": "dynamic" - } - }, - "BUFFER_PROFILE": { - {% if dynamic_mode is not defined and port_names_inactive|length > 0 -%} - "ingress_lossy_pg_zero_profile" : { - "pool":"ingress_zero_pool", - "size":"0", - "static_th":"0" - }, - "ingress_lossless_zero_profile" : { - "pool":"ingress_lossless_pool", - "size":"0", - "dynamic_th":"-8" - }, - "egress_lossless_zero_profile" : { - "pool":"egress_lossless_pool", - "size":"0", - "dynamic_th":"-8" - }, - "egress_lossy_zero_profile" : { - "pool":"egress_lossy_pool", - "size":"0", - "dynamic_th":"-8" - }, - {% endif -%} - "ingress_lossless_profile": { - "pool":"ingress_lossless_pool", - "size":"0", - "dynamic_th":"7" - }, - "ingress_lossy_profile": { - "pool":"ingress_lossless_pool", - "size":"0", - "dynamic_th":"3" - }, - "egress_lossless_profile": { - "pool":"egress_lossless_pool", - "size":"0", - "dynamic_th":"7" - }, - "egress_lossy_profile": { - "pool":"egress_lossy_pool", - "size":"9216", - "dynamic_th":"7" - }, - "q_lossy_profile": { - "pool":"egress_lossy_pool", - "size":"0", - "dynamic_th":"3" - } - }, -{%- endmacro %} - -{%- macro generate_profile_lists(port_names_active, port_names_inactive) %} - "BUFFER_PORT_INGRESS_PROFILE_LIST": { -{% for port in port_names_active.split(',') %} - "{{ port }}": { - "profile_list" : "ingress_lossless_profile" - }{% if not loop.last %},{% endif %} - -{% endfor %} -{% if port_names_inactive|length > 0 %} -, -{% for port in port_names_inactive.split(',') %} - "{{ port }}": { -{% if dynamic_mode is defined %} - "profile_list" : "ingress_lossless_profile" -{% else %} - "profile_list" : "ingress_lossless_zero_profile" -{% endif %} - }{% if not loop.last %},{% endif %} - -{% endfor %} -{% endif %} - }, - "BUFFER_PORT_EGRESS_PROFILE_LIST": { -{% for port in port_names_active.split(',') %} - "{{ port }}": { - "profile_list" : "egress_lossless_profile,egress_lossy_profile" - }{% if not loop.last %},{% endif %} - -{% endfor %} -{% if port_names_inactive|length > 0 %} -, -{% for port in port_names_inactive.split(',') %} - "{{ port }}": { -{% if dynamic_mode is defined %} - "profile_list" : "egress_lossless_profile,egress_lossy_profile" -{% else %} - "profile_list" : "egress_lossless_zero_profile,egress_lossy_zero_profile" -{% endif %} - }{% if not loop.last %},{% endif %} - -{% endfor %} -{% endif %} - } -{%- endmacro %} - -{%- macro generate_queue_buffers_with_extra_lossless_queues(port_names_active, port_names_extra_queues, port_names_inactive) %} - "BUFFER_QUEUE": { -{% set q_loop = namespace(last_valid=false) %} -{% for port in port_names_active.split(',') %} -{% if port not in port_names_extra_queues.split(',') %} - "{{ port }}|3-4": { - "profile" : "egress_lossless_profile" - }, -{% endif %} -{% endfor %} -{% for port in port_names_active.split(',') %} -{% if port not in port_names_extra_queues.split(',') %} - "{{ port }}|0-2": { - "profile" : "q_lossy_profile" - }, -{% endif %} -{% endfor %} -{% for port in port_names_active.split(',') %} -{% if port not in port_names_extra_queues.split(',') %} -{% if port_names_extra_queues|length > 0 %} - "{{ port }}|5-7": { -{% else %} - "{{ port }}|5-6": { -{% endif %} - "profile" : "q_lossy_profile" - }{% if not loop.last %},{% endif %} - -{% set q_loop.last_valid = true %} -{% else %} -{% set q_loop.last_valid = false %} -{% endif %} -{% endfor %} -{% if port_names_extra_queues|length > 0 %} -{% if q_loop.last_valid %},{% endif %} -{% for port in port_names_extra_queues.split(',') %} - "{{ port }}|0-1": { - "profile" : "q_lossy_profile" - }, - "{{ port }}|2-4": { - "profile" : "egress_lossless_profile" - }, - "{{ port }}|5": { - "profile" : "q_lossy_profile" - }, - "{{ port }}|6": { - "profile" : "egress_lossless_profile" - }, - "{{ port }}|7": { - "profile" : "q_lossy_profile" - }{% if not loop.last %},{% endif %} - -{% endfor %} -{% endif %} -{% if port_names_inactive|length > 0 %} -, -{% if dynamic_mode is defined %} -{% for port in port_names_inactive.split(',') %} - "{{ port }}|3-4": { - "profile" : "egress_lossless_profile" - }, -{% endfor %} -{% for port in port_names_inactive.split(',') %} - "{{ port }}|0-2": { - "profile" : "q_lossy_profile" - }, -{% endfor %} -{% for port in port_names_inactive.split(',') %} -{% if port_names_extra_queues|length > 0 %} - "{{ port }}|5-7": { -{% else %} - "{{ port }}|5-6": { -{% endif %} - "profile" : "q_lossy_profile" - }{% if not loop.last %},{% endif %} - -{% endfor %} -{% else %} -{% for port in port_names_inactive.split(',') %} - "{{ port }}|3-4": { - "profile" : "egress_lossless_zero_profile" - }, -{% endfor %} -{% for port in port_names_inactive.split(',') %} - "{{ port }}|0-2": { - "profile" : "egress_lossy_zero_profile" - }, -{% endfor %} -{% for port in port_names_inactive.split(',') %} -{% if port_names_extra_queues|length > 0 %} - "{{ port }}|5-7": { -{% else %} - "{{ port }}|5-6": { -{% endif %} - "profile" : "egress_lossy_zero_profile" - }{% if not loop.last %},{% endif %} - -{% endfor %} -{% endif %} -{% endif %} - } -{%- endmacro %} - -{%- macro generate_queue_buffers(port_names_active, port_names_inactive) %} -{{ generate_queue_buffers_with_extra_lossless_queues(port_names_active, "", port_names_inactive) }} -{%- endmacro %} - -{%- macro generate_pg_profiles_with_extra_lossless_pgs(port_names_active, port_names_extra_pgs, port_names_inactive) %} - "BUFFER_PG": { -{% set pg_loop = namespace(last_valid=false) %} -{% for port in port_names_active.split(',') %} -{% if port not in port_names_extra_pgs.split(',') %} -{% if dynamic_mode is defined %} - "{{ port }}|3-4": { - "profile" : "NULL" - }, -{% endif %} - "{{ port }}|0": { - "profile" : "ingress_lossy_profile" - }{% if not loop.last %},{% endif %} - -{% set pg_loop.last_valid = true %} -{% else %} -{% set pg_loop.last_valid = false %} -{% endif %} -{% endfor %} -{% if port_names_extra_pgs|length > 0 %} -{% if pg_loop.last_valid %},{% endif %} -{% for port in port_names_extra_pgs.split(',') %} -{% if dynamic_mode is defined %} - "{{ port }}|2-4": { - "profile" : "NULL" - }, - "{{ port }}|6": { - "profile" : "NULL" - }, -{% endif %} - "{{ port }}|0": { - "profile" : "ingress_lossy_profile" - }{% if not loop.last %},{% endif %} - -{% endfor %} -{% endif %} -{% if port_names_inactive|length > 0 %} -{%- for port in port_names_inactive.split(',') %} - {%- if loop.first -%},{%- endif -%} -{% if dynamic_mode is defined %} - "{{ port }}|3-4": { - "profile" : "NULL" - }, -{% endif %} - "{{ port }}|0": { -{% if dynamic_mode is defined %} - "profile" : "ingress_lossy_profile" -{% else %} - "profile" : "ingress_lossy_pg_zero_profile" -{% endif %} - }{% if not loop.last %},{% endif %} - -{% endfor %} -{% endif %} - } -{%- endmacro %} - -{%- macro generate_pg_profiles(port_names_active, port_names_inactive) %} -{{ generate_pg_profiles_with_extra_lossless_pgs(port_names_active, "", port_names_inactive) }} -{%- endmacro %} diff --git a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C224O8/buffers_defaults_objects.j2 b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C224O8/buffers_defaults_objects.j2 new file mode 120000 index 00000000000..14851fae21e --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C224O8/buffers_defaults_objects.j2 @@ -0,0 +1 @@ +../Mellanox-SN5600-C256S1/buffers_defaults_objects.j2 \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C224O8/buffers_defaults_t0.j2 b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C224O8/buffers_defaults_t0.j2 index 2a4c7eacd55..06f6352eff5 100644 --- a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C224O8/buffers_defaults_t0.j2 +++ b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C224O8/buffers_defaults_t0.j2 @@ -1,6 +1,6 @@ {# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES - Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,11 +15,17 @@ See the License for the specific language governing permissions and limitations under the License. #} -{% set default_cable = '40m' %} -{% set ingress_lossless_pool_size = '144188416' %} -{% set ingress_lossless_pool_xoff = '1024' %} +{% set default_cable = '0m' %} +{%-set ports2cable = { + 'torrouter_server' : '0m', + 'leafrouter_torrouter' : '0m', + 'spinerouter_leafrouter' : '0m' + } +-%} +{% set ingress_lossless_pool_size = '144189440' %} +{% set ingress_lossless_pool_xoff = '0' %} {% set egress_lossless_pool_size = '158229504' %} -{% set egress_lossy_pool_size = '144188416' %} +{% set egress_lossy_pool_size = '144189440' %} {% import 'buffers_defaults_objects.j2' as defs with context %} diff --git a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C224O8/buffers_defaults_t1.j2 b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C224O8/buffers_defaults_t1.j2 index 7ad4830e644..06f6352eff5 100644 --- a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C224O8/buffers_defaults_t1.j2 +++ b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C224O8/buffers_defaults_t1.j2 @@ -1,6 +1,6 @@ {# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES - Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,18 +15,17 @@ See the License for the specific language governing permissions and limitations under the License. #} -{% set default_cable = '250m' %} -{% set ingress_lossless_pool_size = '144188416' %} -{% set ingress_lossless_pool_xoff = '1024' %} -{% set egress_lossless_pool_size = '158229504' %} -{% set egress_lossy_pool_size = '144188416' %} - +{% set default_cable = '0m' %} {%-set ports2cable = { - 'torrouter_server' : '40m', - 'leafrouter_torrouter' : '250m', - 'spinerouter_leafrouter' : '1000m' + 'torrouter_server' : '0m', + 'leafrouter_torrouter' : '0m', + 'spinerouter_leafrouter' : '0m' } -%} +{% set ingress_lossless_pool_size = '144189440' %} +{% set ingress_lossless_pool_xoff = '0' %} +{% set egress_lossless_pool_size = '158229504' %} +{% set egress_lossy_pool_size = '144189440' %} {% import 'buffers_defaults_objects.j2' as defs with context %} diff --git a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C224O8/qos.json.j2 b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C224O8/qos.json.j2 index eccf286dc87..f85b6bf729d 120000 --- a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C224O8/qos.json.j2 +++ b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C224O8/qos.json.j2 @@ -1 +1 @@ -../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/qos.json.j2 \ No newline at end of file +../Mellanox-SN5600-C256S1/qos.json.j2 \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/buffers_defaults_objects.j2 b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/buffers_defaults_objects.j2 deleted file mode 120000 index c01aebb7ae1..00000000000 --- a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/buffers_defaults_objects.j2 +++ /dev/null @@ -1 +0,0 @@ -../../x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2 \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/buffers_defaults_objects.j2 b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/buffers_defaults_objects.j2 new file mode 100644 index 00000000000..497995cb0c9 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/buffers_defaults_objects.j2 @@ -0,0 +1,222 @@ +{# + SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES + Copyright (c) 2022-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + Apache-2.0 + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +#} + +{%- macro generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) %} + "BUFFER_POOL": { + {% if dynamic_mode is not defined and port_names_inactive|length > 0 -%} + "ingress_zero_pool" : { + "mode": "static", + "type": "ingress", + "size": "0" + }, + {% endif -%} + "ingress_lossless_pool": { + {% if dynamic_mode is not defined -%} + "size": "{{ ingress_lossless_pool_size }}", + {% endif -%} + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "{{ egress_lossless_pool_size }}", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossy_pool": { + {% if dynamic_mode is not defined -%} + "size": "{{ egress_lossy_pool_size }}", + {% endif -%} + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + {% if dynamic_mode is not defined and port_names_inactive|length > 0 -%} + "ingress_lossy_pg_zero_profile" : { + "pool":"ingress_zero_pool", + "size":"0", + "static_th":"0" + }, + "ingress_lossless_zero_profile" : { + "pool":"ingress_lossless_pool", + "size":"0", + "dynamic_th":"-8" + }, + "egress_lossless_zero_profile" : { + "pool":"egress_lossless_pool", + "size":"0", + "dynamic_th":"-8" + }, + "egress_lossy_zero_profile" : { + "pool":"egress_lossy_pool", + "size":"0", + "dynamic_th":"-8" + }, + {% endif -%} + "ingress_lossy_profile": { + "pool":"ingress_lossless_pool", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"egress_lossless_pool", + "size":"0", + "dynamic_th":"7" + }, + "egress_lossy_profile": { + "pool":"egress_lossy_pool", + "size":"9216", + "dynamic_th":"7" + }, + "q_lossy_profile": { + "pool":"egress_lossy_pool", + "size":"0", + "dynamic_th":"0" + }, + "q_lossy_minus_7_profile": { + "pool": "egress_lossy_pool", + "size": "0", + "dynamic_th" : "-7" + }, + "q_lossy_minus_3_profile": { + "pool": "egress_lossy_pool", + "size": "0", + "dynamic_th" : "-3" + } + }, +{%- endmacro %} + +{%- macro generate_profile_lists(port_names_active, port_names_inactive) %} + "BUFFER_PORT_INGRESS_PROFILE_LIST": { +{% for port in port_names_active.split(',') %} + "{{ port }}": { + "profile_list" : "ingress_lossless_profile,ingress_lossy_profile" + }{% if not loop.last %},{% endif %} + +{% endfor %} +{% if port_names_inactive|length > 0 %} +, +{% for port in port_names_inactive.split(',') %} + "{{ port }}": { +{% if dynamic_mode is defined %} + "profile_list" : "ingress_lossless_profile,ingress_lossy_profile" +{% else %} + "profile_list" : "ingress_lossless_zero_profile,ingress_lossy_zero_profile" +{% endif %} + }{% if not loop.last %},{% endif %} + +{% endfor %} +{% endif %} + }, + "BUFFER_PORT_EGRESS_PROFILE_LIST": { +{% for port in port_names_active.split(',') %} + "{{ port }}": { + "profile_list" : "egress_lossless_profile,egress_lossy_profile" + }{% if not loop.last %},{% endif %} + +{% endfor %} +{% if port_names_inactive|length > 0 %} +, +{% for port in port_names_inactive.split(',') %} + "{{ port }}": { +{% if dynamic_mode is defined %} + "profile_list" : "egress_lossless_profile,egress_lossy_profile" +{% else %} + "profile_list" : "egress_lossless_zero_profile,egress_lossy_zero_profile" +{% endif %} + }{% if not loop.last %},{% endif %} + +{% endfor %} +{% endif %} + } +{%- endmacro %} + +{%- macro generate_queue_buffers(port_names_active, port_names_inactive) %} + +{% if dynamic_mode is not defined %} +{% for port in port_names_active.split(',') %} + "{{ port }}|0": { + "profile" : "q_lossy_profile" + }, +{% endfor %} +{% for port in port_names_active.split(',') %} + "{{ port }}|1-2": { + "profile" : "q_lossy_minus_7_profile" + }, +{% endfor %} +{% for port in port_names_active.split(',') %} + "{{ port }}|3": { + "profile" : "q_lossy_profile" + }, +{% endfor %} +{% for port in port_names_active.split(',') %} + "{{ port }}|4": { + "profile" : "q_lossy_minus_3_profile" + }, +{% endfor %} +{% for port in port_names_active.split(',') %} + "{{ port }}|5-6": { + "profile" : "q_lossy_profile" + }{% if not loop.last %},{% endif %} + +{% endfor %} +{% if port_names_inactive|length > 0 %} +{% for port in port_names_inactive.split(',') %} + "{{ port }}|1-6": { + "profile" : "egress_lossy_zero_profile" + }{% if not loop.last %},{% endif %} + +{% endfor %} +{% endif %} +{% endif %} + } +{%- endmacro %} + +{%- macro generate_pg_profiles(port_names_active, port_names_inactive) %} + "BUFFER_PG": { +{% for port in port_names_active.split(',') %} +{% if dynamic_mode is defined %} + "{{ port }}|3-4": { + "profile" : "NULL" + }, +{% endif %} + "{{ port }}|0": { + "profile" : "ingress_lossy_profile" + }{% if not loop.last %},{% endif %} + +{% endfor %} +{% if port_names_inactive|length > 0 %} +{%- for port in port_names_inactive.split(',') %} + {%- if loop.first -%},{%- endif -%} +{% if dynamic_mode is defined %} + "{{ port }}|3-4": { + "profile" : "NULL" + }, +{% endif %} + "{{ port }}|0": { +{% if dynamic_mode is defined %} + "profile" : "ingress_lossy_profile" +{% else %} + "profile" : "ingress_lossy_pg_zero_profile" +{% endif %} + }{% if not loop.last %},{% endif %} + +{% endfor %} +{% endif %} + } +{%- endmacro %} diff --git a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/buffers_defaults_t0.j2 b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/buffers_defaults_t0.j2 index 09c7d8c1abb..54d93665331 100644 --- a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/buffers_defaults_t0.j2 +++ b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/buffers_defaults_t0.j2 @@ -1,6 +1,6 @@ {# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES - Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,11 +15,17 @@ See the License for the specific language governing permissions and limitations under the License. #} -{% set default_cable = '40m' %} -{% set ingress_lossless_pool_size = '142703616' %} -{% set ingress_lossless_pool_xoff = '1024' %} +{% set default_cable = '0m' %} +{%-set ports2cable = { + 'torrouter_server' : '0m', + 'leafrouter_torrouter' : '0m', + 'spinerouter_leafrouter' : '0m' + } +-%} +{% set ingress_lossless_pool_size = '142704640' %} +{% set ingress_lossless_pool_xoff = '0' %} {% set egress_lossless_pool_size = '158229504' %} -{% set egress_lossy_pool_size = '142703616' %} +{% set egress_lossy_pool_size = '142704640' %} {% import 'buffers_defaults_objects.j2' as defs with context %} diff --git a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/buffers_defaults_t1.j2 b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/buffers_defaults_t1.j2 index cb5b6956188..54d93665331 100644 --- a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/buffers_defaults_t1.j2 +++ b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/buffers_defaults_t1.j2 @@ -1,6 +1,6 @@ {# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES - Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,18 +15,17 @@ See the License for the specific language governing permissions and limitations under the License. #} -{% set default_cable = '250m' %} -{% set ingress_lossless_pool_size = '142703616' %} -{% set ingress_lossless_pool_xoff = '1024' %} -{% set egress_lossless_pool_size = '158229504' %} -{% set egress_lossy_pool_size = '142703616' %} - +{% set default_cable = '0m' %} {%-set ports2cable = { - 'torrouter_server' : '40m', - 'leafrouter_torrouter' : '250m', - 'spinerouter_leafrouter' : '1000m' + 'torrouter_server' : '0m', + 'leafrouter_torrouter' : '0m', + 'spinerouter_leafrouter' : '0m' } -%} +{% set ingress_lossless_pool_size = '142704640' %} +{% set ingress_lossless_pool_xoff = '0' %} +{% set egress_lossless_pool_size = '158229504' %} +{% set egress_lossy_pool_size = '142704640' %} {% import 'buffers_defaults_objects.j2' as defs with context %} diff --git a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/qos.json.j2 b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/qos.json.j2 deleted file mode 120000 index eccf286dc87..00000000000 --- a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/qos.json.j2 +++ /dev/null @@ -1 +0,0 @@ -../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/qos.json.j2 \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/qos.json.j2 b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/qos.json.j2 new file mode 100644 index 00000000000..99f048a1cd9 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256S1/qos.json.j2 @@ -0,0 +1,170 @@ +{# + SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES + Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +#} + +{%- macro generate_dscp_to_tc_map_per_sku() -%} + "DSCP_TO_TC_MAP": { + "AZURE": { + "0" : "6", + "1" : "1", + "2" : "2", + "3" : "3", + "4" : "3", + "5" : "4", + "6" : "5", + "7" : "0", + "8" : "0", + "9" : "0", + "10": "0", + "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_pg_map_per_sku() -%} + "TC_TO_PRIORITY_GROUP_MAP": { + "AZURE": { + "0": "0", + "1": "0", + "2": "0", + "3": "0", + "4": "0", + "5": "0", + "6": "0", + "7": "0" + } + }, +{%- endmacro -%} + +{%- macro generate_scheduler_per_sku() -%} + "SCHEDULER": { + "scheduler.1": { + "type" : "DWRR", + "weight": "1" + }, + "scheduler.10": { + "type" : "DWRR", + "weight": "10" + }, + "scheduler.12": { + "type" : "DWRR", + "weight": "12" + }, + "scheduler.32": { + "type" : "DWRR", + "weight": "32" + } + }, +{%- endmacro -%} + +{%- macro generate_single_queue_per_sku(port) -%} + "{{ port }}|0": { + "scheduler": "scheduler.1" + }, + "{{ port }}|1": { + "scheduler": "scheduler.10" + }, + "{{ port }}|2": { + "scheduler": "scheduler.12" + }, + "{{ port }}|3": { + "scheduler": "scheduler.12" + }, + "{{ port }}|4": { + "scheduler": "scheduler.32" + }, + "{{ port }}|5": { + "scheduler": "scheduler.32" + }, + "{{ port }}|6": { + "scheduler": "scheduler.1" + } +{%- endmacro -%} + +{%- macro generate_global_dscp_to_tc_map() %} +{# This is an empty macro since the global DSCP_TO_TC map is not required #} +{%- endmacro %} + +{%- 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" : "10000000", + "yellow_min_threshold" : "2000000", + "red_max_threshold" : "10000000", + "red_min_threshold" : "2000000", + "green_drop_probability" : "5", + "yellow_drop_probability": "5", + "red_drop_probability" : "5" + } + }, +{%- endmacro %} + +{%- include 'qos_config.j2' %} diff --git a/files/build_templates/qos_config.j2 b/files/build_templates/qos_config.j2 index f53afde31ba..06314fee6e8 100644 --- a/files/build_templates/qos_config.j2 +++ b/files/build_templates/qos_config.j2 @@ -2,7 +2,6 @@ {%- set PORT_BP = [] %} {%- set PORT_DPC = [] %} {%- set SYSTEM_PORT_ALL = [] %} -{%- set PORT_QOS_BYPASS = [] %} {%- set voq_chassis = false %} {%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost']['switch_type'] is defined and DEVICE_METADATA['localhost']['switch_type'] == 'voq' %} @@ -32,9 +31,6 @@ {%- if generate_bp_port_list is defined %} {%- if generate_bp_port_list(PORT,PORT_BP) %} {% endif %} {%- endif %} -{%- if generate_qos_bypass_port_list is defined %} - {%- if generate_qos_bypass_port_list(PORT_QOS_BYPASS) %} {% endif %} -{%- endif %} {%- if PORT_ALL | sort_by_port_index %}{% endif %} @@ -59,7 +55,6 @@ {%- if PORT_ACTIVE.append(port) %}{%- endif %} {%- endfor %} {%- endif %} -{%- set PORT_ACTIVE = PORT_ACTIVE | reject('in', PORT_QOS_BYPASS) | list %} {%- if PORT_ACTIVE | sort_by_port_index %}{% endif %} {%- set port_names_list_active = [] %} @@ -97,6 +92,8 @@ ('resource_type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['resource_type'] == 'ComputeAI') %} {{- generate_tc_to_pg_map() }} +{% elif generate_tc_to_pg_map_per_sku is defined %} + {{- generate_tc_to_pg_map_per_sku() }} {% else %} "TC_TO_PRIORITY_GROUP_MAP": { "AZURE": { @@ -161,6 +158,8 @@ ('resource_type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['resource_type'] == 'ComputeAI') %} {{- generate_dscp_to_tc_map() }} +{% elif (generate_dscp_to_tc_map_per_sku is defined) %} + {{ generate_dscp_to_tc_map_per_sku() }} {% else %} "DSCP_TO_TC_MAP": { "AZURE": { @@ -272,6 +271,8 @@ "weight": "5" } }, +{% elif generate_scheduler_per_sku is defined %} + {{ generate_scheduler_per_sku() }} {% else %} "SCHEDULER": { "scheduler.0": { @@ -415,6 +416,13 @@ }{% if not loop.last %},{% endif %} {% endfor %} } +{% elif generate_single_queue_per_sku is defined %} + "QUEUE": { +{% for port in PORT_ACTIVE %} + {{ generate_single_queue_per_sku(port) }} + {%- if not loop.last -%},{% endif %} +{% endfor %} + } {% else %} "QUEUE": { {% if 'type' in DEVICE_METADATA['localhost'] and