diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-O28/buffers_defaults_objects.j2 b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-O28/buffers_defaults_objects.j2 index 20273084f7d..da5945ed585 100644 --- a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-O28/buffers_defaults_objects.j2 +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-O28/buffers_defaults_objects.j2 @@ -1,5 +1,6 @@ {# - Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. + 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"); @@ -92,8 +93,7 @@ "BUFFER_PG": { "Dpc": { "active": { - "dynamic": "ingress_lossy_profile", - "static": "ingress_lossy_profile" + "dynamic": "NULL" }, "inactive": { "dynamic": "ingress_lossy_profile", @@ -361,12 +361,6 @@ "{{ port }}|3-4": { "profile" : {{find_profile_to_attach('BUFFER_PG', port, 'active', 'dynamic')}} }, -{% else %} -{% if port in PORT_DPC %} - "{{ port }}|3-4": { - "profile" : {{find_profile_to_attach('BUFFER_PG', port, 'active', 'static')}} - }, -{% endif %} {% endif %} "{{ port }}|0": { "profile" : "ingress_lossy_profile" diff --git a/files/build_templates/buffers_config.j2 b/files/build_templates/buffers_config.j2 index f1247eba992..76cab5d0f8e 100644 --- a/files/build_templates/buffers_config.j2 +++ b/files/build_templates/buffers_config.j2 @@ -79,7 +79,9 @@ def {%- endif %} {%- endif %} {%- endfor %} - {%- if cable_len -%} + {%- if port_name in PORT_DPC -%} + {{ '0m' }} + {%- elif cable_len -%} {{ cable_len.0 }} {%- else %} {%- if 'torrouter' in switch_role.lower() and 'mgmt' not in switch_role.lower()%} diff --git a/files/build_templates/qos_config.j2 b/files/build_templates/qos_config.j2 index 631f787c799..a7be7d59699 100644 --- a/files/build_templates/qos_config.j2 +++ b/files/build_templates/qos_config.j2 @@ -96,6 +96,18 @@ {{- generate_tc_to_pg_map_per_sku() }} {% else %} "TC_TO_PRIORITY_GROUP_MAP": { +{% if PORT_DPC %} + "AZURE_DPC": { + "0": "0", + "1": "0", + "2": "0", + "3": "0", + "4": "0", + "5": "0", + "6": "0", + "7": "7" + }, +{% endif %} "AZURE": { "0": "0", "1": "0", @@ -351,7 +363,11 @@ {% endif %} "pfcwd_sw_enable" : "3,4", {% endif %} +{% if port not in PORT_DPC %} "tc_to_pg_map" : "AZURE", +{% else %} + "tc_to_pg_map" : "AZURE_DPC", +{% endif %} "pfc_to_queue_map": "AZURE" }{% if not loop.last %},{% endif %} diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-mellanox4700-o28-t1-smartswitch.json b/src/sonic-config-engine/tests/sample_output/py3/qos-mellanox4700-o28-t1-smartswitch.json index 95add1de513..65211c1b8e1 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-mellanox4700-o28-t1-smartswitch.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-mellanox4700-o28-t1-smartswitch.json @@ -14,25 +14,25 @@ "Ethernet224": { "dscp_to_tc_map": "AZURE", "tc_to_queue_map": "AZURE", - "tc_to_pg_map": "AZURE", + "tc_to_pg_map": "AZURE_DPC", "pfc_to_queue_map": "AZURE" }, "Ethernet232": { "dscp_to_tc_map": "AZURE", "tc_to_queue_map": "AZURE", - "tc_to_pg_map": "AZURE", + "tc_to_pg_map": "AZURE_DPC", "pfc_to_queue_map": "AZURE" }, "Ethernet240": { "dscp_to_tc_map": "AZURE", "tc_to_queue_map": "AZURE", - "tc_to_pg_map": "AZURE", + "tc_to_pg_map": "AZURE_DPC", "pfc_to_queue_map": "AZURE" }, "Ethernet248": { "dscp_to_tc_map": "AZURE", "tc_to_queue_map": "AZURE", - "tc_to_pg_map": "AZURE", + "tc_to_pg_map": "AZURE_DPC", "pfc_to_queue_map": "AZURE" } }, @@ -415,27 +415,15 @@ "Ethernet216|0": { "profile": "ingress_lossy_profile" }, - "Ethernet224|3-4": { - "profile": "ingress_lossy_profile" - }, "Ethernet224|0": { "profile": "ingress_lossy_profile" }, - "Ethernet232|3-4": { - "profile": "ingress_lossy_profile" - }, "Ethernet232|0": { "profile": "ingress_lossy_profile" }, - "Ethernet240|3-4": { - "profile": "ingress_lossy_profile" - }, "Ethernet240|0": { "profile": "ingress_lossy_profile" }, - "Ethernet248|3-4": { - "profile": "ingress_lossy_profile" - }, "Ethernet248|0": { "profile": "ingress_lossy_profile" }, diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-mellanox4700-o28-t1-smartswitch_dyn.json b/src/sonic-config-engine/tests/sample_output/py3/qos-mellanox4700-o28-t1-smartswitch_dyn.json index 4afe1c8e23c..ed1c877a23a 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-mellanox4700-o28-t1-smartswitch_dyn.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-mellanox4700-o28-t1-smartswitch_dyn.json @@ -14,25 +14,25 @@ "Ethernet224": { "dscp_to_tc_map": "AZURE", "tc_to_queue_map": "AZURE", - "tc_to_pg_map": "AZURE", + "tc_to_pg_map": "AZURE_DPC", "pfc_to_queue_map": "AZURE" }, "Ethernet232": { "dscp_to_tc_map": "AZURE", "tc_to_queue_map": "AZURE", - "tc_to_pg_map": "AZURE", + "tc_to_pg_map": "AZURE_DPC", "pfc_to_queue_map": "AZURE" }, "Ethernet240": { "dscp_to_tc_map": "AZURE", "tc_to_queue_map": "AZURE", - "tc_to_pg_map": "AZURE", + "tc_to_pg_map": "AZURE_DPC", "pfc_to_queue_map": "AZURE" }, "Ethernet248": { "dscp_to_tc_map": "AZURE", "tc_to_queue_map": "AZURE", - "tc_to_pg_map": "AZURE", + "tc_to_pg_map": "AZURE_DPC", "pfc_to_queue_map": "AZURE" } }, @@ -391,25 +391,25 @@ "profile": "ingress_lossy_profile" }, "Ethernet224|3-4": { - "profile": "ingress_lossy_profile" + "profile": "NULL" }, "Ethernet224|0": { "profile": "ingress_lossy_profile" }, "Ethernet232|3-4": { - "profile": "ingress_lossy_profile" + "profile": "NULL" }, "Ethernet232|0": { "profile": "ingress_lossy_profile" }, "Ethernet240|3-4": { - "profile": "ingress_lossy_profile" + "profile": "NULL" }, "Ethernet240|0": { "profile": "ingress_lossy_profile" }, "Ethernet248|3-4": { - "profile": "ingress_lossy_profile" + "profile": "NULL" }, "Ethernet248|0": { "profile": "ingress_lossy_profile"