1[
2    {
3        "id": "7a92",
4        "name": "Add basic filter with cmp ematch u8/link layer and default action",
5        "category": [
6            "filter",
7            "basic"
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 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff gt 10)' classid 1:1",
16        "expExitCode": "0",
17        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
18        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*cmp\\(u8 at 0 layer 0 mask 0xff gt 10\\)",
19        "matchCount": "1",
20        "teardown": [
21            "$TC qdisc del dev $DEV1 ingress"
22        ]
23    },
24    {
25        "id": "2e8a",
26        "name": "Add basic filter with cmp ematch u8/link layer with trans flag and default action",
27        "category": [
28            "filter",
29            "basic"
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 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff trans gt 10)' classid 1:1",
38        "expExitCode": "0",
39        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
40        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*cmp\\(u8 at 0 layer 0 mask 0xff trans gt 10\\)",
41        "matchCount": "1",
42        "teardown": [
43            "$TC qdisc del dev $DEV1 ingress"
44        ]
45    },
46    {
47        "id": "4d9f",
48        "name": "Add basic filter with cmp ematch u16/link layer and a single action",
49        "category": [
50            "filter",
51            "basic"
52        ],
53        "plugins": {
54            "requires": "nsPlugin"
55        },
56        "setup": [
57            "$TC qdisc add dev $DEV1 ingress"
58        ],
59        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u16 at 0 layer 0 mask 0xff00 lt 3)' action pass",
60        "expExitCode": "0",
61        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
62        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1.*cmp\\(u16 at 0 layer 0 mask 0xff00 lt 3\\).*action.*gact action pass",
63        "matchCount": "1",
64        "teardown": [
65            "$TC qdisc del dev $DEV1 ingress"
66        ]
67    },
68    {
69        "id": "4943",
70        "name": "Add basic filter with cmp ematch u32/link layer and miltiple actions",
71        "category": [
72            "filter",
73            "basic"
74        ],
75        "plugins": {
76            "requires": "nsPlugin"
77        },
78        "setup": [
79            "$TC qdisc add dev $DEV1 ingress"
80        ],
81        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u32 at 4 layer link mask 0xff00ff00 eq 3)' action skbedit mark 7 pipe action gact drop",
82        "expExitCode": "0",
83        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
84        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1.*cmp\\(u32 at 4 layer 0 mask 0xff00ff00 eq 3\\).*action.*skbedit.*mark 7 pipe.*action.*gact action drop",
85        "matchCount": "1",
86        "teardown": [
87            "$TC qdisc del dev $DEV1 ingress"
88        ]
89    },
90    {
91        "id": "7559",
92        "name": "Add basic filter with cmp ematch u8/network layer and default action",
93        "category": [
94            "filter",
95            "basic"
96        ],
97        "plugins": {
98            "requires": "nsPlugin"
99        },
100        "setup": [
101            "$TC qdisc add dev $DEV1 ingress"
102        ],
103        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 0xab protocol ip prio 11 basic match 'cmp(u8 at 0 layer 1 mask 0xff gt 10)' classid 1:1",
104        "expExitCode": "0",
105        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 0xab prio 11 protocol ip basic",
106        "matchPattern": "^filter parent ffff: protocol ip pref 11 basic.*handle 0xab flowid 1:1.*cmp\\(u8 at 0 layer 1 mask 0xff gt 10\\)",
107        "matchCount": "1",
108        "teardown": [
109            "$TC qdisc del dev $DEV1 ingress"
110        ]
111    },
112    {
113        "id": "aff4",
114        "name": "Add basic filter with cmp ematch u8/network layer with trans flag and default action",
115        "category": [
116            "filter",
117            "basic"
118        ],
119        "plugins": {
120            "requires": "nsPlugin"
121        },
122        "setup": [
123            "$TC qdisc add dev $DEV1 ingress"
124        ],
125        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 0xab protocol ip prio 11 basic match 'cmp(u8 at 0 layer 1 mask 0xff trans gt 10)' classid 1:1",
126        "expExitCode": "0",
127        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 0xab prio 11 protocol ip basic",
128        "matchPattern": "^filter parent ffff: protocol ip pref 11 basic.*handle 0xab flowid 1:1.*cmp\\(u8 at 0 layer 1 mask 0xff trans gt 10\\)",
129        "matchCount": "1",
130        "teardown": [
131            "$TC qdisc del dev $DEV1 ingress"
132        ]
133    },
134    {
135        "id": "c732",
136        "name": "Add basic filter with cmp ematch u16/network layer and a single action",
137        "category": [
138            "filter",
139            "basic"
140        ],
141        "plugins": {
142            "requires": "nsPlugin"
143        },
144        "setup": [
145            "$TC qdisc add dev $DEV1 ingress"
146        ],
147        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 0x100 protocol ip prio 100 basic match 'cmp(u16 at 0 layer network mask 0xff00 lt 3)' action pass",
148        "expExitCode": "0",
149        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 0x100 prio 100 protocol ip basic",
150        "matchPattern": "^filter parent ffff: protocol ip pref 100 basic.*handle 0x100.*cmp\\(u16 at 0 layer 1 mask 0xff00 lt 3\\).*action.*gact action pass",
151        "matchCount": "1",
152        "teardown": [
153            "$TC qdisc del dev $DEV1 ingress"
154        ]
155    },
156    {
157        "id": "32d8",
158        "name": "Add basic filter with cmp ematch u32/network layer and miltiple actions",
159        "category": [
160            "filter",
161            "basic"
162        ],
163        "plugins": {
164            "requires": "nsPlugin"
165        },
166        "setup": [
167            "$TC qdisc add dev $DEV1 ingress"
168        ],
169        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 0x112233 protocol ip prio 7 basic match 'cmp(u32 at 4 layer network mask 0xff00ff00 eq 3)' action skbedit mark 7 pipe action gact drop",
170        "expExitCode": "0",
171        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 0x112233 prio 7 protocol ip basic",
172        "matchPattern": "^filter parent ffff: protocol ip pref 7 basic.*handle 0x112233.*cmp\\(u32 at 4 layer 1 mask 0xff00ff00 eq 3\\).*action.*skbedit.*mark 7 pipe.*action.*gact action drop",
173        "matchCount": "1",
174        "teardown": [
175            "$TC qdisc del dev $DEV1 ingress"
176        ]
177    },
178    {
179        "id": "b99c",
180        "name": "Add basic filter with cmp ematch u8/transport layer and default action",
181        "category": [
182            "filter",
183            "basic"
184        ],
185        "plugins": {
186            "requires": "nsPlugin"
187        },
188        "setup": [
189            "$TC qdisc add dev $DEV1 ingress"
190        ],
191        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u8 at 0 layer transport mask 0xff gt 10)' classid 1:1",
192        "expExitCode": "0",
193        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
194        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*cmp\\(u8 at 0 layer 2 mask 0xff gt 10\\)",
195        "matchCount": "1",
196        "teardown": [
197            "$TC qdisc del dev $DEV1 ingress"
198        ]
199    },
200    {
201        "id": "0752",
202        "name": "Add basic filter with cmp ematch u8/transport layer with trans flag and default action",
203        "category": [
204            "filter",
205            "basic"
206        ],
207        "plugins": {
208            "requires": "nsPlugin"
209        },
210        "setup": [
211            "$TC qdisc add dev $DEV1 ingress"
212        ],
213        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u8 at 0 layer transport mask 0xff trans gt 10)' classid 1:1",
214        "expExitCode": "0",
215        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
216        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*cmp\\(u8 at 0 layer 2 mask 0xff trans gt 10\\)",
217        "matchCount": "1",
218        "teardown": [
219            "$TC qdisc del dev $DEV1 ingress"
220        ]
221    },
222    {
223        "id": "7e07",
224        "name": "Add basic filter with cmp ematch u16/transport layer and a single action",
225        "category": [
226            "filter",
227            "basic"
228        ],
229        "plugins": {
230            "requires": "nsPlugin"
231        },
232        "setup": [
233            "$TC qdisc add dev $DEV1 ingress"
234        ],
235        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u16 at 0 layer 2 mask 0xff00 lt 3)' action pass",
236        "expExitCode": "0",
237        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
238        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1.*cmp\\(u16 at 0 layer 2 mask 0xff00 lt 3\\).*action.*gact action pass",
239        "matchCount": "1",
240        "teardown": [
241            "$TC qdisc del dev $DEV1 ingress"
242        ]
243    },
244    {
245        "id": "62d7",
246        "name": "Add basic filter with cmp ematch u32/transport layer and miltiple actions",
247        "category": [
248            "filter",
249            "basic"
250        ],
251        "plugins": {
252            "requires": "nsPlugin"
253        },
254        "setup": [
255            "$TC qdisc add dev $DEV1 ingress"
256        ],
257        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u32 at 4 layer transport mask 0xff00ff00 eq 3)' action skbedit mark 7 pipe action gact drop",
258        "expExitCode": "0",
259        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
260        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1.*cmp\\(u32 at 4 layer 2 mask 0xff00ff00 eq 3\\).*action.*skbedit.*mark 7 pipe.*action.*gact action drop",
261        "matchCount": "1",
262        "teardown": [
263            "$TC qdisc del dev $DEV1 ingress"
264        ]
265    },
266    {
267        "id": "304b",
268        "name": "Add basic filter with NOT cmp ematch rule and default action",
269        "category": [
270            "filter",
271            "basic"
272        ],
273        "plugins": {
274            "requires": "nsPlugin"
275        },
276        "setup": [
277            "$TC qdisc add dev $DEV1 ingress"
278        ],
279        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'not cmp(u8 at 0 layer link mask 0xff eq 3)' classid 1:1",
280        "expExitCode": "0",
281        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
282        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*NOT cmp\\(u8 at 0 layer 0 mask 0xff eq 3\\)",
283        "matchCount": "1",
284        "teardown": [
285            "$TC qdisc del dev $DEV1 ingress"
286        ]
287    },
288    {
289        "id": "8ecb",
290        "name": "Add basic filter with two ANDed cmp ematch rules and single action",
291        "category": [
292            "filter",
293            "basic"
294        ],
295        "plugins": {
296            "requires": "nsPlugin"
297        },
298        "setup": [
299            "$TC qdisc add dev $DEV1 ingress"
300        ],
301        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff eq 3) and cmp(u16 at 8 layer link mask 0x00ff gt 7)' action gact drop",
302        "expExitCode": "0",
303        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
304        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1.*cmp\\(u8 at 0 layer 0 mask 0xff eq 3\\).*AND cmp\\(u16 at 8 layer 0 mask 0xff gt 7\\).*action.*gact action drop",
305        "matchCount": "1",
306        "teardown": [
307            "$TC qdisc del dev $DEV1 ingress"
308        ]
309    },
310    {
311        "id": "b1ad",
312        "name": "Add basic filter with two ORed cmp ematch rules and single action",
313        "category": [
314            "filter",
315            "basic"
316        ],
317        "plugins": {
318            "requires": "nsPlugin"
319        },
320        "setup": [
321            "$TC qdisc add dev $DEV1 ingress"
322        ],
323        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff eq 3) or cmp(u16 at 8 layer link mask 0x00ff gt 7)' action gact drop",
324        "expExitCode": "0",
325        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
326        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1.*cmp\\(u8 at 0 layer 0 mask 0xff eq 3\\).*OR cmp\\(u16 at 8 layer 0 mask 0xff gt 7\\).*action.*gact action drop",
327        "matchCount": "1",
328        "teardown": [
329            "$TC qdisc del dev $DEV1 ingress"
330        ]
331    },
332    {
333        "id": "4600",
334        "name": "Add basic filter with two ANDed cmp ematch rules and one ORed ematch rule and single action",
335        "category": [
336            "filter",
337            "basic"
338        ],
339        "plugins": {
340            "requires": "nsPlugin"
341        },
342        "setup": [
343            "$TC qdisc add dev $DEV1 ingress"
344        ],
345        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff eq 3) and cmp(u16 at 8 layer link mask 0x00ff gt 7) or cmp(u32 at 4 layer network mask 0xa0a0 lt 3)' action gact drop",
346        "expExitCode": "0",
347        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
348        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1.*cmp\\(u8 at 0 layer 0 mask 0xff eq 3\\).*AND cmp\\(u16 at 8 layer 0 mask 0xff gt 7\\).*OR cmp\\(u32 at 4 layer 1 mask 0xa0a0 lt 3\\).*action.*gact action drop",
349        "matchCount": "1",
350        "teardown": [
351            "$TC qdisc del dev $DEV1 ingress"
352        ]
353    },
354    {
355        "id": "bc59",
356        "name": "Add basic filter with two ANDed cmp ematch rules and one NOT ORed ematch rule and single action",
357        "category": [
358            "filter",
359            "basic"
360        ],
361        "plugins": {
362            "requires": "nsPlugin"
363        },
364        "setup": [
365            "$TC qdisc add dev $DEV1 ingress"
366        ],
367        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff eq 3) and cmp(u16 at 8 layer link mask 0x00ff gt 7) or not cmp(u32 at 4 layer network mask 0xa0a0 lt 3)' action gact drop",
368        "expExitCode": "0",
369        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
370        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1.*cmp\\(u8 at 0 layer 0 mask 0xff eq 3\\).*AND cmp\\(u16 at 8 layer 0 mask 0xff gt 7\\).*OR NOT cmp\\(u32 at 4 layer 1 mask 0xa0a0 lt 3\\).*action.*gact action drop",
371        "matchCount": "1",
372        "teardown": [
373            "$TC qdisc del dev $DEV1 ingress"
374        ]
375    },
376    {
377        "id": "bae4",
378        "name": "Add basic filter with u32 ematch u8/zero offset and default action",
379        "category": [
380            "filter",
381            "basic"
382        ],
383        "plugins": {
384            "requires": "nsPlugin"
385        },
386        "setup": [
387            "$TC qdisc add dev $DEV1 ingress"
388        ],
389        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u8 0x11 0x0f at 0)' classid 1:1",
390        "expExitCode": "0",
391        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
392        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(01000000/0f000000 at 0\\)",
393        "matchCount": "1",
394        "teardown": [
395            "$TC qdisc del dev $DEV1 ingress"
396        ]
397    },
398    {
399        "id": "e6cb",
400        "name": "Add basic filter with u32 ematch u8/zero offset and invalid value >0xFF",
401        "category": [
402            "filter",
403            "basic"
404        ],
405        "plugins": {
406            "requires": "nsPlugin"
407        },
408        "setup": [
409            "$TC qdisc add dev $DEV1 ingress"
410        ],
411        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u8 0x1122 0x0f at 0)' classid 1:1",
412        "expExitCode": "1",
413        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
414        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(11220000/0f000000 at 0\\)",
415        "matchCount": "0",
416        "teardown": [
417            "$TC qdisc del dev $DEV1 ingress"
418        ]
419    },
420    {
421        "id": "7727",
422        "name": "Add basic filter with u32 ematch u8/positive offset and default action",
423        "category": [
424            "filter",
425            "basic"
426        ],
427        "plugins": {
428            "requires": "nsPlugin"
429        },
430        "setup": [
431            "$TC qdisc add dev $DEV1 ingress"
432        ],
433        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u8 0x77 0x1f at 12)' classid 1:1",
434        "expExitCode": "0",
435        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
436        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(17000000/1f000000 at 12\\)",
437        "matchCount": "1",
438        "teardown": [
439            "$TC qdisc del dev $DEV1 ingress"
440        ]
441    },
442    {
443        "id": "a429",
444        "name": "Add basic filter with u32 ematch u8/invalid mask >0xFF",
445        "category": [
446            "filter",
447            "basic"
448        ],
449        "plugins": {
450            "requires": "nsPlugin"
451        },
452        "setup": [
453            "$TC qdisc add dev $DEV1 ingress"
454        ],
455        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u8 0x77 0xff00 at 12)' classid 1:1",
456        "expExitCode": "1",
457        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
458        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(77000000/ff000000 at 12\\)",
459        "matchCount": "0",
460        "teardown": [
461            "$TC qdisc del dev $DEV1 ingress"
462        ]
463    },
464    {
465        "id": "8373",
466        "name": "Add basic filter with u32 ematch u8/missing offset",
467        "category": [
468            "filter",
469            "basic"
470        ],
471        "plugins": {
472            "requires": "nsPlugin"
473        },
474        "setup": [
475            "$TC qdisc add dev $DEV1 ingress"
476        ],
477        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u8 0x77 0xff at)' classid 1:1",
478        "expExitCode": "1",
479        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
480        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(77000000 at 12\\)",
481        "matchCount": "0",
482        "teardown": [
483            "$TC qdisc del dev $DEV1 ingress"
484        ]
485    },
486    {
487        "id": "ab8e",
488        "name": "Add basic filter with u32 ematch u8/missing AT keyword",
489        "category": [
490            "filter",
491            "basic"
492        ],
493        "plugins": {
494            "requires": "nsPlugin"
495        },
496        "setup": [
497            "$TC qdisc add dev $DEV1 ingress"
498        ],
499        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u8 0x77 0xff 0)' classid 1:1",
500        "expExitCode": "1",
501        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
502        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(77000000 at 12\\)",
503        "matchCount": "0",
504        "teardown": [
505            "$TC qdisc del dev $DEV1 ingress"
506        ]
507    },
508    {
509        "id": "712d",
510        "name": "Add basic filter with u32 ematch u8/missing value",
511        "category": [
512            "filter",
513            "basic"
514        ],
515        "plugins": {
516            "requires": "nsPlugin"
517        },
518        "setup": [
519            "$TC qdisc add dev $DEV1 ingress"
520        ],
521        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u8 at 12)' classid 1:1",
522        "expExitCode": "1",
523        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
524        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(at 12\\)",
525        "matchCount": "0",
526        "teardown": [
527            "$TC qdisc del dev $DEV1 ingress"
528        ]
529    },
530    {
531        "id": "350f",
532        "name": "Add basic filter with u32 ematch u8/non-numeric value",
533        "category": [
534            "filter",
535            "basic"
536        ],
537        "plugins": {
538            "requires": "nsPlugin"
539        },
540        "setup": [
541            "$TC qdisc add dev $DEV1 ingress"
542        ],
543        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u8 zero 0xff at 0)' classid 1:1",
544        "expExitCode": "1",
545        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
546        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(00000000/ff000000 at 0\\)",
547        "matchCount": "0",
548        "teardown": [
549            "$TC qdisc del dev $DEV1 ingress"
550        ]
551    },
552    {
553        "id": "e28f",
554        "name": "Add basic filter with u32 ematch u8/non-numeric mask",
555        "category": [
556            "filter",
557            "basic"
558        ],
559        "plugins": {
560            "requires": "nsPlugin"
561        },
562        "setup": [
563            "$TC qdisc add dev $DEV1 ingress"
564        ],
565        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u8 0x11 mask at 0)' classid 1:1",
566        "expExitCode": "1",
567        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
568        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(11000000/00000000 at 0\\)",
569        "matchCount": "0",
570        "teardown": [
571            "$TC qdisc del dev $DEV1 ingress"
572        ]
573    },
574    {
575        "id": "6d5f",
576        "name": "Add basic filter with u32 ematch u8/negative offset and default action",
577        "category": [
578            "filter",
579            "basic"
580        ],
581        "plugins": {
582            "requires": "nsPlugin"
583        },
584        "setup": [
585            "$TC qdisc add dev $DEV1 ingress"
586        ],
587        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u8 0xaa 0xf0 at -14)' classid 1:1",
588        "expExitCode": "0",
589        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
590        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(0000a000/0000f000 at -16\\)",
591        "matchCount": "1",
592        "teardown": [
593            "$TC qdisc del dev $DEV1 ingress"
594        ]
595    },
596    {
597        "id": "12dc",
598        "name": "Add basic filter with u32 ematch u8/nexthdr+ offset and default action",
599        "category": [
600            "filter",
601            "basic"
602        ],
603        "plugins": {
604            "requires": "nsPlugin"
605        },
606        "setup": [
607            "$TC qdisc add dev $DEV1 ingress"
608        ],
609        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u8 0xaa 0xf0 at nexthdr+0)' classid 1:1",
610        "expExitCode": "0",
611        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
612        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(a0000000/f0000000 at nexthdr\\+0\\)",
613        "matchCount": "1",
614        "teardown": [
615            "$TC qdisc del dev $DEV1 ingress"
616        ]
617    },
618    {
619        "id": "1d85",
620        "name": "Add basic filter with u32 ematch u16/zero offset and default action",
621        "category": [
622            "filter",
623            "basic"
624        ],
625        "plugins": {
626            "requires": "nsPlugin"
627        },
628        "setup": [
629            "$TC qdisc add dev $DEV1 ingress"
630        ],
631        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u16 0x1122 0xffff at 0)' classid 1:1",
632        "expExitCode": "0",
633        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
634        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(11220000/ffff0000 at 0\\)",
635        "matchCount": "1",
636        "teardown": [
637            "$TC qdisc del dev $DEV1 ingress"
638        ]
639    },
640    {
641        "id": "3672",
642        "name": "Add basic filter with u32 ematch u16/zero offset and invalid value >0xFFFF",
643        "category": [
644            "filter",
645            "basic"
646        ],
647        "plugins": {
648            "requires": "nsPlugin"
649        },
650        "setup": [
651            "$TC qdisc add dev $DEV1 ingress"
652        ],
653        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u16 0x112233 0xffff at 0)' classid 1:1",
654        "expExitCode": "1",
655        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
656        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(11223300/ffff0000 at 0\\)",
657        "matchCount": "0",
658        "teardown": [
659            "$TC qdisc del dev $DEV1 ingress"
660        ]
661    },
662    {
663        "id": "7fb0",
664        "name": "Add basic filter with u32 ematch u16/positive offset and default action",
665        "category": [
666            "filter",
667            "basic"
668        ],
669        "plugins": {
670            "requires": "nsPlugin"
671        },
672        "setup": [
673            "$TC qdisc add dev $DEV1 ingress"
674        ],
675        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u16 0x7788 0x1fff at 12)' classid 1:1",
676        "expExitCode": "0",
677        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
678        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(17880000/1fff0000 at 12\\)",
679        "matchCount": "1",
680        "teardown": [
681            "$TC qdisc del dev $DEV1 ingress"
682        ]
683    },
684    {
685        "id": "19af",
686        "name": "Add basic filter with u32 ematch u16/invalid mask >0xFFFF",
687        "category": [
688            "filter",
689            "basic"
690        ],
691        "plugins": {
692            "requires": "nsPlugin"
693        },
694        "setup": [
695            "$TC qdisc add dev $DEV1 ingress"
696        ],
697        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u16 0x7788 0xffffffff at 12)' classid 1:1",
698        "expExitCode": "1",
699        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
700        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(77880000/ffffffff at 12\\)",
701        "matchCount": "0",
702        "teardown": [
703            "$TC qdisc del dev $DEV1 ingress"
704        ]
705    },
706    {
707        "id": "446d",
708        "name": "Add basic filter with u32 ematch u16/missing offset",
709        "category": [
710            "filter",
711            "basic"
712        ],
713        "plugins": {
714            "requires": "nsPlugin"
715        },
716        "setup": [
717            "$TC qdisc add dev $DEV1 ingress"
718        ],
719        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u16 0x7788 0xffff at)' classid 1:1",
720        "expExitCode": "1",
721        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
722        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(77880000 at 12\\)",
723        "matchCount": "0",
724        "teardown": [
725            "$TC qdisc del dev $DEV1 ingress"
726        ]
727    },
728    {
729        "id": "151b",
730        "name": "Add basic filter with u32 ematch u16/missing AT keyword",
731        "category": [
732            "filter",
733            "basic"
734        ],
735        "plugins": {
736            "requires": "nsPlugin"
737        },
738        "setup": [
739            "$TC qdisc add dev $DEV1 ingress"
740        ],
741        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u16 0x7788 0xffff 0)' classid 1:1",
742        "expExitCode": "1",
743        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
744        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(77880000/ffff0000 at 0\\)",
745        "matchCount": "0",
746        "teardown": [
747            "$TC qdisc del dev $DEV1 ingress"
748        ]
749    },
750    {
751        "id": "bb23",
752        "name": "Add basic filter with u32 ematch u16/missing value",
753        "category": [
754            "filter",
755            "basic"
756        ],
757        "plugins": {
758            "requires": "nsPlugin"
759        },
760        "setup": [
761            "$TC qdisc add dev $DEV1 ingress"
762        ],
763        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u16 at 12)' classid 1:1",
764        "expExitCode": "1",
765        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
766        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(at 12\\)",
767        "matchCount": "0",
768        "teardown": [
769            "$TC qdisc del dev $DEV1 ingress"
770        ]
771    },
772    {
773        "id": "decc",
774        "name": "Add basic filter with u32 ematch u16/non-numeric value",
775        "category": [
776            "filter",
777            "basic"
778        ],
779        "plugins": {
780            "requires": "nsPlugin"
781        },
782        "setup": [
783            "$TC qdisc add dev $DEV1 ingress"
784        ],
785        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u16 zero 0xffff at 0)' classid 1:1",
786        "expExitCode": "1",
787        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
788        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(00000000/ffff0000 at 0\\)",
789        "matchCount": "0",
790        "teardown": [
791            "$TC qdisc del dev $DEV1 ingress"
792        ]
793    },
794    {
795        "id": "e988",
796        "name": "Add basic filter with u32 ematch u16/non-numeric mask",
797        "category": [
798            "filter",
799            "basic"
800        ],
801        "plugins": {
802            "requires": "nsPlugin"
803        },
804        "setup": [
805            "$TC qdisc add dev $DEV1 ingress"
806        ],
807        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u8 0x1122 mask at 0)' classid 1:1",
808        "expExitCode": "1",
809        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
810        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(11220000/00000000 at 0\\)",
811        "matchCount": "0",
812        "teardown": [
813            "$TC qdisc del dev $DEV1 ingress"
814        ]
815    },
816    {
817        "id": "07d8",
818        "name": "Add basic filter with u32 ematch u16/negative offset and default action",
819        "category": [
820            "filter",
821            "basic"
822        ],
823        "plugins": {
824            "requires": "nsPlugin"
825        },
826        "setup": [
827            "$TC qdisc add dev $DEV1 ingress"
828        ],
829        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u16 0xaabb 0xffff at -12)' classid 1:1",
830        "expExitCode": "0",
831        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
832        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(aabb0000/ffff0000 at -12\\)",
833        "matchCount": "1",
834        "teardown": [
835            "$TC qdisc del dev $DEV1 ingress"
836        ]
837    },
838    {
839        "id": "f474",
840        "name": "Add basic filter with u32 ematch u16/nexthdr+ offset and default action",
841        "category": [
842            "filter",
843            "basic"
844        ],
845        "plugins": {
846            "requires": "nsPlugin"
847        },
848        "setup": [
849            "$TC qdisc add dev $DEV1 ingress"
850        ],
851        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u16 0xaabb 0xf0f0 at nexthdr+0)' classid 1:1",
852        "expExitCode": "0",
853        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
854        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(a0b00000/f0f00000 at nexthdr\\+0\\)",
855        "matchCount": "1",
856        "teardown": [
857            "$TC qdisc del dev $DEV1 ingress"
858        ]
859    },
860    {
861        "id": "47a0",
862        "name": "Add basic filter with u32 ematch u32/zero offset and default action",
863        "category": [
864            "filter",
865            "basic"
866        ],
867        "plugins": {
868            "requires": "nsPlugin"
869        },
870        "setup": [
871            "$TC qdisc add dev $DEV1 ingress"
872        ],
873        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u32 0xaabbccdd 0xffffffff at 0)' classid 1:1",
874        "expExitCode": "0",
875        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
876        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(aabbccdd/ffffffff at 0\\)",
877        "matchCount": "1",
878        "teardown": [
879            "$TC qdisc del dev $DEV1 ingress"
880        ]
881    },
882    {
883        "id": "849f",
884        "name": "Add basic filter with u32 ematch u32/positive offset and default action",
885        "category": [
886            "filter",
887            "basic"
888        ],
889        "plugins": {
890            "requires": "nsPlugin"
891        },
892        "setup": [
893            "$TC qdisc add dev $DEV1 ingress"
894        ],
895        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u32 0x11227788 0x1ffff0f0 at 12)' classid 1:1",
896        "expExitCode": "0",
897        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
898        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(11227080/1ffff0f0 at 12\\)",
899        "matchCount": "1",
900        "teardown": [
901            "$TC qdisc del dev $DEV1 ingress"
902        ]
903    },
904    {
905        "id": "d288",
906        "name": "Add basic filter with u32 ematch u32/missing offset",
907        "category": [
908            "filter",
909            "basic"
910        ],
911        "plugins": {
912            "requires": "nsPlugin"
913        },
914        "setup": [
915            "$TC qdisc add dev $DEV1 ingress"
916        ],
917        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u32 0x11227788 0xffffffff at)' classid 1:1",
918        "expExitCode": "1",
919        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
920        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(11227788/ffffffff at 12\\)",
921        "matchCount": "0",
922        "teardown": [
923            "$TC qdisc del dev $DEV1 ingress"
924        ]
925    },
926    {
927        "id": "4998",
928        "name": "Add basic filter with u32 ematch u32/missing AT keyword",
929        "category": [
930            "filter",
931            "basic"
932        ],
933        "plugins": {
934            "requires": "nsPlugin"
935        },
936        "setup": [
937            "$TC qdisc add dev $DEV1 ingress"
938        ],
939        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u32 0x77889900 0xfffff0f0 0)' classid 1:1",
940        "expExitCode": "1",
941        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
942        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(77889900/fffff0f0 at 0\\)",
943        "matchCount": "0",
944        "teardown": [
945            "$TC qdisc del dev $DEV1 ingress"
946        ]
947    },
948    {
949        "id": "1f0a",
950        "name": "Add basic filter with u32 ematch u32/missing value",
951        "category": [
952            "filter",
953            "basic"
954        ],
955        "plugins": {
956            "requires": "nsPlugin"
957        },
958        "setup": [
959            "$TC qdisc add dev $DEV1 ingress"
960        ],
961        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u32 at 12)' classid 1:1",
962        "expExitCode": "1",
963        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
964        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(at 12\\)",
965        "matchCount": "0",
966        "teardown": [
967            "$TC qdisc del dev $DEV1 ingress"
968        ]
969    },
970    {
971        "id": "848e",
972        "name": "Add basic filter with u32 ematch u32/non-numeric value",
973        "category": [
974            "filter",
975            "basic"
976        ],
977        "plugins": {
978            "requires": "nsPlugin"
979        },
980        "setup": [
981            "$TC qdisc add dev $DEV1 ingress"
982        ],
983        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u32 zero 0xffff at 0)' classid 1:1",
984        "expExitCode": "1",
985        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
986        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(00000000/ffff0000 at 0\\)",
987        "matchCount": "0",
988        "teardown": [
989            "$TC qdisc del dev $DEV1 ingress"
990        ]
991    },
992    {
993        "id": "f748",
994        "name": "Add basic filter with u32 ematch u32/non-numeric mask",
995        "category": [
996            "filter",
997            "basic"
998        ],
999        "plugins": {
1000            "requires": "nsPlugin"
1001        },
1002        "setup": [
1003            "$TC qdisc add dev $DEV1 ingress"
1004        ],
1005        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u32 0x11223344 mask at 0)' classid 1:1",
1006        "expExitCode": "1",
1007        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
1008        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(11223344/00000000 at 0\\)",
1009        "matchCount": "0",
1010        "teardown": [
1011            "$TC qdisc del dev $DEV1 ingress"
1012        ]
1013    },
1014    {
1015        "id": "55a6",
1016        "name": "Add basic filter with u32 ematch u32/negative offset and default action",
1017        "category": [
1018            "filter",
1019            "basic"
1020        ],
1021        "plugins": {
1022            "requires": "nsPlugin"
1023        },
1024        "setup": [
1025            "$TC qdisc add dev $DEV1 ingress"
1026        ],
1027        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u32 0xaabbccdd 0xff00ff00 at -12)' classid 1:1",
1028        "expExitCode": "0",
1029        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
1030        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(aa00cc00/ff00ff00 at -12\\)",
1031        "matchCount": "1",
1032        "teardown": [
1033            "$TC qdisc del dev $DEV1 ingress"
1034        ]
1035    },
1036    {
1037        "id": "7282",
1038        "name": "Add basic filter with u32 ematch u32/nexthdr+ offset and default action",
1039        "category": [
1040            "filter",
1041            "basic"
1042        ],
1043        "plugins": {
1044            "requires": "nsPlugin"
1045        },
1046        "setup": [
1047            "$TC qdisc add dev $DEV1 ingress"
1048        ],
1049        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u32 0xaabbccdd 0xffffffff at nexthdr+0)' classid 1:1",
1050        "expExitCode": "0",
1051        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
1052        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*u32\\(aabbccdd/ffffffff at nexthdr\\+0\\)",
1053        "matchCount": "1",
1054        "teardown": [
1055            "$TC qdisc del dev $DEV1 ingress"
1056        ]
1057    },
1058    {
1059        "id": "b2b6",
1060        "name": "Add basic filter with canid ematch and single SFF",
1061        "category": [
1062            "filter",
1063            "basic"
1064        ],
1065        "plugins": {
1066            "requires": "nsPlugin"
1067        },
1068        "setup": [
1069            "$TC qdisc add dev $DEV1 ingress"
1070        ],
1071        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'canid(sff 1)' classid 1:1",
1072        "expExitCode": "0",
1073        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
1074        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*canid\\(sff 0x1\\)",
1075        "matchCount": "1",
1076        "teardown": [
1077            "$TC qdisc del dev $DEV1 ingress"
1078        ]
1079    },
1080    {
1081        "id": "f67f",
1082        "name": "Add basic filter with canid ematch and single SFF with mask",
1083        "category": [
1084            "filter",
1085            "basic"
1086        ],
1087        "plugins": {
1088            "requires": "nsPlugin"
1089        },
1090        "setup": [
1091            "$TC qdisc add dev $DEV1 ingress"
1092        ],
1093        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'canid(sff 0xaabb:0x00ff)' classid 1:1",
1094        "expExitCode": "0",
1095        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
1096        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*canid\\(sff 0x2BB:0xFF\\)",
1097        "matchCount": "1",
1098        "teardown": [
1099            "$TC qdisc del dev $DEV1 ingress"
1100        ]
1101    },
1102    {
1103        "id": "bd5c",
1104        "name": "Add basic filter with canid ematch and multiple SFF",
1105        "category": [
1106            "filter",
1107            "basic"
1108        ],
1109        "plugins": {
1110            "requires": "nsPlugin"
1111        },
1112        "setup": [
1113            "$TC qdisc add dev $DEV1 ingress"
1114        ],
1115        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'canid(sff 1 sff 2 sff 3)' classid 1:1",
1116        "expExitCode": "0",
1117        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
1118        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*canid\\(sff 0x1 sff 0x2 sff 0x3\\)",
1119        "matchCount": "1",
1120        "teardown": [
1121            "$TC qdisc del dev $DEV1 ingress"
1122        ]
1123    },
1124    {
1125        "id": "83c7",
1126        "name": "Add basic filter with canid ematch and multiple SFF with masks",
1127        "category": [
1128            "filter",
1129            "basic"
1130        ],
1131        "plugins": {
1132            "requires": "nsPlugin"
1133        },
1134        "setup": [
1135            "$TC qdisc add dev $DEV1 ingress"
1136        ],
1137        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'canid(sff 0xaa:0x01 sff 0xbb:0x02 sff 0xcc:0x03)' classid 1:1",
1138        "expExitCode": "0",
1139        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
1140        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*canid\\(sff 0xAA:0x1 sff 0xBB:0x2 sff 0xCC:0x3\\)",
1141        "matchCount": "1",
1142        "teardown": [
1143            "$TC qdisc del dev $DEV1 ingress"
1144        ]
1145    },
1146    {
1147        "id": "a8f5",
1148        "name": "Add basic filter with canid ematch and single EFF",
1149        "category": [
1150            "filter",
1151            "basic"
1152        ],
1153        "plugins": {
1154            "requires": "nsPlugin"
1155        },
1156        "setup": [
1157            "$TC qdisc add dev $DEV1 ingress"
1158        ],
1159        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'canid(eff 1)' classid 1:1",
1160        "expExitCode": "0",
1161        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
1162        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*canid\\(eff 0x1\\)",
1163        "matchCount": "1",
1164        "teardown": [
1165            "$TC qdisc del dev $DEV1 ingress"
1166        ]
1167    },
1168    {
1169        "id": "98ae",
1170        "name": "Add basic filter with canid ematch and single EFF with mask",
1171        "category": [
1172            "filter",
1173            "basic"
1174        ],
1175        "plugins": {
1176            "requires": "nsPlugin"
1177        },
1178        "setup": [
1179            "$TC qdisc add dev $DEV1 ingress"
1180        ],
1181        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'canid(eff 0xaabb:0xf1f1)' classid 1:1",
1182        "expExitCode": "0",
1183        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
1184        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*canid\\(eff 0xAABB:0xF1F1\\)",
1185        "matchCount": "1",
1186        "teardown": [
1187            "$TC qdisc del dev $DEV1 ingress"
1188        ]
1189    },
1190    {
1191        "id": "6056",
1192        "name": "Add basic filter with canid ematch and multiple EFF",
1193        "category": [
1194            "filter",
1195            "basic"
1196        ],
1197        "plugins": {
1198            "requires": "nsPlugin"
1199        },
1200        "setup": [
1201            "$TC qdisc add dev $DEV1 ingress"
1202        ],
1203        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'canid(eff 1 eff 2 eff 3)' classid 1:1",
1204        "expExitCode": "0",
1205        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
1206        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*canid\\(eff 0x1 eff 0x2 eff 0x3\\)",
1207        "matchCount": "1",
1208        "teardown": [
1209            "$TC qdisc del dev $DEV1 ingress"
1210        ]
1211    },
1212    {
1213        "id": "d188",
1214        "name": "Add basic filter with canid ematch and multiple EFF with masks",
1215        "category": [
1216            "filter",
1217            "basic"
1218        ],
1219        "plugins": {
1220            "requires": "nsPlugin"
1221        },
1222        "setup": [
1223            "$TC qdisc add dev $DEV1 ingress"
1224        ],
1225        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'canid(eff 0xaa:0x01 eff 0xbb:0x02 eff 0xcc:0x03)' classid 1:1",
1226        "expExitCode": "0",
1227        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
1228        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*canid\\(eff 0xAA:0x1 eff 0xBB:0x2 eff 0xCC:0x3\\)",
1229        "matchCount": "1",
1230        "teardown": [
1231            "$TC qdisc del dev $DEV1 ingress"
1232        ]
1233    },
1234    {
1235        "id": "25d1",
1236        "name": "Add basic filter with canid ematch and a combination of SFF/EFF",
1237        "category": [
1238            "filter",
1239            "basic"
1240        ],
1241        "plugins": {
1242            "requires": "nsPlugin"
1243        },
1244        "setup": [
1245            "$TC qdisc add dev $DEV1 ingress"
1246        ],
1247        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'canid(sff 0x01 eff 0x02)' classid 1:1",
1248        "expExitCode": "0",
1249        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
1250        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*canid\\(eff 0x2 sff 0x1\\)",
1251        "matchCount": "1",
1252        "teardown": [
1253            "$TC qdisc del dev $DEV1 ingress"
1254        ]
1255    },
1256    {
1257        "id": "b438",
1258        "name": "Add basic filter with canid ematch and a combination of SFF/EFF with masks",
1259        "category": [
1260            "filter",
1261            "basic"
1262        ],
1263        "plugins": {
1264            "requires": "nsPlugin"
1265        },
1266        "setup": [
1267            "$TC qdisc add dev $DEV1 ingress"
1268        ],
1269        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'canid(sff 0x01:0xf eff 0x02:0xf)' classid 1:1",
1270        "expExitCode": "0",
1271        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol ip basic",
1272        "matchPattern": "^filter parent ffff: protocol ip pref 1 basic.*handle 0x1 flowid 1:1.*canid\\(eff 0x2:0xF sff 0x1:0xF\\)",
1273        "matchCount": "1",
1274        "teardown": [
1275            "$TC qdisc del dev $DEV1 ingress"
1276        ]
1277    },
1278    {
1279        "id": "0811",
1280        "name": "Add multiple basic filter with cmp ematch u8/link layer and default action and dump them",
1281        "category": [
1282            "filter",
1283            "basic"
1284        ],
1285        "plugins": {
1286            "requires": "nsPlugin"
1287        },
1288        "setup": [
1289            "$TC qdisc add dev $DEV1 ingress",
1290            "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff gt 10)' classid 1:1"
1291        ],
1292        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 2 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff gt 10)' classid 1:1",
1293        "expExitCode": "0",
1294        "verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
1295        "matchPattern": "^filter protocol ip pref 1 basic",
1296        "matchCount": "3",
1297        "teardown": [
1298            "$TC qdisc del dev $DEV1 ingress"
1299        ]
1300    },
1301    {
1302        "id": "5129",
1303        "name": "List basic filters",
1304        "category": [
1305            "filter",
1306            "basic"
1307        ],
1308        "plugins": {
1309            "requires": "nsPlugin"
1310        },
1311        "setup": [
1312            "$TC qdisc add dev $DEV1 ingress",
1313            "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff gt 10)' classid 1:1",
1314            "$TC filter add dev $DEV1 parent ffff: handle 2 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff gt 10)' classid 1:1"
1315        ],
1316        "cmdUnderTest": "$TC filter show dev $DEV1 parent ffff:",
1317        "expExitCode": "0",
1318        "verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
1319        "matchPattern": "cmp\\(u8 at 0 layer 0 mask 0xff gt 10\\)",
1320        "matchCount": "2",
1321        "teardown": [
1322            "$TC qdisc del dev $DEV1 ingress"
1323        ]
1324    }
1325]
1326