1[
2    {
3        "id": "0582",
4        "name": "Create QFQ with default setting",
5        "category": [
6            "qdisc",
7            "qfq"
8        ],
9        "plugins": {
10            "requires": "nsPlugin"
11        },
12        "setup": [
13            "$IP link add dev $DUMMY type dummy || /bin/true"
14        ],
15        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root qfq",
16        "expExitCode": "0",
17        "verifyCmd": "$TC qdisc show dev $DUMMY",
18        "matchPattern": "qdisc qfq 1: root refcnt [0-9]+",
19        "matchCount": "1",
20        "teardown": [
21            "$TC qdisc del dev $DUMMY handle 1: root",
22            "$IP link del dev $DUMMY type dummy"
23        ]
24    },
25    {
26        "id": "c9a3",
27        "name": "Create QFQ with class weight setting",
28        "category": [
29            "qdisc",
30            "qfq"
31        ],
32        "plugins": {
33            "requires": "nsPlugin"
34        },
35        "setup": [
36            "$IP link add dev $DUMMY type dummy || /bin/true",
37            "$TC qdisc add dev $DUMMY handle 1: root qfq"
38        ],
39        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 qfq weight 100",
40        "expExitCode": "0",
41        "verifyCmd": "$TC class show dev $DUMMY",
42        "matchPattern": "class qfq 1:1 root weight 100 maxpkt",
43        "matchCount": "1",
44        "teardown": [
45            "$TC qdisc del dev $DUMMY handle 1: root",
46            "$IP link del dev $DUMMY type dummy"
47        ]
48    },
49    {
50        "id": "d364",
51        "name": "Test QFQ with max class weight setting",
52        "category": [
53            "qdisc",
54            "qfq"
55        ],
56        "plugins": {
57            "requires": "nsPlugin"
58        },
59        "setup": [
60            "$IP link add dev $DUMMY type dummy || /bin/true",
61            "$TC qdisc add dev $DUMMY handle 1: root qfq"
62        ],
63        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 qfq weight 9999",
64        "expExitCode": "2",
65        "verifyCmd": "$TC class show dev $DUMMY",
66        "matchPattern": "class qfq 1:1 root weight 9999 maxpkt",
67        "matchCount": "0",
68        "teardown": [
69            "$TC qdisc del dev $DUMMY handle 1: root",
70            "$IP link del dev $DUMMY type dummy"
71        ]
72    },
73    {
74        "id": "8452",
75        "name": "Create QFQ with class maxpkt setting",
76        "category": [
77            "qdisc",
78            "qfq"
79        ],
80        "plugins": {
81            "requires": "nsPlugin"
82        },
83        "setup": [
84            "$IP link add dev $DUMMY type dummy || /bin/true",
85            "$TC qdisc add dev $DUMMY handle 1: root qfq"
86        ],
87        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 qfq maxpkt 2000",
88        "expExitCode": "0",
89        "verifyCmd": "$TC class show dev $DUMMY",
90        "matchPattern": "class qfq 1:1 root weight 1 maxpkt 2000",
91        "matchCount": "1",
92        "teardown": [
93            "$TC qdisc del dev $DUMMY handle 1: root",
94            "$IP link del dev $DUMMY type dummy"
95        ]
96    },
97    {
98        "id": "22df",
99        "name": "Test QFQ class maxpkt setting lower bound",
100        "category": [
101            "qdisc",
102            "qfq"
103        ],
104        "plugins": {
105            "requires": "nsPlugin"
106        },
107        "setup": [
108            "$IP link add dev $DUMMY type dummy || /bin/true",
109            "$TC qdisc add dev $DUMMY handle 1: root qfq"
110        ],
111        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 qfq maxpkt 128",
112        "expExitCode": "2",
113        "verifyCmd": "$TC class show dev $DUMMY",
114        "matchPattern": "class qfq 1:1 root weight 1 maxpkt 128",
115        "matchCount": "0",
116        "teardown": [
117            "$TC qdisc del dev $DUMMY handle 1: root",
118            "$IP link del dev $DUMMY type dummy"
119        ]
120    },
121    {
122        "id": "92ee",
123        "name": "Test QFQ class maxpkt setting upper bound",
124        "category": [
125            "qdisc",
126            "qfq"
127        ],
128        "plugins": {
129            "requires": "nsPlugin"
130        },
131        "setup": [
132            "$IP link add dev $DUMMY type dummy || /bin/true",
133            "$TC qdisc add dev $DUMMY handle 1: root qfq"
134        ],
135        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 qfq maxpkt 99999",
136        "expExitCode": "2",
137        "verifyCmd": "$TC class show dev $DUMMY",
138        "matchPattern": "class qfq 1:1 root weight 1 maxpkt 99999",
139        "matchCount": "0",
140        "teardown": [
141            "$TC qdisc del dev $DUMMY handle 1: root",
142            "$IP link del dev $DUMMY type dummy"
143        ]
144    },
145    {
146        "id": "d920",
147        "name": "Create QFQ with multiple class setting",
148        "category": [
149            "qdisc",
150            "qfq"
151        ],
152        "plugins": {
153            "requires": "nsPlugin"
154        },
155        "setup": [
156            "$IP link add dev $DUMMY type dummy || /bin/true",
157            "$TC qdisc add dev $DUMMY handle 1: root qfq",
158            "$TC class add dev $DUMMY parent 1: classid 1:1 qfq weight 100"
159        ],
160        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:2 qfq weight 200",
161        "expExitCode": "0",
162        "verifyCmd": "$TC class show dev $DUMMY",
163        "matchPattern": "class qfq 1:[0-9]+ root weight [0-9]+00 maxpkt",
164        "matchCount": "2",
165        "teardown": [
166            "$TC qdisc del dev $DUMMY handle 1: root",
167            "$IP link del dev $DUMMY type dummy"
168        ]
169    },
170    {
171        "id": "0548",
172        "name": "Delete QFQ with handle",
173        "category": [
174            "qdisc",
175            "qfq"
176        ],
177        "plugins": {
178            "requires": "nsPlugin"
179        },
180        "setup": [
181            "$IP link add dev $DUMMY type dummy || /bin/true",
182            "$TC qdisc add dev $DUMMY handle 1: root qfq",
183            "$TC class add dev $DUMMY parent 1: classid 1:1 qfq weight 100"
184        ],
185        "cmdUnderTest": "$TC qdisc del dev $DUMMY handle 1: root",
186        "expExitCode": "0",
187        "verifyCmd": "$TC class show dev $DUMMY",
188        "matchPattern": "qdisc qfq 1: root refcnt [0-9]+",
189        "matchCount": "0",
190        "teardown": [
191            "$IP link del dev $DUMMY type dummy"
192        ]
193    },
194    {
195        "id": "5901",
196        "name": "Show QFQ class",
197        "category": [
198            "qdisc",
199            "qfq"
200        ],
201        "plugins": {
202            "requires": "nsPlugin"
203        },
204        "setup": [
205            "$IP link add dev $DUMMY type dummy || /bin/true"
206        ],
207        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root qfq",
208        "expExitCode": "0",
209        "verifyCmd": "$TC class show dev $DUMMY",
210        "matchPattern": "class qfq 1:",
211        "matchCount": "0",
212        "teardown": [
213            "$TC qdisc del dev $DUMMY handle 1: root",
214            "$IP link del dev $DUMMY type dummy"
215        ]
216    }
217]
218