Skip to content
Closed
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
limitations under the License.
#}

{% import 'traffic_config.j2' as traffic_config %}

{%- 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 -%}
Expand Down Expand Up @@ -73,50 +75,98 @@
"size":"0",
"dynamic_th":"7"
},
"egress_lossless_profile": {
"pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
"pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"-6"
},
"queue0_lossy_profile": {
"pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"0"
"queue0_downlink_lossy_profile": {
"dynamic_th": "0",
"size": "0",
"pool": "egress_lossy_pool"
},
"queue1_lossy_profile": {
"pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"0"
"queue1_downlink_lossy_profile": {
{% if traffic_config.traffic_classification_enable %}
"packet_discard_action": "trim",
{% endif %}
"pool": "egress_lossy_pool",
"size": "0",
"dynamic_th": "0"
},
"queue2_lossy_profile": {
"pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"0"
"queue2_downlink_lossy_profile": {
{% if traffic_config.traffic_classification_enable %}
"packet_discard_action": "trim",
{% endif %}
"pool": "egress_lossy_pool",
"size": "0",
"dynamic_th": "0"
},
"queue3_lossy_profile": {
"pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"0"
"queue3_downlink_lossy_profile": {
{% if traffic_config.traffic_classification_enable %}
"packet_discard_action": "trim",
{% endif %}
"pool": "egress_lossy_pool",
"size": "0",
"dynamic_th": "0"
},
"queue4_lossy_profile": {
"queue4_downlink_lossy_profile": {
"pool": "egress_lossy_pool",
"size": "0",
"dynamic_th" : "7"
"dynamic_th": "7"
},
"queue5_lossy_profile": {
"queue5_downlink_lossy_profile": {
"pool": "egress_lossy_pool",
"size": "0",
"dynamic_th" : "-3"
"dynamic_th": "-3"
},
"queue6_lossy_profile": {
"queue6_downlink_lossy_profile": {
"pool": "egress_lossy_pool",
"size": "0",
"dynamic_th" : "0"
"dynamic_th": "0"
},
"queue0_uplink_lossy_profile": {
"pool": "egress_lossy_pool",
"size": "0",
"dynamic_th": "0"
},
"queue1_uplink_lossy_profile": {
{% if traffic_config.traffic_classification_enable %}
"packet_discard_action": "trim",
{% endif %}
"pool": "egress_lossy_pool",
"size": "0",
"dynamic_th": "0"
},
"queue2_uplink_lossy_profile": {
{% if traffic_config.traffic_classification_enable %}
"packet_discard_action": "trim",
{% endif %}
"pool": "egress_lossy_pool",
"size": "0",
"dynamic_th": "0"
},
"queue3_uplink_lossy_profile": {
{% if traffic_config.traffic_classification_enable %}
"packet_discard_action": "trim",
{% endif %}
"pool": "egress_lossy_pool",
"size": "0",
"dynamic_th": "0"
},
"queue4_uplink_lossy_profile": {
"pool": "egress_lossy_pool",
"size": "0",
"dynamic_th": "7"
},
"queue5_uplink_lossy_profile": {
"pool": "egress_lossy_pool",
"size": "0",
"dynamic_th": "-3"
},
"queue6_uplink_lossy_profile": {
"pool": "egress_lossy_pool",
"size": "0",
"dynamic_th": "0"
}
},
{%- endmacro %}
Expand Down Expand Up @@ -146,7 +196,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names_active.split(',') %}
"{{ port }}": {
"profile_list" : "egress_lossless_profile,egress_lossy_profile"
"profile_list" : "egress_lossy_profile"
}{% if not loop.last %},{% endif %}

{% endfor %}
Expand All @@ -155,9 +205,9 @@
{% for port in port_names_inactive.split(',') %}
"{{ port }}": {
{% if dynamic_mode is defined %}
"profile_list" : "egress_lossless_profile,egress_lossy_profile"
"profile_list" : "egress_lossy_profile"
{% else %}
"profile_list" : "egress_lossless_zero_profile,egress_lossy_zero_profile"
"profile_list" : "egress_lossy_zero_profile"
{% endif %}
}{% if not loop.last %},{% endif %}

Expand All @@ -170,52 +220,51 @@
"BUFFER_QUEUE": {
{% for port in port_names_active.split(',') %}
"{{ port }}|0": {
"profile" : "queue0_lossy_profile"
"profile" : "queue0_{{ 'uplink' if port in PORT_UPLINK else 'downlink' }}_lossy_profile"
},
"{{ port }}|1": {
"profile" : "queue1_lossy_profile"
"profile" : "queue1_{{ 'uplink' if port in PORT_UPLINK else 'downlink' }}_lossy_profile"
},
"{{ port }}|2": {
"profile" : "queue2_lossy_profile"
"profile" : "queue2_{{ 'uplink' if port in PORT_UPLINK else 'downlink' }}_lossy_profile"
},
"{{ port }}|3": {
"profile" : "queue3_lossy_profile"
"profile" : "queue3_{{ 'uplink' if port in PORT_UPLINK else 'downlink' }}_lossy_profile"
},
"{{ port }}|4": {
"profile" : "queue4_lossy_profile"
"profile" : "queue4_{{ 'uplink' if port in PORT_UPLINK else 'downlink' }}_lossy_profile"
},
"{{ port }}|5": {
"profile" : "queue5_lossy_profile"
"profile" : "queue5_{{ 'uplink' if port in PORT_UPLINK else 'downlink' }}_lossy_profile"
},
"{{ port }}|6": {
"profile" : "queue6_lossy_profile"
"profile" : "queue6_{{ 'uplink' if port in PORT_UPLINK else 'downlink' }}_lossy_profile"
}{% if not loop.last %},{% endif %}

{% endfor %}
{% if port_names_inactive|length > 0 %}
{% if dynamic_mode is defined %}
{% if port_names_active.split(',')|length > 0 %},{% endif %}
{% for port in port_names_inactive.split(',') %}
"{{ port }}|0": {
"profile" : "queue0_lossy_profile"
"profile" : "queue0_{{ 'uplink' if port in PORT_UPLINK else 'downlink' }}_lossy_profile"
},
"{{ port }}|1": {
"profile" : "queue1_lossy_profile"
"profile" : "queue1_{{ 'uplink' if port in PORT_UPLINK else 'downlink' }}_lossy_profile"
},
"{{ port }}|2": {
"profile" : "queue2_lossy_profile"
"profile" : "queue2_{{ 'uplink' if port in PORT_UPLINK else 'downlink' }}_lossy_profile"
},
"{{ port }}|3": {
"profile" : "queue3_lossy_profile"
"profile" : "queue3_{{ 'uplink' if port in PORT_UPLINK else 'downlink' }}_lossy_profile"
},
"{{ port }}|4": {
"profile" : "queue4_lossy_profile"
"profile" : "queue4_{{ 'uplink' if port in PORT_UPLINK else 'downlink' }}_lossy_profile"
},
"{{ port }}|5": {
"profile" : "queue5_lossy_profile"
"profile" : "queue5_{{ 'uplink' if port in PORT_UPLINK else 'downlink' }}_lossy_profile"
},
"{{ port }}|6": {
"profile" : "queue6_lossy_profile"
"profile" : "queue6_{{ 'uplink' if port in PORT_UPLINK else 'downlink' }}_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
{% else %}
Expand Down
Loading