[202012] [cherry-pick] Generate switch level dscp_to_tc_map entry from qos_config template (#11132)
* Generate switch level dscp_to_tc_map Signed-off-by: bingwang <wang.bing@microsoft.com>
This commit is contained in:
parent
5b2261da37
commit
6ddf5cd7dc
@ -145,7 +145,7 @@
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "6",
|
||||
"7": "7",
|
||||
"7": "0",
|
||||
"8": "0"
|
||||
},
|
||||
"AZURE_TUNNEL": {
|
||||
|
@ -55,8 +55,12 @@
|
||||
},
|
||||
{%- endmacro %}
|
||||
|
||||
{% import 'buffers_extra_queues.j2' as defs with context %}
|
||||
{% import 'buffers_extra_queues.j2' as defs1 with context %}
|
||||
{% import 'buffers_extra_pgs.j2' as defs2 with context %}
|
||||
|
||||
{%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %}
|
||||
{{ defs.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }}
|
||||
{{ defs1.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }}
|
||||
{%- endmacro %}
|
||||
{%- macro generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pgs) %}
|
||||
{{ defs2.generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pgs) }}
|
||||
{%- endmacro %}
|
||||
|
@ -0,0 +1,20 @@
|
||||
{% if DEVICE_METADATA is defined and 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter' %}
|
||||
{%- macro generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pg) %}
|
||||
"BUFFER_PG": {
|
||||
{% for port in port_names.split(',') %}
|
||||
{% if port not in port_names_require_no_extra_pg.split(',') %}
|
||||
"{{ port }}|2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"{{ port }}|6": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
{% endif %}
|
||||
"{{ port }}|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
{% endmacro %}
|
||||
{% endif %}
|
@ -79,7 +79,7 @@
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "6",
|
||||
"7": "7"
|
||||
"7": "0"
|
||||
}
|
||||
},
|
||||
{%- endmacro %}
|
||||
@ -230,7 +230,7 @@
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "6",
|
||||
"7": "7",
|
||||
"7": "0",
|
||||
"8": "0"
|
||||
},
|
||||
"AZURE_TUNNEL": {
|
||||
|
@ -49,9 +49,12 @@
|
||||
},
|
||||
{%- endmacro %}
|
||||
|
||||
|
||||
{% import 'buffers_extra_queues.j2' as defs with context %}
|
||||
{% import 'buffers_extra_queues.j2' as defs1 with context %}
|
||||
{% import 'buffers_extra_pgs.j2' as defs2 with context %}
|
||||
|
||||
{%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %}
|
||||
{{ defs.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }}
|
||||
{{ defs1.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }}
|
||||
{%- endmacro %}
|
||||
{%- macro generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pgs) %}
|
||||
{{ defs2.generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pgs) }}
|
||||
{%- endmacro %}
|
||||
|
@ -0,0 +1 @@
|
||||
../Arista-7260CX3-C64/buffers_extra_pgs.j2
|
@ -171,6 +171,10 @@ def
|
||||
{{ defs.generate_pg_profils(port_names_active) }}
|
||||
{% elif defs.generate_pg_profiles_with_inactive_ports is defined %}
|
||||
{{ defs.generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) }},
|
||||
{% elif (defs.generate_pg_buffers_with_extra_lossy_pgs is defined) and (port_names_extra_queues != '') %}
|
||||
{{ defs.generate_pg_buffers_with_extra_lossy_pgs(port_names_active, port_names_extra_queues) }}
|
||||
{% elif (defs.generate_pg_buffers_with_extra_lossy_pgs_with_inactive_ports is defined) and (port_names_extra_queues != '') %}
|
||||
{{ defs.generate_pg_buffers_with_extra_lossy_pgs_with_inactive_ports(port_names_active, port_names_extra_queues, port_names_inactive) }}
|
||||
{% else %}
|
||||
"BUFFER_PG": {
|
||||
{% for port in PORT_ACTIVE %}
|
||||
|
@ -214,6 +214,13 @@
|
||||
},
|
||||
{% endif %}
|
||||
"PORT_QOS_MAP": {
|
||||
{% if generate_global_dscp_to_tc_map is defined %}
|
||||
{{- generate_global_dscp_to_tc_map() }}
|
||||
{% else %}
|
||||
"global": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]"
|
||||
}{% if PORT_ACTIVE %},{% endif %}
|
||||
{% endif %}
|
||||
{% for port in PORT_ACTIVE %}
|
||||
"{{ port }}": {
|
||||
{% if 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] in backend_device_types and 'storage_device' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['storage_device'] == 'true' %}
|
||||
|
@ -114,6 +114,9 @@
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"global": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]"
|
||||
},
|
||||
"Ethernet4": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -114,6 +114,9 @@
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"global": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]"
|
||||
},
|
||||
"Ethernet0": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
|
@ -118,6 +118,9 @@
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"global": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]"
|
||||
},
|
||||
"Ethernet0": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
|
@ -112,9 +112,21 @@
|
||||
"Ethernet0|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet0|2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet0|6": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet4|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet4|2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet4|6": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet144|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
@ -124,9 +136,21 @@
|
||||
"Ethernet16|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet16|2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet16|6": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet20|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet20|2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet20|6": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet152|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
@ -136,9 +160,21 @@
|
||||
"Ethernet64|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet64|2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet64|6": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet68|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet68|2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet68|6": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet168|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
@ -148,9 +184,21 @@
|
||||
"Ethernet80|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet80|2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet80|6": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet84|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet84|2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet84|6": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"Ethernet180|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
|
@ -114,6 +114,9 @@
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"global": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]"
|
||||
},
|
||||
"Ethernet4": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
|
@ -114,6 +114,9 @@
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"global": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]"
|
||||
},
|
||||
"Ethernet0": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
|
@ -8,7 +8,7 @@
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "6",
|
||||
"7": "7",
|
||||
"7": "0",
|
||||
"8": "0"
|
||||
},
|
||||
"AZURE_TUNNEL": {
|
||||
@ -217,6 +217,9 @@
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"global": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]"
|
||||
},
|
||||
"Ethernet0": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
|
@ -114,6 +114,9 @@
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"global": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]"
|
||||
},
|
||||
"Ethernet0": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
|
@ -8,7 +8,7 @@
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "6",
|
||||
"7": "7",
|
||||
"7": "0",
|
||||
"8": "0"
|
||||
},
|
||||
"AZURE_TUNNEL": {
|
||||
@ -217,6 +217,9 @@
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"global": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]"
|
||||
},
|
||||
"Ethernet0": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
|
@ -114,6 +114,9 @@
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"global": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]"
|
||||
},
|
||||
"Ethernet0": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
|
@ -100,7 +100,7 @@
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "6",
|
||||
"7": "7"
|
||||
"7": "0"
|
||||
}
|
||||
},
|
||||
"SCHEDULER": {
|
||||
@ -114,6 +114,9 @@
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"global": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]"
|
||||
},
|
||||
"Ethernet0": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -114,6 +114,9 @@
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"global": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]"
|
||||
},
|
||||
"Ethernet0": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
|
@ -118,6 +118,9 @@
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"global": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]"
|
||||
},
|
||||
"Ethernet0": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
|
Loading…
Reference in New Issue
Block a user