forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2b30cc
commit 9acc9d5
Showing
12 changed files
with
1,347 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256/buffers.json.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{# | ||
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. | ||
#} | ||
{%- set default_topo = 't0' %} | ||
{%- include 'buffers_config.j2' %} |
309 changes: 309 additions & 0 deletions
309
device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256/buffers_defaults_objects.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,309 @@ | ||
{# | ||
Copyright (c) 2022 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. | ||
#} | ||
|
||
{%- 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 %} |
47 changes: 47 additions & 0 deletions
47
device/mellanox/x86_64-nvidia_sn5600-r0/Mellanox-SN5600-C256/buffers_defaults_t0.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{# | ||
Copyright (c) 2024 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. | ||
#} | ||
{% set default_cable = '40m' %} | ||
{% set ingress_lossless_pool_size = '119691264' %} | ||
{% set ingress_lossless_pool_xoff = '14286848' %} | ||
{% set egress_lossless_pool_size = '162027520' %} | ||
{% set egress_lossy_pool_size = '119691264' %} | ||
|
||
{% import 'buffers_defaults_objects.j2' as defs with context %} | ||
|
||
{%- macro generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) %} | ||
{{ defs.generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) }} | ||
{%- endmacro %} | ||
|
||
{%- macro generate_profile_lists_with_inactive_ports(port_names_active, port_names_inactive) %} | ||
{{ defs.generate_profile_lists(port_names_active, port_names_inactive) }} | ||
{%- endmacro %} | ||
|
||
{%- macro generate_queue_buffers_with_extra_lossless_queues_with_inactive_ports(port_names_active, port_names_extra_queues, port_names_inactive) %} | ||
{{ defs.generate_queue_buffers_with_extra_lossless_queues(port_names_active, port_names_extra_queues, port_names_inactive) }} | ||
{%- endmacro %} | ||
|
||
{%- macro generate_queue_buffers_with_inactive_ports(port_names_active, port_names_inactive) %} | ||
{{ defs.generate_queue_buffers(port_names_active, port_names_inactive) }} | ||
{%- endmacro %} | ||
|
||
{%- macro generate_pg_profiles_with_extra_lossless_pgs_with_inactive_ports(port_names_active, port_names_extra_pgs, port_names_inactive) %} | ||
{{ defs.generate_pg_profiles_with_extra_lossless_pgs(port_names_active, port_names_extra_pgs, port_names_inactive) }} | ||
{%- endmacro %} | ||
|
||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %} | ||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }} | ||
{%- endmacro %} |
Oops, something went wrong.