Adopt per-port buffer & qos profile apply on mellanox (#3543)

Signed-off-by: Wenda Ni <wenni@microsoft.com>
This commit is contained in:
Wenda Ni 2019-10-22 09:37:45 -07:00 committed by Ying Xie
parent 0ea82d8735
commit c1e17b3579
2 changed files with 42 additions and 16 deletions

View File

@ -65,28 +65,41 @@
{%- macro generate_profile_lists(port_names) %}
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
"{{ port_names }}": {
{% 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": {
"{{ port_names }}": {
{% 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 %}
}
{%- endmacro %}
{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
"{{ port_names }}|3-4": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
},
"{{ port_names }}|0-1": {
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
},
"{{ port_names }}|5": {
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
}
}{% if not loop.last %},{% endif %}
{% endfor %}
}
{%- endmacro %}

View File

@ -65,28 +65,41 @@
{%- macro generate_profile_lists(port_names) %}
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
"{{ port_names }}": {
{% 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": {
"{{ port_names }}": {
{% 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 %}
}
{%- endmacro %}
{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
"{{ port_names }}|3-4": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
},
"{{ port_names }}|0-1": {
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
},
"{{ port_names }}|5": {
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
}
}{% if not loop.last %},{% endif %}
{% endfor %}
}
{%- endmacro %}