|
79 | 79 | {
|
80 | 80 | {% if (generate_tc_to_pg_map is defined) and tunnel_qos_remap_enable %}
|
81 | 81 | {{- generate_tc_to_pg_map() }}
|
| 82 | +{% elif (generate_tc_to_pg_map is defined) and |
| 83 | + ('type' in DEVICE_METADATA['localhost'] and |
| 84 | + DEVICE_METADATA['localhost']['type'] in backend_device_types) and |
| 85 | + ('resource_type' in DEVICE_METADATA['localhost'] and |
| 86 | + DEVICE_METADATA['localhost']['resource_type'] == 'Compute-AI') %} |
| 87 | + {{- generate_tc_to_pg_map() }} |
82 | 88 | {% else %}
|
83 | 89 | "TC_TO_PRIORITY_GROUP_MAP": {
|
84 | 90 | "AZURE": {
|
|
137 | 143 | },
|
138 | 144 | {% elif (generate_dscp_to_tc_map is defined) and tunnel_qos_remap_enable %}
|
139 | 145 | {{- generate_dscp_to_tc_map() }}
|
| 146 | +{% elif (generate_dscp_to_tc_map is defined) and |
| 147 | + ('type' in DEVICE_METADATA['localhost'] and |
| 148 | + DEVICE_METADATA['localhost']['type'] in backend_device_types) and |
| 149 | + ('resource_type' in DEVICE_METADATA['localhost'] and |
| 150 | + DEVICE_METADATA['localhost']['resource_type'] == 'Compute-AI') %} |
| 151 | + {{- generate_dscp_to_tc_map() }} |
140 | 152 | {% else %}
|
141 | 153 | "DSCP_TO_TC_MAP": {
|
142 | 154 | "AZURE": {
|
|
225 | 237 | "weight": "100"
|
226 | 238 | }
|
227 | 239 | },
|
| 240 | +{% elif (generate_tc_to_pg_map is defined) and |
| 241 | + ('type' in DEVICE_METADATA['localhost'] and |
| 242 | + DEVICE_METADATA['localhost']['type'] in backend_device_types) and |
| 243 | + ('resource_type' in DEVICE_METADATA['localhost'] and |
| 244 | + DEVICE_METADATA['localhost']['resource_type'] == 'Compute-AI') %} |
| 245 | + "SCHEDULER": { |
| 246 | + "scheduler.0": { |
| 247 | + "type" : "DWRR", |
| 248 | + "weight": "40" |
| 249 | + }, |
| 250 | + "scheduler.1": { |
| 251 | + "type" : "DWRR", |
| 252 | + "weight": "30" |
| 253 | + }, |
| 254 | + "scheduler.2": { |
| 255 | + "type" : "DWRR", |
| 256 | + "weight": "25" |
| 257 | + }, |
| 258 | + "scheduler.3": { |
| 259 | + "type" : "DWRR", |
| 260 | + "weight": "5" |
| 261 | + } |
| 262 | + }, |
228 | 263 | {% else %}
|
229 | 264 | "SCHEDULER": {
|
230 | 265 | "scheduler.0": {
|
|
368 | 403 | }
|
369 | 404 | {% else %}
|
370 | 405 | "QUEUE": {
|
| 406 | +{% if 'type' in DEVICE_METADATA['localhost'] and |
| 407 | + DEVICE_METADATA['localhost']['type'] in backend_device_types and |
| 408 | + 'resource_type' in DEVICE_METADATA['localhost'] and |
| 409 | + DEVICE_METADATA['localhost']['resource_type'] == 'Compute-AI' %} |
| 410 | +{% for port in PORT_ACTIVE %} |
| 411 | + "{{ port }}|0": { |
| 412 | + "scheduler": "scheduler.0" |
| 413 | + }, |
| 414 | + "{{ port }}|1": { |
| 415 | + "scheduler": "scheduler.1" |
| 416 | + }, |
| 417 | + "{{ port }}|3": { |
| 418 | + "scheduler" : "scheduler.2", |
| 419 | + "wred_profile": "AZURE_LOSSLESS" |
| 420 | + }, |
| 421 | + "{{ port }}|4": { |
| 422 | + "scheduler" : "scheduler.3", |
| 423 | + "wred_profile": "AZURE_LOSSLESS" |
| 424 | + }{% if not loop.last %},{% endif %} |
| 425 | +{% endfor %} |
| 426 | +{% else %} |
371 | 427 | {% for port in PORT_ACTIVE %}
|
372 | 428 | "{{ port }}|3": {
|
373 | 429 | "scheduler" : "scheduler.1",
|
|
431 | 487 | }{% if not loop.last %},{% endif %}
|
432 | 488 |
|
433 | 489 | {% endfor %}
|
| 490 | +{% endif %} |
434 | 491 | }
|
435 | 492 | {% endif %}
|
436 | 493 | }
|
0 commit comments