2019-02-14 01:08:04 -06:00
|
|
|
{% set default_cable = '5m' %}
|
2020-07-30 06:22:08 -05:00
|
|
|
{% set ingress_lossless_pool_size = '11622400' %}
|
|
|
|
{% set ingress_lossy_pool_size = '11622400' %}
|
|
|
|
{% set egress_lossless_pool_size = '34287552' %}
|
|
|
|
{% set egress_lossy_pool_size = '11622400' %}
|
2019-02-14 01:08:04 -06:00
|
|
|
|
|
|
|
{%- 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 %}
|
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
{%- macro generate_buffer_pool_and_profiles() %}
|
|
|
|
"BUFFER_POOL": {
|
|
|
|
"ingress_lossless_pool": {
|
2020-12-13 13:35:39 -06:00
|
|
|
{%- if dynamic_mode is not defined %}
|
2019-02-14 01:08:04 -06:00
|
|
|
"size": "{{ ingress_lossless_pool_size }}",
|
2020-12-13 13:35:39 -06:00
|
|
|
{%- endif %}
|
2019-02-14 01:08:04 -06:00
|
|
|
"type": "ingress",
|
|
|
|
"mode": "dynamic"
|
|
|
|
},
|
|
|
|
"ingress_lossy_pool": {
|
2020-12-13 13:35:39 -06:00
|
|
|
{%- if dynamic_mode is not defined %}
|
2019-02-14 01:08:04 -06:00
|
|
|
"size": "{{ ingress_lossy_pool_size }}",
|
2020-12-13 13:35:39 -06:00
|
|
|
{%- endif %}
|
2019-02-14 01:08:04 -06:00
|
|
|
"type": "ingress",
|
|
|
|
"mode": "dynamic"
|
|
|
|
},
|
|
|
|
"egress_lossless_pool": {
|
|
|
|
"size": "{{ egress_lossless_pool_size }}",
|
|
|
|
"type": "egress",
|
|
|
|
"mode": "dynamic"
|
|
|
|
},
|
|
|
|
"egress_lossy_pool": {
|
2020-12-13 13:35:39 -06:00
|
|
|
{%- if dynamic_mode is not defined %}
|
2019-02-14 01:08:04 -06:00
|
|
|
"size": "{{ egress_lossy_pool_size }}",
|
2020-12-13 13:35:39 -06:00
|
|
|
{%- endif %}
|
2019-02-14 01:08:04 -06:00
|
|
|
"type": "egress",
|
|
|
|
"mode": "dynamic"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"BUFFER_PROFILE": {
|
|
|
|
"ingress_lossless_profile": {
|
|
|
|
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
|
|
|
"size":"0",
|
2020-07-30 06:22:08 -05:00
|
|
|
"dynamic_th":"7"
|
2019-02-14 01:08:04 -06:00
|
|
|
},
|
|
|
|
"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]",
|
2020-07-30 06:22:08 -05:00
|
|
|
"size":"9216",
|
|
|
|
"dynamic_th":"7"
|
2019-02-14 01:08:04 -06:00
|
|
|
},
|
|
|
|
"q_lossy_profile": {
|
|
|
|
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
|
|
|
"size":"0",
|
|
|
|
"dynamic_th":"3"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
{%- macro generate_profile_lists(port_names) %}
|
|
|
|
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
|
2019-10-22 11:37:45 -05:00
|
|
|
{% for port in port_names.split(',') %}
|
|
|
|
"{{ port }}": {
|
2019-02-14 01:08:04 -06:00
|
|
|
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
|
2019-10-22 11:37:45 -05:00
|
|
|
}{% if not loop.last %},{% endif %}
|
|
|
|
|
|
|
|
{% endfor %}
|
2019-02-14 01:08:04 -06:00
|
|
|
},
|
|
|
|
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
|
2019-10-22 11:37:45 -05:00
|
|
|
{% for port in port_names.split(',') %}
|
|
|
|
"{{ port }}": {
|
2019-02-14 01:08:04 -06:00
|
|
|
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
|
2019-10-22 11:37:45 -05:00
|
|
|
}{% if not loop.last %},{% endif %}
|
|
|
|
|
|
|
|
{% endfor %}
|
2019-02-14 01:08:04 -06:00
|
|
|
}
|
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
{%- macro generate_queue_buffers(port_names) %}
|
|
|
|
"BUFFER_QUEUE": {
|
2019-10-22 11:37:45 -05:00
|
|
|
{% for port in port_names.split(',') %}
|
|
|
|
"{{ port }}|3-4": {
|
2019-02-14 01:08:04 -06:00
|
|
|
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
|
|
|
},
|
2019-10-22 11:37:45 -05:00
|
|
|
{% endfor %}
|
|
|
|
{% for port in port_names.split(',') %}
|
|
|
|
"{{ port }}|0-2": {
|
2019-02-14 01:08:04 -06:00
|
|
|
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
|
|
|
},
|
2019-10-22 11:37:45 -05:00
|
|
|
{% endfor %}
|
|
|
|
{% for port in port_names.split(',') %}
|
|
|
|
"{{ port }}|5-6": {
|
2019-02-14 01:08:04 -06:00
|
|
|
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
2019-10-22 11:37:45 -05:00
|
|
|
}{% if not loop.last %},{% endif %}
|
|
|
|
|
|
|
|
{% endfor %}
|
2019-02-14 01:08:04 -06:00
|
|
|
}
|
|
|
|
{%- endmacro %}
|