8f4a1b7b85
- Why I did it Support Mellanox-SN4600C-C64 as T1 switch in dual-ToR scenario This is to port #11032 and #11299 from 202012 to master. Support additional queue and PG in buffer templates, including both traditional and dynamic model Support mapping DSCP 2/6 to lossless traffic in the QoS template. Add macros to generate additional lossless PG in the dynamic model Adjust the order in which the generic/dedicated (with additional lossless queues) macros are checked and called to generate buffer tables in common template buffers_config.j2 Buffer tables are rendered via using macros. Both generic and dedicated macros are defined on our platform. Currently, the generic one is called as long as it is defined, which causes the generic one always being called on our platform. To avoid it, the dedicated macrio is checked and called first and then the generic ones. Support MAP_PFC_PRIORITY_TO_PRIORITY_GROUP on ports with additional lossless queues. On Mellanox-SN4600C-C64, buffer configuration for t1 is calculated as: 40 * 100G downlink ports with 4 lossless PGs/queues, 1 lossy PG, and 3 lossy queues 16 * 100G uplink ports with 2 lossless PGs/queues, 1 lossy PG, and 5 lossy queues Signed-off-by: Stephen Sun <stephens@nvidia.com>
176 lines
4.3 KiB
Django/Jinja
176 lines
4.3 KiB
Django/Jinja
{#
|
|
Copyright (c) 2020-2021 NVIDIA CORPORATION & AFFILIATES.
|
|
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.
|
|
#}
|
|
{% if ('type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter') %}
|
|
{% set different_dscp_to_tc_map = true %}
|
|
{%- macro generate_dscp_to_tc_map() %}
|
|
"DSCP_TO_TC_MAP": {
|
|
"AZURE": {
|
|
"0" : "1",
|
|
"1" : "1",
|
|
"2" : "2",
|
|
"3" : "3",
|
|
"4" : "4",
|
|
"5" : "1",
|
|
"6" : "6",
|
|
"7" : "1",
|
|
"8" : "0",
|
|
"9" : "1",
|
|
"10": "1",
|
|
"11": "1",
|
|
"12": "1",
|
|
"13": "1",
|
|
"14": "1",
|
|
"15": "1",
|
|
"16": "1",
|
|
"17": "1",
|
|
"18": "1",
|
|
"19": "1",
|
|
"20": "1",
|
|
"21": "1",
|
|
"22": "1",
|
|
"23": "1",
|
|
"24": "1",
|
|
"25": "1",
|
|
"26": "1",
|
|
"27": "1",
|
|
"28": "1",
|
|
"29": "1",
|
|
"30": "1",
|
|
"31": "1",
|
|
"32": "1",
|
|
"33": "1",
|
|
"34": "1",
|
|
"35": "1",
|
|
"36": "1",
|
|
"37": "1",
|
|
"38": "1",
|
|
"39": "1",
|
|
"40": "1",
|
|
"41": "1",
|
|
"42": "1",
|
|
"43": "1",
|
|
"44": "1",
|
|
"45": "1",
|
|
"46": "5",
|
|
"47": "1",
|
|
"48": "7",
|
|
"49": "1",
|
|
"50": "1",
|
|
"51": "1",
|
|
"52": "1",
|
|
"53": "1",
|
|
"54": "1",
|
|
"55": "1",
|
|
"56": "1",
|
|
"57": "1",
|
|
"58": "1",
|
|
"59": "1",
|
|
"60": "1",
|
|
"61": "1",
|
|
"62": "1",
|
|
"63": "1"
|
|
},
|
|
"AZURE_UPLINK": {
|
|
"0" : "1",
|
|
"1" : "1",
|
|
"2" : "1",
|
|
"3" : "3",
|
|
"4" : "4",
|
|
"5" : "1",
|
|
"6" : "1",
|
|
"7" : "1",
|
|
"8" : "0",
|
|
"9" : "1",
|
|
"10": "1",
|
|
"11": "1",
|
|
"12": "1",
|
|
"13": "1",
|
|
"14": "1",
|
|
"15": "1",
|
|
"16": "1",
|
|
"17": "1",
|
|
"18": "1",
|
|
"19": "1",
|
|
"20": "1",
|
|
"21": "1",
|
|
"22": "1",
|
|
"23": "1",
|
|
"24": "1",
|
|
"25": "1",
|
|
"26": "1",
|
|
"27": "1",
|
|
"28": "1",
|
|
"29": "1",
|
|
"30": "1",
|
|
"31": "1",
|
|
"32": "1",
|
|
"33": "1",
|
|
"34": "1",
|
|
"35": "1",
|
|
"36": "1",
|
|
"37": "1",
|
|
"38": "1",
|
|
"39": "1",
|
|
"40": "1",
|
|
"41": "1",
|
|
"42": "1",
|
|
"43": "1",
|
|
"44": "1",
|
|
"45": "1",
|
|
"46": "5",
|
|
"47": "1",
|
|
"48": "7",
|
|
"49": "1",
|
|
"50": "1",
|
|
"51": "1",
|
|
"52": "1",
|
|
"53": "1",
|
|
"54": "1",
|
|
"55": "1",
|
|
"56": "1",
|
|
"57": "1",
|
|
"58": "1",
|
|
"59": "1",
|
|
"60": "1",
|
|
"61": "1",
|
|
"62": "1",
|
|
"63": "1"
|
|
}
|
|
},
|
|
{%- endmacro %}
|
|
{%- macro generate_tc_to_pg_map() %}
|
|
"TC_TO_PRIORITY_GROUP_MAP": {
|
|
"AZURE": {
|
|
"0": "0",
|
|
"1": "0",
|
|
"2": "2",
|
|
"3": "3",
|
|
"4": "4",
|
|
"5": "0",
|
|
"6": "6",
|
|
"7": "0"
|
|
}
|
|
},
|
|
{%- endmacro %}
|
|
{%- macro generate_global_dscp_to_tc_map() %}
|
|
{# This is an empty macro since the global DSCP_TO_TC map is not required #}
|
|
{%- endmacro %}
|
|
|
|
{% endif %}
|
|
|
|
{%- include 'qos_config.j2' %}
|