1[
2    {
3        "id": "319a",
4        "name": "Add pedit action that mangles IP TTL",
5        "category": [
6            "actions",
7            "pedit"
8        ],
9        "setup": [
10            [
11                "$TC actions flush action pedit",
12                0,
13                1,
14                255
15            ]
16        ],
17        "cmdUnderTest": "$TC actions add action pedit ex munge ip ttl set 10",
18        "expExitCode": "0",
19        "verifyCmd": "$TC actions ls action pedit",
20        "matchPattern": "action order [0-9]+:  pedit action pass keys 1.*index 1 ref.*key #0  at ipv4\\+8: val 0a000000 mask 00ffffff",
21        "matchCount": "1",
22        "teardown": [
23            "$TC actions flush action pedit"
24        ]
25    },
26    {
27        "id": "7e67",
28        "name": "Replace pedit action with invalid goto chain",
29        "category": [
30            "actions",
31            "pedit"
32        ],
33        "setup": [
34            [
35                "$TC actions flush action pedit",
36                0,
37                1,
38                255
39            ],
40            "$TC actions add action pedit ex munge ip ttl set 10 pass index 90"
41        ],
42        "cmdUnderTest": "$TC actions replace action pedit ex munge ip ttl set 10 goto chain 42 index 90 cookie c1a0c1a0",
43        "expExitCode": "255",
44        "verifyCmd": "$TC actions ls action pedit",
45        "matchPattern": "action order [0-9]+:  pedit action pass keys 1.*index 90 ref.*key #0  at ipv4\\+8: val 0a000000 mask 00ffffff",
46        "matchCount": "1",
47        "teardown": [
48            "$TC actions flush action pedit"
49        ]
50    },
51    {
52        "id": "377e",
53        "name": "Add pedit action with RAW_OP offset u32",
54        "category": [
55            "actions",
56            "pedit",
57            "raw_op"
58        ],
59        "setup": [
60            [
61                "$TC actions flush action pedit",
62                0,
63                1,
64                255
65            ]
66        ],
67        "cmdUnderTest": "$TC actions add action pedit munge offset 12 u32 set 0x90abcdef",
68        "expExitCode": "0",
69        "verifyCmd": "$TC actions list action pedit | grep 'key '",
70        "matchPattern": "12: val 90abcdef mask 00000000",
71        "matchCount": "1",
72        "teardown": [
73            "$TC actions flush action pedit"
74        ]
75    },
76    {
77        "id": "a0ca",
78        "name": "Add pedit action with RAW_OP offset u32 (INVALID)",
79        "category": [
80            "actions",
81            "pedit",
82            "raw_op"
83        ],
84        "setup": [
85            [
86                "$TC actions flush action pedit",
87                0,
88                1,
89                255
90            ]
91        ],
92        "cmdUnderTest": "$TC actions add action pedit munge offset 2 u32 set 0x12345678",
93        "expExitCode": "255",
94        "verifyCmd": "/bin/true",
95        "matchPattern": " ",
96        "matchCount": "0",
97        "teardown": [
98            "$TC actions flush action pedit"
99        ]
100    },
101    {
102        "id": "dd8a",
103        "name": "Add pedit action with RAW_OP offset u16 u16",
104        "category": [
105            "actions",
106            "pedit",
107            "raw_op"
108        ],
109        "setup": [
110            [
111                "$TC actions flush action pedit",
112                0,
113                1,
114                255
115            ]
116        ],
117        "cmdUnderTest": "$TC actions add action pedit munge offset 12 u16 set 0x1234 munge offset 14 u16 set 0x5678",
118        "expExitCode": "0",
119        "verifyCmd": "$TC actions list action pedit | grep 'key '",
120        "matchPattern": "val 12340000 mask 0000ffff.*val 00005678 mask ffff0000",
121        "matchCount": "1",
122        "teardown": [
123            "$TC actions flush action pedit"
124        ]
125    },
126    {
127        "id": "53db",
128        "name": "Add pedit action with RAW_OP offset u16 (INVALID)",
129        "category": [
130            "actions",
131            "pedit",
132            "raw_op"
133        ],
134        "setup": [
135            [
136                "$TC actions flush action pedit",
137                0,
138                1,
139                255
140            ]
141        ],
142        "cmdUnderTest": "$TC actions add action pedit munge offset 15 u16 set 0x1234",
143        "expExitCode": "255",
144        "verifyCmd": "/bin/true",
145        "matchPattern": " ",
146        "matchCount": "0",
147        "teardown": [
148            "$TC actions flush action pedit"
149        ]
150    },
151    {
152        "id": "5c7e",
153        "name": "Add pedit action with RAW_OP offset u8 add value",
154        "category": [
155            "actions",
156            "pedit",
157            "raw_op"
158        ],
159        "setup": [
160            [
161                "$TC actions flush action pedit",
162                0,
163                1,
164                255
165            ]
166        ],
167        "cmdUnderTest": "$TC actions add action pedit ex munge offset 16 u8 add 0xf",
168        "expExitCode": "0",
169        "verifyCmd": "$TC actions list action pedit | grep 'key '",
170        "matchPattern": " 16: add 0f000000 mask 00ffffff",
171        "matchCount": "1",
172        "teardown": [
173            "$TC actions flush action pedit"
174        ]
175    },
176    {
177        "id": "2893",
178        "name": "Add pedit action with RAW_OP offset u8 quad",
179        "category": [
180            "actions",
181            "pedit",
182            "raw_op"
183        ],
184        "setup": [
185            [
186                "$TC actions flush action pedit",
187                0,
188                1,
189                255
190            ]
191        ],
192        "cmdUnderTest": "$TC actions add action pedit munge offset 12 u8 set 0x12 munge offset 13 u8 set 0x34 munge offset 14 u8 set 0x56 munge offset 15 u8 set 0x78",
193        "expExitCode": "0",
194        "verifyCmd": "$TC actions list action pedit | grep 'key '",
195        "matchPattern": "val 12000000 mask 00ffffff.*val 00340000 mask ff00ffff.*val 00005600 mask ffff00ff.*val 00000078 mask ffffff00",
196        "matchCount": "1",
197        "teardown": [
198            "$TC actions flush action pedit"
199        ]
200    },
201    {
202        "id": "3a07",
203        "name": "Add pedit action with RAW_OP offset u8-u16-u8",
204        "category": [
205            "actions",
206            "pedit",
207            "raw_op"
208        ],
209        "setup": [
210            [
211                "$TC actions flush action pedit",
212                0,
213                1,
214                255
215            ]
216        ],
217        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u8 set 0x12 munge offset 1 u16 set 0x3456 munge offset 3 u8 set 0x78",
218        "expExitCode": "0",
219        "verifyCmd": "$TC actions list action pedit | grep 'key '",
220        "matchPattern": "val 12000000 mask 00ffffff.*val 00345600 mask ff0000ff.*val 00000078 mask ffffff00",
221        "matchCount": "1",
222        "teardown": [
223            "$TC actions flush action pedit"
224        ]
225    },
226    {
227        "id": "ab0f",
228        "name": "Add pedit action with RAW_OP offset u16-u8-u8",
229        "category": [
230            "actions",
231            "pedit",
232            "raw_op"
233        ],
234        "setup": [
235            [
236                "$TC actions flush action pedit",
237                0,
238                1,
239                255
240            ]
241        ],
242        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u16 set 0x1234 munge offset 2 u8 set 0x56 munge offset 3 u8 set 0x78",
243        "expExitCode": "0",
244        "verifyCmd": "$TC actions list action pedit | grep 'key '",
245        "matchPattern": "val 12340000 mask 0000ffff.*val 00005600 mask ffff00ff.*val 00000078 mask ffffff00",
246        "matchCount": "1",
247        "teardown": [
248            "$TC actions flush action pedit"
249        ]
250    },
251    {
252        "id": "9d12",
253        "name": "Add pedit action with RAW_OP offset u32 set u16 clear u8 invert",
254        "category": [
255            "actions",
256            "pedit",
257            "raw_op"
258        ],
259        "setup": [
260            [
261                "$TC actions flush action pedit",
262                0,
263                1,
264                255
265            ]
266        ],
267        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u32 set 0x12345678 munge offset 1 u16 clear munge offset 2 u8 invert",
268        "expExitCode": "0",
269        "verifyCmd": "$TC actions list action pedit | grep 'key '",
270        "matchPattern": "val 12345678 mask 00000000.*val 00000000 mask ff0000ff.*val 0000ff00 mask ffffffff",
271        "matchCount": "1",
272        "teardown": [
273            "$TC actions flush action pedit"
274        ]
275    },
276    {
277        "id": "ebfa",
278        "name": "Add pedit action with RAW_OP offset overflow u32 (INVALID)",
279        "category": [
280            "actions",
281            "pedit",
282            "raw_op"
283        ],
284        "setup": [
285            [
286                "$TC actions flush action pedit",
287                0,
288                1,
289                255
290            ]
291        ],
292        "cmdUnderTest": "$TC actions add action pedit munge offset 0xffffffffffffffffffffffffffffffffffffffffff u32 set 0x1",
293        "expExitCode": "255",
294        "verifyCmd": "/bin/true",
295        "matchPattern": " ",
296        "matchCount": "0",
297        "teardown": [
298            "$TC actions flush action pedit"
299        ]
300    },
301    {
302        "id": "f512",
303        "name": "Add pedit action with RAW_OP offset u16 at offmask shift set",
304        "category": [
305            "actions",
306            "pedit",
307            "raw_op"
308        ],
309        "setup": [
310            [
311                "$TC actions flush action pedit",
312                0,
313                1,
314                255
315            ]
316        ],
317        "cmdUnderTest": "$TC actions add action pedit munge offset 12 u16 at 12 ffff 1 set 0xaaaa",
318        "expExitCode": "0",
319        "verifyCmd": "$TC actions list action pedit | grep 'key '",
320        "matchPattern": " 12: val aaaa0000 mask 0000ffff",
321        "matchCount": "1",
322        "teardown": [
323            "$TC actions flush action pedit"
324        ]
325    },
326    {
327        "id": "c2cb",
328        "name": "Add pedit action with RAW_OP offset u32 retain value",
329        "category": [
330            "actions",
331            "pedit",
332            "raw_op"
333        ],
334        "setup": [
335            [
336                "$TC actions flush action pedit",
337                0,
338                1,
339                255
340            ]
341        ],
342        "cmdUnderTest": "$TC actions add action pedit munge offset 12 u32 set 0x12345678 retain 0xff00",
343        "expExitCode": "0",
344        "verifyCmd": "$TC actions list action pedit | grep 'key '",
345        "matchPattern": " 12: val 00005600 mask ffff00ff",
346        "matchCount": "1",
347        "teardown": [
348            "$TC actions flush action pedit"
349        ]
350    },
351    {
352        "id": "1762",
353        "name": "Add pedit action with RAW_OP offset u8 clear value",
354        "category": [
355            "actions",
356            "pedit",
357            "raw_op"
358        ],
359        "setup": [
360            [
361                "$TC actions flush action pedit",
362                0,
363                1,
364                255
365            ]
366        ],
367        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u8 clear",
368        "expExitCode": "0",
369        "verifyCmd": "$TC actions list action pedit",
370        "matchPattern": "action order [0-9]+:.*pedit.*keys 1.*key #0.*at 0: val 00000000 mask 00ffffff",
371        "matchCount": "1",
372        "teardown": [
373            "$TC actions flush action pedit"
374        ]
375    },
376    {
377        "id": "bcee",
378        "name": "Add pedit action with RAW_OP offset u8 retain value",
379        "category": [
380            "actions",
381            "pedit",
382            "raw_op"
383        ],
384        "setup": [
385            [
386                "$TC actions flush action pedit",
387                0,
388                1,
389                255
390            ]
391        ],
392        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u8 set 0x11 retain 0x0f",
393        "expExitCode": "0",
394        "verifyCmd": "$TC actions list action pedit",
395        "matchPattern": "action order [0-9]+:.*pedit.*keys 1.*key #0.*at 0: val 01000000 mask f0ffffff",
396        "matchCount": "1",
397        "teardown": [
398            "$TC actions flush action pedit"
399        ]
400    },
401    {
402        "id": "e89f",
403        "name": "Add pedit action with RAW_OP offset u16 retain value",
404        "category": [
405            "actions",
406            "pedit",
407            "raw_op"
408        ],
409        "setup": [
410            [
411                "$TC actions flush action pedit",
412                0,
413                1,
414                255
415            ]
416        ],
417        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u16 set 0x1122 retain 0xff00",
418        "expExitCode": "0",
419        "verifyCmd": "$TC actions list action pedit",
420        "matchPattern": "action order [0-9]+:.*pedit.*keys 1.*key #0.*at 0: val 11000000 mask 00ffffff",
421        "matchCount": "1",
422        "teardown": [
423            "$TC actions flush action pedit"
424        ]
425    },
426    {
427        "id": "c282",
428        "name": "Add pedit action with RAW_OP offset u32 clear value",
429        "category": [
430            "actions",
431            "pedit",
432            "raw_op"
433        ],
434        "setup": [
435            [
436                "$TC actions flush action pedit",
437                0,
438                1,
439                255
440            ]
441        ],
442        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u32 clear",
443        "expExitCode": "0",
444        "verifyCmd": "$TC actions list action pedit",
445        "matchPattern": "action order [0-9]+:.*pedit.*keys 1.*key #0.*at 0: val 00000000 mask 00000000",
446        "matchCount": "1",
447        "teardown": [
448            "$TC actions flush action pedit"
449        ]
450    },
451    {
452        "id": "c422",
453        "name": "Add pedit action with RAW_OP offset u16 invert value",
454        "category": [
455            "actions",
456            "pedit",
457            "raw_op"
458        ],
459        "setup": [
460            [
461                "$TC actions flush action pedit",
462                0,
463                1,
464                255
465            ]
466        ],
467        "cmdUnderTest": "$TC actions add action pedit munge offset 12 u16 invert",
468        "expExitCode": "0",
469        "verifyCmd": "$TC actions list action pedit",
470        "matchPattern": "action order [0-9]+:.*pedit.*keys 1.*key #0.*at 12: val ffff0000 mask ffffffff",
471        "matchCount": "1",
472        "teardown": [
473            "$TC actions flush action pedit"
474        ]
475    },
476    {
477        "id": "d3d3",
478        "name": "Add pedit action with RAW_OP offset u32 invert value",
479        "category": [
480            "actions",
481            "pedit",
482            "raw_op"
483        ],
484        "setup": [
485            [
486                "$TC actions flush action pedit",
487                0,
488                1,
489                255
490            ]
491        ],
492        "cmdUnderTest": "$TC actions add action pedit munge offset 12 u32 invert",
493        "expExitCode": "0",
494        "verifyCmd": "$TC actions list action pedit",
495        "matchPattern": "action order [0-9]+:.*pedit.*keys 1.*key #0.*at 12: val ffffffff mask ffffffff",
496        "matchCount": "1",
497        "teardown": [
498            "$TC actions flush action pedit"
499        ]
500    },
501    {
502        "id": "57e5",
503        "name": "Add pedit action with RAW_OP offset u8 preserve value",
504        "category": [
505            "actions",
506            "pedit",
507            "raw_op"
508        ],
509        "setup": [
510            [
511                "$TC actions flush action pedit",
512                0,
513                1,
514                255
515            ]
516        ],
517        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u8 preserve",
518        "expExitCode": "0",
519        "verifyCmd": "$TC actions list action pedit",
520        "matchPattern": "action order [0-9]+:.*pedit.*keys 1.*key #0.*at 0: val 00000000 mask ffffffff",
521        "matchCount": "1",
522        "teardown": [
523            "$TC actions flush action pedit"
524        ]
525    },
526    {
527        "id": "99e0",
528        "name": "Add pedit action with RAW_OP offset u16 preserve value",
529        "category": [
530            "actions",
531            "pedit",
532            "raw_op"
533        ],
534        "setup": [
535            [
536                "$TC actions flush action pedit",
537                0,
538                1,
539                255
540            ]
541        ],
542        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u16 preserve",
543        "expExitCode": "0",
544        "verifyCmd": "$TC actions list action pedit",
545        "matchPattern": "action order [0-9]+:.*pedit.*keys 1.*key #0.*at 0: val 00000000 mask ffffffff",
546        "matchCount": "1",
547        "teardown": [
548            "$TC actions flush action pedit"
549        ]
550    },
551    {
552        "id": "1892",
553        "name": "Add pedit action with RAW_OP offset u32 preserve value",
554        "category": [
555            "actions",
556            "pedit",
557            "raw_op"
558        ],
559        "setup": [
560            [
561                "$TC actions flush action pedit",
562                0,
563                1,
564                255
565            ]
566        ],
567        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u32 preserve",
568        "expExitCode": "0",
569        "verifyCmd": "$TC actions list action pedit",
570        "matchPattern": "action order [0-9]+:.*pedit.*keys 1.*key #0.*at 0: val 00000000 mask ffffffff",
571        "matchCount": "1",
572        "teardown": [
573            "$TC actions flush action pedit"
574        ]
575    },
576    {
577        "id": "4b60",
578        "name": "Add pedit action with RAW_OP negative offset u16/u32 set value",
579        "category": [
580            "actions",
581            "pedit",
582            "raw_op"
583        ],
584        "setup": [
585            [
586                "$TC actions flush action pedit",
587                0,
588                1,
589                255
590            ]
591        ],
592        "cmdUnderTest": "$TC actions add action pedit munge offset -14 u16 set 0x0000 munge offset -12 u32 set 0x00000100 munge offset -8 u32 set 0x0aaf0100 munge offset -4 u32 set 0x0008eb06 pipe",
593        "expExitCode": "0",
594        "verifyCmd": "$TC actions list action pedit",
595        "matchPattern": "action order [0-9]+:.*pedit.*keys 4.*key #0.*at -16: val 00000000 mask ffff0000.*key #1.*at -12: val 00000100 mask 00000000.*key #2.*at -8: val 0aaf0100 mask 00000000.*key #3.*at -4: val 0008eb06 mask 00000000",
596        "matchCount": "1",
597        "teardown": [
598            "$TC actions flush action pedit"
599        ]
600    },
601    {
602        "id": "a5a7",
603        "name": "Add pedit action with LAYERED_OP eth set src",
604        "category": [
605            "actions",
606            "pedit",
607            "layered_op"
608        ],
609        "setup": [
610            [
611                "$TC actions flush action pedit",
612                0,
613                1,
614                255
615            ]
616        ],
617        "cmdUnderTest": "$TC actions add action pedit ex munge eth src set 11:22:33:44:55:66",
618        "expExitCode": "0",
619        "verifyCmd": "$TC actions list action pedit",
620        "matchPattern": "action order [0-9]+:  pedit action pass keys 2.*key #0  at eth\\+4: val 00001122 mask ffff0000.*key #1  at eth\\+8: val 33445566 mask 00000000",
621        "matchCount": "1",
622        "teardown": [
623            "$TC actions flush action pedit"
624        ]
625    },
626    {
627        "id": "86d4",
628        "name": "Add pedit action with LAYERED_OP eth set src & dst",
629        "category": [
630            "actions",
631            "pedit",
632            "layered_op"
633        ],
634        "setup": [
635            [
636                "$TC actions flush action pedit",
637                0,
638                1,
639                255
640            ]
641        ],
642        "cmdUnderTest": "$TC actions add action pedit ex munge eth src set 11:22:33:44:55:66 munge eth dst set ff:ee:dd:cc:bb:aa",
643        "expExitCode": "0",
644        "verifyCmd": "$TC actions list action pedit | grep 'key '",
645        "matchPattern": "eth\\+4: val 00001122 mask ffff0000.*eth\\+8: val 33445566 mask 00000000.*eth\\+0: val ffeeddcc mask 00000000.*eth\\+4: val bbaa0000 mask 0000ffff",
646        "matchCount": "1",
647        "teardown": [
648            "$TC actions flush action pedit"
649        ]
650    },
651    {
652        "id": "f8a9",
653        "name": "Add pedit action with LAYERED_OP eth set dst",
654        "category": [
655            "actions",
656            "pedit",
657            "layered_op"
658        ],
659        "setup": [
660            [
661                "$TC actions flush action pedit",
662                0,
663                1,
664                255
665            ]
666        ],
667        "cmdUnderTest": "$TC actions add action pedit ex munge eth dst set 11:22:33:44:55:66",
668        "expExitCode": "0",
669        "verifyCmd": "$TC actions list action pedit",
670        "matchPattern": "action order [0-9]+:  pedit action pass keys 2.*key #0  at eth\\+0: val 11223344 mask 00000000.*key #1  at eth\\+4: val 55660000 mask 0000ffff",
671        "matchCount": "1",
672        "teardown": [
673            "$TC actions flush action pedit"
674        ]
675    },
676    {
677        "id": "c715",
678        "name": "Add pedit action with LAYERED_OP eth set src (INVALID)",
679        "category": [
680            "actions",
681            "pedit",
682            "layered_op"
683        ],
684        "setup": [
685            [
686                "$TC actions flush action pedit",
687                0,
688                1,
689                255
690            ]
691        ],
692        "cmdUnderTest": "$TC actions add action pedit ex munge eth src set %e:11:m2:33:x4:-5",
693        "expExitCode": "255",
694        "verifyCmd": "/bin/true",
695        "matchPattern": " ",
696        "matchCount": "0",
697        "teardown": [
698            "$TC actions flush action pedit"
699        ]
700    },
701    {
702        "id": "8131",
703        "name": "Add pedit action with LAYERED_OP eth set dst (INVALID)",
704        "category": [
705            "actions",
706            "pedit",
707            "layered_op"
708        ],
709        "setup": [
710            [
711                "$TC actions flush action pedit",
712                0,
713                1,
714                255
715            ]
716        ],
717        "cmdUnderTest": "$TC actions add action pedit ex munge eth dst set %e:11:m2:33:x4:-5",
718        "expExitCode": "255",
719        "verifyCmd": "/bin/true",
720        "matchPattern": " ",
721        "matchCount": "0",
722        "teardown": [
723            "$TC actions flush action pedit"
724        ]
725    },
726    {
727        "id": "ba22",
728        "name": "Add pedit action with LAYERED_OP eth type set/clear sequence",
729        "category": [
730            "actions",
731            "pedit",
732            "layered_op"
733        ],
734        "setup": [
735            [
736                "$TC actions flush action pedit",
737                0,
738                1,
739                255
740            ]
741        ],
742        "cmdUnderTest": "$TC actions add action pedit ex munge eth type set 0x1 munge eth type clear munge eth type set 0x1 munge eth type clear munge eth type set 0x1 munge eth type clear munge eth type set 0x1 munge eth type clear munge eth type set 0x1 munge eth type clear munge eth type set 0x1 munge eth type clear",
743        "expExitCode": "0",
744        "verifyCmd": "$TC actions list action pedit | grep 'key '",
745        "matchPattern": "eth\\+12: val 00010000 mask 0000ffff.*eth\\+12: val 00000000 mask 0000ffff.*eth\\+12: val 00010000 mask 0000ffff.*eth\\+12: val 00000000 mask 0000ffff.*eth\\+12: val 00010000 mask 0000ffff.*eth\\+12: val 00000000 mask 0000ffff.*eth\\+12: val 00010000 mask 0000ffff.*eth\\+12: val 00000000 mask 0000ffff.*eth\\+12: val 00010000 mask 0000ffff.*eth\\+12: val 00000000 mask 0000ffff.*eth\\+12: val 00010000 mask 0000ffff.*eth\\+12: val 00000000 mask 0000ffff",
746        "matchCount": "1",
747        "teardown": [
748            "$TC actions flush action pedit"
749        ]
750    },
751    {
752        "id": "dec4",
753        "name": "Add pedit action with LAYERED_OP eth set type (INVALID)",
754        "category": [
755            "actions",
756            "pedit",
757            "layered_op"
758        ],
759        "setup": [
760            [
761                "$TC actions flush action pedit",
762                0,
763                1,
764                255
765            ]
766        ],
767        "cmdUnderTest": "$TC actions add action pedit ex munge eth type set 0xabcdef",
768        "expExitCode": "255",
769        "verifyCmd": "$TC actions list action pedit",
770        "matchPattern": "action order [0-9]+:  pedit action pass keys 1.*key #0  at eth+12: val ",
771        "matchCount": "0",
772        "teardown": []
773    },
774    {
775        "id": "ab06",
776        "name": "Add pedit action with LAYERED_OP eth add type",
777        "category": [
778            "actions",
779            "pedit",
780            "layered_op"
781        ],
782        "setup": [
783            [
784                "$TC actions flush action pedit",
785                0,
786                1,
787                255
788            ]
789        ],
790        "cmdUnderTest": "$TC actions add action pedit ex munge eth type add 0x1",
791        "expExitCode": "0",
792        "verifyCmd": "$TC actions list action pedit",
793        "matchPattern": "action order [0-9]+:  pedit action pass keys 1.*key #0  at eth\\+12: add 00010000 mask 0000ffff",
794        "matchCount": "1",
795        "teardown": [
796            "$TC actions flush action pedit"
797        ]
798    },
799    {
800        "id": "918d",
801        "name": "Add pedit action with LAYERED_OP eth invert src",
802        "category": [
803            "actions",
804            "pedit",
805            "layered_op"
806        ],
807        "setup": [
808            [
809                "$TC actions flush action pedit",
810                0,
811                1,
812                255
813            ]
814        ],
815        "cmdUnderTest": "$TC actions add action pedit ex munge eth src invert",
816        "expExitCode": "0",
817        "verifyCmd": "$TC actions list action pedit",
818        "matchPattern": "action order [0-9]+:  pedit action pass keys 2.*key #0  at eth\\+4: val 0000ff00 mask ffff0000.*key #1  at eth\\+8: val 00000000 mask 00000000",
819        "matchCount": "1",
820        "teardown": [
821            "$TC actions flush action pedit"
822        ]
823    },
824    {
825        "id": "a8d4",
826        "name": "Add pedit action with LAYERED_OP eth invert dst",
827        "category": [
828            "actions",
829            "pedit",
830            "layered_op"
831        ],
832        "setup": [
833            [
834                "$TC actions flush action pedit",
835                0,
836                1,
837                255
838            ]
839        ],
840        "cmdUnderTest": "$TC actions add action pedit ex munge eth dst invert",
841        "expExitCode": "0",
842        "verifyCmd": "$TC actions list action pedit",
843        "matchPattern": "action order [0-9]+:  pedit action pass keys 2.*key #0  at eth\\+0: val ff000000 mask 00000000.*key #1  at eth\\+4: val 00000000 mask 0000ffff",
844        "matchCount": "1",
845        "teardown": [
846            "$TC actions flush action pedit"
847        ]
848    },
849    {
850        "id": "ee13",
851        "name": "Add pedit action with LAYERED_OP eth invert type",
852        "category": [
853            "actions",
854            "pedit",
855            "layered_op"
856        ],
857        "setup": [
858            [
859                "$TC actions flush action pedit",
860                0,
861                1,
862                255
863            ]
864        ],
865        "cmdUnderTest": "$TC actions add action pedit ex munge eth type invert",
866        "expExitCode": "0",
867        "verifyCmd": "$TC actions list action pedit",
868        "matchPattern": "action order [0-9]+:  pedit action pass keys 1.*key #0  at eth\\+12: val ffff0000 mask ffffffff",
869        "matchCount": "1",
870        "teardown": [
871            "$TC actions flush action pedit"
872        ]
873    },
874    {
875        "id": "7588",
876        "name": "Add pedit action with LAYERED_OP ip set src",
877        "category": [
878            "actions",
879            "pedit",
880            "layered_op"
881        ],
882        "setup": [
883            [
884                "$TC actions flush action pedit",
885                0,
886                1,
887                255
888            ]
889        ],
890        "cmdUnderTest": "$TC actions add action pedit munge ip src set 1.1.1.1",
891        "expExitCode": "0",
892        "verifyCmd": "$TC actions list action pedit",
893        "matchPattern": "action order [0-9]+:  pedit action pass keys 1.*key #0  at 12: val 01010101 mask 00000000",
894        "matchCount": "1",
895        "teardown": [
896            "$TC actions flush action pedit"
897        ]
898    },
899    {
900        "id": "0fa7",
901        "name": "Add pedit action with LAYERED_OP ip set dst",
902        "category": [
903            "actions",
904            "pedit",
905            "layered_op"
906        ],
907        "setup": [
908            [
909                "$TC actions flush action pedit",
910                0,
911                1,
912                255
913            ]
914        ],
915        "cmdUnderTest": "$TC actions add action pedit munge ip dst set 2.2.2.2",
916        "expExitCode": "0",
917        "verifyCmd": "$TC actions list action pedit",
918        "matchPattern": "action order [0-9]+:  pedit action pass keys 1.*key #0  at 16: val 02020202 mask 00000000",
919        "matchCount": "1",
920        "teardown": [
921            "$TC actions flush action pedit"
922        ]
923    },
924    {
925        "id": "5810",
926        "name": "Add pedit action with LAYERED_OP ip set src & dst",
927        "category": [
928            "actions",
929            "pedit",
930            "layered_op"
931        ],
932        "setup": [
933            [
934                "$TC actions flush action pedit",
935                0,
936                1,
937                255
938            ]
939        ],
940        "cmdUnderTest": "$TC actions add action pedit munge ip src set 18.52.86.120 munge ip dst set 18.52.86.120",
941        "expExitCode": "0",
942        "verifyCmd": "$TC actions list action pedit | grep 'key '",
943        "matchPattern": " 12: val 12345678 mask 00000000.* 16: val 12345678 mask 00000000",
944        "matchCount": "1",
945        "teardown": [
946            "$TC actions flush action pedit"
947        ]
948    },
949    {
950        "id": "1092",
951        "name": "Add pedit action with LAYERED_OP ip set ihl & dsfield",
952        "category": [
953            "actions",
954            "pedit",
955            "layered_op"
956        ],
957        "setup": [
958            [
959                "$TC actions flush action pedit",
960                0,
961                1,
962                255
963            ]
964        ],
965        "cmdUnderTest": "$TC actions add action pedit munge ip ihl set 0xff munge ip dsfield set 0xff",
966        "expExitCode": "0",
967        "verifyCmd": "$TC actions list action pedit | grep 'key '",
968        "matchPattern": " 0: val 0f000000 mask f0ffffff.* 0: val 00ff0000 mask ff00ffff",
969        "matchCount": "1",
970        "teardown": [
971            "$TC actions flush action pedit"
972        ]
973    },
974    {
975        "id": "02d8",
976        "name": "Add pedit action with LAYERED_OP ip set ttl & protocol",
977        "category": [
978            "actions",
979            "pedit",
980            "layered_op"
981        ],
982        "setup": [
983            [
984                "$TC actions flush action pedit",
985                0,
986                1,
987                255
988            ]
989        ],
990        "cmdUnderTest": "$TC actions add action pedit munge ip ttl set 0x1 munge ip protocol set 0xff",
991        "expExitCode": "0",
992        "verifyCmd": "$TC actions list action pedit | grep 'key '",
993        "matchPattern": " 8: val 01000000 mask 00ffffff.* 8: val 00ff0000 mask ff00ffff",
994        "matchCount": "1",
995        "teardown": [
996            "$TC actions flush action pedit"
997        ]
998    },
999    {
1000        "id": "3e2d",
1001        "name": "Add pedit action with LAYERED_OP ip set ttl (INVALID)",
1002        "category": [
1003            "actions",
1004            "pedit",
1005            "layered_op"
1006        ],
1007        "setup": [
1008            [
1009                "$TC actions flush action pedit",
1010                0,
1011                1,
1012                255
1013            ]
1014        ],
1015        "cmdUnderTest": "$TC actions add action pedit munge ip ttl set 300",
1016        "expExitCode": "255",
1017        "verifyCmd": "/bin/true",
1018        "matchPattern": " ",
1019        "matchCount": "0",
1020        "teardown": [
1021            "$TC actions flush action pedit"
1022        ]
1023    },
1024    {
1025        "id": "31ae",
1026        "name": "Add pedit action with LAYERED_OP ip ttl clear/set",
1027        "category": [
1028            "actions",
1029            "pedit",
1030            "layered_op"
1031        ],
1032        "setup": [
1033            [
1034                "$TC actions flush action pedit",
1035                0,
1036                1,
1037                255
1038            ]
1039        ],
1040        "cmdUnderTest": "$TC actions add action pedit munge ip ttl clear munge ip ttl set 0x1",
1041        "expExitCode": "0",
1042        "verifyCmd": "$TC actions list action pedit | grep 'key '",
1043        "matchPattern": " 8: val 00000000 mask 00ffffff.* 8: val 01000000 mask 00ffffff",
1044        "matchCount": "1",
1045        "teardown": [
1046            "$TC actions flush action pedit"
1047        ]
1048    },
1049    {
1050        "id": "486f",
1051        "name": "Add pedit action with LAYERED_OP ip set duplicate fields",
1052        "category": [
1053            "actions",
1054            "pedit",
1055            "layered_op"
1056        ],
1057        "setup": [
1058            [
1059                "$TC actions flush action pedit",
1060                0,
1061                1,
1062                255
1063            ]
1064        ],
1065        "cmdUnderTest": "$TC actions add action pedit munge ip ttl set 0x1 munge ip ttl set 0x1",
1066        "expExitCode": "0",
1067        "verifyCmd": "$TC actions list action pedit | grep 'key '",
1068        "matchPattern": " 8: val 01000000 mask 00ffffff.* 8: val 01000000 mask 00ffffff",
1069        "matchCount": "1",
1070        "teardown": [
1071            "$TC actions flush action pedit"
1072        ]
1073    },
1074    {
1075        "id": "e790",
1076        "name": "Add pedit action with LAYERED_OP ip set ce, df, mf, firstfrag, nofrag fields",
1077        "category": [
1078            "actions",
1079            "pedit",
1080            "layered_op"
1081        ],
1082        "setup": [
1083            [
1084                "$TC actions flush action pedit",
1085                0,
1086                1,
1087                255
1088            ]
1089        ],
1090        "cmdUnderTest": "$TC actions add action pedit munge ip ce set 0xff munge ip df set 0xff munge ip mf set 0xff munge ip firstfrag set 0xff munge ip nofrag set 0xff",
1091        "expExitCode": "0",
1092        "verifyCmd": "$TC actions list action pedit | grep 'key '",
1093        "matchPattern": " 4: val 00008000 mask ffff7fff.* 4: val 00004000 mask ffffbfff.* 4: val 00002000 mask ffffdfff.* 4: val 00001f00 mask ffffe0ff.* 4: val 00003f00 mask ffffc0ff",
1094        "matchCount": "1",
1095        "teardown": [
1096            "$TC actions flush action pedit"
1097        ]
1098    },
1099    {
1100        "id": "cc8a",
1101        "name": "Add pedit action with LAYERED_OP ip set tos",
1102        "category": [
1103            "actions",
1104            "pedit",
1105            "layered_op"
1106        ],
1107        "setup": [
1108            [
1109                "$TC actions flush action pedit",
1110                0,
1111                1,
1112                255
1113            ]
1114        ],
1115        "cmdUnderTest": "$TC actions add action pedit munge ip tos set 0x4 continue",
1116        "expExitCode": "0",
1117        "verifyCmd": "$TC actions list action pedit",
1118        "matchPattern": "action order [0-9]+:  pedit action continue keys 1.*key #0  at 0: val 00040000 mask ff00ffff",
1119        "matchCount": "1",
1120        "teardown": [
1121            "$TC actions flush action pedit"
1122        ]
1123    },
1124    {
1125        "id": "7a17",
1126        "name": "Add pedit action with LAYERED_OP ip set precedence",
1127        "category": [
1128            "actions",
1129            "pedit",
1130            "layered_op"
1131        ],
1132        "setup": [
1133            [
1134                "$TC actions flush action pedit",
1135                0,
1136                1,
1137                255
1138            ]
1139        ],
1140        "cmdUnderTest": "$TC actions add action pedit munge ip precedence set 3 jump 2",
1141        "expExitCode": "0",
1142        "verifyCmd": "$TC actions list action pedit",
1143        "matchPattern": "action order [0-9]+:  pedit action jump 2 keys 1.*key #0  at 0: val 00030000 mask ff00ffff",
1144        "matchCount": "1",
1145        "teardown": [
1146            "$TC actions flush action pedit"
1147        ]
1148    },
1149    {
1150        "id": "c3b6",
1151        "name": "Add pedit action with LAYERED_OP ip add tos",
1152        "category": [
1153            "actions",
1154            "pedit",
1155            "layered_op"
1156        ],
1157        "setup": [
1158            [
1159                "$TC actions flush action pedit",
1160                0,
1161                1,
1162                255
1163            ]
1164        ],
1165        "cmdUnderTest": "$TC actions add action pedit ex munge ip tos add 0x1 pass",
1166        "expExitCode": "0",
1167        "verifyCmd": "$TC actions list action pedit",
1168        "matchPattern": "action order [0-9]+:  pedit action pass keys 1.*key #0  at ipv4\\+0: add 00010000 mask ff00ffff",
1169        "matchCount": "1",
1170        "teardown": [
1171            "$TC actions flush action pedit"
1172        ]
1173    },
1174    {
1175        "id": "43d3",
1176        "name": "Add pedit action with LAYERED_OP ip add precedence",
1177        "category": [
1178            "actions",
1179            "pedit",
1180            "layered_op"
1181        ],
1182        "setup": [
1183            [
1184                "$TC actions flush action pedit",
1185                0,
1186                1,
1187                255
1188            ]
1189        ],
1190        "cmdUnderTest": "$TC actions add action pedit ex munge ip precedence add 0x1 pipe",
1191        "expExitCode": "0",
1192        "verifyCmd": "$TC actions list action pedit",
1193        "matchPattern": "action order [0-9]+:  pedit action pipe keys 1.*key #0  at ipv4\\+0: add 00010000 mask ff00ffff",
1194        "matchCount": "1",
1195        "teardown": [
1196            "$TC actions flush action pedit"
1197        ]
1198    },
1199    {
1200        "id": "438e",
1201        "name": "Add pedit action with LAYERED_OP ip clear tos",
1202        "category": [
1203            "actions",
1204            "pedit",
1205            "layered_op"
1206        ],
1207        "setup": [
1208            [
1209                "$TC actions flush action pedit",
1210                0,
1211                1,
1212                255
1213            ]
1214        ],
1215        "cmdUnderTest": "$TC actions add action pedit munge ip tos clear continue",
1216        "expExitCode": "0",
1217        "verifyCmd": "$TC actions list action pedit",
1218        "matchPattern": "action order [0-9]+:  pedit action continue keys 1.*key #0  at 0: val 00000000 mask ff00ffff",
1219        "matchCount": "1",
1220        "teardown": [
1221            "$TC actions flush action pedit"
1222        ]
1223    },
1224    {
1225        "id": "6b1b",
1226        "name": "Add pedit action with LAYERED_OP ip clear precedence",
1227        "category": [
1228            "actions",
1229            "pedit",
1230            "layered_op"
1231        ],
1232        "setup": [
1233            [
1234                "$TC actions flush action pedit",
1235                0,
1236                1,
1237                255
1238            ]
1239        ],
1240        "cmdUnderTest": "$TC actions add action pedit munge ip precedence clear jump 2",
1241        "expExitCode": "0",
1242        "verifyCmd": "$TC actions list action pedit",
1243        "matchPattern": "action order [0-9]+:  pedit action jump 2 keys 1.*key #0  at 0: val 00000000 mask ff00ffff",
1244        "matchCount": "1",
1245        "teardown": [
1246            "$TC actions flush action pedit"
1247        ]
1248    },
1249    {
1250        "id": "824a",
1251        "name": "Add pedit action with LAYERED_OP ip invert tos",
1252        "category": [
1253            "actions",
1254            "pedit",
1255            "layered_op"
1256        ],
1257        "setup": [
1258            [
1259                "$TC actions flush action pedit",
1260                0,
1261                1,
1262                255
1263            ]
1264        ],
1265        "cmdUnderTest": "$TC actions add action pedit munge ip tos invert pipe",
1266        "expExitCode": "0",
1267        "verifyCmd": "$TC actions list action pedit",
1268        "matchPattern": "action order [0-9]+:  pedit action pipe keys 1.*key #0  at 0: val 00ff0000 mask ffffffff",
1269        "matchCount": "1",
1270        "teardown": [
1271            "$TC actions flush action pedit"
1272        ]
1273    },
1274    {
1275        "id": "106f",
1276        "name": "Add pedit action with LAYERED_OP ip invert precedence",
1277        "category": [
1278            "actions",
1279            "pedit",
1280            "layered_op"
1281        ],
1282        "setup": [
1283            [
1284                "$TC actions flush action pedit",
1285                0,
1286                1,
1287                255
1288            ]
1289        ],
1290        "cmdUnderTest": "$TC actions add action pedit munge ip precedence invert reclassify",
1291        "expExitCode": "0",
1292        "verifyCmd": "$TC actions list action pedit",
1293        "matchPattern": "action order [0-9]+:  pedit action reclassify keys 1.*key #0  at 0: val 00ff0000 mask ffffffff",
1294        "matchCount": "1",
1295        "teardown": [
1296            "$TC actions flush action pedit"
1297        ]
1298    },
1299    {
1300        "id": "6829",
1301        "name": "Add pedit action with LAYERED_OP beyond ip set dport & sport",
1302        "category": [
1303            "actions",
1304            "pedit",
1305            "layered_op"
1306        ],
1307        "setup": [
1308            [
1309                "$TC actions flush action pedit",
1310                0,
1311                1,
1312                255
1313            ]
1314        ],
1315        "cmdUnderTest": "$TC actions add action pedit munge ip dport set 0x1234 munge ip sport set 0x5678",
1316        "expExitCode": "0",
1317        "verifyCmd": "$TC actions list action pedit | grep 'key '",
1318        "matchPattern": " 20: val 00001234 mask ffff0000.* 20: val 56780000 mask 0000ffff",
1319        "matchCount": "1",
1320        "teardown": [
1321            "$TC actions flush action pedit"
1322        ]
1323    },
1324    {
1325        "id": "afd8",
1326        "name": "Add pedit action with LAYERED_OP beyond ip set icmp_type & icmp_code",
1327        "category": [
1328            "actions",
1329            "pedit",
1330            "layered_op"
1331        ],
1332        "setup": [
1333            [
1334                "$TC actions flush action pedit",
1335                0,
1336                1,
1337                255
1338            ]
1339        ],
1340        "cmdUnderTest": "$TC actions add action pedit munge ip icmp_type set 0xff munge ip icmp_code set 0xff",
1341        "expExitCode": "0",
1342        "verifyCmd": "$TC actions list action pedit | grep 'key '",
1343        "matchPattern": " 20: val ff000000 mask 00ffffff.* 20: val ff000000 mask 00ffffff",
1344        "matchCount": "1",
1345        "teardown": [
1346            "$TC actions flush action pedit"
1347        ]
1348    },
1349    {
1350        "id": "3143",
1351        "name": "Add pedit action with LAYERED_OP beyond ip set dport (INVALID)",
1352        "category": [
1353            "actions",
1354            "pedit",
1355            "layered_op"
1356        ],
1357        "setup": [
1358            [
1359                "$TC actions flush action pedit",
1360                0,
1361                1,
1362                255
1363            ]
1364        ],
1365        "cmdUnderTest": "$TC actions add action pedit ex munge ip dport set 0x1234",
1366        "expExitCode": "255",
1367        "verifyCmd": "/bin/true",
1368        "matchPattern": " ",
1369        "matchCount": "0",
1370        "teardown": [
1371            "$TC actions flush action pedit"
1372        ]
1373    },
1374    {
1375        "id": "815c",
1376        "name": "Add pedit action with LAYERED_OP ip6 set src",
1377        "category": [
1378            "actions",
1379            "pedit",
1380            "layered_op"
1381        ],
1382        "setup": [
1383            [
1384                "$TC actions flush action pedit",
1385                0,
1386                1,
1387                255
1388            ]
1389        ],
1390        "cmdUnderTest": "$TC actions add action pedit ex munge ip6 src set 2001:0db8:0:f101::1",
1391        "expExitCode": "0",
1392        "verifyCmd": "$TC actions list action pedit",
1393        "matchPattern": "action order [0-9]+:  pedit action pass keys 4.*key #0  at ipv6\\+8: val 20010db8 mask 00000000.*key #1  at ipv6\\+12: val 0000f101 mask 00000000.*key #2  at ipv6\\+16: val 00000000 mask 00000000.*key #3  at ipv6\\+20: val 00000001 mask 00000000",
1394        "matchCount": "1",
1395        "teardown": [
1396            "$TC actions flush action pedit"
1397        ]
1398    },
1399    {
1400        "id": "4dae",
1401        "name": "Add pedit action with LAYERED_OP ip6 set dst",
1402        "category": [
1403            "actions",
1404            "pedit",
1405            "layered_op"
1406        ],
1407        "setup": [
1408            [
1409                "$TC actions flush action pedit",
1410                0,
1411                1,
1412                255
1413            ]
1414        ],
1415        "cmdUnderTest": "$TC actions add action pedit ex munge ip6 dst set 2001:0db8:0:f101::1",
1416        "expExitCode": "0",
1417        "verifyCmd": "$TC actions list action pedit",
1418        "matchPattern": "action order [0-9]+:  pedit action pass keys 4.*key #0  at ipv6\\+24: val 20010db8 mask 00000000.*key #1  at ipv6\\+28: val 0000f101 mask 00000000.*key #2  at ipv6\\+32: val 00000000 mask 00000000.*key #3  at ipv6\\+36: val 00000001 mask 00000000",
1419        "matchCount": "1",
1420        "teardown": [
1421            "$TC actions flush action pedit"
1422        ]
1423    },
1424    {
1425        "id": "fc1f",
1426        "name": "Add pedit action with LAYERED_OP ip6 set src & dst",
1427        "category": [
1428            "actions",
1429            "pedit",
1430            "layered_op"
1431        ],
1432        "setup": [
1433            [
1434                "$TC actions flush action pedit",
1435                0,
1436                1,
1437                255
1438            ]
1439        ],
1440        "cmdUnderTest": "$TC actions add action pedit ex munge ip6 src set 2001:0db8:0:f101::1 munge ip6 dst set 2001:0db8:0:f101::1",
1441        "expExitCode": "0",
1442        "verifyCmd": "$TC actions list action pedit | grep 'key '",
1443        "matchPattern": "ipv6\\+8: val 20010db8 mask 00000000.*ipv6\\+12: val 0000f101 mask 00000000.*ipv6\\+16: val 00000000 mask 00000000.*ipv6\\+20: val 00000001 mask 00000000.*ipv6\\+24: val 20010db8 mask 00000000.*ipv6\\+28: val 0000f101 mask 00000000.*ipv6\\+32: val 00000000 mask 00000000.*ipv6\\+36: val 00000001 mask 00000000",
1444        "matchCount": "1",
1445        "teardown": [
1446            "$TC actions flush action pedit"
1447        ]
1448    },
1449    {
1450        "id": "6d34",
1451        "name": "Add pedit action with LAYERED_OP ip6 dst retain value (INVALID)",
1452        "category": [
1453            "actions",
1454            "pedit",
1455            "layered_op"
1456        ],
1457        "setup": [
1458            [
1459                "$TC actions flush action pedit",
1460                0,
1461                1,
1462                255
1463            ]
1464        ],
1465        "cmdUnderTest": "$TC actions add action pedit ex munge ip6 dst set 2001:0db8:0:f101::1 retain 0xff0000",
1466        "expExitCode": "255",
1467        "verifyCmd": "/bin/true",
1468        "matchPattern": " ",
1469        "matchCount": "0",
1470        "teardown": [
1471            "$TC actions flush action pedit"
1472        ]
1473    },
1474    {
1475        "id": "6f5e",
1476        "name": "Add pedit action with LAYERED_OP ip6 flow_lbl",
1477        "category": [
1478            "actions",
1479            "pedit",
1480            "layered_op"
1481        ],
1482        "setup": [
1483            [
1484                "$TC actions flush action pedit",
1485                0,
1486                1,
1487                255
1488            ]
1489        ],
1490        "cmdUnderTest": "$TC actions add action pedit ex munge ip6 flow_lbl set 0xfffff",
1491        "expExitCode": "0",
1492        "verifyCmd": "$TC actions list action pedit | grep 'key '",
1493        "matchPattern": "ipv6\\+0: val 0007ffff mask fff80000",
1494        "matchCount": "1",
1495        "teardown": [
1496            "$TC actions flush action pedit"
1497        ]
1498    },
1499    {
1500        "id": "6795",
1501        "name": "Add pedit action with LAYERED_OP ip6 set payload_len, nexthdr, hoplimit",
1502        "category": [
1503            "actions",
1504            "pedit",
1505            "layered_op"
1506        ],
1507        "setup": [
1508            [
1509                "$TC actions flush action pedit",
1510                0,
1511                1,
1512                255
1513            ]
1514        ],
1515        "cmdUnderTest": "$TC actions add action pedit ex munge ip6 payload_len set 0xffff munge ip6 nexthdr set 0xff munge ip6 hoplimit set 0xff",
1516        "expExitCode": "0",
1517        "verifyCmd": "$TC actions list action pedit | grep 'key '",
1518        "matchPattern": "ipv6\\+4: val ffff0000 mask 0000ffff.*ipv6\\+4: val 0000ff00 mask ffff00ff.*ipv6\\+4: val 000000ff mask ffffff00",
1519        "matchCount": "1",
1520        "teardown": [
1521            "$TC actions flush action pedit"
1522        ]
1523    },
1524    {
1525        "id": "1442",
1526        "name": "Add pedit action with LAYERED_OP tcp set dport & sport",
1527        "category": [
1528            "actions",
1529            "pedit",
1530            "layered_op"
1531        ],
1532        "setup": [
1533            [
1534                "$TC actions flush action pedit",
1535                0,
1536                1,
1537                255
1538            ]
1539        ],
1540        "cmdUnderTest": "$TC actions add action pedit ex munge tcp dport set 4789 munge tcp sport set 1",
1541        "expExitCode": "0",
1542        "verifyCmd": "$TC actions list action pedit | grep 'key '",
1543        "matchPattern": "tcp\\+0: val 000012b5 mask ffff0000.*tcp\\+0: val 00010000 mask 0000ffff",
1544        "matchCount": "1",
1545        "teardown": [
1546            "$TC actions flush action pedit"
1547        ]
1548    },
1549    {
1550        "id": "b7ac",
1551        "name": "Add pedit action with LAYERED_OP tcp sport set (INVALID)",
1552        "category": [
1553            "actions",
1554            "pedit",
1555            "layered_op"
1556        ],
1557        "setup": [
1558            [
1559                "$TC actions flush action pedit",
1560                0,
1561                1,
1562                255
1563            ]
1564        ],
1565        "cmdUnderTest": "$TC actions add action pedit ex munge tcp sport set -200",
1566        "expExitCode": "255",
1567        "verifyCmd": "/bin/true",
1568        "matchPattern": " ",
1569        "matchCount": "0",
1570        "teardown": [
1571            "$TC actions flush action pedit"
1572        ]
1573    },
1574    {
1575        "id": "cfcc",
1576        "name": "Add pedit action with LAYERED_OP tcp flags set",
1577        "category": [
1578            "actions",
1579            "pedit",
1580            "layered_op"
1581        ],
1582        "setup": [
1583            [
1584                "$TC actions flush action pedit",
1585                0,
1586                1,
1587                255
1588            ]
1589        ],
1590        "cmdUnderTest": "$TC actions add action pedit ex munge tcp flags set 0x16",
1591        "expExitCode": "0",
1592        "verifyCmd": "$TC actions list action pedit | grep 'key '",
1593        "matchPattern": "tcp\\+12: val 00160000 mask ff00ffff",
1594        "matchCount": "1",
1595        "teardown": [
1596            "$TC actions flush action pedit"
1597        ]
1598    },
1599    {
1600        "id": "3bc4",
1601        "name": "Add pedit action with LAYERED_OP tcp set dport, sport & flags fields",
1602        "category": [
1603            "actions",
1604            "pedit",
1605            "layered_op"
1606        ],
1607        "setup": [
1608            [
1609                "$TC actions flush action pedit",
1610                0,
1611                1,
1612                255
1613            ]
1614        ],
1615        "cmdUnderTest": "$TC actions add action pedit ex munge tcp dport set 4789 munge tcp sport set 1 munge tcp flags set 0x1",
1616        "expExitCode": "0",
1617        "verifyCmd": "$TC actions list action pedit | grep 'key '",
1618        "matchPattern": "tcp\\+0: val 000012b5 mask ffff0000.*tcp\\+0: val 00010000 mask 0000ffff.*tcp\\+12: val 00010000 mask ff00ffff",
1619        "matchCount": "1",
1620        "teardown": [
1621            "$TC actions flush action pedit"
1622        ]
1623    },
1624    {
1625        "id": "f1c8",
1626        "name": "Add pedit action with LAYERED_OP udp set dport & sport",
1627        "category": [
1628            "actions",
1629            "pedit",
1630            "layered_op"
1631        ],
1632        "setup": [
1633            [
1634                "$TC actions flush action pedit",
1635                0,
1636                1,
1637                255
1638            ]
1639        ],
1640        "cmdUnderTest": "$TC actions add action pedit ex munge udp dport set 4789 munge udp sport set 4789",
1641        "expExitCode": "0",
1642        "verifyCmd": "$TC actions list action pedit | grep 'key '",
1643        "matchPattern": "udp\\+0: val 000012b5 mask ffff0000.*udp\\+0: val 12b50000 mask 0000ffff",
1644        "matchCount": "1",
1645        "teardown": [
1646            "$TC actions flush action pedit"
1647        ]
1648    },
1649    {
1650        "id": "d784",
1651        "name": "Add pedit action with mixed RAW/LAYERED_OP #1",
1652        "category": [
1653            "actions",
1654            "pedit",
1655            "layered_op",
1656            "raw_op"
1657        ],
1658        "setup": [
1659            [
1660                "$TC actions flush action pedit",
1661                0,
1662                1,
1663                255
1664            ]
1665        ],
1666        "cmdUnderTest": "$TC actions add action pedit ex munge eth src set 11:22:33:44:55:66 munge ip ttl set 0xff munge tcp flags clear munge offset 15 u8 add 40 retain 0xf0 munge udp dport add 1",
1667        "expExitCode": "0",
1668        "verifyCmd": "$TC actions list action pedit | grep 'key '",
1669        "matchPattern": "eth\\+4: val 00001122 mask ffff0000.*eth\\+8: val 33445566 mask 00000000.*ipv4\\+8: val ff000000 mask 00ffffff.*tcp\\+12: val 00000000 mask ff00ffff.* 12: add 00000020 mask ffffff0f.*udp\\+0: add 00000001 mask ffff0000",
1670        "matchCount": "1",
1671        "teardown": [
1672            "$TC actions flush action pedit"
1673        ]
1674    },
1675    {
1676        "id": "70ca",
1677        "name": "Add pedit action with mixed RAW/LAYERED_OP #2",
1678        "category": [
1679            "actions",
1680            "pedit",
1681            "layered_op",
1682            "raw_op"
1683        ],
1684        "setup": [
1685            [
1686                "$TC actions flush action pedit",
1687                0,
1688                1,
1689                255
1690            ]
1691        ],
1692        "cmdUnderTest": "$TC actions add action pedit ex munge eth src set 11:22:33:44:55:66 munge eth dst set ff:ee:dd:cc:bb:aa munge ip6 payload_len set 0xffff munge ip6 nexthdr set 0xff munge ip6 hoplimit preserve munge offset 0 u8 set 0x12 munge offset 1 u16 set 0x3456 munge offset 3 u8 set 0x78 munge ip ttl set 0xaa munge ip protocol set 0xff",
1693        "expExitCode": "0",
1694        "verifyCmd": "$TC actions list action pedit | grep 'key '",
1695        "matchPattern": "eth\\+4: val 00001122 mask ffff0000.*eth\\+8: val 33445566 mask 00000000.*eth\\+0: val ffeeddcc mask 00000000.*eth\\+4: val bbaa0000 mask 0000ffff.*ipv6\\+4: val ffff0000 mask 0000ffff.*ipv6\\+4: val 0000ff00 mask ffff00ff.*ipv6\\+4: val 00000000 mask ffffffff.* 0: val 12000000 mask 00ffffff.* 0: val 00345600 mask ff0000ff.* 0: val 00000078 mask ffffff00.*ipv4\\+8: val aa000000 mask 00ffffff.*ipv4\\+8: val 00ff0000 mask ff00ffff",
1696        "matchCount": "1",
1697        "teardown": [
1698            "$TC actions flush action pedit"
1699        ]
1700    }
1701]
1702