Skip to content

Commit dc79935

Browse files
authored
Support different DSCP_TO_TC_MAP for T1 in dualtor deployment (#11569)
* Support different DSCP_TO_TC_MAP for T1 in dualtor deployment
1 parent de4755b commit dc79935

File tree

9 files changed

+208
-89
lines changed

9 files changed

+208
-89
lines changed

device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_extra_pgs.j2

-20
This file was deleted.

device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_extra_pgs.j2

-1
This file was deleted.

device/common/profiles/th2/7260/BALANCED/buffers_defaults_t1.j2

-4
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,7 @@
5151
{%- endmacro %}
5252

5353
{% import 'buffers_extra_queues.j2' as defs1 with context %}
54-
{% import 'buffers_extra_pgs.j2' as defs2 with context %}
5554

5655
{%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %}
5756
{{ defs1.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }}
5857
{%- endmacro %}
59-
{%- macro generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pgs) %}
60-
{{ defs2.generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pgs) }}
61-
{%- endmacro %}

device/common/profiles/th2/7260/BALANCED/qos.json.j2

+67
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{% if ('type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter') %}
2+
{% set different_dscp_to_tc_map = true %}
23
{%- macro generate_dscp_to_tc_map() %}
34
"DSCP_TO_TC_MAP": {
45
"AZURE": {
@@ -66,6 +67,72 @@
6667
"61": "1",
6768
"62": "1",
6869
"63": "1"
70+
},
71+
"AZURE_UPLINK": {
72+
"0" : "1",
73+
"1" : "1",
74+
"2" : "1",
75+
"3" : "3",
76+
"4" : "4",
77+
"5" : "1",
78+
"6" : "1",
79+
"7" : "1",
80+
"8" : "0",
81+
"9" : "1",
82+
"10": "1",
83+
"11": "1",
84+
"12": "1",
85+
"13": "1",
86+
"14": "1",
87+
"15": "1",
88+
"16": "1",
89+
"17": "1",
90+
"18": "1",
91+
"19": "1",
92+
"20": "1",
93+
"21": "1",
94+
"22": "1",
95+
"23": "1",
96+
"24": "1",
97+
"25": "1",
98+
"26": "1",
99+
"27": "1",
100+
"28": "1",
101+
"29": "1",
102+
"30": "1",
103+
"31": "1",
104+
"32": "1",
105+
"33": "1",
106+
"34": "1",
107+
"35": "1",
108+
"36": "1",
109+
"37": "1",
110+
"38": "1",
111+
"39": "1",
112+
"40": "1",
113+
"41": "1",
114+
"42": "1",
115+
"43": "1",
116+
"44": "1",
117+
"45": "1",
118+
"46": "5",
119+
"47": "1",
120+
"48": "7",
121+
"49": "1",
122+
"50": "1",
123+
"51": "1",
124+
"52": "1",
125+
"53": "1",
126+
"54": "1",
127+
"55": "1",
128+
"56": "1",
129+
"57": "1",
130+
"58": "1",
131+
"59": "1",
132+
"60": "1",
133+
"61": "1",
134+
"62": "1",
135+
"63": "1"
69136
}
70137
},
71138
{%- endmacro %}

device/common/profiles/th2/7260/RDMA-CENTRIC/buffers_defaults_t1.j2

+1-4
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,8 @@
5151
{%- endmacro %}
5252

5353
{% import 'buffers_extra_queues.j2' as defs1 with context %}
54-
{% import 'buffers_extra_pgs.j2' as defs2 with context %}
5554

5655
{%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %}
5756
{{ defs1.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }}
5857
{%- endmacro %}
59-
{%- macro generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pgs) %}
60-
{{ defs2.generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pgs) }}
61-
{%- endmacro %}
58+

device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2

+66
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,72 @@
6666
"61": "1",
6767
"62": "1",
6868
"63": "1"
69+
},
70+
"AZURE_UPLINK": {
71+
"0" : "1",
72+
"1" : "1",
73+
"2" : "1",
74+
"3" : "3",
75+
"4" : "4",
76+
"5" : "1",
77+
"6" : "1",
78+
"7" : "1",
79+
"8" : "0",
80+
"9" : "1",
81+
"10": "1",
82+
"11": "1",
83+
"12": "1",
84+
"13": "1",
85+
"14": "1",
86+
"15": "1",
87+
"16": "1",
88+
"17": "1",
89+
"18": "1",
90+
"19": "1",
91+
"20": "1",
92+
"21": "1",
93+
"22": "1",
94+
"23": "1",
95+
"24": "1",
96+
"25": "1",
97+
"26": "1",
98+
"27": "1",
99+
"28": "1",
100+
"29": "1",
101+
"30": "1",
102+
"31": "1",
103+
"32": "1",
104+
"33": "1",
105+
"34": "1",
106+
"35": "1",
107+
"36": "1",
108+
"37": "1",
109+
"38": "1",
110+
"39": "1",
111+
"40": "1",
112+
"41": "1",
113+
"42": "1",
114+
"43": "1",
115+
"44": "1",
116+
"45": "1",
117+
"46": "5",
118+
"47": "1",
119+
"48": "7",
120+
"49": "1",
121+
"50": "1",
122+
"51": "1",
123+
"52": "1",
124+
"53": "1",
125+
"54": "1",
126+
"55": "1",
127+
"56": "1",
128+
"57": "1",
129+
"58": "1",
130+
"59": "1",
131+
"60": "1",
132+
"61": "1",
133+
"62": "1",
134+
"63": "1"
69135
}
70136
},
71137
{%- endmacro %}

files/build_templates/buffers_config.j2

-4
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,6 @@ def
172172
{{ defs.generate_pg_profiles_with_extra_lossless_pgs_with_inactive_ports(port_names_active, port_names_extra_queues, port_names_inactive) }},
173173
{% elif defs.generate_pg_profiles_with_inactive_ports is defined %}
174174
{{ defs.generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) }},
175-
{% elif (defs.generate_pg_buffers_with_extra_lossy_pgs is defined) and (port_names_extra_queues != '') %}
176-
{{ defs.generate_pg_buffers_with_extra_lossy_pgs(port_names_active, port_names_extra_queues) }}
177-
{% elif (defs.generate_pg_buffers_with_extra_lossy_pgs_with_inactive_ports is defined) and (port_names_extra_queues != '') %}
178-
{{ defs.generate_pg_buffers_with_extra_lossy_pgs_with_inactive_ports(port_names_active, port_names_extra_queues, port_names_inactive) }}
179175
{% elif defs.generate_pg_profils is defined %}
180176
{{ defs.generate_pg_profils(port_names_active) }}
181177
{% else %}

src/sonic-config-engine/tests/sample_output/py3/buffer-arista7260-t1.json

-48
Original file line numberDiff line numberDiff line change
@@ -112,21 +112,9 @@
112112
"Ethernet0|0": {
113113
"profile" : "ingress_lossy_profile"
114114
},
115-
"Ethernet0|2": {
116-
"profile" : "ingress_lossy_profile"
117-
},
118-
"Ethernet0|6": {
119-
"profile" : "ingress_lossy_profile"
120-
},
121115
"Ethernet4|0": {
122116
"profile" : "ingress_lossy_profile"
123117
},
124-
"Ethernet4|2": {
125-
"profile" : "ingress_lossy_profile"
126-
},
127-
"Ethernet4|6": {
128-
"profile" : "ingress_lossy_profile"
129-
},
130118
"Ethernet144|0": {
131119
"profile" : "ingress_lossy_profile"
132120
},
@@ -136,21 +124,9 @@
136124
"Ethernet16|0": {
137125
"profile" : "ingress_lossy_profile"
138126
},
139-
"Ethernet16|2": {
140-
"profile" : "ingress_lossy_profile"
141-
},
142-
"Ethernet16|6": {
143-
"profile" : "ingress_lossy_profile"
144-
},
145127
"Ethernet20|0": {
146128
"profile" : "ingress_lossy_profile"
147129
},
148-
"Ethernet20|2": {
149-
"profile" : "ingress_lossy_profile"
150-
},
151-
"Ethernet20|6": {
152-
"profile" : "ingress_lossy_profile"
153-
},
154130
"Ethernet152|0": {
155131
"profile" : "ingress_lossy_profile"
156132
},
@@ -160,21 +136,9 @@
160136
"Ethernet64|0": {
161137
"profile" : "ingress_lossy_profile"
162138
},
163-
"Ethernet64|2": {
164-
"profile" : "ingress_lossy_profile"
165-
},
166-
"Ethernet64|6": {
167-
"profile" : "ingress_lossy_profile"
168-
},
169139
"Ethernet68|0": {
170140
"profile" : "ingress_lossy_profile"
171141
},
172-
"Ethernet68|2": {
173-
"profile" : "ingress_lossy_profile"
174-
},
175-
"Ethernet68|6": {
176-
"profile" : "ingress_lossy_profile"
177-
},
178142
"Ethernet168|0": {
179143
"profile" : "ingress_lossy_profile"
180144
},
@@ -184,21 +148,9 @@
184148
"Ethernet80|0": {
185149
"profile" : "ingress_lossy_profile"
186150
},
187-
"Ethernet80|2": {
188-
"profile" : "ingress_lossy_profile"
189-
},
190-
"Ethernet80|6": {
191-
"profile" : "ingress_lossy_profile"
192-
},
193151
"Ethernet84|0": {
194152
"profile" : "ingress_lossy_profile"
195153
},
196-
"Ethernet84|2": {
197-
"profile" : "ingress_lossy_profile"
198-
},
199-
"Ethernet84|6": {
200-
"profile" : "ingress_lossy_profile"
201-
},
202154
"Ethernet180|0": {
203155
"profile" : "ingress_lossy_profile"
204156
},

0 commit comments

Comments
 (0)