1[
2    {
3        "id": "901f",
4        "name": "Add fw filter with prio at 32-bit maxixum",
5        "category": [
6            "filter",
7            "fw"
8        ],
9	"plugins": {
10		"requires": "nsPlugin"
11	},
12        "setup": [
13            "$TC qdisc add dev $DEV1 ingress"
14        ],
15        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 65535 fw action ok",
16        "expExitCode": "0",
17        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 65535 protocol all fw",
18        "matchPattern": "pref 65535 fw.*handle 0x1.*gact action pass",
19        "matchCount": "1",
20        "teardown": [
21            "$TC qdisc del dev $DEV1 ingress"
22        ]
23    },
24    {
25        "id": "51e2",
26        "name": "Add fw filter with prio exceeding 32-bit maxixum",
27        "category": [
28            "filter",
29            "fw"
30        ],
31	"plugins": {
32		"requires": "nsPlugin"
33	},
34        "setup": [
35            "$TC qdisc add dev $DEV1 ingress"
36        ],
37        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 65536 fw action ok",
38        "expExitCode": "255",
39        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 65536 protocol all fw",
40        "matchPattern": "pref 65536 fw.*handle 0x1.*gact action pass",
41        "matchCount": "0",
42        "teardown": [
43            "$TC qdisc del dev $DEV1 ingress"
44        ]
45    },
46    {
47        "id": "d987",
48        "name": "Add fw filter with action ok",
49        "category": [
50            "filter",
51            "fw"
52        ],
53	"plugins": {
54		"requires": "nsPlugin"
55	},
56	"plugins": {
57		"requires": "nsPlugin"
58	},
59	"plugins": {
60		"requires": "nsPlugin"
61	},
62	"plugins": {
63		"requires": "nsPlugin"
64	},
65	"plugins": {
66		"requires": "nsPlugin"
67	},
68	"plugins": {
69		"requires": "nsPlugin"
70	},
71	"plugins": {
72		"requires": "nsPlugin"
73	},
74	"plugins": {
75		"requires": "nsPlugin"
76	},
77	"plugins": {
78		"requires": "nsPlugin"
79	},
80	"plugins": {
81		"requires": "nsPlugin"
82	},
83	"plugins": {
84		"requires": "nsPlugin"
85	},
86	"plugins": {
87		"requires": "nsPlugin"
88	},
89	"plugins": {
90		"requires": "nsPlugin"
91	},
92	"plugins": {
93		"requires": "nsPlugin"
94	},
95	"plugins": {
96		"requires": "nsPlugin"
97	},
98	"plugins": {
99		"requires": "nsPlugin"
100	},
101	"plugins": {
102		"requires": "nsPlugin"
103	},
104	"plugins": {
105		"requires": "nsPlugin"
106	},
107	"plugins": {
108		"requires": "nsPlugin"
109	},
110	"plugins": {
111		"requires": "nsPlugin"
112	},
113	"plugins": {
114		"requires": "nsPlugin"
115	},
116	"plugins": {
117		"requires": "nsPlugin"
118	},
119	"plugins": {
120		"requires": "nsPlugin"
121	},
122	"plugins": {
123		"requires": "nsPlugin"
124	},
125	"plugins": {
126		"requires": "nsPlugin"
127	},
128	"plugins": {
129		"requires": "nsPlugin"
130	},
131	"plugins": {
132		"requires": "nsPlugin"
133	},
134	"plugins": {
135		"requires": "nsPlugin"
136	},
137	"plugins": {
138		"requires": "nsPlugin"
139	},
140	"plugins": {
141		"requires": "nsPlugin"
142	},
143	"plugins": {
144		"requires": "nsPlugin"
145	},
146	"plugins": {
147		"requires": "nsPlugin"
148	},
149	"plugins": {
150		"requires": "nsPlugin"
151	},
152	"plugins": {
153		"requires": "nsPlugin"
154	},
155	"plugins": {
156		"requires": "nsPlugin"
157	},
158	"plugins": {
159		"requires": "nsPlugin"
160	},
161        "setup": [
162            "$TC qdisc add dev $DEV1 ingress"
163        ],
164        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action ok",
165        "expExitCode": "0",
166        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
167        "matchPattern": "handle 0x1.*gact action pass",
168        "matchCount": "1",
169        "teardown": [
170            "$TC qdisc del dev $DEV1 ingress"
171        ]
172    },
173    {
174        "id": "c591",
175        "name": "Add fw filter with action ok by reference",
176        "__comment": "We add sleep here because action might have not been deleted by workqueue just yet. Remove this when the behaviour is fixed.",
177        "category": [
178            "filter",
179            "fw"
180        ],
181        "setup": [
182            "$TC qdisc add dev $DEV1 ingress",
183            "/bin/sleep 1",
184            "$TC actions add action gact ok index 1"
185        ],
186        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action gact index 1",
187        "expExitCode": "0",
188        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
189        "matchPattern": "handle 0x1.*gact action pass.*index 1 ref 2 bind 1",
190        "matchCount": "1",
191        "teardown": [
192            "$TC qdisc del dev $DEV1 ingress",
193            "/bin/sleep 1",
194            "$TC actions del action gact index 1"
195        ]
196    },
197    {
198        "id": "affe",
199        "name": "Add fw filter with action continue",
200        "category": [
201            "filter",
202            "fw"
203        ],
204        "setup": [
205            "$TC qdisc add dev $DEV1 ingress"
206        ],
207        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action continue",
208        "expExitCode": "0",
209        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
210        "matchPattern": "handle 0x1.*gact action continue",
211        "matchCount": "1",
212        "teardown": [
213            "$TC qdisc del dev $DEV1 ingress"
214        ]
215    },
216    {
217        "id": "38b3",
218        "name": "Add fw filter with action continue by reference",
219        "__comment": "We add sleep here because action might have not been deleted by workqueue just yet. Remove this when the behaviour is fixed.",
220        "category": [
221            "filter",
222            "fw"
223        ],
224        "setup": [
225            "$TC qdisc add dev $DEV1 ingress",
226            "/bin/sleep 1",
227            "$TC actions add action gact continue index 1"
228        ],
229        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action gact index 1",
230        "expExitCode": "0",
231        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
232        "matchPattern": "handle 0x1.*gact action continue.*index 1 ref 2 bind 1",
233        "matchCount": "1",
234        "teardown": [
235            "$TC qdisc del dev $DEV1 ingress",
236            "/bin/sleep 1",
237            "$TC actions del action gact index 1"
238        ]
239    },
240    {
241        "id": "28bc",
242        "name": "Add fw filter with action pipe",
243        "category": [
244            "filter",
245            "fw"
246        ],
247        "setup": [
248            "$TC qdisc add dev $DEV1 ingress"
249        ],
250        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action pipe",
251        "expExitCode": "0",
252        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
253        "matchPattern": "handle 0x1.*gact action pipe",
254        "matchCount": "1",
255        "teardown": [
256            "$TC qdisc del dev $DEV1 ingress"
257        ]
258    },
259    {
260        "id": "6753",
261        "name": "Add fw filter with action pipe by reference",
262        "__comment": "We add sleep here because action might have not been deleted by workqueue just yet.",
263        "category": [
264            "filter",
265            "fw"
266        ],
267        "setup": [
268            "$TC qdisc add dev $DEV1 ingress",
269            "/bin/sleep 1",
270            "$TC actions add action gact pipe index 1"
271        ],
272        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action gact index 1",
273        "expExitCode": "0",
274        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
275        "matchPattern": "handle 0x1.*gact action pipe.*index 1 ref 2 bind 1",
276        "matchCount": "1",
277        "teardown": [
278            "$TC qdisc del dev $DEV1 ingress",
279            "/bin/sleep 1",
280            "$TC actions del action gact index 1"
281        ]
282    },
283    {
284        "id": "8da2",
285        "name": "Add fw filter with action drop",
286        "category": [
287            "filter",
288            "fw"
289        ],
290        "setup": [
291            "$TC qdisc add dev $DEV1 ingress"
292        ],
293        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action drop",
294        "expExitCode": "0",
295        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 protocol all prio 1 fw",
296        "matchPattern": "handle 0x1.*gact action drop",
297        "matchCount": "1",
298        "teardown": [
299            "$TC qdisc del dev $DEV1 ingress"
300        ]
301    },
302    {
303        "id": "6dc6",
304        "name": "Add fw filter with action drop by reference",
305        "__comment": "We add sleep here because action might have not been deleted by workqueue just yet.",
306        "category": [
307            "filter",
308            "fw"
309        ],
310        "setup": [
311            "$TC qdisc add dev $DEV1 ingress",
312            "/bin/sleep 1",
313            "$TC actions add action gact drop index 1"
314        ],
315        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action gact index 1",
316        "expExitCode": "0",
317        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
318        "matchPattern": "handle 0x1.*gact action drop.*index 1 ref 2 bind 1",
319        "matchCount": "1",
320        "teardown": [
321            "$TC qdisc del dev $DEV1 ingress",
322            "/bin/sleep 1",
323            "$TC actions del action gact index 1"
324        ]
325    },
326    {
327        "id": "9436",
328        "name": "Add fw filter with action reclassify",
329        "category": [
330            "filter",
331            "fw"
332        ],
333        "setup": [
334            "$TC qdisc add dev $DEV1 ingress"
335        ],
336        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action reclassify",
337        "expExitCode": "0",
338        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
339        "matchPattern": "handle 0x1.*gact action reclassify",
340        "matchCount": "1",
341        "teardown": [
342            "$TC qdisc del dev $DEV1 ingress"
343        ]
344    },
345    {
346        "id": "3bc2",
347        "name": "Add fw filter with action reclassify by reference",
348        "__comment": "We add sleep here because action might have not been deleted by workqueue just yet.",
349        "category": [
350            "filter",
351            "fw"
352        ],
353        "setup": [
354            "$TC qdisc add dev $DEV1 ingress",
355            "/bin/sleep 1",
356            "$TC actions add action gact reclassify index 1"
357        ],
358        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action gact index 1",
359        "expExitCode": "0",
360        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
361        "matchPattern": "handle 0x1.*gact action reclassify.*index 1 ref 2 bind 1",
362        "matchCount": "1",
363        "teardown": [
364            "$TC qdisc del dev $DEV1 ingress",
365            "/bin/sleep 1",
366            "$TC actions del action gact index 1"
367        ]
368    },
369    {
370        "id": "95bb",
371        "name": "Add fw filter with action jump 10",
372        "category": [
373            "filter",
374            "fw"
375        ],
376        "setup": [
377            "$TC qdisc add dev $DEV1 ingress"
378        ],
379        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action jump 10",
380        "expExitCode": "0",
381        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
382        "matchPattern": "handle 0x1.*gact action jump 10",
383        "matchCount": "1",
384        "teardown": [
385            "$TC qdisc del dev $DEV1 ingress"
386        ]
387    },
388    {
389        "id": "36f7",
390        "name": "Add fw filter with action jump 10 by reference",
391        "__comment": "We add sleep here because action might have not been deleted by workqueue just yet.",
392        "category": [
393            "filter",
394            "fw"
395        ],
396        "setup": [
397            "$TC qdisc add dev $DEV1 ingress",
398            "/bin/sleep 1",
399            "$TC actions add action gact jump 10 index 1"
400        ],
401        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action gact index 1",
402        "expExitCode": "0",
403        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
404        "matchPattern": "handle 0x1.*gact action jump 10.*index 1 ref 2 bind 1",
405        "matchCount": "1",
406        "teardown": [
407            "$TC qdisc del dev $DEV1 ingress",
408            "/bin/sleep 1",
409            "$TC actions del action gact index 1"
410        ]
411    },
412    {
413        "id": "3d74",
414        "name": "Add fw filter with action goto chain 5",
415        "category": [
416            "filter",
417            "fw"
418        ],
419        "setup": [
420            "$TC qdisc add dev $DEV1 ingress"
421        ],
422        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action goto chain 5",
423        "expExitCode": "0",
424        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
425        "matchPattern": "handle 0x1.*gact action goto chain 5",
426        "matchCount": "1",
427        "teardown": [
428            "$TC qdisc del dev $DEV1 ingress"
429        ]
430    },
431    {
432        "id": "eb8f",
433        "name": "Add fw filter with invalid action",
434        "category": [
435            "filter",
436            "fw"
437        ],
438        "setup": [
439            "$TC qdisc add dev $DEV1 ingress"
440        ],
441        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action pump",
442        "expExitCode": "255",
443        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
444        "matchPattern": "handle 0x1.*gact action pump",
445        "matchCount": "0",
446        "teardown": [
447            "$TC qdisc del dev $DEV1 ingress"
448        ]
449    },
450    {
451        "id": "6a79",
452        "name": "Add fw filter with missing mandatory action",
453        "category": [
454            "filter",
455            "fw"
456        ],
457        "setup": [
458            "$TC qdisc add dev $DEV1 ingress"
459        ],
460        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw",
461        "expExitCode": "2",
462        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
463        "matchPattern": "filter protocol all pref [0-9]+ fw.*handle 0x1",
464        "matchCount": "0",
465        "teardown": [
466            "$TC qdisc del dev $DEV1 ingress"
467        ]
468    },
469    {
470        "id": "8298",
471        "name": "Add fw filter with cookie",
472        "category": [
473            "filter",
474            "fw"
475        ],
476        "setup": [
477            "$TC qdisc add dev $DEV1 ingress"
478        ],
479        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 2 fw action pipe cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
480        "expExitCode": "0",
481        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 2 protocol all fw",
482        "matchPattern": "pref 2 fw.*handle 0x1.*gact action pipe.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
483        "matchCount": "1",
484        "teardown": [
485            "$TC qdisc del dev $DEV1 ingress"
486        ]
487    },
488    {
489        "id": "a88c",
490        "name": "Add fw filter with invalid cookie",
491        "category": [
492            "filter",
493            "fw"
494        ],
495        "setup": [
496            "$TC qdisc add dev $DEV1 ingress"
497        ],
498        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 2 fw action continue cookie aa11bb22cc33dd44ee55ff66aa11b1b2777888",
499        "expExitCode": "255",
500        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 2 protocol all fw",
501        "matchPattern": "pref 2 fw.*handle 0x1.*gact action continue.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2777888",
502        "matchCount": "0",
503        "teardown": [
504            "$TC qdisc del dev $DEV1 ingress"
505        ]
506    },
507    {
508        "id": "10f6",
509        "name": "Add fw filter with handle in hex",
510        "category": [
511            "filter",
512            "fw"
513        ],
514        "setup": [
515            "$TC qdisc add dev $DEV1 ingress"
516        ],
517        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 0xa1b2ff prio 1 fw action ok",
518        "expExitCode": "0",
519        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 0xa1b2ff prio 1 protocol all fw",
520        "matchPattern": "fw.*handle 0xa1b2ff.*gact action pass",
521        "matchCount": "1",
522        "teardown": [
523            "$TC qdisc del dev $DEV1 ingress"
524        ]
525    },
526    {
527        "id": "9d51",
528        "name": "Add fw filter with handle at 32-bit maximum",
529        "category": [
530            "filter",
531            "fw"
532        ],
533        "setup": [
534            "$TC qdisc add dev $DEV1 ingress"
535        ],
536        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 4294967295 prio 1 fw action ok",
537        "expExitCode": "0",
538        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 4294967295 prio 1 protocol all fw",
539        "matchPattern": "fw.*handle 0xffffffff.*gact action pass",
540        "matchCount": "1",
541        "teardown": [
542            "$TC qdisc del dev $DEV1 ingress"
543        ]
544    },
545    {
546        "id": "d939",
547        "name": "Add fw filter with handle exceeding 32-bit maximum",
548        "category": [
549            "filter",
550            "fw"
551        ],
552        "setup": [
553            "$TC qdisc add dev $DEV1 ingress"
554        ],
555        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 4294967296 prio 1 fw action ok",
556        "expExitCode": "1",
557        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 4294967296 prio 1 protocol all fw",
558        "matchPattern": "fw.*handle 0x.*gact action pass",
559        "matchCount": "0",
560        "teardown": [
561            "$TC qdisc del dev $DEV1 ingress"
562        ]
563    },
564    {
565        "id": "658c",
566        "name": "Add fw filter with mask in hex",
567        "category": [
568            "filter",
569            "fw"
570        ],
571        "setup": [
572            "$TC qdisc add dev $DEV1 ingress"
573        ],
574        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 10/0xa1b2f prio 1 fw action ok",
575        "expExitCode": "0",
576        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 10 prio 1 protocol all fw",
577        "matchPattern": "fw.*handle 0xa/0xa1b2f",
578        "matchCount": "1",
579        "teardown": [
580            "$TC qdisc del dev $DEV1 ingress"
581        ]
582    },
583    {
584        "id": "86be",
585        "name": "Add fw filter with mask at 32-bit maximum",
586        "category": [
587            "filter",
588            "fw"
589        ],
590        "setup": [
591            "$TC qdisc add dev $DEV1 ingress"
592        ],
593        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 10/4294967295 prio 1 fw action ok",
594        "expExitCode": "0",
595        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 10 prio 1 protocol all fw",
596        "matchPattern": "fw.*handle 0xa[^/]",
597        "matchCount": "1",
598        "teardown": [
599            "$TC qdisc del dev $DEV1 ingress"
600        ]
601    },
602    {
603        "id": "e635",
604        "name": "Add fw filter with mask exceeding 32-bit maximum",
605        "category": [
606            "filter",
607            "fw"
608        ],
609        "setup": [
610            "$TC qdisc add dev $DEV1 ingress"
611        ],
612        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 10/4294967296 prio 1 fw action ok",
613        "expExitCode": "1",
614        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 10 prio 1 protocol all fw",
615        "matchPattern": "fw.*handle 0xa",
616        "matchCount": "0",
617        "teardown": [
618            "$TC qdisc del dev $DEV1 ingress"
619        ]
620    },
621    {
622        "id": "6cab",
623        "name": "Add fw filter with handle/mask in hex",
624        "category": [
625            "filter",
626            "fw"
627        ],
628        "setup": [
629            "$TC qdisc add dev $DEV1 ingress"
630        ],
631        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 0xa1b2cdff/0x1a2bffdc prio 1 fw action ok",
632        "expExitCode": "0",
633        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 0xa1b2cdff prio 1 protocol all fw",
634        "matchPattern": "fw.*handle 0xa1b2cdff/0x1a2bffdc",
635        "matchCount": "1",
636        "teardown": [
637            "$TC qdisc del dev $DEV1 ingress"
638        ]
639    },
640    {
641        "id": "8700",
642        "name": "Add fw filter with handle/mask at 32-bit maximum",
643        "category": [
644            "filter",
645            "fw"
646        ],
647        "setup": [
648            "$TC qdisc add dev $DEV1 ingress"
649        ],
650        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 4294967295/4294967295 prio 1 fw action ok",
651        "expExitCode": "0",
652        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 0xffffffff prio 1 protocol all fw",
653        "matchPattern": "fw.*handle 0xffffffff[^/]",
654        "matchCount": "1",
655        "teardown": [
656            "$TC qdisc del dev $DEV1 ingress"
657        ]
658    },
659    {
660        "id": "7d62",
661        "name": "Add fw filter with handle/mask exceeding 32-bit maximum",
662        "category": [
663            "filter",
664            "fw"
665        ],
666        "setup": [
667            "$TC qdisc add dev $DEV1 ingress"
668        ],
669        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 4294967296/4294967296 prio 1 fw action ok",
670        "expExitCode": "1",
671        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 10 prio 1 protocol all fw",
672        "matchPattern": "fw.*handle",
673        "matchCount": "0",
674        "teardown": [
675            "$TC qdisc del dev $DEV1 ingress"
676        ]
677    },
678    {
679        "id": "7b69",
680        "name": "Add fw filter with missing mandatory handle",
681        "category": [
682            "filter",
683            "fw"
684        ],
685        "setup": [
686            "$TC qdisc add dev $DEV1 ingress"
687        ],
688        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: prio 1 fw action ok",
689        "expExitCode": "2",
690        "verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
691        "matchPattern": "filter protocol all.*fw.*handle.*gact action pass",
692        "matchCount": "0",
693        "teardown": [
694            "$TC qdisc del dev $DEV1 ingress"
695        ]
696    },
697    {
698        "id": "d68b",
699        "name": "Add fw filter with invalid parent",
700        "category": [
701            "filter",
702            "fw"
703        ],
704        "setup": [
705            "$TC qdisc add dev $DEV1 ingress"
706        ],
707        "cmdUnderTest": "$TC filter add dev $DEV1 parent aa11b1b2: handle 1 prio 1 fw action ok",
708        "expExitCode": "255",
709        "verifyCmd": "$TC filter dev $DEV1 parent aa11b1b2: handle 1 prio 1 protocol all fw",
710        "matchPattern": "filter protocol all pref 1 fw.*handle 0x1.*gact action pass",
711        "matchCount": "0",
712        "teardown": [
713            "$TC qdisc del dev $DEV1 ingress"
714        ]
715    },
716    {
717        "id": "66e0",
718        "name": "Add fw filter with missing mandatory parent id",
719        "category": [
720            "filter",
721            "fw"
722        ],
723        "setup": [
724            "$TC qdisc add dev $DEV1 ingress"
725        ],
726        "cmdUnderTest": "$TC filter add dev $DEV1 handle 1 prio 1 fw action ok",
727        "expExitCode": "2",
728        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
729        "matchPattern": "pref [0-9]+ fw.*handle 0x1.*gact action pass",
730        "matchCount": "0",
731        "teardown": [
732            "$TC qdisc del dev $DEV1 ingress"
733        ]
734    },
735    {
736        "id": "0ff3",
737        "name": "Add fw filter with classid",
738        "category": [
739            "filter",
740            "fw"
741        ],
742        "setup": [
743            "$TC qdisc add dev $DEV1 ingress"
744        ],
745        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw classid 3 action ok",
746        "expExitCode": "0",
747        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
748        "matchPattern": "fw.*handle 0x1 classid :3.*gact action pass",
749        "matchCount": "1",
750        "teardown": [
751            "$TC qdisc del dev $DEV1 ingress"
752        ]
753    },
754    {
755        "id": "9849",
756        "name": "Add fw filter with classid at root",
757        "category": [
758            "filter",
759            "fw"
760        ],
761        "setup": [
762            "$TC qdisc add dev $DEV1 ingress"
763        ],
764        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw classid ffff:ffff action ok",
765        "expExitCode": "0",
766        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
767        "matchPattern": "pref 1 fw.*handle 0x1 classid root.*gact action pass",
768        "matchCount": "1",
769        "teardown": [
770            "$TC qdisc del dev $DEV1 ingress"
771        ]
772    },
773    {
774        "id": "b7ff",
775        "name": "Add fw filter with classid - keeps last 8 (hex) digits",
776        "category": [
777            "filter",
778            "fw"
779        ],
780        "setup": [
781            "$TC qdisc add dev $DEV1 ingress"
782        ],
783        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw classid 98765fedcb action ok",
784        "expExitCode": "0",
785        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
786        "matchPattern": "fw.*handle 0x1 classid 765f:edcb.*gact action pass",
787        "matchCount": "1",
788        "teardown": [
789            "$TC qdisc del dev $DEV1 ingress"
790        ]
791    },
792    {
793        "id": "2b18",
794        "name": "Add fw filter with invalid classid",
795        "category": [
796            "filter",
797            "fw"
798        ],
799        "setup": [
800            "$TC qdisc add dev $DEV1 ingress"
801        ],
802        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw classid 6789defg action ok",
803        "expExitCode": "1",
804        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw",
805        "matchPattern": "fw.*handle 0x1 classid 6789:defg.*gact action pass",
806        "matchCount": "0",
807        "teardown": [
808            "$TC qdisc del dev $DEV1 ingress"
809        ]
810    },
811    {
812        "id": "fade",
813        "name": "Add fw filter with flowid",
814        "category": [
815            "filter",
816            "fw"
817        ],
818        "setup": [
819            "$TC qdisc add dev $DEV1 ingress"
820        ],
821        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 10 prio 1 fw flowid 1:10 action ok",
822        "expExitCode": "0",
823        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 10 prio 1 protocol all fw",
824        "matchPattern": "filter parent ffff: protocol all pref 1 fw.*handle 0xa classid 1:10.*gact action pass",
825        "matchCount": "1",
826        "teardown": [
827            "$TC qdisc del dev $DEV1 ingress"
828        ]
829    },
830    {
831        "id": "33af",
832        "name": "Add fw filter with flowid then classid (same arg, takes second)",
833        "category": [
834            "filter",
835            "fw"
836        ],
837        "setup": [
838            "$TC qdisc add dev $DEV1 ingress"
839        ],
840        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 11 prio 1 fw flowid 10 classid 4 action ok",
841        "expExitCode": "0",
842        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 11 prio 1 protocol all fw",
843        "matchPattern": "filter parent ffff: protocol all pref 1 fw.*handle 0xb classid :4.*gact action pass",
844        "matchCount": "1",
845        "teardown": [
846            "$TC qdisc del dev $DEV1 ingress"
847        ]
848    },
849    {
850        "id": "8a8c",
851        "name": "Add fw filter with classid then flowid (same arg, takes second)",
852        "category": [
853            "filter",
854            "fw"
855        ],
856        "setup": [
857            "$TC qdisc add dev $DEV1 ingress"
858        ],
859        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 11 prio 1 fw classid 4 flowid 10 action ok",
860        "expExitCode": "0",
861        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 11 prio 1 protocol all fw",
862        "matchPattern": "filter parent ffff: protocol all pref 1 fw.*handle 0xb classid :10.*gact action pass",
863        "matchCount": "1",
864        "teardown": [
865            "$TC qdisc del dev $DEV1 ingress"
866        ]
867    },
868    {
869        "id": "b50d",
870        "name": "Add fw filter with handle val/mask and flowid 10:1000",
871        "category": [
872            "filter",
873            "fw"
874        ],
875        "setup": [
876            "$TC qdisc add dev $DEV1 ingress"
877        ],
878        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: prio 3 handle 10/0xff fw flowid 10:1000 action ok",
879        "expExitCode": "0",
880        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 10 prio 3 protocol all fw",
881        "matchPattern": "filter parent ffff: protocol all pref 3 fw.*handle 0xa/0xff classid 10:1000.*gact action pass",
882        "matchCount": "1",
883        "teardown": [
884            "$TC qdisc del dev $DEV1 ingress"
885        ]
886    },
887    {
888        "id": "7207",
889        "name": "Add fw filter with protocol ip",
890        "category": [
891            "filter",
892            "fw"
893        ],
894        "setup": [
895            "$TC qdisc add dev $DEV1 ingress"
896        ],
897        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol ip prio 1 handle 3 fw action ok",
898        "expExitCode": "0",
899        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 3 prio 1 protocol ip fw",
900        "matchPattern": "filter parent ffff: protocol ip pref 1 fw.*handle 0x3.*gact action pass.*index [0-9]+ ref [0-9]+ bind [0-9]+",
901        "matchCount": "1",
902        "teardown": [
903            "$TC qdisc del dev $DEV1 ingress"
904        ]
905    },
906    {
907        "id": "306d",
908        "name": "Add fw filter with protocol ipv6",
909        "category": [
910            "filter",
911            "fw"
912        ],
913        "setup": [
914            "$TC qdisc add dev $DEV1 ingress"
915        ],
916        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol ipv6 prio 2 handle 4 fw action ok",
917        "expExitCode": "0",
918        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 4 prio 2 protocol ipv6 fw",
919        "matchPattern": "filter parent ffff: protocol ipv6 pref 2 fw.*handle 0x4.*gact action pass.*index [0-9]+ ref [0-9]+ bind [0-9]+",
920        "matchCount": "1",
921        "teardown": [
922            "$TC qdisc del dev $DEV1 ingress"
923        ]
924    },
925    {
926        "id": "9a78",
927        "name": "Add fw filter with protocol arp",
928        "category": [
929            "filter",
930            "fw"
931        ],
932        "setup": [
933            "$TC qdisc add dev $DEV1 ingress"
934        ],
935        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol arp prio 5 handle 7 fw action drop",
936        "expExitCode": "0",
937        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 7 prio 5 protocol arp fw",
938        "matchPattern": "filter parent ffff: protocol arp pref 5 fw.*handle 0x7.*gact action drop.*index [0-9]+ ref [0-9]+ bind [0-9]+",
939        "matchCount": "1",
940        "teardown": [
941            "$TC qdisc del dev $DEV1 ingress"
942        ]
943    },
944    {
945        "id": "1821",
946        "name": "Add fw filter with protocol 802_3",
947        "category": [
948            "filter",
949            "fw"
950        ],
951        "setup": [
952            "$TC qdisc add dev $DEV1 ingress"
953        ],
954        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol 802_3 handle 1 prio 1 fw action ok",
955        "expExitCode": "0",
956        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol 802_3 fw",
957        "matchPattern": "filter parent ffff: protocol 802_3 pref 1 fw.*handle 0x1.*gact action pass",
958        "matchCount": "1",
959        "teardown": [
960            "$TC qdisc del dev $DEV1 ingress"
961        ]
962    },
963    {
964        "id": "2260",
965        "name": "Add fw filter with invalid protocol",
966        "category": [
967            "filter",
968            "fw"
969        ],
970        "setup": [
971            "$TC qdisc add dev $DEV1 ingress"
972        ],
973        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol igmp handle 1 prio 1 fw action ok",
974        "expExitCode": "255",
975        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol igmp fw",
976        "matchPattern": "filter parent ffff: protocol igmp pref 1 fw.*handle 0x1.*gact action pass",
977        "matchCount": "0",
978        "teardown": [
979            "$TC qdisc del dev $DEV1 ingress"
980        ]
981    },
982    {
983        "id": "09d7",
984        "name": "Add fw filters protocol 802_3 and ip with conflicting priorities",
985        "category": [
986            "filter",
987            "fw"
988        ],
989	"plugins": {
990		"requires": "nsPlugin"
991	},
992        "setup": [
993            "$TC qdisc add dev $DEV1 ingress",
994            "$TC filter add dev $DEV1 parent ffff: protocol 802_3 prio 3 handle 7 fw action ok"
995        ],
996        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol ip prio 3 handle 8 fw action ok",
997        "expExitCode": "2",
998        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 8 prio 3 protocol ip fw",
999        "matchPattern": "filter parent ffff: protocol ip pref 3 fw.*handle 0x8",
1000        "matchCount": "0",
1001        "teardown": [
1002            "$TC qdisc del dev $DEV1 ingress"
1003        ]
1004    },
1005    {
1006        "id": "6973",
1007        "name": "Add fw filters with same index, same action",
1008        "category": [
1009            "filter",
1010            "fw"
1011        ],
1012	"plugins": {
1013		"requires": "nsPlugin"
1014	},
1015        "setup": [
1016            "$TC qdisc add dev $DEV1 ingress",
1017            "$TC filter add dev $DEV1 parent ffff: prio 6 handle 2 fw action continue index 5"
1018        ],
1019        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: prio 8 handle 4 fw action continue index 5",
1020        "expExitCode": "0",
1021        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 4 prio 8 protocol all fw",
1022        "matchPattern": "filter parent ffff: protocol all pref 8 fw.*handle 0x4.*gact action continue.*index 5 ref 2 bind 2",
1023        "matchCount": "1",
1024        "teardown": [
1025            "$TC qdisc del dev $DEV1 ingress"
1026        ]
1027    },
1028    {
1029        "id": "fc06",
1030        "name": "Add fw filters with action police",
1031        "category": [
1032            "filter",
1033            "fw"
1034        ],
1035	"plugins": {
1036		"requires": "nsPlugin"
1037	},
1038        "setup": [
1039            "$TC qdisc add dev $DEV1 ingress"
1040        ],
1041        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: prio 3 handle 4 fw action police rate 1kbit burst 10k index 5",
1042        "expExitCode": "0",
1043        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 4 prio 3 protocol all fw",
1044        "matchPattern": "filter parent ffff: protocol all pref 3 fw.*handle 0x4.*police 0x5 rate 1Kbit burst 10Kb mtu 2Kb action reclassify overhead 0b.*ref 1 bind 1",
1045        "matchCount": "1",
1046        "teardown": [
1047            "$TC qdisc del dev $DEV1 ingress"
1048        ]
1049    },
1050    {
1051        "id": "aac7",
1052        "name": "Add fw filters with action police linklayer atm",
1053        "category": [
1054            "filter",
1055            "fw"
1056        ],
1057	"plugins": {
1058		"requires": "nsPlugin"
1059	},
1060        "setup": [
1061            "$TC qdisc add dev $DEV1 ingress"
1062        ],
1063        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: prio 3 handle 4 fw action police rate 2mbit burst 200k linklayer atm index 8",
1064        "expExitCode": "0",
1065        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 4 prio 3 protocol all fw",
1066        "matchPattern": "filter parent ffff: protocol all pref 3 fw.*handle 0x4.*police 0x8 rate 2Mbit burst 200Kb mtu 2Kb action reclassify overhead 0b linklayer atm.*ref 1 bind 1",
1067        "matchCount": "1",
1068        "teardown": [
1069            "$TC qdisc del dev $DEV1 ingress"
1070        ]
1071    },
1072    {
1073        "id": "5339",
1074        "name": "Del entire fw filter",
1075        "category": [
1076            "filter",
1077            "fw"
1078        ],
1079	"plugins": {
1080		"requires": "nsPlugin"
1081	},
1082        "setup": [
1083            "$TC qdisc add dev $DEV1 ingress",
1084            "$TC filter add dev $DEV1 parent ffff: handle 5 prio 7 fw action pass",
1085            "$TC filter add dev $DEV1 parent ffff: handle 3 prio 9 fw action pass"
1086        ],
1087        "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff:",
1088        "expExitCode": "0",
1089        "verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
1090        "matchPattern": "protocol all pref.*handle.*gact action pass",
1091        "matchCount": "0",
1092        "teardown": [
1093            "$TC qdisc del dev $DEV1 ingress"
1094        ]
1095    },
1096    {
1097        "id": "0e99",
1098        "name": "Del single fw filter x1",
1099        "__comment__": "First of two tests to check that one filter is there and the other isn't",
1100        "category": [
1101            "filter",
1102            "fw"
1103        ],
1104	"plugins": {
1105		"requires": "nsPlugin"
1106	},
1107        "setup": [
1108            "$TC qdisc add dev $DEV1 ingress",
1109            "$TC filter add dev $DEV1 parent ffff: handle 5 prio 7 fw action pass",
1110            "$TC filter add dev $DEV1 parent ffff: handle 3 prio 9 fw action pass"
1111        ],
1112        "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff: handle 3 prio 9 fw action pass",
1113        "expExitCode": "0",
1114        "verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
1115        "matchPattern": "protocol all pref 7.*handle 0x5.*gact action pass",
1116        "matchCount": "1",
1117        "teardown": [
1118            "$TC qdisc del dev $DEV1 ingress"
1119        ]
1120    },
1121    {
1122        "id": "f54c",
1123        "name": "Del single fw filter x2",
1124        "__comment__": "Second of two tests to check that one filter is there and the other isn't",
1125        "category": [
1126            "filter",
1127            "fw"
1128        ],
1129	"plugins": {
1130		"requires": "nsPlugin"
1131	},
1132        "setup": [
1133            "$TC qdisc add dev $DEV1 ingress",
1134            "$TC filter add dev $DEV1 parent ffff: handle 5 prio 7 fw action pass",
1135            "$TC filter add dev $DEV1 parent ffff: handle 3 prio 9 fw action pass"
1136        ],
1137        "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff: handle 3 prio 9 fw action pass",
1138        "expExitCode": "0",
1139        "verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
1140        "matchPattern": "protocol all pref 9.*handle 0x3.*gact action pass",
1141        "matchCount": "0",
1142        "teardown": [
1143            "$TC qdisc del dev $DEV1 ingress"
1144        ]
1145    },
1146    {
1147        "id": "ba94",
1148        "name": "Del fw filter by prio",
1149        "category": [
1150            "filter",
1151            "fw"
1152        ],
1153	"plugins": {
1154		"requires": "nsPlugin"
1155	},
1156        "setup": [
1157            "$TC qdisc add dev $DEV1 ingress",
1158            "$TC filter add dev $DEV1 parent ffff: handle 1 prio 4 fw action ok",
1159            "$TC filter add dev $DEV1 parent ffff: handle 2 prio 4 fw action ok"
1160        ],
1161        "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff: prio 4",
1162        "expExitCode": "0",
1163        "verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
1164        "matchPattern": "pref 4 fw.*gact action pass",
1165        "matchCount": "0",
1166        "teardown": [
1167            "$TC qdisc del dev $DEV1 ingress"
1168        ]
1169    },
1170    {
1171        "id": "4acb",
1172        "name": "Del fw filter by chain",
1173        "category": [
1174            "filter",
1175            "fw"
1176        ],
1177	"plugins": {
1178		"requires": "nsPlugin"
1179	},
1180        "setup": [
1181            "$TC qdisc add dev $DEV1 ingress",
1182            "$TC filter add dev $DEV1 parent ffff: handle 4 prio 2 chain 13 fw action pipe",
1183            "$TC filter add dev $DEV1 parent ffff: handle 3 prio 5 chain 13 fw action pipe"
1184        ],
1185        "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff: chain 13",
1186        "expExitCode": "0",
1187        "verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
1188        "matchPattern": "fw chain 13 handle.*gact action pipe",
1189        "matchCount": "0",
1190        "teardown": [
1191            "$TC qdisc del dev $DEV1 ingress"
1192        ]
1193    },
1194    {
1195        "id": "3424",
1196        "name": "Del fw filter by action (invalid)",
1197        "category": [
1198            "filter",
1199            "fw"
1200        ],
1201	"plugins": {
1202		"requires": "nsPlugin"
1203	},
1204        "setup": [
1205            "$TC qdisc add dev $DEV1 ingress",
1206            "$TC filter add dev $DEV1 parent ffff: handle 2 prio 4 fw action drop"
1207        ],
1208        "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff: fw action drop",
1209        "expExitCode": "2",
1210        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 2 prio 4 protocol all fw",
1211        "matchPattern": "handle 0x2.*gact action drop",
1212        "matchCount": "1",
1213        "teardown": [
1214            "$TC qdisc del dev $DEV1 ingress"
1215        ]
1216    },
1217    {
1218        "id": "da89",
1219        "name": "Del fw filter by handle (invalid)",
1220        "category": [
1221            "filter",
1222            "fw"
1223        ],
1224	"plugins": {
1225		"requires": "nsPlugin"
1226	},
1227        "setup": [
1228            "$TC qdisc add dev $DEV1 ingress",
1229            "$TC filter add dev $DEV1 parent ffff: handle 3 prio 4 fw action continue"
1230        ],
1231        "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff: handle 3 fw",
1232        "expExitCode": "2",
1233        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 3 prio 4 protocol all fw",
1234        "matchPattern": "handle 0x3.*gact action continue",
1235        "matchCount": "1",
1236        "teardown": [
1237            "$TC qdisc del dev $DEV1 ingress"
1238        ]
1239    },
1240    {
1241        "id": "4d95",
1242        "name": "Del fw filter by protocol (invalid)",
1243        "category": [
1244            "filter",
1245            "fw"
1246        ],
1247	"plugins": {
1248		"requires": "nsPlugin"
1249	},
1250        "setup": [
1251            "$TC qdisc add dev $DEV1 ingress",
1252            "$TC filter add dev $DEV1 parent ffff: handle 4 prio 2 protocol arp fw action pipe"
1253        ],
1254        "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff: protocol arp fw",
1255        "expExitCode": "2",
1256        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 4 prio 2 protocol arp fw",
1257        "matchPattern": "filter parent ffff: protocol arp.*handle 0x4.*gact action pipe",
1258        "matchCount": "1",
1259        "teardown": [
1260            "$TC qdisc del dev $DEV1 ingress"
1261        ]
1262    },
1263    {
1264        "id": "4736",
1265        "name": "Del fw filter by flowid (invalid)",
1266        "category": [
1267            "filter",
1268            "fw"
1269        ],
1270	"plugins": {
1271		"requires": "nsPlugin"
1272	},
1273        "setup": [
1274            "$TC qdisc add dev $DEV1 ingress",
1275            "$TC filter add dev $DEV1 parent ffff: handle 4 prio 2 fw action pipe flowid 45"
1276        ],
1277        "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff: fw flowid 45",
1278        "expExitCode": "2",
1279        "verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
1280        "matchPattern": "handle 0x4.*gact action pipe",
1281        "matchCount": "1",
1282        "teardown": [
1283            "$TC qdisc del dev $DEV1 ingress"
1284        ]
1285    },
1286    {
1287        "id": "3dcb",
1288        "name": "Replace fw filter action",
1289        "category": [
1290            "filter",
1291            "fw"
1292        ],
1293	"plugins": {
1294		"requires": "nsPlugin"
1295	},
1296        "setup": [
1297            "$TC qdisc add dev $DEV1 ingress",
1298            "$TC filter add dev $DEV1 parent ffff: handle 1 prio 2 fw action ok"
1299        ],
1300        "cmdUnderTest": "$TC filter replace dev $DEV1 parent ffff: handle 1 prio 2 fw action pipe",
1301        "expExitCode": "0",
1302        "verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
1303        "matchPattern": "pref 2 fw.*handle 0x1.*gact action pipe",
1304        "matchCount": "1",
1305        "teardown": [
1306            "$TC qdisc del dev $DEV1 ingress"
1307        ]
1308    },
1309    {
1310        "id": "eb4d",
1311        "name": "Replace fw filter classid",
1312        "category": [
1313            "filter",
1314            "fw"
1315        ],
1316	"plugins": {
1317		"requires": "nsPlugin"
1318	},
1319        "setup": [
1320            "$TC qdisc add dev $DEV1 ingress",
1321            "$TC filter add dev $DEV1 parent ffff: handle 1 prio 2 fw action ok"
1322        ],
1323        "cmdUnderTest": "$TC filter replace dev $DEV1 parent ffff: handle 1 prio 2 fw action pipe classid 2",
1324        "expExitCode": "0",
1325        "verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
1326        "matchPattern": "pref 2 fw.*handle 0x1 classid :2.*gact action pipe",
1327        "matchCount": "1",
1328        "teardown": [
1329            "$TC qdisc del dev $DEV1 ingress"
1330        ]
1331    },
1332    {
1333        "id": "67ec",
1334        "name": "Replace fw filter index",
1335        "category": [
1336            "filter",
1337            "fw"
1338        ],
1339	"plugins": {
1340		"requires": "nsPlugin"
1341	},
1342        "setup": [
1343            "$TC qdisc add dev $DEV1 ingress",
1344            "$TC filter add dev $DEV1 parent ffff: handle 1 prio 2 fw action ok index 3"
1345        ],
1346        "cmdUnderTest": "$TC filter replace dev $DEV1 parent ffff: handle 1 prio 2 fw action ok index 16",
1347        "expExitCode": "0",
1348        "verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
1349        "matchPattern": "pref 2 fw.*handle 0x1.*gact action pass.*index 16",
1350        "matchCount": "1",
1351        "teardown": [
1352            "$TC qdisc del dev $DEV1 ingress"
1353        ]
1354    }
1355]
1356