Updated format of generating BUFFER_QUEUE in buffers_defaults templates (#9850)
This PR includes necessary changes for correct generating BUFFER_QUEUE values in DB. Changes are based on the schema.md Why I did it Change format of generating BUFFER_QUEUE in DB according to schema.md and yang-model. Old format: "BUFFER_QUEUE": { "Ethernet0,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet12,Ethernet120,Ethernet124,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet4,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet8,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96|queue": { "profile": "profile" }, "Ethernet0,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet12,Ethernet120,Ethernet124,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet4,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet8,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96|queue": { "profile": "profile" } }, New format: "BUFFER_QUEUE": { "Ethernet0|queue": { "profile": "profile" }, "Ethernet0|queue": { "profile": "profile" }, "Ethernet4|queue": { "profile": "profile" }, "Ethernet4|queue": { "profile": "profile" }, "Ethernet8|queue": { "profile": "profile" }, "Ethernet8|queue": { "profile": "profile" }, ... } How I did it Updated structure of buffers_defaults jinja templates. Signed-off-by: Oleksandr Kozodoi <oleksandrx.kozodoi@intel.com>
This commit is contained in:
parent
fb25f13ee8
commit
8c10c01bd8
@ -61,11 +61,15 @@
|
|||||||
|
|
||||||
{%- macro generate_queue_buffers(port_names) %}
|
{%- macro generate_queue_buffers(port_names) %}
|
||||||
"BUFFER_QUEUE": {
|
"BUFFER_QUEUE": {
|
||||||
"{{ port_names }}|3-4": {
|
{% for port in port_names.split(',') %}
|
||||||
"profile" : "egress_lossless_profile"
|
"{{ port }}|0-2": {
|
||||||
},
|
|
||||||
"{{ port_names }}|0-1": {
|
|
||||||
"profile" : "q_lossy_profile"
|
"profile" : "q_lossy_profile"
|
||||||
}
|
},
|
||||||
|
{% endfor %}
|
||||||
|
{% for port in port_names.split(',') %}
|
||||||
|
"{{ port }}|3-4": {
|
||||||
|
"profile" : "egress_lossless_profile"
|
||||||
|
}{% if not loop.last %},{% endif %}
|
||||||
|
{% endfor %}
|
||||||
}
|
}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
@ -61,11 +61,15 @@
|
|||||||
|
|
||||||
{%- macro generate_queue_buffers(port_names) %}
|
{%- macro generate_queue_buffers(port_names) %}
|
||||||
"BUFFER_QUEUE": {
|
"BUFFER_QUEUE": {
|
||||||
"{{ port_names }}|3-4": {
|
{% for port in port_names.split(',') %}
|
||||||
"profile" : "egress_lossless_profile"
|
"{{ port }}|0-2": {
|
||||||
},
|
|
||||||
"{{ port_names }}|0-1": {
|
|
||||||
"profile" : "q_lossy_profile"
|
"profile" : "q_lossy_profile"
|
||||||
}
|
},
|
||||||
|
{% endfor %}
|
||||||
|
{% for port in port_names.split(',') %}
|
||||||
|
"{{ port }}|3-4": {
|
||||||
|
"profile" : "egress_lossless_profile"
|
||||||
|
}{% if not loop.last %},{% endif %}
|
||||||
|
{% endfor %}
|
||||||
}
|
}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
@ -16,8 +16,7 @@
|
|||||||
"ingress_lossless_pool": {
|
"ingress_lossless_pool": {
|
||||||
"size": "{{ ingress_lossless_pool_size }}",
|
"size": "{{ ingress_lossless_pool_size }}",
|
||||||
"type": "ingress",
|
"type": "ingress",
|
||||||
"mode": "dynamic",
|
"mode": "dynamic"
|
||||||
"xoff": "36222208"
|
|
||||||
},
|
},
|
||||||
"ingress_lossy_pool": {
|
"ingress_lossy_pool": {
|
||||||
"size": "{{ ingress_lossy_pool_size }}",
|
"size": "{{ ingress_lossy_pool_size }}",
|
||||||
@ -61,11 +60,15 @@
|
|||||||
|
|
||||||
{%- macro generate_queue_buffers(port_names) %}
|
{%- macro generate_queue_buffers(port_names) %}
|
||||||
"BUFFER_QUEUE": {
|
"BUFFER_QUEUE": {
|
||||||
"{{ port_names }}|3-4": {
|
{% for port in port_names.split(',') %}
|
||||||
"profile" : "egress_lossless_profile"
|
"{{ port }}|0-2": {
|
||||||
},
|
|
||||||
"{{ port_names }}|0-1": {
|
|
||||||
"profile" : "q_lossy_profile"
|
"profile" : "q_lossy_profile"
|
||||||
}
|
},
|
||||||
|
{% endfor %}
|
||||||
|
{% for port in port_names.split(',') %}
|
||||||
|
"{{ port }}|3-4": {
|
||||||
|
"profile" : "egress_lossless_profile"
|
||||||
|
}{% if not loop.last %},{% endif %}
|
||||||
|
{% endfor %}
|
||||||
}
|
}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
@ -16,8 +16,7 @@
|
|||||||
"ingress_lossless_pool": {
|
"ingress_lossless_pool": {
|
||||||
"size": "{{ ingress_lossless_pool_size }}",
|
"size": "{{ ingress_lossless_pool_size }}",
|
||||||
"type": "ingress",
|
"type": "ingress",
|
||||||
"mode": "dynamic",
|
"mode": "dynamic"
|
||||||
"xoff": "36222208"
|
|
||||||
},
|
},
|
||||||
"ingress_lossy_pool": {
|
"ingress_lossy_pool": {
|
||||||
"size": "{{ ingress_lossy_pool_size }}",
|
"size": "{{ ingress_lossy_pool_size }}",
|
||||||
@ -61,11 +60,15 @@
|
|||||||
|
|
||||||
{%- macro generate_queue_buffers(port_names) %}
|
{%- macro generate_queue_buffers(port_names) %}
|
||||||
"BUFFER_QUEUE": {
|
"BUFFER_QUEUE": {
|
||||||
"{{ port_names }}|3-4": {
|
{% for port in port_names.split(',') %}
|
||||||
"profile" : "egress_lossless_profile"
|
"{{ port }}|0-2": {
|
||||||
},
|
|
||||||
"{{ port_names }}|0-1": {
|
|
||||||
"profile" : "q_lossy_profile"
|
"profile" : "q_lossy_profile"
|
||||||
}
|
},
|
||||||
|
{% endfor %}
|
||||||
|
{% for port in port_names.split(',') %}
|
||||||
|
"{{ port }}|3-4": {
|
||||||
|
"profile" : "egress_lossless_profile"
|
||||||
|
}{% if not loop.last %},{% endif %}
|
||||||
|
{% endfor %}
|
||||||
}
|
}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
@ -63,21 +63,17 @@
|
|||||||
},
|
},
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{%- macro generate_pg_profils(port_names) %}
|
|
||||||
"BUFFER_PG": {
|
|
||||||
"{{ port_names }}|3-4": {
|
|
||||||
"profile" : "ingress_lossless_profile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{%- endmacro %}
|
|
||||||
|
|
||||||
{%- macro generate_queue_buffers(port_names) %}
|
{%- macro generate_queue_buffers(port_names) %}
|
||||||
"BUFFER_QUEUE": {
|
"BUFFER_QUEUE": {
|
||||||
"{{ port_names }}|3-4": {
|
{% for port in port_names.split(',') %}
|
||||||
"profile" : "egress_lossless_profile"
|
"{{ port }}|0-2": {
|
||||||
},
|
|
||||||
"{{ port_names }}|0-1": {
|
|
||||||
"profile" : "q_lossy_profile"
|
"profile" : "q_lossy_profile"
|
||||||
}
|
},
|
||||||
|
{% endfor %}
|
||||||
|
{% for port in port_names.split(',') %}
|
||||||
|
"{{ port }}|3-4": {
|
||||||
|
"profile" : "egress_lossless_profile"
|
||||||
|
}{% if not loop.last %},{% endif %}
|
||||||
|
{% endfor %}
|
||||||
}
|
}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
@ -63,21 +63,17 @@
|
|||||||
},
|
},
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{%- macro generate_pg_profils(port_names) %}
|
|
||||||
"BUFFER_PG": {
|
|
||||||
"{{ port_names }}|3-4": {
|
|
||||||
"profile" : "ingress_lossless_profile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{%- endmacro %}
|
|
||||||
|
|
||||||
{%- macro generate_queue_buffers(port_names) %}
|
{%- macro generate_queue_buffers(port_names) %}
|
||||||
"BUFFER_QUEUE": {
|
"BUFFER_QUEUE": {
|
||||||
"{{ port_names }}|3-4": {
|
{% for port in port_names.split(',') %}
|
||||||
"profile" : "egress_lossless_profile"
|
"{{ port }}|0-2": {
|
||||||
},
|
|
||||||
"{{ port_names }}|0-1": {
|
|
||||||
"profile" : "q_lossy_profile"
|
"profile" : "q_lossy_profile"
|
||||||
}
|
},
|
||||||
|
{% endfor %}
|
||||||
|
{% for port in port_names.split(',') %}
|
||||||
|
"{{ port }}|3-4": {
|
||||||
|
"profile" : "egress_lossless_profile"
|
||||||
|
}{% if not loop.last %},{% endif %}
|
||||||
|
{% endfor %}
|
||||||
}
|
}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
Loading…
Reference in New Issue
Block a user