Skip to content

Commit 4e1fb68

Browse files
andriymoroz-mlnxyxieca
authored andcommitted
Update Mellanox buffers profile to use single pool for lossless (#1101)
Signed-off-by: Andriy Moroz <[email protected]>
1 parent ca214b9 commit 4e1fb68

File tree

2 files changed

+8
-23
lines changed

2 files changed

+8
-23
lines changed

dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2

+5-12
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@
44
{%- if port_names_list.append(port) %}{% endif %}
55
{% endfor %}
66
{% set port_names = port_names_list | join(',') %}
7-
{
8-
"BUFFER_POOL_TABLE:ingress_lossless_pool": {
9-
"size": "3024486",
10-
"type": "ingress",
11-
"mode": "dynamic"
12-
},
13-
"OP": "SET"
14-
},
157
{
168
"BUFFER_POOL_TABLE:ingress_lossy_pool": {
179
"size": "6422528",
@@ -106,6 +98,7 @@
10698
},
10799

108100
{# The following template part is for variable PG profile configuration #}
101+
{% set non_pg_lossless_pool_size = 866726 %}
109102
{% set pg_range = '3-4' %}
110103
{# Lists of supported speed and cable length #}
111104
{% set supported_speed = [10000, 25000, 40000, 50000, 100000] %}
@@ -239,7 +232,7 @@
239232
{%- set profile_config = pg_profiles[profile_name] %}
240233
{
241234
"BUFFER_PROFILE_TABLE:{{ profile_name }}": {
242-
"pool":"[BUFFER_POOL_TABLE:ingress_lossless_pg_pool]",
235+
"pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]",
243236
"xon":"{{ profile_config['xon'] }}",
244237
"xoff":"{{ profile_config['xoff'] }}",
245238
"size":"{{ profile_config['size'] }}",
@@ -249,10 +242,10 @@
249242
},
250243
{% endfor -%}
251244

252-
{# Pool declaration #}
245+
{# Lossless pool declaration #}
253246
{
254-
"BUFFER_POOL_TABLE:ingress_lossless_pg_pool": {
255-
"size": "{{ ingress_lossless_pg_pool_size | sum }}",
247+
"BUFFER_POOL_TABLE:ingress_lossless_pool": {
248+
"size": "{{ ingress_lossless_pg_pool_size | sum + non_pg_lossless_pool_size }}",
256249
"type": "ingress",
257250
"mode": "dynamic"
258251
},

src/sonic-config-engine/tests/sample_output/msn27.32ports.json

+3-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
[
2-
{
3-
"BUFFER_POOL_TABLE:ingress_lossless_pool": {
4-
"size": "3024486",
5-
"type": "ingress",
6-
"mode": "dynamic"
7-
},
8-
"OP": "SET"
9-
},
102
{
113
"BUFFER_POOL_TABLE:ingress_lossy_pool": {
124
"size": "6422528",
@@ -297,7 +289,7 @@
297289

298290
{
299291
"BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile": {
300-
"pool":"[BUFFER_POOL_TABLE:ingress_lossless_pg_pool]",
292+
"pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]",
301293
"xon":"18432",
302294
"xoff":"75776",
303295
"size":"94208",
@@ -306,8 +298,8 @@
306298
"OP": "SET"
307299
},
308300
{
309-
"BUFFER_POOL_TABLE:ingress_lossless_pg_pool": {
310-
"size": "3014656",
301+
"BUFFER_POOL_TABLE:ingress_lossless_pool": {
302+
"size": "3881382",
311303
"type": "ingress",
312304
"mode": "dynamic"
313305
},

0 commit comments

Comments
 (0)