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