xref: /linux/tools/testing/selftests/tc-testing/tc-tests/actions/csum.json (revision 69bfec7548f4c1595bac0e3ddfc0458a5af31f4c)
1[
2    {
3        "id": "6d84",
4        "name": "Add csum iph action",
5        "category": [
6            "actions",
7            "csum"
8        ],
9        "setup": [
10            [
11                "$TC actions flush action csum",
12                0,
13                1,
14                255
15            ]
16        ],
17        "cmdUnderTest": "$TC actions add action csum iph index 800",
18        "expExitCode": "0",
19        "verifyCmd": "$TC actions get action csum index 800",
20        "matchPattern": "action order [0-9]*: csum \\(iph\\) action pass.*index 800 ref",
21        "matchCount": "1",
22        "teardown": [
23            "$TC actions flush action csum"
24        ]
25    },
26    {
27        "id": "1862",
28        "name": "Add csum ip4h action",
29        "category": [
30            "actions",
31            "csum"
32        ],
33        "setup": [
34            [
35                "$TC actions flush action csum",
36                0,
37                1,
38                255
39            ]
40        ],
41        "cmdUnderTest": "$TC actions add action csum ip4h index 7",
42        "expExitCode": "0",
43        "verifyCmd": "$TC actions get action csum index 7",
44        "matchPattern": "action order [0-9]*: csum \\(iph\\) action pass.*index 7 ref",
45        "matchCount": "1",
46        "teardown": [
47            "$TC actions flush action csum"
48        ]
49    },
50    {
51        "id": "15c6",
52        "name": "Add csum ipv4h action",
53        "category": [
54            "actions",
55            "csum"
56        ],
57        "setup": [
58            [
59                "$TC actions flush action csum",
60                0,
61                1,
62                255
63            ]
64        ],
65        "cmdUnderTest": "$TC actions add action csum ipv4h index 1122",
66        "expExitCode": "0",
67        "verifyCmd": "$TC actions get action csum index 1122",
68        "matchPattern": "action order [0-9]*: csum \\(iph\\) action pass.*index 1122 ref",
69        "matchCount": "1",
70        "teardown": [
71            "$TC actions flush action csum"
72        ]
73    },
74    {
75        "id": "bf47",
76        "name": "Add csum icmp action",
77        "category": [
78            "actions",
79            "csum"
80        ],
81        "setup": [
82            [
83                "$TC actions flush action csum",
84                0,
85                1,
86                255
87            ]
88        ],
89        "cmdUnderTest": "$TC actions add action csum icmp index 1",
90        "expExitCode": "0",
91        "verifyCmd": "$TC actions get action csum index 1",
92        "matchPattern": "action order [0-9]*: csum \\(icmp\\) action pass.*index 1 ref",
93        "matchCount": "1",
94        "teardown": [
95            "$TC actions flush action csum"
96        ]
97    },
98    {
99        "id": "cc1d",
100        "name": "Add csum igmp action",
101        "category": [
102            "actions",
103            "csum"
104        ],
105        "setup": [
106            [
107                "$TC actions flush action csum",
108                0,
109                1,
110                255
111            ]
112        ],
113        "cmdUnderTest": "$TC actions add action csum igmp index 999",
114        "expExitCode": "0",
115        "verifyCmd": "$TC actions get action csum index 999",
116        "matchPattern": "action order [0-9]*: csum \\(igmp\\) action pass.*index 999 ref",
117        "matchCount": "1",
118        "teardown": [
119            "$TC actions flush action csum"
120        ]
121    },
122    {
123        "id": "bccc",
124        "name": "Add csum foobar action",
125        "category": [
126            "actions",
127            "csum"
128        ],
129        "setup": [
130            [
131                "$TC actions flush action csum",
132                0,
133                1,
134                255
135            ]
136        ],
137        "cmdUnderTest": "$TC actions add action csum foobar index 1",
138        "expExitCode": "255",
139        "verifyCmd": "$TC actions ls action csum",
140        "matchPattern": "action order [0-9]*: csum \\(foobar\\) action pass.*index 1 ref",
141        "matchCount": "0",
142        "teardown": [
143            "$TC actions flush action csum"
144        ]
145    },
146    {
147        "id": "3bb4",
148        "name": "Add csum tcp action",
149        "category": [
150            "actions",
151            "csum"
152        ],
153        "setup": [
154            [
155                "$TC actions flush action csum",
156                0,
157                1,
158                255
159            ]
160        ],
161        "cmdUnderTest": "$TC actions add action csum tcp index 9999",
162        "expExitCode": "0",
163        "verifyCmd": "$TC actions get action csum index 9999",
164        "matchPattern": "action order [0-9]*: csum \\(tcp\\) action pass.*index 9999 ref",
165        "matchCount": "1",
166        "teardown": [
167            "$TC actions flush action csum"
168        ]
169    },
170    {
171        "id": "759c",
172        "name": "Add csum udp action",
173        "category": [
174            "actions",
175            "csum"
176        ],
177        "setup": [
178            [
179                "$TC actions flush action csum",
180                0,
181                1,
182                255
183            ]
184        ],
185        "cmdUnderTest": "$TC actions add action csum udp index 334455",
186        "expExitCode": "0",
187        "verifyCmd": "$TC actions get action csum index 334455",
188        "matchPattern": "action order [0-9]*: csum \\(udp\\) action pass.*index 334455 ref",
189        "matchCount": "1",
190        "teardown": [
191            "$TC actions flush action csum"
192        ]
193    },
194    {
195        "id": "bdb6",
196        "name": "Add csum udp xor iph action",
197        "category": [
198            "actions",
199            "csum"
200        ],
201        "setup": [
202            [
203                "$TC actions flush action csum",
204                0,
205                1,
206                255
207            ]
208        ],
209        "cmdUnderTest": "$TC actions add action csum udp xor iph index 3",
210        "expExitCode": "255",
211        "verifyCmd": "$TC actions ls action csum",
212        "matchPattern": "action order [0-9]*: csum \\(udp xor iph\\) action pass.*index 3 ref",
213        "matchCount": "0",
214        "teardown": [
215            "$TC actions flush action csum"
216        ]
217    },
218    {
219        "id": "c220",
220        "name": "Add csum udplite action",
221        "category": [
222            "actions",
223            "csum"
224        ],
225        "setup": [
226            [
227                "$TC actions flush action csum",
228                0,
229                1,
230                255
231            ]
232        ],
233        "cmdUnderTest": "$TC actions add action csum udplite continue index 3",
234        "expExitCode": "0",
235        "verifyCmd": "$TC actions get action csum index 3",
236        "matchPattern": "action order [0-9]*: csum \\(udplite\\) action continue.*index 3 ref",
237        "matchCount": "1",
238        "teardown": [
239            "$TC actions flush action csum"
240        ]
241    },
242    {
243        "id": "8993",
244        "name": "Add csum sctp action",
245        "category": [
246            "actions",
247            "csum"
248        ],
249        "setup": [
250            [
251                "$TC actions flush action csum",
252                0,
253                1,
254                255
255            ]
256        ],
257        "cmdUnderTest": "$TC actions add action csum sctp index 777",
258        "expExitCode": "0",
259        "verifyCmd": "$TC actions get action csum index 777",
260        "matchPattern": "action order [0-9]*: csum \\(sctp\\) action pass.*index 777 ref",
261        "matchCount": "1",
262        "teardown": [
263            "$TC actions flush action csum"
264        ]
265    },
266    {
267        "id": "b138",
268        "name": "Add csum ip & icmp action",
269        "category": [
270            "actions",
271            "csum"
272        ],
273        "setup": [
274            [
275                "$TC actions flush action csum",
276                0,
277                1,
278                255
279            ]
280        ],
281        "cmdUnderTest": "$TC actions add action csum ip and icmp pipe index 123",
282        "expExitCode": "0",
283        "verifyCmd": "$TC actions get action csum index 123",
284        "matchPattern": "action order [0-9]*: csum \\(iph, icmp\\) action pipe.*index 123 ref",
285        "matchCount": "1",
286        "teardown": [
287            "$TC actions flush action csum"
288        ]
289    },
290    {
291        "id": "eeda",
292        "name": "Add csum ip & sctp action",
293        "category": [
294            "actions",
295            "csum"
296        ],
297        "setup": [
298            [
299                "$TC actions flush action csum",
300                0,
301                1,
302                255
303            ]
304        ],
305        "cmdUnderTest": "$TC actions add action csum ipv4h sctp continue index 2",
306        "expExitCode": "0",
307        "verifyCmd": "$TC actions get action csum index 2",
308        "matchPattern": "action order [0-9]*: csum \\(iph, sctp\\) action continue.*index 2 ref",
309        "matchCount": "1",
310        "teardown": [
311            "$TC actions flush action csum"
312        ]
313    },
314    {
315        "id": "0017",
316        "name": "Add csum udp or tcp action",
317        "category": [
318            "actions",
319            "csum"
320        ],
321        "setup": [
322            [
323                "$TC actions flush action csum",
324                0,
325                1,
326                255
327            ]
328        ],
329        "cmdUnderTest": "$TC actions add action csum udp or tcp continue index 27",
330        "expExitCode": "0",
331        "verifyCmd": "$TC actions get action csum index 27",
332        "matchPattern": "action order [0-9]*: csum \\(tcp, udp\\) action continue.*index 27 ref",
333        "matchCount": "1",
334        "teardown": [
335            "$TC actions flush action csum"
336        ]
337    },
338    {
339        "id": "b10b",
340        "name": "Add all 7 csum actions",
341        "category": [
342            "actions",
343            "csum"
344        ],
345        "setup": [
346            [
347                "$TC actions flush action csum",
348                0,
349                1,
350                255
351            ]
352        ],
353        "cmdUnderTest": "$TC actions add action csum icmp ip4h sctp igmp udplite udp tcp index 7",
354        "expExitCode": "0",
355        "verifyCmd": "$TC actions get action csum index 7",
356        "matchPattern": "action order [0-9]*: csum \\(iph, icmp, igmp, tcp, udp, udplite, sctp\\).*index 7 ref",
357        "matchCount": "1",
358        "teardown": [
359            "$TC actions flush action csum"
360        ]
361    },
362    {
363        "id": "ce92",
364        "name": "Add csum udp action with cookie",
365        "category": [
366            "actions",
367            "csum"
368        ],
369        "setup": [
370            [
371                "$TC actions flush action csum",
372                0,
373                1,
374                255
375            ]
376        ],
377        "cmdUnderTest": "$TC actions add action csum udp pipe index 7 cookie 12345678",
378        "expExitCode": "0",
379        "verifyCmd": "$TC actions get action csum index 7",
380        "matchPattern": "action order [0-9]*: csum \\(udp\\) action pipe.*index 7.*cookie 12345678",
381        "matchCount": "1",
382        "teardown": [
383            "$TC actions flush action csum"
384        ]
385    },
386    {
387        "id": "912f",
388        "name": "Add csum icmp action with large cookie",
389        "category": [
390            "actions",
391            "csum"
392        ],
393        "setup": [
394            [
395                "$TC actions flush action csum",
396                0,
397                1,
398                255
399            ]
400        ],
401        "cmdUnderTest": "$TC actions add action csum icmp pipe index 17 cookie aabbccddeeff1122",
402        "expExitCode": "0",
403        "verifyCmd": "$TC actions get action csum index 17",
404        "matchPattern": "action order [0-9]*: csum \\(icmp\\) action pipe.*index 17.*cookie aabbccddeeff1122",
405        "matchCount": "1",
406        "teardown": [
407            "$TC actions flush action csum"
408        ]
409    },
410    {
411        "id": "879b",
412        "name": "Add batch of 32 csum tcp actions",
413        "category": [
414            "actions",
415            "csum"
416        ],
417        "setup": [
418            [
419                "$TC actions flush action csum",
420                0,
421                1,
422                255
423            ]
424        ],
425        "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action csum tcp continue index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions add \\$args\"",
426        "expExitCode": "0",
427        "verifyCmd": "$TC actions ls action csum",
428        "matchPattern": "^[ \t]+index [0-9]* ref",
429        "matchCount": "32",
430        "teardown": [
431            "$TC actions flush action csum"
432        ]
433    },
434    {
435        "id": "b4e9",
436        "name": "Delete batch of 32 csum actions",
437        "category": [
438            "actions",
439            "csum"
440        ],
441        "setup": [
442            [
443                "$TC actions flush action csum",
444                0,
445                1,
446                255
447            ],
448            "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action csum tcp continue index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions add \\$args\""
449        ],
450        "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action csum index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions del \\$args\"",
451        "expExitCode": "0",
452        "verifyCmd": "$TC actions list action csum",
453        "matchPattern": "^[ \t]+index [0-9]+ ref",
454        "matchCount": "0",
455        "teardown": []
456    },
457    {
458        "id": "0015",
459        "name": "Add batch of 32 csum tcp actions with large cookies",
460        "category": [
461            "actions",
462            "csum"
463        ],
464        "setup": [
465            [
466                "$TC actions flush action csum",
467                0,
468                1,
469                255
470            ]
471        ],
472        "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action csum tcp continue index \\$i cookie 123456789abcde \\\"; args=\"\\$args\\$cmd\"; done && $TC actions add \\$args\"",
473        "expExitCode": "0",
474        "verifyCmd": "$TC actions ls action csum",
475        "matchPattern": "^[ \t]+index [0-9]* ref",
476        "matchCount": "32",
477        "teardown": [
478            "$TC actions flush action csum"
479        ]
480    },
481    {
482        "id": "989e",
483        "name": "Delete batch of 32 csum actions with large cookies",
484        "category": [
485            "actions",
486            "csum"
487        ],
488        "setup": [
489            [
490                "$TC actions flush action csum",
491                0,
492                1,
493                255
494            ],
495            "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action csum tcp continue index \\$i cookie 123456789abcde \\\"; args=\"\\$args\\$cmd\"; done && $TC actions add \\$args\""
496        ],
497        "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action csum index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions del \\$args\"",
498        "expExitCode": "0",
499        "verifyCmd": "$TC actions list action csum",
500        "matchPattern": "^[ \t]+index [0-9]+ ref",
501        "matchCount": "0",
502        "teardown": []
503    },
504    {
505        "id": "d128",
506        "name": "Replace csum action with invalid goto chain control",
507        "category": [
508            "actions",
509            "csum"
510        ],
511        "setup": [
512            [
513                "$TC actions flush action csum",
514                0,
515                1,
516                255
517            ],
518            "$TC actions add action csum iph index 90"
519        ],
520        "cmdUnderTest": "$TC actions replace action csum iph goto chain 42 index 90 cookie c1a0c1a0",
521        "expExitCode": "255",
522        "verifyCmd": "$TC actions get action csum index 90",
523        "matchPattern": "action order [0-9]*: csum \\(iph\\) action pass.*index 90 ref",
524        "matchCount": "1",
525        "teardown": [
526            "$TC actions flush action csum"
527        ]
528    },
529    {
530        "id": "eaf0",
531        "name": "Add csum iph action with no_percpu flag",
532        "category": [
533            "actions",
534            "csum"
535        ],
536        "setup": [
537            [
538                "$TC actions flush action csum",
539                0,
540                1,
541                255
542            ]
543        ],
544        "cmdUnderTest": "$TC actions add action csum iph no_percpu",
545        "expExitCode": "0",
546        "verifyCmd": "$TC actions list action csum",
547        "matchPattern": "action order [0-9]*: csum \\(iph\\) action pass.*no_percpu",
548        "matchCount": "1",
549        "teardown": [
550            "$TC actions flush action csum"
551        ]
552    }
553]
554