Skip to content

Commit b65e06f

Browse files
authored
two platforms supporting S3IP SYSFS (TCS8400, TCS9400) (sonic-net#12386)
Why I did it Add two platform that support s3IP framework How I did it Add two platforms supporting S3IP SYSFS (TCS8400, TCS9400) How to verify it Manual test
1 parent bb09ebe commit b65e06f

File tree

333 files changed

+103583
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

333 files changed

+103583
-1
lines changed

device/tencent/x86_64-tencent_tcs8400-r0/TCS8400-24CC8CD/TCS8400-24CC8CD.yml

+574
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# name lanes alias index speed
2+
Ethernet1 25,26,27,28 Eth200GE0/1 1 200000
3+
Ethernet2 29,30,31,32 Eth200GE0/2 2 200000
4+
Ethernet3 41,42,43,44 Eth200GE0/3 3 200000
5+
Ethernet4 45,46,47,48 Eth200GE0/4 4 200000
6+
Ethernet5 49,50,51,52 Eth200GE0/5 5 200000
7+
Ethernet6 53,54,55,56 Eth200GE0/6 6 200000
8+
Ethernet7 57,58,59,60 Eth200GE0/7 7 200000
9+
Ethernet8 61,62,63,64 Eth200GE0/8 8 200000
10+
Ethernet9 9,10,11,12 Eth200GE0/9 9 200000
11+
Ethernet10 13,14,15,16 Eth200GE0/10 10 200000
12+
Ethernet11 17,18,19,20 Eth200GE0/11 11 200000
13+
Ethernet12 21,22,23,24 Eth200GE0/12 12 200000
14+
Ethernet13 81,82,83,84 Eth200GE0/13 13 200000
15+
Ethernet14 85,86,87,88 Eth200GE0/14 14 200000
16+
Ethernet15 89,90,91,92 Eth200GE0/15 15 200000
17+
Ethernet16 93,94,95,96 Eth200GE0/16 16 200000
18+
Ethernet17 97,98,99,100 Eth200GE0/17 17 200000
19+
Ethernet18 101,102,103,104 Eth200GE0/18 18 200000
20+
Ethernet19 137,138,139,140 Eth200GE0/19 19 200000
21+
Ethernet20 141,142,143,144 Eth200GE0/20 20 200000
22+
Ethernet21 145,146,147,148 Eth200GE0/21 21 200000
23+
Ethernet22 149,150,151,152 Eth200GE0/22 22 200000
24+
Ethernet23 153,154,155,156 Eth200GE0/23 23 200000
25+
Ethernet24 157,158,159,160 Eth200GE0/24 24 200000
26+
Ethernet25 1,2,3,4,5,6,7,8 Eth400GE0/25 25 400000
27+
Ethernet26 33,34,35,36,37,38,39,40 Eth400GE0/26 26 400000
28+
Ethernet27 65,66,67,68,69,70,71,72 Eth400GE0/27 27 400000
29+
Ethernet28 73,74,75,76,77,78,79,80 Eth400GE0/28 28 400000
30+
Ethernet29 105,106,107,108,109,110,111,112 Eth400GE0/29 29 400000
31+
Ethernet30 113,114,115,116,117,118,119,120 Eth400GE0/30 30 400000
32+
Ethernet31 121,122,123,124,125,126,127,128 Eth400GE0/31 31 400000
33+
Ethernet32 129,130,131,132,133,134,135,136 Eth400GE0/32 32 400000
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/TCS8400-24CC8CD.yml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,268 @@
1+
{
2+
"DEVICE_METADATA": {
3+
"localhost": {
4+
"hwsku": "TCS8400-24CC8CD",
5+
"platform": "x86_64-tencent_tcs8400-r0",
6+
"mac": "58:69:6c:f1:23:12",
7+
"hostname": "sonic"
8+
}
9+
},
10+
"PORT": {
11+
"Ethernet1": {
12+
"lanes": "25,26,27,28",
13+
"alias": "Eth200GE0/1",
14+
"index": "1",
15+
"speed": "200000",
16+
"admin_status": "up",
17+
"mtu": "9100"
18+
},
19+
"Ethernet2": {
20+
"lanes": "29,30,31,32",
21+
"alias": "Eth200GE0/2",
22+
"index": "2",
23+
"speed": "200000",
24+
"admin_status": "up",
25+
"mtu": "9100"
26+
},
27+
"Ethernet3": {
28+
"lanes": "41,42,43,44",
29+
"alias": "Eth200GE0/3",
30+
"index": "3",
31+
"speed": "200000",
32+
"admin_status": "up",
33+
"mtu": "9100"
34+
},
35+
"Ethernet4": {
36+
"lanes": "45,46,47,48",
37+
"alias": "Eth200GE0/4",
38+
"index": "4",
39+
"speed": "200000",
40+
"admin_status": "up",
41+
"mtu": "9100"
42+
},
43+
"Ethernet5": {
44+
"lanes": "49,50,51,52",
45+
"alias": "Eth200GE0/5",
46+
"index": "5",
47+
"speed": "200000",
48+
"admin_status": "up",
49+
"mtu": "9100"
50+
},
51+
"Ethernet6": {
52+
"lanes": "53,54,55,56",
53+
"alias": "Eth200GE0/6",
54+
"index": "6",
55+
"speed": "200000",
56+
"admin_status": "up",
57+
"mtu": "9100"
58+
},
59+
"Ethernet7": {
60+
"lanes": "57,58,59,60",
61+
"alias": "Eth200GE0/7",
62+
"index": "7",
63+
"speed": "200000",
64+
"admin_status": "up",
65+
"mtu": "9100"
66+
},
67+
"Ethernet8": {
68+
"lanes": "61,62,63,64",
69+
"alias": "Eth200GE0/8",
70+
"index": "8",
71+
"speed": "200000",
72+
"admin_status": "up",
73+
"mtu": "9100"
74+
},
75+
"Ethernet9": {
76+
"lanes": "9,10,11,12",
77+
"alias": "Eth200GE0/9",
78+
"index": "9",
79+
"speed": "200000",
80+
"admin_status": "up",
81+
"mtu": "9100"
82+
},
83+
"Ethernet10": {
84+
"lanes": "13,14,15,16",
85+
"alias": "Eth200GE0/10",
86+
"index": "10",
87+
"speed": "200000",
88+
"admin_status": "up",
89+
"mtu": "9100"
90+
},
91+
"Ethernet11": {
92+
"lanes": "17,18,19,20",
93+
"alias": "Eth200GE0/11",
94+
"index": "11",
95+
"speed": "200000",
96+
"admin_status": "up",
97+
"mtu": "9100"
98+
},
99+
"Ethernet12": {
100+
"lanes": "21,22,23,24",
101+
"alias": "Eth200GE0/12",
102+
"index": "12",
103+
"speed": "200000",
104+
"admin_status": "up",
105+
"mtu": "9100"
106+
},
107+
"Ethernet13": {
108+
"lanes": "81,82,83,84",
109+
"alias": "Eth200GE0/13",
110+
"index": "13",
111+
"speed": "200000",
112+
"admin_status": "up",
113+
"mtu": "9100"
114+
},
115+
"Ethernet14": {
116+
"lanes": "85,86,87,88",
117+
"alias": "Eth200GE0/14",
118+
"index": "14",
119+
"speed": "200000",
120+
"admin_status": "up",
121+
"mtu": "9100"
122+
},
123+
"Ethernet15": {
124+
"lanes": "89,90,91,92",
125+
"alias": "Eth200GE0/15",
126+
"index": "15",
127+
"speed": "200000",
128+
"admin_status": "up",
129+
"mtu": "9100"
130+
},
131+
"Ethernet16": {
132+
"lanes": "93,94,95,96",
133+
"alias": "Eth200GE0/16",
134+
"index": "16",
135+
"speed": "200000",
136+
"admin_status": "up",
137+
"mtu": "9100"
138+
},
139+
"Ethernet17": {
140+
"lanes": "97,98,99,100",
141+
"alias": "Eth200GE0/17",
142+
"index": "17",
143+
"speed": "200000",
144+
"admin_status": "up",
145+
"mtu": "9100"
146+
},
147+
"Ethernet18": {
148+
"lanes": "101,102,103,104",
149+
"alias": "Eth200GE0/18",
150+
"index": "18",
151+
"speed": "200000",
152+
"admin_status": "up",
153+
"mtu": "9100"
154+
},
155+
"Ethernet19": {
156+
"lanes": "137,138,139,140",
157+
"alias": "Eth200GE0/19",
158+
"index": "19",
159+
"speed": "200000",
160+
"admin_status": "up",
161+
"mtu": "9100"
162+
},
163+
"Ethernet20": {
164+
"lanes": "141,142,143,144",
165+
"alias": "Eth200GE0/20",
166+
"index": "20",
167+
"speed": "200000",
168+
"admin_status": "up",
169+
"mtu": "9100"
170+
},
171+
"Ethernet21": {
172+
"lanes": "145,146,147,148",
173+
"alias": "Eth200GE0/21",
174+
"index": "21",
175+
"speed": "200000",
176+
"admin_status": "up",
177+
"mtu": "9100"
178+
},
179+
"Ethernet22": {
180+
"lanes": "149,150,151,152",
181+
"alias": "Eth200GE0/22",
182+
"index": "22",
183+
"speed": "200000",
184+
"admin_status": "up",
185+
"mtu": "9100"
186+
},
187+
"Ethernet23": {
188+
"lanes": "153,154,155,156",
189+
"alias": "Eth200GE0/23",
190+
"index": "23",
191+
"speed": "200000",
192+
"admin_status": "up",
193+
"mtu": "9100"
194+
},
195+
"Ethernet24": {
196+
"lanes": "157,158,159,160",
197+
"alias": "Eth200GE0/24",
198+
"index": "24",
199+
"speed": "200000",
200+
"admin_status": "up",
201+
"mtu": "9100"
202+
},
203+
"Ethernet25": {
204+
"lanes": "1,2,3,4,5,6,7,8",
205+
"alias": "Eth400GE0/25",
206+
"index": "25",
207+
"speed": "400000",
208+
"admin_status": "up",
209+
"mtu": "9100"
210+
},
211+
"Ethernet26": {
212+
"lanes": "33,34,35,36,37,38,39,40",
213+
"alias": "Eth400GE0/26",
214+
"index": "26",
215+
"speed": "400000",
216+
"admin_status": "up",
217+
"mtu": "9100"
218+
},
219+
"Ethernet27": {
220+
"lanes": "65,66,67,68,69,70,71,72",
221+
"alias": "Eth400GE0/27",
222+
"index": "27",
223+
"speed": "400000",
224+
"admin_status": "up",
225+
"mtu": "9100"
226+
},
227+
"Ethernet28": {
228+
"lanes": "73,74,75,76,77,78,79,80",
229+
"alias": "Eth400GE0/28",
230+
"index": "28",
231+
"speed": "400000",
232+
"admin_status": "up",
233+
"mtu": "9100"
234+
},
235+
"Ethernet29": {
236+
"lanes": "105,106,107,108,109,110,111,112",
237+
"alias": "Eth400GE0/29",
238+
"index": "29",
239+
"speed": "400000",
240+
"admin_status": "up",
241+
"mtu": "9100"
242+
},
243+
"Ethernet30": {
244+
"lanes": "113,114,115,116,117,118,119,120",
245+
"alias": "Eth400GE0/30",
246+
"index": "30",
247+
"speed": "400000",
248+
"admin_status": "up",
249+
"mtu": "9100"
250+
},
251+
"Ethernet31": {
252+
"lanes": "121,122,123,124,125,126,127,128",
253+
"alias": "Eth400GE0/31",
254+
"index": "31",
255+
"speed": "400000",
256+
"admin_status": "up",
257+
"mtu": "9100"
258+
},
259+
"Ethernet32": {
260+
"lanes": "129,130,131,132,133,134,135,136",
261+
"alias": "Eth400GE0/32",
262+
"index": "32",
263+
"speed": "400000",
264+
"admin_status": "up",
265+
"mtu": "9100"
266+
}
267+
}
268+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
cint_reset();
2+
3+
int cint_field_group_create(int unit, bcm_field_group_t grp)
4+
{
5+
int rv;
6+
7+
bcm_field_qset_t qset;
8+
bcm_field_aset_t aset;
9+
10+
BCM_FIELD_QSET_INIT(qset);
11+
BCM_FIELD_QSET_ADD(qset,bcmFieldQualifyDstMac);
12+
BCM_FIELD_QSET_ADD(qset, bcmFieldQualifyStageIngress);
13+
14+
BCM_FIELD_ASET_INIT(aset);
15+
BCM_FIELD_ASET_ADD(aset, bcmFieldActionCopyToCpu);
16+
17+
rv = bcm_field_group_create_mode_id(unit, qset, 103, bcmFieldGroupModeAuto, grp);
18+
if (rv != BCM_E_NONE) {
19+
printf("bcm_field_group_create_mode_id failed, rv = %d\r\n", rv);
20+
return -1;
21+
}
22+
printf("cint_field_group_create success!!!, rv = %d\r\n", rv);
23+
24+
bcm_field_group_dump(unit,grp);
25+
return 0;
26+
}
27+
28+
int cint_field_entry_create1(int unit, bcm_field_group_t grp,bcm_field_entry_t entry)
29+
{
30+
int rv;
31+
bcm_mac_t dst_mac = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
32+
bcm_mac_t mac_mask = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
33+
34+
rv = bcm_field_entry_create_id(unit, grp, entry);
35+
if (rv != BCM_E_NONE) {
36+
printf("bcm_field_entry_create_id failed, rv = %d\r\n", rv);
37+
return -1;
38+
}
39+
40+
41+
rv =bcm_field_qualify_DstMac(unit, entry, dst_mac, mac_mask);
42+
if (rv != BCM_E_NONE) {
43+
printf("bcm_field_qualify_DstMac failed,ret = %d\r\n", rv);
44+
bcm_field_entry_destroy(unit, entry);
45+
return -1;
46+
}
47+
48+
rv = bcm_field_action_add(unit, entry, bcmFieldActionCopyToCpu, 1, 0);
49+
if (rv != BCM_E_NONE) {
50+
printf("bcm_field_action_add failed, rv = %d \r\n", rv);
51+
bcm_field_entry_destroy(unit, entry);
52+
return -1;
53+
}
54+
55+
rv = bcm_field_action_add(unit, entry, bcmFieldActionDrop, 1, 0);
56+
if (rv != BCM_E_NONE) {
57+
printf("bcm_field_action_add failed, rv = %d \r\n", rv);
58+
bcm_field_entry_destroy(unit, entry);
59+
return -1;
60+
}
61+
62+
rv = bcm_field_entry_install(unit, entry);
63+
if (rv != BCM_E_NONE) {
64+
printf("bcm_field_entry_install failed,ret = %d\r\n", rv);
65+
bcm_field_entry_destroy(unit, entry);
66+
return -1;
67+
}
68+
69+
printf("********************* BEGIN ****************************\r\n");
70+
bcm_field_entry_dump(unit, entry);
71+
printf("*********************** END ****************************\r\n");
72+
73+
return 0;
74+
}
75+
76+
cint_field_group_create(0,5);
77+
cint_field_entry_create1(0,5,2048);
78+
79+
//bcm_field_entry_destroy(0, 2048);
80+
//bcm_field_group_destroy(0, 5);
81+
82+
83+
84+
85+
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TCS8400-24CC8CD t1

0 commit comments

Comments
 (0)