-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
Copy pathbuffers_extra_queues.j2
55 lines (52 loc) · 1.73 KB
/
buffers_extra_queues.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{% if DEVICE_METADATA is defined and 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %}
{%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %}
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
{% if port in port_names_require_extra_buffer.split(',') %}
"{{ port }}|0-1": {
"profile" : "egress_lossy_profile"
},
"{{ port }}|2-4": {
"profile" : "egress_lossless_profile"
},
"{{ port }}|5": {
"profile" : "egress_lossy_profile"
},
"{{ port }}|6": {
"profile" : "egress_lossless_profile"
},
"{{ port }}|7": {
"profile" : "egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% else %}
"{{ port }}|0-2": {
"profile" : "egress_lossy_profile"
},
"{{ port }}|3-4": {
"profile" : "egress_lossless_profile"
},
"{{ port }}|5-7": {
"profile" : "egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endif %}
{% endfor %}
}
{% endmacro %}
{%- macro generate_pg_profiles_with_extra_lossy_pgs(port_names, port_names_require_extra_lossless_pgs) %}
"BUFFER_PG": {
{% for port in port_names.split(',') %}
{% if port not in port_names_require_extra_lossless_pgs.split(',') %}
"{{ port }}|2": {
"profile" : "ingress_lossy_profile"
},
"{{ port }}|6": {
"profile" : "ingress_lossy_profile"
},
{% endif %}
"{{ port }}|0": {
"profile" : "ingress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
},
{% endmacro %}
{% endif %}