4 "name": "Add valid basic police action",
10 "requires": "nsPlugin"
14 "$TC actions flush action police",
20 "cmdUnderTest": "$TC actions add action police rate 1kbit burst 10k index 1",
22 "verifyCmd": "$TC actions ls action police",
23 "matchPattern": "action order [0-9]*: police 0x1 rate 1Kbit burst 10Kb",
26 "$TC actions flush action police"
31 "name": "Add police action with duplicate index",
37 "requires": "nsPlugin"
41 "$TC actions flush action police",
46 "$TC actions add action police rate 4Mbit burst 120k index 9"
48 "cmdUnderTest": "$TC actions add action police rate 8kbit burst 24k index 9",
50 "verifyCmd": "$TC actions ls action police",
51 "matchPattern": "action order [0-9]*: police 0x9",
54 "$TC actions flush action police"
59 "name": "Add valid police action with mtu",
65 "requires": "nsPlugin"
69 "$TC actions flush action police",
75 "cmdUnderTest": "$TC actions add action police rate 90kbit burst 10k mtu 1k index 98",
77 "verifyCmd": "$TC actions get action police index 98",
78 "matchPattern": "action order [0-9]*: police 0x62 rate 90Kbit burst 10Kb mtu 1Kb",
81 "$TC actions flush action police"
86 "name": "Add valid police action with peakrate",
92 "requires": "nsPlugin"
96 "$TC actions flush action police",
102 "cmdUnderTest": "$TC actions add action police rate 90kbit burst 10k mtu 2kb peakrate 100kbit index 3",
104 "verifyCmd": "$TC actions ls action police",
105 "matchPattern": "action order [0-9]*: police 0x3 rate 90Kbit burst 10Kb mtu 2Kb peakrate 100Kbit",
108 "$TC actions flush action police"
113 "name": "Add police action with peakrate and no mtu",
119 "requires": "nsPlugin"
123 "$TC actions flush action police",
129 "cmdUnderTest": "$TC actions add action police rate 5kbit burst 6kb peakrate 10kbit index 9",
130 "expExitCode": "255",
131 "verifyCmd": "$TC actions ls action police",
132 "matchPattern": "action order [0-9]*: police 0x9 rate 5Kb burst 10Kb",
135 "$TC actions flush action police"
140 "name": "Add police action with valid overhead",
146 "requires": "nsPlugin"
150 "$TC actions flush action police",
156 "cmdUnderTest": "$TC actions add action police rate 1mbit burst 100k overhead 64 index 64",
158 "verifyCmd": "$TC actions get action police index 64",
159 "matchPattern": "action order [0-9]*: police 0x40 rate 1Mbit burst 100Kb mtu 2Kb action reclassify overhead 64b",
162 "$TC actions flush action police"
167 "name": "Add police action with ethernet linklayer type",
173 "requires": "nsPlugin"
177 "$TC actions flush action police",
183 "cmdUnderTest": "$TC actions add action police rate 2mbit burst 200k linklayer ethernet index 8",
185 "verifyCmd": "$TC actions show action police",
186 "matchPattern": "action order [0-9]*: police 0x8 rate 2Mbit burst 200Kb mtu 2Kb action reclassify overhead 0b",
189 "$TC actions flush action police"
194 "name": "Add police action with atm linklayer type",
200 "requires": "nsPlugin"
204 "$TC actions flush action police",
210 "cmdUnderTest": "$TC actions add action police rate 2mbit burst 200k linklayer atm index 8",
212 "verifyCmd": "$TC actions show action police",
213 "matchPattern": "action order [0-9]*: police 0x8 rate 2Mbit burst 200Kb mtu 2Kb action reclassify overhead 0b linklayer atm",
216 "$TC actions flush action police"
221 "name": "Add police actions with conform-exceed control continue/drop",
227 "requires": "nsPlugin"
231 "$TC actions flush action police",
237 "cmdUnderTest": "$TC actions add action police rate 3mbit burst 250k conform-exceed continue/drop index 1",
239 "verifyCmd": "$TC actions get action police index 1",
240 "matchPattern": "action order [0-9]*: police 0x1 rate 3Mbit burst 250Kb mtu 2Kb action continue/drop",
243 "$TC actions flush action police"
248 "name": "Add police actions with conform-exceed control pass/reclassify",
254 "requires": "nsPlugin"
258 "$TC actions flush action police",
264 "cmdUnderTest": "$TC actions add action police rate 3mbit burst 250k conform-exceed pass/reclassify index 4",
266 "verifyCmd": "$TC actions ls action police",
267 "matchPattern": "action order [0-9]*: police 0x4 rate 3Mbit burst 250Kb mtu 2Kb action pass/reclassify",
270 "$TC actions flush action police"
275 "name": "Add police actions with conform-exceed control pass/pipe",
281 "requires": "nsPlugin"
285 "$TC actions flush action police",
291 "cmdUnderTest": "$TC actions add action police rate 3mbit burst 250k conform-exceed pass/pipe index 5",
293 "verifyCmd": "$TC actions ls action police",
294 "matchPattern": "action order [0-9]*: police 0x5 rate 3Mbit burst 250Kb mtu 2Kb action pass/pipe",
297 "$TC actions flush action police"
302 "name": "Add police action with invalid rate value",
308 "requires": "nsPlugin"
312 "$TC actions flush action police",
318 "cmdUnderTest": "$TC actions add action police rate 3tb burst 250k conform-exceed pass/pipe index 5",
319 "expExitCode": "255",
320 "verifyCmd": "$TC actions ls action police",
321 "matchPattern": "action order [0-9]*: police 0x5 rate 3Tb burst 250Kb mtu 2Kb action pass/pipe",
324 "$TC actions flush action police"
329 "name": "Add police action with invalid burst value",
335 "requires": "nsPlugin"
339 "$TC actions flush action police",
345 "cmdUnderTest": "$TC actions add action police rate 3kbit burst 250P conform-exceed pass/pipe index 5",
346 "expExitCode": "255",
347 "verifyCmd": "$TC actions ls action police",
348 "matchPattern": "action order [0-9]*: police 0x5 rate 3Kbit burst 250Pb mtu 2Kb action pass/pipe",
351 "$TC actions flush action police"
356 "name": "Add police actions with conform-exceed control pass/pipe [with numeric values]",
362 "requires": "nsPlugin"
366 "$TC actions flush action police",
372 "cmdUnderTest": "$TC actions add action police rate 3mbit burst 250k conform-exceed 0/3 index 1",
374 "verifyCmd": "$TC actions get action police index 1",
375 "matchPattern": "action order [0-9]*: police 0x1 rate 3Mbit burst 250Kb mtu 2Kb action pass/pipe",
378 "$TC actions flush action police"
383 "name": "Add police actions with conform-exceed control <invalid>/drop",
389 "requires": "nsPlugin"
393 "$TC actions flush action police",
399 "cmdUnderTest": "$TC actions add action police rate 3mbit burst 250k conform-exceed 10/drop index 1",
400 "expExitCode": "255",
401 "verifyCmd": "$TC actions ls action police",
402 "matchPattern": "action order [0-9]*: police 0x1 rate 3Mbit burst 250Kb mtu 2Kb action ",
405 "$TC actions flush action police"
410 "name": "Add police action with invalid peakrate value",
416 "requires": "nsPlugin"
420 "$TC actions flush action police",
426 "cmdUnderTest": "$TC actions add action police rate 90kbit burst 10k mtu 2kb peakrate 100T index 1",
427 "expExitCode": "255",
428 "verifyCmd": "$TC actions ls action police",
429 "matchPattern": "action order [0-9]*: police 0x1 rate 90Kbit burst 10Kb mtu 2Kb peakrate 100Tbit",
432 "$TC actions flush action police"
437 "name": "Add police action with invalid mtu value",
443 "requires": "nsPlugin"
447 "$TC actions flush action police",
453 "cmdUnderTest": "$TC actions add action police rate 10kbit burst 10k mtu 2Pbit index 1",
454 "expExitCode": "255",
455 "verifyCmd": "$TC actions ls action police",
456 "matchPattern": "action order [0-9]*: police 0x1 rate 10Kbit burst 1Kb mtu 2Pb",
459 "$TC actions flush action police"
464 "name": "Add police action with cookie",
470 "requires": "nsPlugin"
474 "$TC actions flush action police",
480 "cmdUnderTest": "$TC actions add action police rate 10mbit burst 10k index 1 cookie a1b1c1d1e1f12233bb",
482 "verifyCmd": "$TC actions get action police index 1",
483 "matchPattern": "action order [0-9]*: police 0x1 rate 10Mbit burst 10Kb mtu 2Kb.*cookie a1b1c1d1e1f12233bb",
486 "$TC actions flush action police"
491 "name": "Add police action with maximum index",
497 "requires": "nsPlugin"
501 "$TC actions flush action police",
507 "cmdUnderTest": "$TC actions add action police rate 10mbit burst 10k index 4294967295",
509 "verifyCmd": "$TC actions get action police index 4294967295",
510 "matchPattern": "action order [0-9]*: police 0xffffffff rate 10Mbit burst 10Kb mtu 2Kb",
513 "$TC actions flush action police"
518 "name": "Delete police action",
524 "requires": "nsPlugin"
528 "$TC actions flush action police",
533 "$TC actions add action police rate 5mbit burst 2m index 12"
535 "cmdUnderTest": "$TC actions delete action police index 12",
537 "verifyCmd": "$TC actions ls action police",
538 "matchPattern": "action order [0-9]*: police 0xc rate 5Mb burst 2Mb",
541 "$TC actions flush action police"
546 "name": "Get single police action from many actions",
552 "requires": "nsPlugin"
556 "$TC actions flush action police",
561 "$TC actions add action police rate 1mbit burst 100k index 1",
562 "$TC actions add action police rate 2mbit burst 200k index 2",
563 "$TC actions add action police rate 3mbit burst 300k index 3",
564 "$TC actions add action police rate 4mbit burst 400k index 4",
565 "$TC actions add action police rate 5mbit burst 500k index 5",
566 "$TC actions add action police rate 6mbit burst 600k index 6",
567 "$TC actions add action police rate 7mbit burst 700k index 7",
568 "$TC actions add action police rate 8mbit burst 800k index 8"
570 "cmdUnderTest": "$TC actions get action police index 4",
572 "verifyCmd": "$TC actions get action police index 4",
573 "matchPattern": "action order [0-9]*: police 0x4 rate 4Mbit burst 400Kb",
576 "$TC actions flush action police"
581 "name": "Get single police action without specifying index",
587 "requires": "nsPlugin"
591 "$TC actions flush action police",
596 "$TC actions add action police rate 1mbit burst 100k index 1"
598 "cmdUnderTest": "$TC actions get action police",
599 "expExitCode": "255",
600 "verifyCmd": "$TC actions get action police",
601 "matchPattern": "action order [0-9]*: police",
604 "$TC actions flush action police"
609 "name": "List police actions",
615 "requires": "nsPlugin"
619 "$TC actions flush action police",
624 "$TC actions add action police rate 1mbit burst 100k index 1",
625 "$TC actions add action police rate 2mbit burst 200k index 2",
626 "$TC actions add action police rate 3mbit burst 300k index 3",
627 "$TC actions add action police rate 4mbit burst 400k index 4",
628 "$TC actions add action police rate 5mbit burst 500k index 5",
629 "$TC actions add action police rate 6mbit burst 600k index 6",
630 "$TC actions add action police rate 7mbit burst 700k index 7",
631 "$TC actions add action police rate 8mbit burst 800k index 8"
633 "cmdUnderTest": "$TC actions list action police",
635 "verifyCmd": "$TC actions ls action police",
636 "matchPattern": "action order [0-9]*: police 0x[1-8] rate [1-8]Mbit burst [1-8]00Kb",
639 "$TC actions flush action police"
644 "name": "Flush police actions",
650 "requires": "nsPlugin"
653 "$TC actions add action police rate 1mbit burst 100k index 1",
654 "$TC actions add action police rate 2mbit burst 200k index 2",
655 "$TC actions add action police rate 3mbit burst 300k index 3",
656 "$TC actions add action police rate 4mbit burst 400k index 4",
657 "$TC actions add action police rate 5mbit burst 500k index 5",
658 "$TC actions add action police rate 6mbit burst 600k index 6",
659 "$TC actions add action police rate 7mbit burst 700k index 7",
660 "$TC actions add action police rate 8mbit burst 800k index 8"
662 "cmdUnderTest": "$TC actions flush action police",
664 "verifyCmd": "$TC actions ls action police",
665 "matchPattern": "action order [0-9]*: police",
673 "name": "Add police action with control continue",
679 "requires": "nsPlugin"
683 "$TC actions flush action police",
689 "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m continue index 1",
691 "verifyCmd": "$TC actions get action police index 1",
692 "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action continue",
695 "$TC actions flush action police"
700 "name": "Add police action with control drop",
706 "requires": "nsPlugin"
710 "$TC actions flush action police",
716 "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m drop index 1",
718 "verifyCmd": "$TC actions ls action police",
719 "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action drop",
722 "$TC actions flush action police"
727 "name": "Add police action with control ok",
733 "requires": "nsPlugin"
737 "$TC actions flush action police",
743 "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m ok index 1",
745 "verifyCmd": "$TC actions ls action police",
746 "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action pass",
749 "$TC actions flush action police"
754 "name": "Add police action with control reclassify",
760 "requires": "nsPlugin"
764 "$TC actions flush action police",
770 "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m reclassify index 1",
772 "verifyCmd": "$TC actions get action police index 1",
773 "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action reclassify",
776 "$TC actions flush action police"
781 "name": "Add police action with control pipe",
787 "requires": "nsPlugin"
791 "$TC actions flush action police",
797 "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m pipe index 1",
799 "verifyCmd": "$TC actions ls action police",
800 "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action pipe",
803 "$TC actions flush action police"
808 "name": "Add police action with exceed goto chain control action",
814 "requires": "nsPlugin"
818 "$TC actions flush action police",
824 "cmdUnderTest": "$TC actions add action police rate 1mbit burst 1k conform-exceed pass / goto chain 42",
825 "expExitCode": "255",
826 "verifyCmd": "$TC actions ls action police",
827 "matchPattern": "action order [0-9]*: police 0x1 rate 1Mbit burst 1Kb mtu 2Kb action pass/goto chain 42",
830 "$TC actions flush action police"
835 "name": "Replace police action with invalid goto chain control",
841 "requires": "nsPlugin"
845 "$TC actions flush action police",
850 "$TC actions add action police rate 3mbit burst 250k drop index 90"
852 "cmdUnderTest": "$TC actions replace action police rate 3mbit burst 250k goto chain 42 index 90 cookie c1a0c1a0",
853 "expExitCode": "255",
854 "verifyCmd": "$TC actions get action police index 90",
855 "matchPattern": "action order [0-9]*: police 0x5a rate 3Mbit burst 250Kb mtu 2Kb action drop",
858 "$TC actions flush action police"
863 "name": "Add valid police action with packets per second rate limit",
869 "requires": "nsPlugin"
873 "$TC actions flush action police",
879 "cmdUnderTest": "$TC actions add action police pkts_rate 1000 pkts_burst 200 index 1",
881 "verifyCmd": "$TC actions ls action police",
882 "matchPattern": "action order [0-9]*: police 0x1 rate 0bit burst 0b mtu 4096Mb pkts_rate 1000 pkts_burst 200",
885 "$TC actions flush action police"
890 "name": "Add invalid police action with both bps and pps",
896 "requires": "nsPlugin"
900 "$TC actions flush action police",
906 "cmdUnderTest": "$TC actions add action police rate 1kbit burst 10k pkts_rate 1000 pkts_burst 200 index 1",
907 "expExitCode": "255",
908 "verifyCmd": "$TC actions ls action police",
909 "matchPattern": "action order [0-9]*: police 0x1 ",
912 "$TC actions flush action police"
917 "name": "Add police action with skip_hw option",
923 "requires": "nsPlugin"
927 "$TC actions flush action police",
933 "cmdUnderTest": "$TC actions add action police rate 1kbit burst 10k index 100 skip_hw",
935 "verifyCmd": "$TC actions ls action police | grep skip_hw",
936 "matchPattern": "skip_hw",
939 "$TC actions flush action police"