Skip to content

Commit 651aa91

Browse files
authored
[Arista7060] Add PFC configuration (#1506)
1 parent 56efb41 commit 651aa91

File tree

6 files changed

+281
-1
lines changed

6 files changed

+281
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{%- set default_topo = 't1' %}
2+
{%- include 'buffers_config.j2' %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
{%- set default_cable = '5m' %}
3+
4+
{%- macro generate_port_lists(PORT_ALL) %}
5+
{# Generate list of ports #}
6+
{%- for port_idx in range(0,128,4) %}
7+
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
8+
{%- endfor %}
9+
{%- endmacro %}
10+
11+
{%- macro generate_buffer_pool_and_profiles() %}
12+
"BUFFER_POOL": {
13+
"ingress_lossless_pool": {
14+
"size": "11213696",
15+
"type": "ingress",
16+
"mode": "dynamic",
17+
"xoff": "3855488"
18+
},
19+
"egress_lossy_pool": {
20+
"size": "9532224",
21+
"type": "egress",
22+
"mode": "dynamic"
23+
},
24+
"egress_lossless_pool": {
25+
"size": "15982720",
26+
"type": "egress",
27+
"mode": "static"
28+
}
29+
},
30+
"BUFFER_PROFILE": {
31+
"ingress_lossy_profile": {
32+
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
33+
"size":"0",
34+
"dynamic_th":"3"
35+
},
36+
"egress_lossless_profile": {
37+
"pool":"[BUFFER_POOL|egress_lossless_pool]",
38+
"size":"1518",
39+
"static_th":"3995680"
40+
},
41+
"egress_lossy_profile": {
42+
"pool":"[BUFFER_POOL|egress_lossy_pool]",
43+
"size":"1518",
44+
"dynamic_th":"3"
45+
}
46+
},
47+
{%- endmacro %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
{%- set default_cable = '40m' %}
3+
4+
{%- macro generate_port_lists(PORT_ALL) %}
5+
{# Generate list of ports #}
6+
{%- for port_idx in range(0,128,4) %}
7+
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
8+
{%- endfor %}
9+
{%- endmacro %}
10+
11+
{%- macro generate_buffer_pool_and_profiles() %}
12+
"BUFFER_POOL": {
13+
"ingress_lossless_pool": {
14+
"size": "10443264",
15+
"type": "ingress",
16+
"mode": "dynamic",
17+
"xoff": "4625920"
18+
},
19+
"egress_lossy_pool": {
20+
"size": "8877440",
21+
"type": "egress",
22+
"mode": "dynamic"
23+
},
24+
"egress_lossless_pool": {
25+
"size": "15982720",
26+
"type": "egress",
27+
"mode": "static"
28+
}
29+
},
30+
"BUFFER_PROFILE": {
31+
"ingress_lossy_profile": {
32+
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
33+
"size":"0",
34+
"dynamic_th":"3"
35+
},
36+
"egress_lossless_profile": {
37+
"pool":"[BUFFER_POOL|egress_lossless_pool]",
38+
"size":"1518",
39+
"static_th":"3995680"
40+
},
41+
"egress_lossy_profile": {
42+
"pool":"[BUFFER_POOL|egress_lossy_pool]",
43+
"size":"1518",
44+
"dynamic_th":"3"
45+
}
46+
},
47+
{%- endmacro %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# PG lossless profiles.
2+
# speed cable size xon xoff threshold xon_offset
3+
10000 5m 1248 2288 35776 -4 2288
4+
25000 5m 1248 2288 53248 -4 2288
5+
40000 5m 1248 2288 66560 -4 2288
6+
50000 5m 1248 2288 90272 -4 2288
7+
100000 5m 1248 2288 165568 -4 2288
8+
10000 40m 1248 2288 37024 -4 2288
9+
25000 40m 1248 2288 53248 -4 2288
10+
40000 40m 1248 2288 71552 -4 2288
11+
50000 40m 1248 2288 96096 -4 2288
12+
100000 40m 1248 2288 177632 -4 2288
13+
10000 300m 1248 2288 46176 -4 2288
14+
25000 300m 1248 2288 79040 -4 2288
15+
40000 300m 1248 2288 108160 -4 2288
16+
50000 300m 1248 2288 141856 -4 2288
17+
100000 300m 1248 2288 268736 -4 2288
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
{
2+
"TC_TO_PRIORITY_GROUP_MAP": {
3+
"AZURE": {
4+
"0": "0",
5+
"1": "1",
6+
"2": "2",
7+
"3": "3",
8+
"4": "4",
9+
"5": "5",
10+
"6": "6",
11+
"7": "7"
12+
}
13+
},
14+
"MAP_PFC_PRIORITY_TO_QUEUE": {
15+
"AZURE": {
16+
"0": "0",
17+
"1": "1",
18+
"2": "2",
19+
"3": "3",
20+
"4": "4",
21+
"5": "5",
22+
"6": "6",
23+
"7": "7"
24+
}
25+
},
26+
"TC_TO_QUEUE_MAP": {
27+
"AZURE": {
28+
"0": "0",
29+
"1": "1",
30+
"2": "2",
31+
"3": "3",
32+
"4": "4",
33+
"5": "5",
34+
"6": "6",
35+
"7": "7"
36+
}
37+
},
38+
"DSCP_TO_TC_MAP": {
39+
"AZURE": {
40+
"0":"0",
41+
"1":"0",
42+
"2":"0",
43+
"3":"3",
44+
"4":"4",
45+
"5":"0",
46+
"6":"0",
47+
"7":"0",
48+
"8":"1",
49+
"9":"0",
50+
"10":"0",
51+
"11":"0",
52+
"12":"0",
53+
"13":"0",
54+
"14":"0",
55+
"15":"0",
56+
"16":"0",
57+
"17":"0",
58+
"18":"0",
59+
"19":"0",
60+
"20":"0",
61+
"21":"0",
62+
"22":"0",
63+
"23":"0",
64+
"24":"0",
65+
"25":"0",
66+
"26":"0",
67+
"27":"0",
68+
"28":"0",
69+
"29":"0",
70+
"30":"0",
71+
"31":"0",
72+
"32":"0",
73+
"33":"0",
74+
"34":"0",
75+
"35":"0",
76+
"36":"0",
77+
"37":"0",
78+
"38":"0",
79+
"39":"0",
80+
"40":"0",
81+
"41":"0",
82+
"42":"0",
83+
"43":"0",
84+
"44":"0",
85+
"45":"0",
86+
"46":"0",
87+
"47":"0",
88+
"48":"0",
89+
"49":"0",
90+
"50":"0",
91+
"51":"0",
92+
"52":"0",
93+
"53":"0",
94+
"54":"0",
95+
"55":"0",
96+
"56":"0",
97+
"57":"0",
98+
"58":"0",
99+
"59":"0",
100+
"60":"0",
101+
"61":"0",
102+
"62":"0",
103+
"63":"0"
104+
}
105+
},
106+
"SCHEDULER": {
107+
"scheduler.0" : {
108+
"type":"DWRR",
109+
"weight": "25"
110+
},
111+
"scheduler.1" : {
112+
"type":"DWRR",
113+
"weight": "30"
114+
},
115+
"scheduler.2" : {
116+
"type":"DWRR",
117+
"weight": "20"
118+
}
119+
},
120+
"PORT_QOS_MAP": {
121+
"Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124": {
122+
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
123+
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
124+
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
125+
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
126+
"pfc_enable": "3,4"
127+
}
128+
},
129+
"WRED_PROFILE": {
130+
"AZURE_LOSSY" : {
131+
"wred_green_enable":"true",
132+
"wred_yellow_enable":"true",
133+
"ecn":"ecn_all",
134+
"red_max_threshold":"512000",
135+
"red_min_threshold":"512000",
136+
"yellow_max_threshold":"512000",
137+
"yellow_min_threshold":"512000",
138+
"green_max_threshold": "184320",
139+
"green_min_threshold": "184320"
140+
},
141+
"AZURE_LOSSLESS" : {
142+
"wred_green_enable":"true",
143+
"wred_yellow_enable":"true",
144+
"ecn":"ecn_all",
145+
"red_max_threshold":"512000",
146+
"red_min_threshold":"512000",
147+
"yellow_max_threshold":"512000",
148+
"yellow_min_threshold":"512000",
149+
"green_max_threshold": "184320",
150+
"green_min_threshold": "184320"
151+
}
152+
},
153+
"QUEUE": {
154+
"Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|0-1" : {
155+
"wred_profile" : "[WRED_PROFILE|AZURE_LOSSY]"
156+
},
157+
"Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124!3-4" : {
158+
"scheduler" : "[SCHEDULER|scheduler.0]"
159+
},
160+
"Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124!0" : {
161+
"scheduler" : "[SCHEDULER|scheduler.1]"
162+
},
163+
"Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124!1" : {
164+
"scheduler" : "[SCHEDULER|scheduler.2]"
165+
}
166+
}
167+
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SAI_INIT_CONFIG_FILE=/etc/bcm/th-a7060-cx32s-32x100G.config.bcm
1+
SAI_INIT_CONFIG_FILE=/etc/bcm/th-a7060-cx32s-32x100G-t1.config.bcm

0 commit comments

Comments
 (0)