diff --git a/files/build_templates/buffers_config.j2 b/files/build_templates/buffers_config.j2 index a8f8192c98d3..ee96ac179c13 100644 --- a/files/build_templates/buffers_config.j2 +++ b/files/build_templates/buffers_config.j2 @@ -130,11 +130,11 @@ def {%- set port_names_list_extra_queues = [] %} {%- for port in PORT_ACTIVE %} - {% if (defs.generate_queue_buffers_with_extra_lossless_queues is defined or defs.generate_queue_buffers_with_extra_lossless_queues_with_inactive_ports is defined) and + {%- if (defs.generate_queue_buffers_with_extra_lossless_queues is defined or defs.generate_queue_buffers_with_extra_lossless_queues_with_inactive_ports is defined) and (('type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter' and DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR[port].name in DEVICE_NEIGHBOR_METADATA and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[port].name].type == 'ToRRouter') or ('subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' and DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR[port].name in DEVICE_NEIGHBOR_METADATA and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[port].name].type == 'LeafRouter')) %} {%- if port_names_list_extra_queues.append(port) %}{%- endif %} - {% endif %} + {%- endif %} {%- endfor %} {%- set port_names_extra_queues = port_names_list_extra_queues | join(',') %}