1[
2    {
3        "id": "6f5a",
4        "name": "Add vlan pop action with pipe opcode",
5        "category": [
6            "actions",
7            "vlan"
8        ],
9        "setup": [
10            [
11                "$TC actions flush action vlan",
12                0,
13                1,
14                255
15            ]
16        ],
17        "cmdUnderTest": "$TC actions add action vlan pop pipe index 8",
18        "expExitCode": "0",
19        "verifyCmd": "$TC actions list action vlan",
20        "matchPattern": "action order [0-9]+: vlan.*pop.*pipe.*index 8 ref",
21        "matchCount": "1",
22        "teardown": [
23            "$TC actions flush action vlan"
24        ]
25    },
26    {
27        "id": "df35",
28        "name": "Add vlan pop action with pass opcode",
29        "category": [
30            "actions",
31            "vlan"
32        ],
33        "setup": [
34            [
35                "$TC actions flush action vlan",
36                0,
37                1,
38                255
39            ]
40        ],
41        "cmdUnderTest": "$TC actions add action vlan pop pass index 8",
42        "expExitCode": "0",
43        "verifyCmd": "$TC actions get action vlan index 8",
44        "matchPattern": "action order [0-9]+: vlan.*pop.*pass.*index 8 ref",
45        "matchCount": "1",
46        "teardown": [
47            "$TC actions flush action vlan"
48        ]
49    },
50    {
51        "id": "b0d4",
52        "name": "Add vlan pop action with drop opcode",
53        "category": [
54            "actions",
55            "vlan"
56        ],
57        "setup": [
58            [
59                "$TC actions flush action vlan",
60                0,
61                1,
62                255
63            ]
64        ],
65        "cmdUnderTest": "$TC actions add action vlan pop drop index 8",
66        "expExitCode": "0",
67        "verifyCmd": "$TC actions get action vlan index 8",
68        "matchPattern": "action order [0-9]+: vlan.*pop.*drop.*index 8 ref",
69        "matchCount": "1",
70        "teardown": [
71            "$TC actions flush action vlan"
72        ]
73    },
74    {
75        "id": "95ee",
76        "name": "Add vlan pop action with reclassify opcode",
77        "category": [
78            "actions",
79            "vlan"
80        ],
81        "setup": [
82            [
83                "$TC actions flush action vlan",
84                0,
85                1,
86                255
87            ]
88        ],
89        "cmdUnderTest": "$TC actions add action vlan pop reclassify index 8",
90        "expExitCode": "0",
91        "verifyCmd": "$TC actions get action vlan index 8",
92        "matchPattern": "action order [0-9]+: vlan.*pop.*reclassify.*index 8 ref",
93        "matchCount": "1",
94        "teardown": [
95            "$TC actions flush action vlan"
96        ]
97    },
98    {
99        "id": "0283",
100        "name": "Add vlan pop action with continue opcode",
101        "category": [
102            "actions",
103            "vlan"
104        ],
105        "setup": [
106            [
107                "$TC actions flush action vlan",
108                0,
109                1,
110                255
111            ]
112        ],
113        "cmdUnderTest": "$TC actions add action vlan pop continue index 8",
114        "expExitCode": "0",
115        "verifyCmd": "$TC actions get action vlan index 8",
116        "matchPattern": "action order [0-9]+: vlan.*pop.*continue.*index 8 ref",
117        "matchCount": "1",
118        "teardown": [
119            "$TC actions flush action vlan"
120        ]
121    },
122    {
123        "id": "b6b9",
124        "name": "Add vlan pop action with jump opcode",
125        "category": [
126            "actions",
127            "vlan"
128        ],
129        "setup": [
130            [
131                "$TC actions flush action vlan",
132                0,
133                1,
134                255
135            ]
136        ],
137        "cmdUnderTest": "$TC actions add action vlan pop jump 10 index 8",
138        "expExitCode": "0",
139        "verifyCmd": "$TC actions list action vlan",
140        "matchPattern": "action order [0-9]+: vlan.*jump 10.*index 8 ref",
141        "matchCount": "1",
142        "teardown": [
143            "$TC actions flush action vlan"
144        ]
145    },
146    {
147        "id": "87c3",
148        "name": "Add vlan pop action with trap opcode",
149        "category": [
150            "actions",
151            "vlan"
152        ],
153        "setup": [
154            [
155                "$TC actions flush action vlan",
156                0,
157                1,
158                255
159            ]
160        ],
161        "cmdUnderTest": "$TC actions add action vlan pop trap index 8",
162        "expExitCode": "0",
163        "verifyCmd": "$TC actions list action vlan",
164        "matchPattern": "action order [0-9]+: vlan.*pop trap.*index 8 ref",
165        "matchCount": "1",
166        "teardown": [
167            "$TC actions flush action vlan"
168        ]
169    },
170    {
171        "id": "a178",
172        "name": "Add vlan pop action with invalid opcode",
173        "category": [
174            "actions",
175            "vlan"
176        ],
177        "setup": [
178            [
179                "$TC actions flush action vlan",
180                0,
181                1,
182                255
183            ]
184        ],
185        "cmdUnderTest": "$TC actions add action vlan pop foo index 8",
186        "expExitCode": "255",
187        "verifyCmd": "$TC actions list action vlan",
188        "matchPattern": "action order [0-9]+: vlan.*pop.*foo.*index 8 ref",
189        "matchCount": "0",
190        "teardown": []
191    },
192    {
193        "id": "ee6f",
194        "name": "Add vlan pop action with index at 32-bit maximum",
195        "category": [
196            "actions",
197            "vlan"
198        ],
199        "setup": [
200            [
201                "$TC actions flush action vlan",
202                0,
203                1,
204                255
205            ]
206        ],
207        "cmdUnderTest": "$TC actions add action vlan pop index 4294967295",
208        "expExitCode": "0",
209        "verifyCmd": "$TC actions list action vlan",
210        "matchPattern": "action order [0-9]+: vlan.*pop.*index 4294967295 ref",
211        "matchCount": "1",
212        "teardown": [
213            "$TC actions flush action vlan"
214        ]
215    },
216    {
217        "id": "0dfa",
218        "name": "Add vlan pop action with index exceeding 32-bit maximum",
219        "category": [
220            "actions",
221            "vlan"
222        ],
223        "setup": [
224            [
225                "$TC actions flush action vlan",
226                0,
227                1,
228                255
229            ]
230        ],
231        "cmdUnderTest": "$TC actions add action vlan pop reclassify index 429496729599",
232        "expExitCode": "255",
233        "verifyCmd": "$TC actions get action vlan index 429496729599",
234        "matchPattern": "action order [0-9]+: vlan.*pop.reclassify.*index 429496729599",
235        "matchCount": "0",
236        "teardown": []
237    },
238    {
239        "id": "2b91",
240        "name": "Add vlan invalid action",
241        "category": [
242            "actions",
243            "vlan"
244        ],
245        "setup": [
246            [
247                "$TC actions flush action vlan",
248                0,
249                1,
250                255
251            ]
252        ],
253        "cmdUnderTest": "$TC actions add action vlan bad_mode",
254        "expExitCode": "255",
255        "verifyCmd": "$TC actions list action vlan",
256        "matchPattern": "action order [0-9]+: vlan.*bad_mode",
257        "matchCount": "0",
258        "teardown": []
259    },
260    {
261        "id": "57fc",
262        "name": "Add vlan push action with invalid protocol type",
263        "category": [
264            "actions",
265            "vlan"
266        ],
267        "setup": [
268            [
269                "$TC actions flush action vlan",
270                0,
271                1,
272                255
273            ]
274        ],
275        "cmdUnderTest": "$TC actions add action vlan push protocol ABCD",
276        "expExitCode": "255",
277        "verifyCmd": "$TC actions list action vlan",
278        "matchPattern": "action order [0-9]+: vlan.*push",
279        "matchCount": "0",
280        "teardown": []
281    },
282    {
283        "id": "3989",
284        "name": "Add vlan push action with default protocol and priority",
285        "category": [
286            "actions",
287            "vlan"
288        ],
289        "setup": [
290            [
291                "$TC actions flush action vlan",
292                0,
293                1,
294                255
295            ]
296        ],
297        "cmdUnderTest": "$TC actions add action vlan push id 123 index 18",
298        "expExitCode": "0",
299        "verifyCmd": "$TC actions get action vlan index 18",
300        "matchPattern": "action order [0-9]+: vlan.*push id 123 protocol 802.1Q priority 0 pipe.*index 18 ref",
301        "matchCount": "1",
302        "teardown": [
303            "$TC actions flush action vlan"
304        ]
305    },
306    {
307        "id": "79dc",
308        "name": "Add vlan push action with protocol 802.1Q and priority 3",
309        "category": [
310            "actions",
311            "vlan"
312        ],
313        "setup": [
314            [
315                "$TC actions flush action vlan",
316                0,
317                1,
318                255
319            ]
320        ],
321        "cmdUnderTest": "$TC actions add action vlan push id 77 protocol 802.1Q priority 3 continue index 734",
322        "expExitCode": "0",
323        "verifyCmd": "$TC actions get action vlan index 734",
324        "matchPattern": "action order [0-9]+: vlan.*push id 77 protocol 802.1Q priority 3 continue.*index 734 ref",
325        "matchCount": "1",
326        "teardown": [
327            "$TC actions flush action vlan"
328        ]
329    },
330    {
331        "id": "4d73",
332        "name": "Add vlan push action with protocol 802.1AD",
333        "category": [
334            "actions",
335            "vlan"
336        ],
337        "setup": [
338            [
339                "$TC actions flush action vlan",
340                0,
341                1,
342                255
343            ]
344        ],
345        "cmdUnderTest": "$TC actions add action vlan push id 1024 protocol 802.1AD pass index 10000",
346        "expExitCode": "0",
347        "verifyCmd": "$TC actions get action vlan index 10000",
348        "matchPattern": "action order [0-9]+: vlan.*push id 1024 protocol 802.1ad priority 0 pass.*index 10000 ref",
349        "matchCount": "1",
350        "teardown": [
351            "$TC actions flush action vlan"
352        ]
353    },
354    {
355        "id": "1f4b",
356        "name": "Add vlan push action with maximum 12-bit vlan ID",
357        "category": [
358            "actions",
359            "vlan"
360        ],
361        "setup": [
362            [
363                "$TC actions flush action vlan",
364                0,
365                1,
366                255
367            ]
368        ],
369        "cmdUnderTest": "$TC actions add action vlan push id 4094 index 1",
370        "expExitCode": "0",
371        "verifyCmd": "$TC actions get action vlan index 1",
372        "matchPattern": "action order [0-9]+: vlan.*push id 4094.*protocol 802.1Q.*priority 0.*index 1 ref",
373        "matchCount": "1",
374        "teardown": [
375            "$TC actions flush action vlan"
376        ]
377    },
378    {
379        "id": "1f7b",
380        "name": "Add vlan push action with invalid vlan ID",
381        "category": [
382            "actions",
383            "vlan"
384        ],
385        "setup": [
386            [
387                "$TC actions flush action vlan",
388                0,
389                1,
390                255
391            ]
392        ],
393        "cmdUnderTest": "$TC actions add action vlan push id 5678 index 1",
394        "expExitCode": "255",
395        "verifyCmd": "$TC actions list action vlan",
396        "matchPattern": "action order [0-9]+: vlan.*push id 5678.*index 1 ref",
397        "matchCount": "0",
398        "teardown": [
399            "$TC actions flush action vlan"
400        ]
401    },
402    {
403        "id": "fe40",
404        "name": "Add vlan push action with maximum 3-bit IEEE 802.1p priority",
405        "category": [
406            "actions",
407            "vlan"
408        ],
409        "setup": [
410            [
411                "$TC actions flush action vlan",
412                0,
413                1,
414                255
415            ]
416        ],
417        "cmdUnderTest": "$TC actions add action vlan push id 4 priority 7 reclassify index 1",
418        "expExitCode": "0",
419        "verifyCmd": "$TC actions get action vlan index 1",
420        "matchPattern": "action order [0-9]+: vlan.*push id 4.*protocol 802.1Q.*priority 7.*reclassify.*index 1 ref",
421        "matchCount": "1",
422        "teardown": [
423            "$TC actions flush action vlan"
424        ]
425    },
426    {
427        "id": "5d02",
428        "name": "Add vlan push action with invalid IEEE 802.1p priority",
429        "category": [
430            "actions",
431            "vlan"
432        ],
433        "setup": [
434            [
435                "$TC actions flush action vlan",
436                0,
437                1,
438                255
439            ]
440        ],
441        "cmdUnderTest": "$TC actions add action vlan push id 5 priority 10 index 1",
442        "expExitCode": "255",
443        "verifyCmd": "$TC actions list action vlan",
444        "matchPattern": "action order [0-9]+: vlan.*push id 5.*index 1 ref",
445        "matchCount": "0",
446        "teardown": []
447    },
448    {
449        "id": "6812",
450        "name": "Add vlan modify action for protocol 802.1Q",
451        "category": [
452            "actions",
453            "vlan"
454        ],
455        "setup": [
456            [
457                "$TC actions flush action vlan",
458                0,
459                1,
460                255
461            ]
462        ],
463        "cmdUnderTest": "$TC actions add action vlan modify protocol 802.1Q id 5 index 100",
464        "expExitCode": "0",
465        "verifyCmd": "$TC actions get action vlan index 100",
466        "matchPattern": "action order [0-9]+: vlan.*modify id 100 protocol 802.1Q priority 0 pipe.*index 100 ref",
467        "matchCount": "0",
468        "teardown": [
469            "$TC actions flush action vlan"
470        ]
471    },
472    {
473        "id": "5a31",
474        "name": "Add vlan modify action for protocol 802.1AD",
475        "category": [
476            "actions",
477            "vlan"
478        ],
479        "setup": [
480            [
481                "$TC actions flush action vlan",
482                0,
483                1,
484                255
485            ]
486        ],
487        "cmdUnderTest": "$TC actions add action vlan modify protocol 802.1ad id 500 reclassify index 12",
488        "expExitCode": "0",
489        "verifyCmd": "$TC actions get action vlan index 12",
490        "matchPattern": "action order [0-9]+: vlan.*modify id 500 protocol 802.1ad priority 0 reclassify.*index 12 ref",
491        "matchCount": "1",
492        "teardown": [
493            "$TC actions flush action vlan"
494        ]
495    },
496    {
497        "id": "3deb",
498        "name": "Replace existing vlan push action with new ID",
499        "category": [
500            "actions",
501            "vlan"
502        ],
503        "setup": [
504            [
505                "$TC actions flush action vlan",
506                0,
507                1,
508                255
509            ],
510            "$TC actions add action vlan push id 500 pipe index 12"
511        ],
512        "cmdUnderTest": "$TC actions replace action vlan push id 700 pipe index 12",
513        "expExitCode": "0",
514        "verifyCmd": "$TC actions get action vlan index 12",
515        "matchPattern": "action order [0-9]+: vlan.*push id 700 protocol 802.1Q priority 0 pipe.*index 12 ref",
516        "matchCount": "1",
517        "teardown": [
518            "$TC actions flush action vlan"
519        ]
520    },
521    {
522        "id": "9e76",
523        "name": "Replace existing vlan push action with new protocol",
524        "category": [
525            "actions",
526            "vlan"
527        ],
528        "setup": [
529            [
530                "$TC actions flush action vlan",
531                0,
532                1,
533                255
534            ],
535            "$TC actions add action vlan push id 1 protocol 802.1Q pipe index 1"
536        ],
537        "cmdUnderTest": "$TC actions replace action vlan push id 1 protocol 802.1ad pipe index 1",
538        "expExitCode": "0",
539        "verifyCmd": "$TC actions get action vlan index 1",
540        "matchPattern": "action order [0-9]+: vlan.*push id 1 protocol 802.1ad priority 0 pipe.*index 1 ref",
541        "matchCount": "1",
542        "teardown": [
543            "$TC actions flush action vlan"
544        ]
545    },
546    {
547        "id": "ede4",
548        "name": "Replace existing vlan push action with new priority",
549        "category": [
550            "actions",
551            "vlan"
552        ],
553        "setup": [
554            [
555                "$TC actions flush action vlan",
556                0,
557                1,
558                255
559            ],
560            "$TC actions add action vlan push id 1 protocol 802.1Q priority 3 reclassify index 1"
561        ],
562        "cmdUnderTest": "$TC actions replace action vlan push id 1 priority 4 reclassify index 1",
563        "expExitCode": "0",
564        "verifyCmd": "$TC actions get action vlan index 1",
565        "matchPattern": "action order [0-9]+: vlan.*push id 1 protocol 802.1Q priority 4 reclassify.*index 1 ref",
566        "matchCount": "1",
567        "teardown": [
568            "$TC actions flush action vlan"
569        ]
570    },
571    {
572        "id": "d413",
573        "name": "Replace existing vlan pop action with new cookie",
574        "category": [
575            "actions",
576            "vlan"
577        ],
578        "setup": [
579            [
580                "$TC actions flush action vlan",
581                0,
582                1,
583                255
584            ],
585            "$TC actions add action vlan pop continue index 1 cookie 22334455"
586        ],
587        "cmdUnderTest": "$TC actions replace action vlan pop continue index 1 cookie a1b1c2d1",
588        "expExitCode": "0",
589        "verifyCmd": "$TC actions get action vlan index 1",
590        "matchPattern": "action order [0-9]+: vlan.*pop continue.*index 1 ref.*cookie a1b1c2d1",
591        "matchCount": "1",
592        "teardown": [
593            "$TC actions flush action vlan"
594        ]
595    },
596    {
597        "id": "83a4",
598        "name": "Delete vlan pop action",
599        "category": [
600            "actions",
601            "vlan"
602        ],
603        "setup": [
604            [
605                "$TC actions flush action vlan",
606                0,
607                1,
608                255
609            ],
610            "$TC actions add action vlan pop index 44"
611        ],
612        "cmdUnderTest": "$TC actions del action vlan index 44",
613        "expExitCode": "0",
614        "verifyCmd": "$TC actions list action vlan",
615        "matchPattern": "action order [0-9]+: vlan.*pop.*index 44 ref",
616        "matchCount": "0",
617        "teardown": []
618    },
619    {
620        "id": "ed1e",
621        "name": "Delete vlan push action for protocol 802.1Q",
622        "category": [
623            "actions",
624            "vlan"
625        ],
626        "setup": [
627            [
628                "$TC actions flush action vlan",
629                0,
630                1,
631                255
632            ],
633            "$TC actions add action vlan push id 4094 protocol 802.1Q index 999"
634        ],
635        "cmdUnderTest": "$TC actions del action vlan index 999",
636        "expExitCode": "0",
637        "verifyCmd": "$TC actions list action vlan",
638        "matchPattern": "action order [0-9]+: vlan.*push id 4094 protocol 802.1Q priority 0 pipe.*index 999 ref",
639        "matchCount": "0",
640        "teardown": []
641    },
642    {
643        "id": "a2a3",
644        "name": "Flush vlan actions",
645        "category": [
646            "actions",
647            "vlan"
648        ],
649        "setup": [
650            [
651                "$TC actions flush action vlan",
652                0,
653                1,
654                255
655            ],
656            "$TC actions add action vlan push id 4 protocol 802.1ad index 10",
657            "$TC actions add action vlan push id 4 protocol 802.1ad index 11",
658            "$TC actions add action vlan push id 4 protocol 802.1ad index 12",
659            "$TC actions add action vlan push id 4 protocol 802.1ad index 13"
660        ],
661        "cmdUnderTest": "$TC actions flush action vlan",
662        "expExitCode": "0",
663        "verifyCmd": "$TC actions list action vlan",
664        "matchPattern": "action order [0-9]+: vlan.*push id 4 protocol 802.1ad",
665        "matchCount": "0",
666        "teardown": []
667    },
668    {
669        "id": "1d78",
670        "name": "Add vlan push action with cookie",
671        "category": [
672            "actions",
673            "vlan"
674        ],
675        "setup": [
676            [
677                "$TC actions flush action vlan",
678                0,
679                1,
680                255
681            ]
682        ],
683        "cmdUnderTest": "$TC actions add action vlan push id 4 cookie a0a0a0a0a0a0a0",
684        "expExitCode": "0",
685        "verifyCmd": "$TC actions list action vlan",
686        "matchPattern": "action order [0-9]+: vlan.*push id 4.*cookie a0a0a0a0a0a0a0",
687        "matchCount": "1",
688        "teardown": [
689            "$TC actions flush action vlan"
690        ]
691    },
692    {
693        "id": "e394",
694        "name": "Replace vlan push action with invalid goto chain control",
695        "category": [
696            "actions",
697            "vlan"
698        ],
699        "setup": [
700            [
701                "$TC actions flush action vlan",
702                0,
703                1,
704                255
705            ],
706            "$TC actions add action vlan push id 500 pass index 90"
707        ],
708        "cmdUnderTest": "$TC actions replace action vlan push id 500 goto chain 42 index 90 cookie c1a0c1a0",
709        "expExitCode": "255",
710        "verifyCmd": "$TC actions get action vlan index 90",
711        "matchPattern": "action order [0-9]+: vlan.*push id 500 protocol 802.1Q priority 0 pass.*index 90 ref",
712        "matchCount": "1",
713        "teardown": [
714            "$TC actions flush action vlan"
715        ]
716    },
717    {
718        "id": "294e",
719        "name": "Add batch of 32 vlan push actions with cookie",
720        "category": [
721            "actions",
722            "vlan"
723        ],
724        "setup": [
725            [
726                "$TC actions flush action vlan",
727                0,
728                1,
729                255
730            ]
731        ],
732        "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan push protocol 802.1q id 4094 priority 7 pipe index \\$i cookie aabbccddeeff112233445566778800a1 \\\"; args=\"\\$args\\$cmd\"; done && $TC actions add \\$args\"",
733        "expExitCode": "0",
734        "verifyCmd": "$TC actions list action vlan",
735        "matchPattern": "^[ \t]+index [0-9]+ ref",
736        "matchCount": "32",
737        "teardown": [
738            "$TC actions flush action vlan"
739        ]
740    },
741    {
742        "id": "56f7",
743        "name": "Delete batch of 32 vlan push actions",
744        "category": [
745            "actions",
746            "vlan"
747        ],
748        "setup": [
749            [
750                "$TC actions flush action vlan",
751                0,
752                1,
753                255
754            ],
755            "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan push protocol 802.1q id 4094 priority 7 pipe index \\$i \\\"; args=\\\"\\$args\\$cmd\\\"; done && $TC actions add \\$args\""
756        ],
757        "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions del \\$args\"",
758        "expExitCode": "0",
759        "verifyCmd": "$TC actions list action vlan",
760        "matchPattern": "^[ \t]+index [0-9]+ ref",
761        "matchCount": "0",
762        "teardown": []
763    },
764    {
765        "id": "759f",
766        "name": "Add batch of 32 vlan pop actions with cookie",
767        "category": [
768            "actions",
769            "vlan"
770        ],
771        "setup": [
772            [
773                "$TC actions flush action vlan",
774                0,
775                1,
776                255
777            ]
778        ],
779        "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan pop continue index \\$i cookie aabbccddeeff112233445566778800a1 \\\"; args=\"\\$args\\$cmd\"; done && $TC actions add \\$args\"",
780        "expExitCode": "0",
781        "verifyCmd": "$TC actions list action vlan",
782        "matchPattern": "^[ \t]+index [0-9]+ ref",
783        "matchCount": "32",
784        "teardown": [
785            "$TC actions flush action vlan"
786        ]
787    },
788    {
789        "id": "c84a",
790        "name": "Delete batch of 32 vlan pop actions",
791        "category": [
792            "actions",
793            "vlan"
794        ],
795        "setup": [
796            [
797                "$TC actions flush action vlan",
798                0,
799                1,
800                255
801            ],
802            "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan pop index \\$i \\\"; args=\\\"\\$args\\$cmd\\\"; done && $TC actions add \\$args\""
803        ],
804        "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions del \\$args\"",
805        "expExitCode": "0",
806        "verifyCmd": "$TC actions list action vlan",
807        "matchPattern": "^[ \t]+index [0-9]+ ref",
808        "matchCount": "0",
809        "teardown": []
810    }
811]
812