[qos]: Adjust 7260 buffer sizes to accomodate extra lossless queues (#11018)

Why I did it
As part of PCBB changes, we need to enable 2 extra lossless queues. The changes in this PR are done to adjust only the reserved sizes on Th2 for the additional 2 lossless queues
Calculations are done based on 40 downlinks for T1 and 16 uplinks for dual ToR

How to verify it
Verified that the rendering works fine on Th2 dut
Unit tests have been updated to reflect the modified buffer sizes when pcbb is enabled. There are existing testcases that will test the original buffer sizes when pcbb is disabled. With these changes, was able to build sonic-config-engine wheel successfully

Signed-off-by: Neetha John <nejo@microsoft.com>
This commit is contained in:
Neetha John 2022-06-05 22:20:26 -07:00 committed by Guohan Lu
parent f555a4a0a0
commit 21f14dc6ea
9 changed files with 48 additions and 10 deletions

View File

@ -7,16 +7,20 @@
{%- endfor %}
{%- endmacro %}
{%- import 'buffers_pool_sizes_t0.j2' as defs with context %}
{%- set ingress_lossless_pool_size = defs.ingress_lossless_pool_size %}
{%- set egress_lossy_pool_size = defs.egress_lossy_pool_size %}
{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
"size": "33329088",
"size": "{{ ingress_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic",
"xoff": "7827456"
},
"egress_lossy_pool": {
"size": "26663272",
"size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
},

View File

@ -7,11 +7,15 @@
{%- endfor %}
{%- endmacro %}
{%- import 'buffers_pool_sizes_t1.j2' as defs with context %}
{%- set ingress_lossless_pool_size = defs.ingress_lossless_pool_size %}
{%- set egress_lossy_pool_size = defs.egress_lossy_pool_size %}
{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
{# SS Tab2 Row 71 #}
"size": "33582016",
"size": "{{ ingress_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic",
{# SS Tab2 Row 68 #}
@ -19,7 +23,7 @@
},
"egress_lossy_pool": {
{# SS Tab2 Row 60 #}
"size": "26866112",
"size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
},

View File

@ -0,0 +1,8 @@
{%- set ingress_lossless_pool_size = '33329088' %}
{%- set egress_lossy_pool_size = '26663272' %}
{%- if ((SYSTEM_DEFAULTS is defined) and ('tunnel_qos_remap' in SYSTEM_DEFAULTS) and (SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled')) and
((DEVICE_METADATA is defined) and ('localhost' in DEVICE_METADATA) and ('subtype' in DEVICE_METADATA['localhost']) and (DEVICE_METADATA['localhost']['subtype'] == 'DualToR')) %}
{%- set ingress_lossless_pool_size = '33169344' %}
{%- set egress_lossy_pool_size = '26535808' %}
{%- endif %}

View File

@ -0,0 +1,8 @@
{%- set ingress_lossless_pool_size = '33582016' %}
{%- set egress_lossy_pool_size = '26866112' %}
{%- if ((SYSTEM_DEFAULTS is defined) and ('tunnel_qos_remap' in SYSTEM_DEFAULTS) and (SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled')) and
((DEVICE_METADATA is defined) and ('localhost' in DEVICE_METADATA) and ('type' in DEVICE_METADATA['localhost']) and (DEVICE_METADATA['localhost']['type'] == 'LeafRouter')) %}
{%- set ingress_lossless_pool_size = '33262528' %}
{%- set egress_lossy_pool_size = '26610688' %}
{%- endif %}

View File

@ -15,16 +15,20 @@
{%- endfor %}
{%- endmacro %}
{%- import 'buffers_pool_sizes_t0.j2' as defs with context %}
{%- set ingress_lossless_pool_size = defs.ingress_lossless_pool_size %}
{%- set egress_lossy_pool_size = defs.egress_lossy_pool_size %}
{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
"size": "33329088",
"size": "{{ ingress_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic",
"xoff": "7827456"
},
"egress_lossy_pool": {
"size": "26663272",
"size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
},

View File

@ -0,0 +1 @@
../Arista-7260CX3-C64/buffers_pool_sizes_t0.j2

View File

@ -7,16 +7,20 @@
{%- endfor %}
{%- endmacro %}
{%- import 'buffers_pool_sizes_t0.j2' as defs with context %}
{%- set ingress_lossless_pool_size = defs.ingress_lossless_pool_size %}
{%- set egress_lossy_pool_size = defs.egress_lossy_pool_size %}
{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
"size": "33329088",
"size": "{{ ingress_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic",
"xoff": "7827456"
},
"egress_lossy_pool": {
"size": "26663272",
"size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
},

View File

@ -7,16 +7,20 @@
{%- endfor %}
{%- endmacro %}
{%- import 'buffers_pool_sizes_t0.j2' as defs with context %}
{%- set ingress_lossless_pool_size = defs.ingress_lossless_pool_size %}
{%- set egress_lossy_pool_size = defs.egress_lossy_pool_size %}
{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
"size": "33329088",
"size": "{{ ingress_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic",
"xoff": "7827456"
},
"egress_lossy_pool": {
"size": "26663272",
"size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
},

View File

@ -0,0 +1 @@
../Arista-7260CX3-C64/buffers_pool_sizes_t0.j2