Skip to content

Commit a947a05

Browse files
Remove PG 3 and 4 for Internal Ports (sonic-net#21797)
Remove PG 3 and 4 for Internal Ports
1 parent 08f1fbe commit a947a05

File tree

5 files changed

+32
-33
lines changed

5 files changed

+32
-33
lines changed

device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-O28/buffers_defaults_objects.j2

+1-8
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@
9393
"BUFFER_PG": {
9494
"Dpc": {
9595
"active": {
96-
"dynamic": "ingress_lossy_profile",
97-
"static": "ingress_lossy_profile"
96+
"dynamic": "NULL"
9897
},
9998
"inactive": {
10099
"dynamic": "ingress_lossy_profile",
@@ -362,12 +361,6 @@
362361
"{{ port }}|3-4": {
363362
"profile" : {{find_profile_to_attach('BUFFER_PG', port, 'active', 'dynamic')}}
364363
},
365-
{% else %}
366-
{% if port in PORT_DPC %}
367-
"{{ port }}|3-4": {
368-
"profile" : {{find_profile_to_attach('BUFFER_PG', port, 'active', 'static')}}
369-
},
370-
{% endif %}
371364
{% endif %}
372365
"{{ port }}|0": {
373366
"profile" : "ingress_lossy_profile"

files/build_templates/buffers_config.j2

+3-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ def
7979
{%- endif %}
8080
{%- endif %}
8181
{%- endfor %}
82-
{%- if cable_len -%}
82+
{%- if port_name in PORT_DPC -%}
83+
{{ '0m' }}
84+
{%- elif cable_len -%}
8385
{{ cable_len.0 }}
8486
{%- else %}
8587
{%- if 'torrouter' in switch_role.lower() and 'mgmt' not in switch_role.lower()%}

files/build_templates/qos_config.j2

+16
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,18 @@
9696
{{- generate_tc_to_pg_map_per_sku() }}
9797
{% else %}
9898
"TC_TO_PRIORITY_GROUP_MAP": {
99+
{% if PORT_DPC %}
100+
"AZURE_DPC": {
101+
"0": "0",
102+
"1": "0",
103+
"2": "0",
104+
"3": "0",
105+
"4": "0",
106+
"5": "0",
107+
"6": "0",
108+
"7": "7"
109+
},
110+
{% endif %}
99111
"AZURE": {
100112
"0": "0",
101113
"1": "0",
@@ -351,7 +363,11 @@
351363
{% endif %}
352364
"pfcwd_sw_enable" : "3,4",
353365
{% endif %}
366+
{% if port not in PORT_DPC %}
354367
"tc_to_pg_map" : "AZURE",
368+
{% else %}
369+
"tc_to_pg_map" : "AZURE_DPC",
370+
{% endif %}
355371
"pfc_to_queue_map": "AZURE"
356372
}{% if not loop.last %},{% endif %}
357373

src/sonic-config-engine/tests/sample_output/py3/qos-mellanox4700-o28-t1-smartswitch.json

+4-16
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@
1414
"Ethernet224": {
1515
"dscp_to_tc_map": "AZURE",
1616
"tc_to_queue_map": "AZURE",
17-
"tc_to_pg_map": "AZURE",
17+
"tc_to_pg_map": "AZURE_DPC",
1818
"pfc_to_queue_map": "AZURE"
1919
},
2020
"Ethernet232": {
2121
"dscp_to_tc_map": "AZURE",
2222
"tc_to_queue_map": "AZURE",
23-
"tc_to_pg_map": "AZURE",
23+
"tc_to_pg_map": "AZURE_DPC",
2424
"pfc_to_queue_map": "AZURE"
2525
},
2626
"Ethernet240": {
2727
"dscp_to_tc_map": "AZURE",
2828
"tc_to_queue_map": "AZURE",
29-
"tc_to_pg_map": "AZURE",
29+
"tc_to_pg_map": "AZURE_DPC",
3030
"pfc_to_queue_map": "AZURE"
3131
},
3232
"Ethernet248": {
3333
"dscp_to_tc_map": "AZURE",
3434
"tc_to_queue_map": "AZURE",
35-
"tc_to_pg_map": "AZURE",
35+
"tc_to_pg_map": "AZURE_DPC",
3636
"pfc_to_queue_map": "AZURE"
3737
}
3838
},
@@ -415,27 +415,15 @@
415415
"Ethernet216|0": {
416416
"profile": "ingress_lossy_profile"
417417
},
418-
"Ethernet224|3-4": {
419-
"profile": "ingress_lossy_profile"
420-
},
421418
"Ethernet224|0": {
422419
"profile": "ingress_lossy_profile"
423420
},
424-
"Ethernet232|3-4": {
425-
"profile": "ingress_lossy_profile"
426-
},
427421
"Ethernet232|0": {
428422
"profile": "ingress_lossy_profile"
429423
},
430-
"Ethernet240|3-4": {
431-
"profile": "ingress_lossy_profile"
432-
},
433424
"Ethernet240|0": {
434425
"profile": "ingress_lossy_profile"
435426
},
436-
"Ethernet248|3-4": {
437-
"profile": "ingress_lossy_profile"
438-
},
439427
"Ethernet248|0": {
440428
"profile": "ingress_lossy_profile"
441429
},

src/sonic-config-engine/tests/sample_output/py3/qos-mellanox4700-o28-t1-smartswitch_dyn.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@
1414
"Ethernet224": {
1515
"dscp_to_tc_map": "AZURE",
1616
"tc_to_queue_map": "AZURE",
17-
"tc_to_pg_map": "AZURE",
17+
"tc_to_pg_map": "AZURE_DPC",
1818
"pfc_to_queue_map": "AZURE"
1919
},
2020
"Ethernet232": {
2121
"dscp_to_tc_map": "AZURE",
2222
"tc_to_queue_map": "AZURE",
23-
"tc_to_pg_map": "AZURE",
23+
"tc_to_pg_map": "AZURE_DPC",
2424
"pfc_to_queue_map": "AZURE"
2525
},
2626
"Ethernet240": {
2727
"dscp_to_tc_map": "AZURE",
2828
"tc_to_queue_map": "AZURE",
29-
"tc_to_pg_map": "AZURE",
29+
"tc_to_pg_map": "AZURE_DPC",
3030
"pfc_to_queue_map": "AZURE"
3131
},
3232
"Ethernet248": {
3333
"dscp_to_tc_map": "AZURE",
3434
"tc_to_queue_map": "AZURE",
35-
"tc_to_pg_map": "AZURE",
35+
"tc_to_pg_map": "AZURE_DPC",
3636
"pfc_to_queue_map": "AZURE"
3737
}
3838
},
@@ -391,25 +391,25 @@
391391
"profile": "ingress_lossy_profile"
392392
},
393393
"Ethernet224|3-4": {
394-
"profile": "ingress_lossy_profile"
394+
"profile": "NULL"
395395
},
396396
"Ethernet224|0": {
397397
"profile": "ingress_lossy_profile"
398398
},
399399
"Ethernet232|3-4": {
400-
"profile": "ingress_lossy_profile"
400+
"profile": "NULL"
401401
},
402402
"Ethernet232|0": {
403403
"profile": "ingress_lossy_profile"
404404
},
405405
"Ethernet240|3-4": {
406-
"profile": "ingress_lossy_profile"
406+
"profile": "NULL"
407407
},
408408
"Ethernet240|0": {
409409
"profile": "ingress_lossy_profile"
410410
},
411411
"Ethernet248|3-4": {
412-
"profile": "ingress_lossy_profile"
412+
"profile": "NULL"
413413
},
414414
"Ethernet248|0": {
415415
"profile": "ingress_lossy_profile"

0 commit comments

Comments
 (0)