Skip to content

Commit

Permalink
Generate switch level dscp_to_tc_map entry from qos_config template (#…
Browse files Browse the repository at this point in the history
…11087)

* Generate switch level dscp_to_tc_map

Signed-off-by: bingwang <wang.bing@microsoft.com>
  • Loading branch information
bingwang-ms authored Jun 17, 2022
1 parent faecf38 commit 83f23e2
Show file tree
Hide file tree
Showing 15 changed files with 49 additions and 0 deletions.
7 changes: 7 additions & 0 deletions files/build_templates/qos_config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,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" : "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' %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@
}
},
"PORT_QOS_MAP": {
"global": {
"dscp_to_tc_map" : "AZURE"
},
"Ethernet4": {
"dscp_to_tc_map" : "AZURE",
"tc_to_queue_map" : "AZURE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@
}
},
"PORT_QOS_MAP": {
"global": {
"dscp_to_tc_map" : "AZURE"
},
"Ethernet0": {
"dscp_to_tc_map" : "AZURE",
"tc_to_queue_map" : "AZURE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@
}
},
"PORT_QOS_MAP": {
"global": {
"dscp_to_tc_map" : "AZURE"
},
"Ethernet0": {
"dscp_to_tc_map" : "AZURE",
"tc_to_queue_map" : "AZURE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@
}
},
"PORT_QOS_MAP": {
"global": {
"dscp_to_tc_map" : "AZURE"
},
"Ethernet0": {
"dscp_to_tc_map" : "AZURE",
"tc_to_queue_map" : "AZURE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@
}
},
"PORT_QOS_MAP": {
"global": {
"dscp_to_tc_map" : "AZURE"
},
"Ethernet4": {
"dscp_to_tc_map" : "AZURE",
"tc_to_queue_map" : "AZURE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@
}
},
"PORT_QOS_MAP": {
"global": {
"dscp_to_tc_map" : "AZURE"
},
"Ethernet0": {
"dscp_to_tc_map" : "AZURE",
"tc_to_queue_map" : "AZURE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@
}
},
"PORT_QOS_MAP": {
"global": {
"dscp_to_tc_map" : "AZURE"
},
"Ethernet0": {
"dscp_to_tc_map" : "AZURE",
"tc_to_queue_map" : "AZURE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@
}
},
"PORT_QOS_MAP": {
"global": {
"dscp_to_tc_map" : "AZURE"
},
"Ethernet0": {
"dscp_to_tc_map" : "AZURE",
"tc_to_queue_map" : "AZURE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@
}
},
"PORT_QOS_MAP": {
"global": {
"dscp_to_tc_map" : "AZURE"
},
"Ethernet0": {
"dscp_to_tc_map" : "AZURE",
"tc_to_queue_map" : "AZURE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@
}
},
"PORT_QOS_MAP": {
"global": {
"dscp_to_tc_map" : "AZURE"
},
"Ethernet0": {
"dscp_to_tc_map" : "AZURE",
"tc_to_queue_map" : "AZURE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@
}
},
"PORT_QOS_MAP": {
"global": {
"dscp_to_tc_map" : "AZURE"
},
"Ethernet0": {
"dscp_to_tc_map" : "AZURE",
"tc_to_queue_map" : "AZURE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@
}
},
"PORT_QOS_MAP": {
"global": {
"dscp_to_tc_map" : "AZURE"
},
"Ethernet0": {
"dscp_to_tc_map" : "AZURE",
"tc_to_queue_map" : "AZURE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@
}
},
"PORT_QOS_MAP": {
"global": {
"dscp_to_tc_map" : "AZURE"
},
"Ethernet0": {
"dscp_to_tc_map" : "AZURE",
"tc_to_queue_map" : "AZURE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@
}
},
"PORT_QOS_MAP": {
"global": {
"dscp_to_tc_map" : "AZURE"
},
"Ethernet0": {
"dscp_to_tc_map" : "AZURE",
"tc_to_queue_map" : "AZURE",
Expand Down

0 comments on commit 83f23e2

Please sign in to comment.