Skip to content

Commit

Permalink
Update Mellanox buffers profile to use single pool for lossless
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
  • Loading branch information
andriymoroz-mlnx committed Nov 1, 2017
1 parent c832f2a commit 525628e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 23 deletions.
17 changes: 5 additions & 12 deletions dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@
{%- if port_names_list.append(port) %}{% endif %}
{% endfor %}
{% set port_names = port_names_list | join(',') %}
{
"BUFFER_POOL_TABLE:ingress_lossless_pool": {
"size": "3024486",
"type": "ingress",
"mode": "dynamic"
},
"OP": "SET"
},
{
"BUFFER_POOL_TABLE:ingress_lossy_pool": {
"size": "6422528",
Expand Down Expand Up @@ -106,6 +98,7 @@
},

{# The following template part is for variable PG profile configuration #}
{% set non_pg_lossless_pool_size = 866726 %}
{% set pg_range = '3-4' %}
{# Lists of supported speed and cable length #}
{% set supported_speed = [10000, 25000, 40000, 50000, 100000] %}
Expand Down Expand Up @@ -239,7 +232,7 @@
{%- set profile_config = pg_profiles[profile_name] %}
{
"BUFFER_PROFILE_TABLE:{{ profile_name }}": {
"pool":"[BUFFER_POOL_TABLE:ingress_lossless_pg_pool]",
"pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]",
"xon":"{{ profile_config['xon'] }}",
"xoff":"{{ profile_config['xoff'] }}",
"size":"{{ profile_config['size'] }}",
Expand All @@ -249,10 +242,10 @@
},
{% endfor -%}

{# Pool declaration #}
{# Lossless pool declaration #}
{
"BUFFER_POOL_TABLE:ingress_lossless_pg_pool": {
"size": "{{ ingress_lossless_pg_pool_size | sum }}",
"BUFFER_POOL_TABLE:ingress_lossless_pool": {
"size": "{{ ingress_lossless_pg_pool_size | sum + non_pg_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic"
},
Expand Down
14 changes: 3 additions & 11 deletions src/sonic-config-engine/tests/sample_output/msn27.32ports.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
[
{
"BUFFER_POOL_TABLE:ingress_lossless_pool": {
"size": "3024486",
"type": "ingress",
"mode": "dynamic"
},
"OP": "SET"
},
{
"BUFFER_POOL_TABLE:ingress_lossy_pool": {
"size": "6422528",
Expand Down Expand Up @@ -297,7 +289,7 @@

{
"BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile": {
"pool":"[BUFFER_POOL_TABLE:ingress_lossless_pg_pool]",
"pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]",
"xon":"18432",
"xoff":"75776",
"size":"94208",
Expand All @@ -306,8 +298,8 @@
"OP": "SET"
},
{
"BUFFER_POOL_TABLE:ingress_lossless_pg_pool": {
"size": "3014656",
"BUFFER_POOL_TABLE:ingress_lossless_pool": {
"size": "3881382",
"type": "ingress",
"mode": "dynamic"
},
Expand Down

0 comments on commit 525628e

Please sign in to comment.