[Reclaim buffer][202106] Reclaim unused buffers by applying zero buffer profiles (#9062)
This is to backport community PR #8768 to 202106 branch Why I did it Support zero buffer profiles Add buffer profiles and pool definition for zero buffer profiles Support applying zero profiles on INACTIVE PORTS Enable dynamic buffer manager to load zero pools and profiles from a JSON file Signed-off-by: Stephen Sun stephens@nvidia.com How I did it Add buffer profiles and pool definition for zero buffer profiles If the buffer model is static: - Apply normal buffer profiles to admin-up ports - Apply zero buffer profiles to admin-down ports If the buffer model is dynamic: - Apply normal buffer profiles to all ports - buffer manager will take care when a port is shut down - Update buffers_config.j2 to support INACTIVE PORTS by extending the existing macros to generate the various buffer objects, including PGs, queues, ingress/egress profile lists Originally, all the macros to generate the above buffer objects took active ports only as an argument Now that buffer items need to be generated on inactive ports as well, an extra argument representing the inactive ports need to be added To be backward compatible, a new series of macros are introduced to take both active and inactive ports as arguments The original version (with active ports only) will be checked first. If it is not defined, then the extended version will be called Only vendors who support zero profiles need to change their buffer templates Enable buffer manager to load zero pools and profiles from a JSON file: The JSON file is provided on a per-platform basis It is copied from platform/<vendor> folder to /usr/share/sonic/temlates folder in compiling time and rendered when the swss container is being created. To make code clean and reduce redundant code, extract common macros from buffer_defaults_t{0,1}.j2 of all SKUs to two common files: One in Mellanox-SN2700-D48C8 for single ingress pool mode The other in ACS-MSN2700 for double ingress pool mode Those files of all other SKUs will be symbol link to the above files Update sonic-cfggen test accordingly: - Adjust example output file of JSON template for unit test - Add unit test in for Mellanox's new buffer templates. How to verify it Regression test. Unit test in sonic-cfggen Run regression test and manually test.
This commit is contained in:
parent
08c2c07fc0
commit
5c91f233ef
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_objects.j2
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_objects.j2
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_objects.j2
|
@ -0,0 +1,229 @@
|
||||
{%- 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 }}",
|
||||
{% endif -%}
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"ingress_lossy_pool": {
|
||||
{% if dynamic_mode is not defined -%}
|
||||
"size": "{{ ingress_lossy_pool_size }}",
|
||||
{% 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":"[BUFFER_POOL|ingress_zero_pool]",
|
||||
"size":"0",
|
||||
"static_th":"0"
|
||||
},
|
||||
"ingress_lossless_zero_profile" : {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"-8"
|
||||
},
|
||||
"ingress_lossy_zero_profile" : {
|
||||
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"-8"
|
||||
},
|
||||
"egress_lossless_zero_profile" : {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"-8"
|
||||
},
|
||||
"egress_lossy_zero_profile" : {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"-8"
|
||||
},
|
||||
{% endif -%}
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_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" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_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" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
{% else %}
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_zero_profile],[BUFFER_PROFILE|ingress_lossy_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" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_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" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
{% else %}
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_zero_profile],[BUFFER_PROFILE|egress_lossy_zero_profile]"
|
||||
{% endif %}
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_queue_buffers(port_names_active, port_names_inactive) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names_active.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names_active.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names_active.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% if port_names_inactive|length > 0 %}
|
||||
,
|
||||
{% if dynamic_mode is defined %}
|
||||
{% for port in port_names_inactive.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names_inactive.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names_inactive.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for port in port_names_inactive.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_zero_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names_inactive.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names_inactive.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_pg_profiles(port_names_active, port_names_inactive) %}
|
||||
"BUFFER_PG": {
|
||||
{% for port in port_names_active.split(',') %}
|
||||
{% if dynamic_mode is defined %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "NULL"
|
||||
},
|
||||
{% endif %}
|
||||
"{{ port }}|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% 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" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
{% else %}
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_pg_zero_profile]"
|
||||
{% endif %}
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
}
|
||||
{%- endmacro %}
|
@ -4,109 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '13945824' %}
|
||||
{% set egress_lossy_pool_size = '4580864' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
{%- endif %}
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"ingress_lossy_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossy_pool_size }}",
|
||||
{%- 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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
||||
|
||||
|
@ -4,109 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '13945824' %}
|
||||
{% set egress_lossy_pool_size = '3302912' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
{%- endif %}
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"ingress_lossy_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossy_pool_size }}",
|
||||
{%- 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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2
|
@ -0,0 +1,218 @@
|
||||
{%- 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":"[BUFFER_POOL|ingress_zero_pool]",
|
||||
"size":"0",
|
||||
"static_th":"0"
|
||||
},
|
||||
"ingress_lossless_zero_profile" : {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"-8"
|
||||
},
|
||||
"egress_lossless_zero_profile" : {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"-8"
|
||||
},
|
||||
"egress_lossy_zero_profile" : {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"-8"
|
||||
},
|
||||
{% endif -%}
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_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" : "[BUFFER_PROFILE|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" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
{% else %}
|
||||
"profile_list" : "[BUFFER_PROFILE|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" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_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" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
{% else %}
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_zero_profile],[BUFFER_PROFILE|egress_lossy_zero_profile]"
|
||||
{% endif %}
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_queue_buffers(port_names_active, port_names_inactive) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names_active.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names_active.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names_active.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% if port_names_inactive|length > 0 %}
|
||||
,
|
||||
{% if dynamic_mode is defined %}
|
||||
{% for port in port_names_inactive.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names_inactive.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names_inactive.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for port in port_names_inactive.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_zero_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names_inactive.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names_inactive.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_pg_profiles(port_names_active, port_names_inactive) %}
|
||||
"BUFFER_PG": {
|
||||
{% for port in port_names_active.split(',') %}
|
||||
{% if dynamic_mode is defined %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "NULL"
|
||||
},
|
||||
{% endif %}
|
||||
"{{ port }}|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% 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" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
{% else %}
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_pg_zero_profile]"
|
||||
{% endif %}
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
}
|
||||
{%- endmacro %}
|
@ -4,103 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '13945824' %}
|
||||
{% set egress_lossy_pool_size = '7719936' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
||||
|
||||
|
@ -4,103 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '13945824' %}
|
||||
{% set egress_lossy_pool_size = '9686016' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2
|
@ -4,103 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '13945824' %}
|
||||
{% set egress_lossy_pool_size = '10177536' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
||||
|
||||
|
@ -4,103 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '13945824' %}
|
||||
{% set egress_lossy_pool_size = '8719360' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_objects.j2
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_objects.j2
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_objects.j2
|
@ -4,107 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '34287552' %}
|
||||
{% set egress_lossy_pool_size = '14542848' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
{%- endif %}
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"ingress_lossy_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossy_pool_size }}",
|
||||
{%- 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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -4,107 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '34287552' %}
|
||||
{% set egress_lossy_pool_size = '11622400' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
{%- endif %}
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"ingress_lossy_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossy_pool_size }}",
|
||||
{%- 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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_objects.j2
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_objects.j2
|
@ -4,107 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '34287552' %}
|
||||
{% set egress_lossy_pool_size = '13924352' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
{%- endif %}
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"ingress_lossy_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossy_pool_size }}",
|
||||
{%- 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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -4,107 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '34287552' %}
|
||||
{% set egress_lossy_pool_size = '12457984' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
{%- endif %}
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"ingress_lossy_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossy_pool_size }}",
|
||||
{%- 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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2
|
@ -4,101 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '34287552' %}
|
||||
{% set egress_lossy_pool_size = '25866240' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -4,101 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '34287552' %}
|
||||
{% set egress_lossy_pool_size = '24219648' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2
|
@ -4,97 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '34287552' %}
|
||||
{% set egress_lossy_pool_size = '20664320' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
"xoff": "{{ ingress_lossless_xoff_size }}",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"egress_lossless_pool": {
|
||||
"size": "{{ egress_lossless_pool_size }}",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"egress_lossy_pool": {
|
||||
"size": "{{ egress_lossy_pool_size }}",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -4,97 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '34287552' %}
|
||||
{% set egress_lossy_pool_size = '19601408' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
"xoff": "{{ ingress_lossless_xoff_size }}",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"egress_lossless_pool": {
|
||||
"size": "{{ egress_lossless_pool_size }}",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"egress_lossy_pool": {
|
||||
"size": "{{ egress_lossy_pool_size }}",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2
|
@ -4,101 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '34287552' %}
|
||||
{% set egress_lossy_pool_size = '20017152' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -4,101 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '34287552' %}
|
||||
{% set egress_lossy_pool_size = '19124224' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2
|
@ -4,101 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '34287552' %}
|
||||
{% set egress_lossy_pool_size = '24576000' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -4,101 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '34287552' %}
|
||||
{% set egress_lossy_pool_size = '22597632' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2
|
@ -4,97 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '34287552' %}
|
||||
{% set egress_lossy_pool_size = '24360960' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
"xoff": "{{ ingress_lossless_pool_xoff }}",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"egress_lossless_pool": {
|
||||
"size": "{{ egress_lossless_pool_size }}",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"egress_lossy_pool": {
|
||||
"size": "{{ egress_lossy_pool_size }}",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -4,97 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '34287552' %}
|
||||
{% set egress_lossy_pool_size = '22380544' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
"xoff": "{{ ingress_lossless_pool_xoff }}",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"egress_lossless_pool": {
|
||||
"size": "{{ egress_lossless_pool_size }}",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"egress_lossy_pool": {
|
||||
"size": "{{ egress_lossy_pool_size }}",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2
|
@ -4,101 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '34287552' %}
|
||||
{% set egress_lossy_pool_size = '24360960' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -4,101 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '34287552' %}
|
||||
{% set egress_lossy_pool_size = '22380544' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_objects.j2
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_objects.j2
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_objects.j2
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2
|
@ -4,103 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '60817392' %}
|
||||
{% set egress_lossy_pool_size = '53379072' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
"xoff": "{{ ingress_lossless_xoff_size }}",
|
||||
{%- 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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
||||
|
||||
|
@ -4,103 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '60817392' %}
|
||||
{% set egress_lossy_pool_size = '52723712' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
"xoff": "{{ ingress_lossless_xoff_size }}",
|
||||
{%- 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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2
|
@ -4,101 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '60817392' %}
|
||||
{% set egress_lossy_pool_size = '47587328' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
"xoff": "{{ ingress_lossless_xoff_size }}",
|
||||
{%- 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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -4,101 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '60817392' %}
|
||||
{% set egress_lossy_pool_size = '46702592' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
"xoff": "{{ ingress_lossless_xoff_size }}",
|
||||
{%- 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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2
|
@ -4,101 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '60817392' %}
|
||||
{% set egress_lossy_pool_size = '50995200' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
"xoff": "{{ ingress_lossless_xoff_size }}",
|
||||
{%- 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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -4,101 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '60817392' %}
|
||||
{% set egress_lossy_pool_size = '50143232' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
"xoff": "{{ ingress_lossless_xoff_size }}",
|
||||
{%- 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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_objects.j2
|
@ -4,109 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '60817392' %}
|
||||
{% set egress_lossy_pool_size = '26451968' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
{%- endif %}
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"ingress_lossy_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossy_pool_size }}",
|
||||
{%- 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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
||||
|
||||
|
@ -4,109 +4,20 @@
|
||||
{% set egress_lossless_pool_size = '60817392' %}
|
||||
{% set egress_lossy_pool_size = '20627456' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0, 32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{% 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_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
{%- endif %}
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"ingress_lossy_pool": {
|
||||
{%- if dynamic_mode is not defined %}
|
||||
"size": "{{ ingress_lossy_pool_size }}",
|
||||
{%- 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": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"9216",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- 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_profile_lists(port_names) %}
|
||||
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}": {
|
||||
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- 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_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in port_names.split(',') %}
|
||||
"{{ port }}|5-6": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %}
|
||||
{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }}
|
||||
{%- endmacro %}
|
||||
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_objects.j2
|
57
platform/mellanox/zero_profiles.j2
Normal file
57
platform/mellanox/zero_profiles.j2
Normal file
@ -0,0 +1,57 @@
|
||||
[
|
||||
{
|
||||
"BUFFER_POOL_TABLE:ingress_zero_pool": {
|
||||
"mode": "static",
|
||||
"type": "ingress",
|
||||
"size": "0"
|
||||
},
|
||||
"OP": "SET"
|
||||
},
|
||||
{
|
||||
"BUFFER_PROFILE_TABLE:ingress_lossy_pg_zero_profile" : {
|
||||
"pool":"[BUFFER_POOL_TABLE:ingress_zero_pool]",
|
||||
"size":"0",
|
||||
"static_th":"0"
|
||||
},
|
||||
"OP": "SET"
|
||||
},
|
||||
{
|
||||
"BUFFER_PROFILE_TABLE:ingress_lossy_zero_profile" : {
|
||||
"pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"-8"
|
||||
},
|
||||
"OP": "SET"
|
||||
},
|
||||
{
|
||||
"BUFFER_PROFILE_TABLE:ingress_lossless_zero_profile" : {
|
||||
"pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"-8"
|
||||
},
|
||||
"OP": "SET"
|
||||
},
|
||||
{
|
||||
"BUFFER_PROFILE_TABLE:egress_lossy_zero_profile" : {
|
||||
"pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"-8"
|
||||
},
|
||||
"OP": "SET"
|
||||
},
|
||||
{
|
||||
"BUFFER_PROFILE_TABLE:egress_lossless_zero_profile" : {
|
||||
"pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"-8"
|
||||
},
|
||||
"OP": "SET"
|
||||
},
|
||||
{
|
||||
"control_fields" : {
|
||||
"pgs_to_apply_zero_profile":"0",
|
||||
"ingress_zero_profile":"[BUFFER_PROFILE_TABLE:ingress_lossy_pg_zero_profile]"
|
||||
},
|
||||
"OP": "SET"
|
||||
}
|
||||
]
|
2303
src/sonic-config-engine/tests/sample-mellanox-2410-t1-minigraph.xml
Normal file
2303
src/sonic-config-engine/tests/sample-mellanox-2410-t1-minigraph.xml
Normal file
File diff suppressed because it is too large
Load Diff
1498
src/sonic-config-engine/tests/sample-mellanox-2700-t0-minigraph.xml
Normal file
1498
src/sonic-config-engine/tests/sample-mellanox-2700-t0-minigraph.xml
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -22,6 +22,8 @@ class TestJ2Files(TestCase):
|
||||
self.t1_mlnx_minigraph = os.path.join(self.test_dir, 't1-sample-graph-mlnx.xml')
|
||||
self.mlnx_port_config = os.path.join(self.test_dir, 'sample-port-config-mlnx.ini')
|
||||
self.dell6100_t0_minigraph = os.path.join(self.test_dir, 'sample-dell-6100-t0-minigraph.xml')
|
||||
self.mellanox2700_t0_minigraph = os.path.join(self.test_dir, 'sample-mellanox-2700-t0-minigraph.xml')
|
||||
self.mellanox2410_t1_minigraph = os.path.join(self.test_dir, 'sample-mellanox-2410-t1-minigraph.xml')
|
||||
self.arista7050_t0_minigraph = os.path.join(self.test_dir, 'sample-arista-7050-t0-minigraph.xml')
|
||||
self.multi_asic_minigraph = os.path.join(self.test_dir, 'multi_npu_data', 'sample-minigraph.xml')
|
||||
self.multi_asic_port_config = os.path.join(self.test_dir, 'multi_npu_data', 'sample_port_config-0.ini')
|
||||
@ -241,6 +243,46 @@ class TestJ2Files(TestCase):
|
||||
sample_output_file = os.path.join(self.test_dir, 'sample_output', utils.PYvX_DIR, 'buffers-dell6100.json')
|
||||
assert filecmp.cmp(sample_output_file, self.output_file)
|
||||
|
||||
def test_buffers_mellanox2700_render_template(self):
|
||||
# Mellanox buffer template rendering for single ingress pool mode
|
||||
mellanox_dir_path = os.path.join(self.test_dir, '..', '..', '..', 'device', 'mellanox', 'x86_64-mlnx_msn2700-r0', 'Mellanox-SN2700-D48C8')
|
||||
buffers_file = os.path.join(mellanox_dir_path, 'buffers.json.j2')
|
||||
port_config_ini_file = os.path.join(mellanox_dir_path, 'port_config.ini')
|
||||
|
||||
# copy buffers_config.j2 to the Mellanox 2700 directory to have all templates in one directory
|
||||
buffers_config_file = os.path.join(self.test_dir, '..', '..', '..', 'files', 'build_templates', 'buffers_config.j2')
|
||||
shutil.copy2(buffers_config_file, mellanox_dir_path)
|
||||
|
||||
argument = '-m ' + self.mellanox2700_t0_minigraph + ' -p ' + port_config_ini_file + ' -t ' + buffers_file + ' > ' + self.output_file
|
||||
self.run_script(argument)
|
||||
|
||||
# cleanup
|
||||
buffers_config_file_new = os.path.join(mellanox_dir_path, 'buffers_config.j2')
|
||||
os.remove(buffers_config_file_new)
|
||||
|
||||
sample_output_file = os.path.join(self.test_dir, 'sample_output', utils.PYvX_DIR, 'buffers-mellanox2700.json')
|
||||
assert filecmp.cmp(sample_output_file, self.output_file)
|
||||
|
||||
def test_buffers_mellanox2410_render_template(self):
|
||||
# Mellanox buffer template rendering for double ingress pools mode
|
||||
mellanox_dir_path = os.path.join(self.test_dir, '..', '..', '..', 'device', 'mellanox', 'x86_64-mlnx_msn2410-r0', 'ACS-MSN2410')
|
||||
buffers_file = os.path.join(mellanox_dir_path, 'buffers.json.j2')
|
||||
port_config_ini_file = os.path.join(mellanox_dir_path, 'port_config.ini')
|
||||
|
||||
# copy buffers_config.j2 to the Mellanox 2410 directory to have all templates in one directory
|
||||
buffers_config_file = os.path.join(self.test_dir, '..', '..', '..', 'files', 'build_templates', 'buffers_config.j2')
|
||||
shutil.copy2(buffers_config_file, mellanox_dir_path)
|
||||
|
||||
argument = '-m ' + self.mellanox2410_t1_minigraph + ' -p ' + port_config_ini_file + ' -t ' + buffers_file + ' > ' + self.output_file
|
||||
self.run_script(argument)
|
||||
|
||||
# cleanup
|
||||
buffers_config_file_new = os.path.join(mellanox_dir_path, 'buffers_config.j2')
|
||||
os.remove(buffers_config_file_new)
|
||||
|
||||
sample_output_file = os.path.join(self.test_dir, 'sample_output', utils.PYvX_DIR, 'buffers-mellanox2410.json')
|
||||
assert filecmp.cmp(sample_output_file, self.output_file)
|
||||
|
||||
def test_ipinip_multi_asic(self):
|
||||
ipinip_file = os.path.join(self.test_dir, '..', '..', '..', 'dockers', 'docker-orchagent', 'ipinip.json.j2')
|
||||
argument = '-m ' + self.multi_asic_minigraph + ' -p ' + self.multi_asic_port_config + ' -t ' + ipinip_file + ' -n asic0 ' + ' > ' + self.output_file
|
||||
|
Loading…
Reference in New Issue
Block a user