xref: /linux/tools/testing/selftests/tc-testing/tc-tests/actions/police.json (revision a23e1966932464e1c5226cb9ac4ce1d5fc10ba22)
1[
2    {
3        "id": "49aa",
4        "name": "Add valid basic police action",
5        "category": [
6            "actions",
7            "police"
8        ],
9        "plugins": {
10           "requires": "nsPlugin"
11        },
12        "setup": [
13            [
14                "$TC actions flush action police",
15                0,
16                1,
17                255
18            ]
19        ],
20        "cmdUnderTest": "$TC actions add action police rate 1kbit burst 10k index 1",
21        "expExitCode": "0",
22        "verifyCmd": "$TC actions ls action police",
23        "matchPattern": "action order [0-9]*:  police 0x1 rate 1Kbit burst 10Kb",
24        "matchCount": "1",
25        "teardown": [
26            "$TC actions flush action police"
27        ]
28    },
29    {
30        "id": "3abe",
31        "name": "Add police action with duplicate index",
32        "category": [
33            "actions",
34            "police"
35        ],
36        "plugins": {
37           "requires": "nsPlugin"
38        },
39        "setup": [
40            [
41                "$TC actions flush action police",
42                0,
43                1,
44                255
45            ],
46            "$TC actions add action police rate 4Mbit burst 120k index 9"
47        ],
48        "cmdUnderTest": "$TC actions add action police rate 8kbit burst 24k index 9",
49        "expExitCode": "255",
50        "verifyCmd": "$TC actions ls action police",
51        "matchPattern": "action order [0-9]*:  police 0x9",
52        "matchCount": "1",
53        "teardown": [
54            "$TC actions flush action police"
55        ]
56    },
57    {
58        "id": "49fa",
59        "name": "Add valid police action with mtu",
60        "category": [
61            "actions",
62            "police"
63        ],
64        "plugins": {
65           "requires": "nsPlugin"
66        },
67        "setup": [
68            [
69                "$TC actions flush action police",
70                0,
71                1,
72                255
73            ]
74        ],
75        "cmdUnderTest": "$TC actions add action police rate 90kbit burst 10k mtu 1k index 98",
76        "expExitCode": "0",
77        "verifyCmd": "$TC actions get action police index 98",
78        "matchPattern": "action order [0-9]*:  police 0x62 rate 90Kbit burst 10Kb mtu 1Kb",
79        "matchCount": "1",
80        "teardown": [
81            "$TC actions flush action police"
82        ]
83    },
84    {
85        "id": "7943",
86        "name": "Add valid police action with peakrate",
87        "category": [
88            "actions",
89            "police"
90        ],
91        "plugins": {
92           "requires": "nsPlugin"
93        },
94        "setup": [
95            [
96                "$TC actions flush action police",
97                0,
98                1,
99                255
100            ]
101        ],
102        "cmdUnderTest": "$TC actions add action police rate 90kbit burst 10k mtu 2kb peakrate 100kbit index 3",
103        "expExitCode": "0",
104        "verifyCmd": "$TC actions ls action police",
105        "matchPattern": "action order [0-9]*:  police 0x3 rate 90Kbit burst 10Kb mtu 2Kb peakrate 100Kbit",
106        "matchCount": "1",
107        "teardown": [
108            "$TC actions flush action police"
109        ]
110    },
111    {
112        "id": "055e",
113        "name": "Add police action with peakrate and no mtu",
114        "category": [
115            "actions",
116            "police"
117        ],
118        "plugins": {
119           "requires": "nsPlugin"
120        },
121        "setup": [
122            [
123                "$TC actions flush action police",
124                0,
125                1,
126                255
127            ]
128        ],
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",
133        "matchCount": "0",
134        "teardown": [
135            "$TC actions flush action police"
136        ]
137    },
138    {
139        "id": "f057",
140        "name": "Add police action with valid overhead",
141        "category": [
142            "actions",
143            "police"
144        ],
145        "plugins": {
146           "requires": "nsPlugin"
147        },
148        "setup": [
149            [
150                "$TC actions flush action police",
151                0,
152                1,
153                255
154            ]
155        ],
156        "cmdUnderTest": "$TC actions add action police rate 1mbit burst 100k overhead 64 index 64",
157        "expExitCode": "0",
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",
160        "matchCount": "1",
161        "teardown": [
162            "$TC actions flush action police"
163        ]
164    },
165    {
166        "id": "7ffb",
167        "name": "Add police action with ethernet linklayer type",
168        "category": [
169            "actions",
170            "police"
171        ],
172        "plugins": {
173           "requires": "nsPlugin"
174        },
175        "setup": [
176            [
177                "$TC actions flush action police",
178                0,
179                1,
180                255
181            ]
182        ],
183        "cmdUnderTest": "$TC actions add action police rate 2mbit burst 200k linklayer ethernet index 8",
184        "expExitCode": "0",
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",
187        "matchCount": "1",
188        "teardown": [
189            "$TC actions flush action police"
190        ]
191    },
192    {
193        "id": "3dda",
194        "name": "Add police action with atm linklayer type",
195        "category": [
196            "actions",
197            "police"
198        ],
199        "plugins": {
200           "requires": "nsPlugin"
201        },
202        "setup": [
203            [
204                "$TC actions flush action police",
205                0,
206                1,
207                255
208            ]
209        ],
210        "cmdUnderTest": "$TC actions add action police rate 2mbit burst 200k linklayer atm index 8",
211        "expExitCode": "0",
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",
214        "matchCount": "1",
215        "teardown": [
216            "$TC actions flush action police"
217        ]
218    },
219    {
220        "id": "551b",
221        "name": "Add police actions with conform-exceed control continue/drop",
222        "category": [
223            "actions",
224            "police"
225        ],
226        "plugins": {
227           "requires": "nsPlugin"
228        },
229        "setup": [
230            [
231                "$TC actions flush action police",
232                0,
233                1,
234                255
235            ]
236        ],
237        "cmdUnderTest": "$TC actions add action police rate 3mbit burst 250k conform-exceed continue/drop index 1",
238        "expExitCode": "0",
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",
241        "matchCount": "1",
242        "teardown": [
243            "$TC actions flush action police"
244        ]
245    },
246    {
247        "id": "0c70",
248        "name": "Add police actions with conform-exceed control pass/reclassify",
249        "category": [
250            "actions",
251            "police"
252        ],
253        "plugins": {
254           "requires": "nsPlugin"
255        },
256        "setup": [
257            [
258                "$TC actions flush action police",
259                0,
260                1,
261                255
262            ]
263        ],
264        "cmdUnderTest": "$TC actions add action police rate 3mbit burst 250k conform-exceed pass/reclassify index 4",
265        "expExitCode": "0",
266        "verifyCmd": "$TC actions ls action police",
267        "matchPattern": "action order [0-9]*:  police 0x4 rate 3Mbit burst 250Kb mtu 2Kb action pass/reclassify",
268        "matchCount": "1",
269        "teardown": [
270            "$TC actions flush action police"
271        ]
272    },
273    {
274        "id": "d946",
275        "name": "Add police actions with conform-exceed control pass/pipe",
276        "category": [
277            "actions",
278            "police"
279        ],
280        "plugins": {
281           "requires": "nsPlugin"
282        },
283        "setup": [
284            [
285                "$TC actions flush action police",
286                0,
287                1,
288                255
289            ]
290        ],
291        "cmdUnderTest": "$TC actions add action police rate 3mbit burst 250k conform-exceed pass/pipe index 5",
292        "expExitCode": "0",
293        "verifyCmd": "$TC actions ls action police",
294        "matchPattern": "action order [0-9]*:  police 0x5 rate 3Mbit burst 250Kb mtu 2Kb action pass/pipe",
295        "matchCount": "1",
296        "teardown": [
297            "$TC actions flush action police"
298        ]
299    },
300    {
301        "id": "ddd6",
302        "name": "Add police action with invalid rate value",
303        "category": [
304            "actions",
305            "police"
306        ],
307        "plugins": {
308           "requires": "nsPlugin"
309        },
310        "setup": [
311            [
312                "$TC actions flush action police",
313                0,
314                1,
315                255
316            ]
317        ],
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",
322        "matchCount": "0",
323        "teardown": [
324            "$TC actions flush action police"
325        ]
326    },
327    {
328        "id": "f61c",
329        "name": "Add police action with invalid burst value",
330        "category": [
331            "actions",
332            "police"
333        ],
334        "plugins": {
335           "requires": "nsPlugin"
336        },
337        "setup": [
338            [
339                "$TC actions flush action police",
340                0,
341                1,
342                255
343            ]
344        ],
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",
349        "matchCount": "0",
350        "teardown": [
351            "$TC actions flush action police"
352        ]
353    },
354    {
355        "id": "6aaf",
356        "name": "Add police actions with conform-exceed control pass/pipe [with numeric values]",
357        "category": [
358            "actions",
359            "police"
360        ],
361        "plugins": {
362           "requires": "nsPlugin"
363        },
364        "setup": [
365            [
366                "$TC actions flush action police",
367                0,
368                1,
369                255
370            ]
371        ],
372        "cmdUnderTest": "$TC actions add action police rate 3mbit burst 250k conform-exceed 0/3 index 1",
373        "expExitCode": "0",
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",
376        "matchCount": "1",
377        "teardown": [
378            "$TC actions flush action police"
379        ]
380    },
381    {
382        "id": "29b1",
383        "name": "Add police actions with conform-exceed control <invalid>/drop",
384        "category": [
385            "actions",
386            "police"
387        ],
388        "plugins": {
389           "requires": "nsPlugin"
390        },
391        "setup": [
392            [
393                "$TC actions flush action police",
394                0,
395                1,
396                255
397            ]
398        ],
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 ",
403        "matchCount": "0",
404        "teardown": [
405            "$TC actions flush action police"
406        ]
407    },
408    {
409        "id": "c26f",
410        "name": "Add police action with invalid peakrate value",
411        "category": [
412            "actions",
413            "police"
414        ],
415        "plugins": {
416           "requires": "nsPlugin"
417        },
418        "setup": [
419            [
420                "$TC actions flush action police",
421                0,
422                1,
423                255
424            ]
425        ],
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",
430        "matchCount": "0",
431        "teardown": [
432            "$TC actions flush action police"
433        ]
434    },
435    {
436        "id": "db04",
437        "name": "Add police action with invalid mtu value",
438        "category": [
439            "actions",
440            "police"
441        ],
442        "plugins": {
443           "requires": "nsPlugin"
444        },
445        "setup": [
446            [
447                "$TC actions flush action police",
448                0,
449                1,
450                255
451            ]
452        ],
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",
457        "matchCount": "0",
458        "teardown": [
459            "$TC actions flush action police"
460        ]
461    },
462    {
463        "id": "f3c9",
464        "name": "Add police action with cookie",
465        "category": [
466            "actions",
467            "police"
468        ],
469        "plugins": {
470           "requires": "nsPlugin"
471        },
472        "setup": [
473            [
474                "$TC actions flush action police",
475                0,
476                1,
477                255
478            ]
479        ],
480        "cmdUnderTest": "$TC actions add action police rate 10mbit burst 10k index 1 cookie a1b1c1d1e1f12233bb",
481        "expExitCode": "0",
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",
484        "matchCount": "1",
485        "teardown": [
486            "$TC actions flush action police"
487        ]
488    },
489    {
490        "id": "d190",
491        "name": "Add police action with maximum index",
492        "category": [
493            "actions",
494            "police"
495        ],
496        "plugins": {
497           "requires": "nsPlugin"
498        },
499        "setup": [
500            [
501                "$TC actions flush action police",
502                0,
503                1,
504                255
505            ]
506        ],
507        "cmdUnderTest": "$TC actions add action police rate 10mbit burst 10k index 4294967295",
508        "expExitCode": "0",
509        "verifyCmd": "$TC actions get action police index 4294967295",
510        "matchPattern": "action order [0-9]*:  police 0xffffffff rate 10Mbit burst 10Kb mtu 2Kb",
511        "matchCount": "1",
512        "teardown": [
513            "$TC actions flush action police"
514        ]
515    },
516    {
517        "id": "336e",
518        "name": "Delete police action",
519        "category": [
520            "actions",
521            "police"
522        ],
523        "plugins": {
524           "requires": "nsPlugin"
525        },
526        "setup": [
527            [
528                "$TC actions flush action police",
529                0,
530                1,
531                255
532            ],
533            "$TC actions add action police rate 5mbit burst 2m index 12"
534        ],
535        "cmdUnderTest": "$TC actions delete action police index 12",
536        "expExitCode": "0",
537        "verifyCmd": "$TC actions ls action police",
538        "matchPattern": "action order [0-9]*:  police 0xc rate 5Mb burst 2Mb",
539        "matchCount": "0",
540        "teardown": [
541            "$TC actions flush action police"
542        ]
543    },
544    {
545        "id": "77fa",
546        "name": "Get single police action from many actions",
547        "category": [
548            "actions",
549            "police"
550        ],
551        "plugins": {
552           "requires": "nsPlugin"
553        },
554        "setup": [
555            [
556                "$TC actions flush action police",
557                0,
558                1,
559                255
560            ],
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"
569        ],
570        "cmdUnderTest": "$TC actions get action police index 4",
571        "expExitCode": "0",
572        "verifyCmd": "$TC actions get action police index 4",
573        "matchPattern": "action order [0-9]*:  police 0x4 rate 4Mbit burst 400Kb",
574        "matchCount": "1",
575        "teardown": [
576            "$TC actions flush action police"
577        ]
578    },
579    {
580        "id": "aa43",
581        "name": "Get single police action without specifying index",
582        "category": [
583            "actions",
584            "police"
585        ],
586        "plugins": {
587           "requires": "nsPlugin"
588        },
589        "setup": [
590            [
591                "$TC actions flush action police",
592                0,
593                1,
594                255
595            ],
596            "$TC actions add action police rate 1mbit burst 100k index 1"
597        ],
598        "cmdUnderTest": "$TC actions get action police",
599        "expExitCode": "255",
600        "verifyCmd": "$TC actions get action police",
601        "matchPattern": "action order [0-9]*:  police",
602        "matchCount": "0",
603        "teardown": [
604            "$TC actions flush action police"
605        ]
606    },
607    {
608        "id": "858b",
609        "name": "List police actions",
610        "category": [
611            "actions",
612            "police"
613        ],
614        "plugins": {
615           "requires": "nsPlugin"
616        },
617        "setup": [
618            [
619                "$TC actions flush action police",
620                0,
621                1,
622                255
623            ],
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"
632        ],
633        "cmdUnderTest": "$TC actions list action police",
634        "expExitCode": "0",
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",
637        "matchCount": "8",
638        "teardown": [
639            "$TC actions flush action police"
640        ]
641    },
642    {
643        "id": "1c3a",
644        "name": "Flush police actions",
645        "category": [
646            "actions",
647            "police"
648        ],
649        "plugins": {
650           "requires": "nsPlugin"
651        },
652        "setup": [
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"
661        ],
662        "cmdUnderTest": "$TC actions flush action police",
663        "expExitCode": "0",
664        "verifyCmd": "$TC actions ls action police",
665        "matchPattern": "action order [0-9]*:  police",
666        "matchCount": "0",
667        "teardown": [
668            ""
669        ]
670    },
671    {
672        "id": "7326",
673        "name": "Add police action with control continue",
674        "category": [
675            "actions",
676            "police"
677        ],
678        "plugins": {
679           "requires": "nsPlugin"
680        },
681        "setup": [
682            [
683                "$TC actions flush action police",
684                0,
685                1,
686                255
687            ]
688        ],
689        "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m continue index 1",
690        "expExitCode": "0",
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",
693        "matchCount": "1",
694        "teardown": [
695            "$TC actions flush action police"
696        ]
697    },
698    {
699        "id": "34fa",
700        "name": "Add police action with control drop",
701        "category": [
702            "actions",
703            "police"
704        ],
705        "plugins": {
706           "requires": "nsPlugin"
707        },
708        "setup": [
709            [
710                "$TC actions flush action police",
711                0,
712                1,
713                255
714            ]
715        ],
716        "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m drop index 1",
717        "expExitCode": "0",
718        "verifyCmd": "$TC actions ls action police",
719        "matchPattern": "action order [0-9]*:  police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action drop",
720        "matchCount": "1",
721        "teardown": [
722            "$TC actions flush action police"
723        ]
724    },
725    {
726        "id": "8dd5",
727        "name": "Add police action with control ok",
728        "category": [
729            "actions",
730            "police"
731        ],
732        "plugins": {
733           "requires": "nsPlugin"
734        },
735        "setup": [
736            [
737                "$TC actions flush action police",
738                0,
739                1,
740                255
741            ]
742        ],
743        "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m ok index 1",
744        "expExitCode": "0",
745        "verifyCmd": "$TC actions ls action police",
746        "matchPattern": "action order [0-9]*:  police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action pass",
747        "matchCount": "1",
748        "teardown": [
749            "$TC actions flush action police"
750        ]
751    },
752    {
753        "id": "b9d1",
754        "name": "Add police action with control reclassify",
755        "category": [
756            "actions",
757            "police"
758        ],
759        "plugins": {
760           "requires": "nsPlugin"
761        },
762        "setup": [
763            [
764                "$TC actions flush action police",
765                0,
766                1,
767                255
768            ]
769        ],
770        "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m reclassify index 1",
771        "expExitCode": "0",
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",
774        "matchCount": "1",
775        "teardown": [
776            "$TC actions flush action police"
777        ]
778    },
779    {
780        "id": "c534",
781        "name": "Add police action with control pipe",
782        "category": [
783            "actions",
784            "police"
785        ],
786        "plugins": {
787           "requires": "nsPlugin"
788        },
789        "setup": [
790            [
791                "$TC actions flush action police",
792                0,
793                1,
794                255
795            ]
796        ],
797        "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m pipe index 1",
798        "expExitCode": "0",
799        "verifyCmd": "$TC actions ls action police",
800        "matchPattern": "action order [0-9]*:  police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action pipe",
801        "matchCount": "1",
802        "teardown": [
803            "$TC actions flush action police"
804        ]
805    },
806    {
807        "id": "b48b",
808        "name": "Add police action with exceed goto chain control action",
809        "category": [
810            "actions",
811            "police"
812        ],
813        "plugins": {
814           "requires": "nsPlugin"
815        },
816        "setup": [
817            [
818                "$TC actions flush action police",
819                0,
820                1,
821                255
822            ]
823        ],
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",
828        "matchCount": "0",
829        "teardown": [
830            "$TC actions flush action police"
831        ]
832    },
833    {
834        "id": "689e",
835        "name": "Replace police action with invalid goto chain control",
836        "category": [
837            "actions",
838            "police"
839        ],
840        "plugins": {
841           "requires": "nsPlugin"
842        },
843        "setup": [
844            [
845                "$TC actions flush action police",
846                0,
847                1,
848                255
849            ],
850            "$TC actions add action police rate 3mbit burst 250k drop index 90"
851        ],
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",
856        "matchCount": "1",
857        "teardown": [
858            "$TC actions flush action police"
859        ]
860    },
861    {
862        "id": "cdd7",
863        "name": "Add valid police action with packets per second rate limit",
864        "category": [
865            "actions",
866            "police"
867        ],
868        "plugins": {
869           "requires": "nsPlugin"
870        },
871        "setup": [
872            [
873                "$TC actions flush action police",
874                0,
875                1,
876                255
877            ]
878        ],
879        "cmdUnderTest": "$TC actions add action police pkts_rate 1000 pkts_burst 200 index 1",
880        "expExitCode": "0",
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",
883        "matchCount": "1",
884        "teardown": [
885            "$TC actions flush action police"
886        ]
887    },
888    {
889        "id": "f5bc",
890        "name": "Add invalid police action with both bps and pps",
891        "category": [
892            "actions",
893            "police"
894        ],
895        "plugins": {
896           "requires": "nsPlugin"
897        },
898        "setup": [
899            [
900                "$TC actions flush action police",
901                0,
902                1,
903                255
904            ]
905        ],
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 ",
910        "matchCount": "0",
911        "teardown": [
912            "$TC actions flush action police"
913        ]
914    },
915    {
916        "id": "7d64",
917        "name": "Add police action with skip_hw option",
918        "category": [
919            "actions",
920            "police"
921        ],
922        "plugins": {
923           "requires": "nsPlugin"
924        },
925        "setup": [
926            [
927                "$TC actions flush action police",
928                0,
929                1,
930                255
931            ]
932        ],
933        "cmdUnderTest": "$TC actions add action police rate 1kbit burst 10k index 100 skip_hw",
934        "expExitCode": "0",
935        "verifyCmd": "$TC actions ls action police | grep skip_hw",
936        "matchPattern": "skip_hw",
937        "matchCount": "1",
938        "teardown": [
939            "$TC actions flush action police"
940        ]
941    }
942]
943