4 "name": "Add basic filter with cmp ematch u8/link layer and default action",
10 "requires": "nsPlugin"
13 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
21 "$TC qdisc del dev $DEV1 ingress"
26 "name": "Add basic filter with cmp ematch u8/link layer with trans flag and default action",
32 "requires": "nsPlugin"
35 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
43 "$TC qdisc del dev $DEV1 ingress"
48 "name": "Add basic filter with cmp ematch u16/link layer and a single action",
54 "requires": "nsPlugin"
57 "$TC qdisc add dev $DEV1 ingress"
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",
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",
65 "$TC qdisc del dev $DEV1 ingress"
70 "name": "Add basic filter with cmp ematch u32/link layer and miltiple actions",
76 "requires": "nsPlugin"
79 "$TC qdisc add dev $DEV1 ingress"
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",
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",
87 "$TC qdisc del dev $DEV1 ingress"
92 "name": "Add basic filter with cmp ematch u8/network layer and default action",
98 "requires": "nsPlugin"
101 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
109 "$TC qdisc del dev $DEV1 ingress"
114 "name": "Add basic filter with cmp ematch u8/network layer with trans flag and default action",
120 "requires": "nsPlugin"
123 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
131 "$TC qdisc del dev $DEV1 ingress"
136 "name": "Add basic filter with cmp ematch u16/network layer and a single action",
142 "requires": "nsPlugin"
145 "$TC qdisc add dev $DEV1 ingress"
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",
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",
153 "$TC qdisc del dev $DEV1 ingress"
158 "name": "Add basic filter with cmp ematch u32/network layer and miltiple actions",
164 "requires": "nsPlugin"
167 "$TC qdisc add dev $DEV1 ingress"
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",
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",
175 "$TC qdisc del dev $DEV1 ingress"
180 "name": "Add basic filter with cmp ematch u8/transport layer and default action",
186 "requires": "nsPlugin"
189 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
197 "$TC qdisc del dev $DEV1 ingress"
202 "name": "Add basic filter with cmp ematch u8/transport layer with trans flag and default action",
208 "requires": "nsPlugin"
211 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
219 "$TC qdisc del dev $DEV1 ingress"
224 "name": "Add basic filter with cmp ematch u16/transport layer and a single action",
230 "requires": "nsPlugin"
233 "$TC qdisc add dev $DEV1 ingress"
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",
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",
241 "$TC qdisc del dev $DEV1 ingress"
246 "name": "Add basic filter with cmp ematch u32/transport layer and miltiple actions",
252 "requires": "nsPlugin"
255 "$TC qdisc add dev $DEV1 ingress"
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",
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",
263 "$TC qdisc del dev $DEV1 ingress"
268 "name": "Add basic filter with NOT cmp ematch rule and default action",
274 "requires": "nsPlugin"
277 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
285 "$TC qdisc del dev $DEV1 ingress"
290 "name": "Add basic filter with two ANDed cmp ematch rules and single action",
296 "requires": "nsPlugin"
299 "$TC qdisc add dev $DEV1 ingress"
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",
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",
307 "$TC qdisc del dev $DEV1 ingress"
312 "name": "Add basic filter with two ORed cmp ematch rules and single action",
318 "requires": "nsPlugin"
321 "$TC qdisc add dev $DEV1 ingress"
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",
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",
329 "$TC qdisc del dev $DEV1 ingress"
334 "name": "Add basic filter with two ANDed cmp ematch rules and one ORed ematch rule and single action",
340 "requires": "nsPlugin"
343 "$TC qdisc add dev $DEV1 ingress"
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",
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",
351 "$TC qdisc del dev $DEV1 ingress"
356 "name": "Add basic filter with two ANDed cmp ematch rules and one NOT ORed ematch rule and single action",
362 "requires": "nsPlugin"
365 "$TC qdisc add dev $DEV1 ingress"
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",
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",
373 "$TC qdisc del dev $DEV1 ingress"
378 "name": "Add basic filter with u32 ematch u8/zero offset and default action",
384 "requires": "nsPlugin"
387 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
395 "$TC qdisc del dev $DEV1 ingress"
400 "name": "Add basic filter with u32 ematch u8/zero offset and invalid value >0xFF",
406 "requires": "nsPlugin"
409 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
417 "$TC qdisc del dev $DEV1 ingress"
422 "name": "Add basic filter with u32 ematch u8/positive offset and default action",
428 "requires": "nsPlugin"
431 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
439 "$TC qdisc del dev $DEV1 ingress"
444 "name": "Add basic filter with u32 ematch u8/invalid mask >0xFF",
450 "requires": "nsPlugin"
453 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
461 "$TC qdisc del dev $DEV1 ingress"
466 "name": "Add basic filter with u32 ematch u8/missing offset",
472 "requires": "nsPlugin"
475 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
483 "$TC qdisc del dev $DEV1 ingress"
488 "name": "Add basic filter with u32 ematch u8/missing AT keyword",
494 "requires": "nsPlugin"
497 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
505 "$TC qdisc del dev $DEV1 ingress"
510 "name": "Add basic filter with u32 ematch u8/missing value",
516 "requires": "nsPlugin"
519 "$TC qdisc add dev $DEV1 ingress"
521 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u8 at 12)' classid 1: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\\)",
527 "$TC qdisc del dev $DEV1 ingress"
532 "name": "Add basic filter with u32 ematch u8/non-numeric value",
538 "requires": "nsPlugin"
541 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
549 "$TC qdisc del dev $DEV1 ingress"
554 "name": "Add basic filter with u32 ematch u8/non-numeric mask",
560 "requires": "nsPlugin"
563 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
571 "$TC qdisc del dev $DEV1 ingress"
576 "name": "Add basic filter with u32 ematch u8/negative offset and default action",
582 "requires": "nsPlugin"
585 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
593 "$TC qdisc del dev $DEV1 ingress"
598 "name": "Add basic filter with u32 ematch u8/nexthdr+ offset and default action",
604 "requires": "nsPlugin"
607 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
615 "$TC qdisc del dev $DEV1 ingress"
620 "name": "Add basic filter with u32 ematch u16/zero offset and default action",
626 "requires": "nsPlugin"
629 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
637 "$TC qdisc del dev $DEV1 ingress"
642 "name": "Add basic filter with u32 ematch u16/zero offset and invalid value >0xFFFF",
648 "requires": "nsPlugin"
651 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
659 "$TC qdisc del dev $DEV1 ingress"
664 "name": "Add basic filter with u32 ematch u16/positive offset and default action",
670 "requires": "nsPlugin"
673 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
681 "$TC qdisc del dev $DEV1 ingress"
686 "name": "Add basic filter with u32 ematch u16/invalid mask >0xFFFF",
692 "requires": "nsPlugin"
695 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
703 "$TC qdisc del dev $DEV1 ingress"
708 "name": "Add basic filter with u32 ematch u16/missing offset",
714 "requires": "nsPlugin"
717 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
725 "$TC qdisc del dev $DEV1 ingress"
730 "name": "Add basic filter with u32 ematch u16/missing AT keyword",
736 "requires": "nsPlugin"
739 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
747 "$TC qdisc del dev $DEV1 ingress"
752 "name": "Add basic filter with u32 ematch u16/missing value",
758 "requires": "nsPlugin"
761 "$TC qdisc add dev $DEV1 ingress"
763 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u16 at 12)' classid 1: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\\)",
769 "$TC qdisc del dev $DEV1 ingress"
774 "name": "Add basic filter with u32 ematch u16/non-numeric value",
780 "requires": "nsPlugin"
783 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
791 "$TC qdisc del dev $DEV1 ingress"
796 "name": "Add basic filter with u32 ematch u16/non-numeric mask",
802 "requires": "nsPlugin"
805 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
813 "$TC qdisc del dev $DEV1 ingress"
818 "name": "Add basic filter with u32 ematch u16/negative offset and default action",
824 "requires": "nsPlugin"
827 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
835 "$TC qdisc del dev $DEV1 ingress"
840 "name": "Add basic filter with u32 ematch u16/nexthdr+ offset and default action",
846 "requires": "nsPlugin"
849 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
857 "$TC qdisc del dev $DEV1 ingress"
862 "name": "Add basic filter with u32 ematch u32/zero offset and default action",
868 "requires": "nsPlugin"
871 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
879 "$TC qdisc del dev $DEV1 ingress"
884 "name": "Add basic filter with u32 ematch u32/positive offset and default action",
890 "requires": "nsPlugin"
893 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
901 "$TC qdisc del dev $DEV1 ingress"
906 "name": "Add basic filter with u32 ematch u32/missing offset",
912 "requires": "nsPlugin"
915 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
923 "$TC qdisc del dev $DEV1 ingress"
928 "name": "Add basic filter with u32 ematch u32/missing AT keyword",
934 "requires": "nsPlugin"
937 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
945 "$TC qdisc del dev $DEV1 ingress"
950 "name": "Add basic filter with u32 ematch u32/missing value",
956 "requires": "nsPlugin"
959 "$TC qdisc add dev $DEV1 ingress"
961 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'u32(u32 at 12)' classid 1: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\\)",
967 "$TC qdisc del dev $DEV1 ingress"
972 "name": "Add basic filter with u32 ematch u32/non-numeric value",
978 "requires": "nsPlugin"
981 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
989 "$TC qdisc del dev $DEV1 ingress"
994 "name": "Add basic filter with u32 ematch u32/non-numeric mask",
1000 "requires": "nsPlugin"
1003 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
1011 "$TC qdisc del dev $DEV1 ingress"
1016 "name": "Add basic filter with u32 ematch u32/negative offset and default action",
1022 "requires": "nsPlugin"
1025 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
1033 "$TC qdisc del dev $DEV1 ingress"
1038 "name": "Add basic filter with u32 ematch u32/nexthdr+ offset and default action",
1044 "requires": "nsPlugin"
1047 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
1055 "$TC qdisc del dev $DEV1 ingress"
1060 "name": "Add basic filter with canid ematch and single SFF",
1066 "requires": "nsPlugin"
1069 "$TC qdisc add dev $DEV1 ingress"
1071 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'canid(sff 1)' classid 1:1",
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\\)",
1077 "$TC qdisc del dev $DEV1 ingress"
1082 "name": "Add basic filter with canid ematch and single SFF with mask",
1088 "requires": "nsPlugin"
1091 "$TC qdisc add dev $DEV1 ingress"
1093 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'canid(sff 0xaabb:0x00ff)' classid 1:1",
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\\)",
1099 "$TC qdisc del dev $DEV1 ingress"
1104 "name": "Add basic filter with canid ematch and multiple SFF",
1110 "requires": "nsPlugin"
1113 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
1121 "$TC qdisc del dev $DEV1 ingress"
1126 "name": "Add basic filter with canid ematch and multiple SFF with masks",
1132 "requires": "nsPlugin"
1135 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
1143 "$TC qdisc del dev $DEV1 ingress"
1148 "name": "Add basic filter with canid ematch and single EFF",
1154 "requires": "nsPlugin"
1157 "$TC qdisc add dev $DEV1 ingress"
1159 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'canid(eff 1)' classid 1:1",
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\\)",
1165 "$TC qdisc del dev $DEV1 ingress"
1170 "name": "Add basic filter with canid ematch and single EFF with mask",
1176 "requires": "nsPlugin"
1179 "$TC qdisc add dev $DEV1 ingress"
1181 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'canid(eff 0xaabb:0xf1f1)' classid 1:1",
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\\)",
1187 "$TC qdisc del dev $DEV1 ingress"
1192 "name": "Add basic filter with canid ematch and multiple EFF",
1198 "requires": "nsPlugin"
1201 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
1209 "$TC qdisc del dev $DEV1 ingress"
1214 "name": "Add basic filter with canid ematch and multiple EFF with masks",
1220 "requires": "nsPlugin"
1223 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
1231 "$TC qdisc del dev $DEV1 ingress"
1236 "name": "Add basic filter with canid ematch and a combination of SFF/EFF",
1242 "requires": "nsPlugin"
1245 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
1253 "$TC qdisc del dev $DEV1 ingress"
1258 "name": "Add basic filter with canid ematch and a combination of SFF/EFF with masks",
1264 "requires": "nsPlugin"
1267 "$TC qdisc add dev $DEV1 ingress"
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",
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\\)",
1275 "$TC qdisc del dev $DEV1 ingress"
1280 "name": "Add multiple basic filter with cmp ematch u8/link layer and default action and dump them",
1286 "requires": "nsPlugin"
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"
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",
1294 "verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
1295 "matchPattern": "^filter protocol ip pref 1 basic",
1298 "$TC qdisc del dev $DEV1 ingress"
1303 "name": "List basic filters",
1309 "requires": "nsPlugin"
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"
1316 "cmdUnderTest": "$TC filter show dev $DEV1 parent ffff:",
1318 "verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
1319 "matchPattern": "cmp\\(u8 at 0 layer 0 mask 0xff gt 10\\)",
1322 "$TC qdisc del dev $DEV1 ingress"