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