[Qos] use dot1p to tc mapping for backend switches (#3422)
* Use dot1p to tc mapping for backend switches Signed-off-by: Wenda Ni <wenni@microsoft.com> * Do not write DSCP to TC mapping into CONFIG_DB or config_db.json for storage switches Signed-off-by: Wenda Ni <wenni@microsoft.com>
This commit is contained in:
parent
97c675c6d5
commit
81aef6b64c
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
|
|
||||||
{%- set pfc_to_pg_map_supported_asics = ['mellanox', 'barefoot', 'marvell'] -%}
|
{%- set pfc_to_pg_map_supported_asics = ['mellanox', 'barefoot', 'marvell'] -%}
|
||||||
|
{%- set backend_device_types = ['BackEndToRRouter', 'BackEndLeafRouter'] -%}
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -72,6 +73,20 @@
|
|||||||
"7": "7"
|
"7": "7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{% if 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] in backend_device_types %}
|
||||||
|
"DOT1P_TO_TC_MAP": {
|
||||||
|
"AZURE": {
|
||||||
|
"0": "0",
|
||||||
|
"1": "1",
|
||||||
|
"2": "2",
|
||||||
|
"3": "3",
|
||||||
|
"4": "4",
|
||||||
|
"5": "5",
|
||||||
|
"6": "6",
|
||||||
|
"7": "7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{% else %}
|
||||||
"DSCP_TO_TC_MAP": {
|
"DSCP_TO_TC_MAP": {
|
||||||
"AZURE": {
|
"AZURE": {
|
||||||
"0" : "1",
|
"0" : "1",
|
||||||
@ -140,6 +155,7 @@
|
|||||||
"63": "1"
|
"63": "1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{% endif %}
|
||||||
"SCHEDULER": {
|
"SCHEDULER": {
|
||||||
"scheduler.0": {
|
"scheduler.0": {
|
||||||
"type" : "DWRR",
|
"type" : "DWRR",
|
||||||
@ -160,7 +176,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
"PORT_QOS_MAP": {
|
"PORT_QOS_MAP": {
|
||||||
"{{ port_names_active }}": {
|
"{{ port_names_active }}": {
|
||||||
|
{% if 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] in backend_device_types %}
|
||||||
|
"dot1p_to_tc_map" : "[DOT1P_TO_TC_MAP|AZURE]",
|
||||||
|
{% else %}
|
||||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
||||||
|
{% endif %}
|
||||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||||
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
||||||
|
@ -18,7 +18,7 @@ if [ -f /etc/sonic/config_db.json ]; then
|
|||||||
else
|
else
|
||||||
# generate and merge buffers configuration into config file
|
# generate and merge buffers configuration into config file
|
||||||
sonic-cfggen -t /usr/share/sonic/hwsku/buffers.json.j2 > /tmp/buffers.json
|
sonic-cfggen -t /usr/share/sonic/hwsku/buffers.json.j2 > /tmp/buffers.json
|
||||||
sonic-cfggen -t /usr/share/sonic/hwsku/qos.json.j2 > /tmp/qos.json
|
sonic-cfggen -j /etc/sonic/init_cfg.json -t /usr/share/sonic/hwsku/qos.json.j2 > /tmp/qos.json
|
||||||
sonic-cfggen -p /usr/share/sonic/hwsku/port_config.ini -k $HWSKU --print-data > /tmp/ports.json
|
sonic-cfggen -p /usr/share/sonic/hwsku/port_config.ini -k $HWSKU --print-data > /tmp/ports.json
|
||||||
sonic-cfggen -j /etc/sonic/init_cfg.json -j /tmp/buffers.json -j /tmp/qos.json -j /tmp/ports.json --print-data > /etc/sonic/config_db.json
|
sonic-cfggen -j /etc/sonic/init_cfg.json -j /tmp/buffers.json -j /tmp/qos.json -j /tmp/ports.json --print-data > /etc/sonic/config_db.json
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user