xref: /linux/tools/testing/selftests/tc-testing/tc-tests/qdiscs/htb.json (revision 1aca5ce036e3499336d1a2ace3070f908381c055)
1[
2    {
3        "id": "0904",
4        "name": "Create HTB with default setting",
5        "category": [
6            "qdisc",
7            "htb"
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 htb",
16        "expExitCode": "0",
17        "verifyCmd": "$TC qdisc show dev $DUMMY",
18        "matchPattern": "qdisc htb 1: root refcnt [0-9]+ r2q 10 default 0 direct_packets_stat.*direct_qlen",
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": "3906",
27        "name": "Create HTB with default-N setting",
28        "category": [
29            "qdisc",
30            "htb"
31        ],
32        "plugins": {
33            "requires": "nsPlugin"
34        },
35        "setup": [
36            "$IP link add dev $DUMMY type dummy || /bin/true"
37        ],
38        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root htb default 10",
39        "expExitCode": "0",
40        "verifyCmd": "$TC qdisc show dev $DUMMY",
41        "matchPattern": "qdisc htb 1: root refcnt [0-9]+ r2q 10 default 0x10 direct_packets_stat.* direct_qlen",
42        "matchCount": "1",
43        "teardown": [
44            "$TC qdisc del dev $DUMMY handle 1: root",
45            "$IP link del dev $DUMMY type dummy"
46        ]
47    },
48    {
49        "id": "8492",
50        "name": "Create HTB with r2q setting",
51        "category": [
52            "qdisc",
53            "htb"
54        ],
55        "plugins": {
56            "requires": "nsPlugin"
57        },
58        "setup": [
59            "$IP link add dev $DUMMY type dummy || /bin/true"
60        ],
61        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root htb r2q 5",
62        "expExitCode": "0",
63        "verifyCmd": "$TC qdisc show dev $DUMMY",
64        "matchPattern": "qdisc htb 1: root refcnt [0-9]+ r2q 5 default 0 direct_packets_stat.*direct_qlen",
65        "matchCount": "1",
66        "teardown": [
67            "$TC qdisc del dev $DUMMY handle 1: root",
68            "$IP link del dev $DUMMY type dummy"
69        ]
70    },
71    {
72        "id": "9502",
73        "name": "Create HTB with direct_qlen setting",
74        "category": [
75            "qdisc",
76            "htb"
77        ],
78        "plugins": {
79            "requires": "nsPlugin"
80        },
81        "setup": [
82            "$IP link add dev $DUMMY type dummy || /bin/true"
83        ],
84        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root htb direct_qlen 1024",
85        "expExitCode": "0",
86        "verifyCmd": "$TC qdisc show dev $DUMMY",
87        "matchPattern": "qdisc htb 1: root refcnt [0-9]+ r2q 10 default 0 direct_packets_stat.*direct_qlen 1024",
88        "matchCount": "1",
89        "teardown": [
90            "$TC qdisc del dev $DUMMY handle 1: root",
91            "$IP link del dev $DUMMY type dummy"
92        ]
93    },
94    {
95        "id": "b924",
96        "name": "Create HTB with class rate and burst setting",
97        "category": [
98            "qdisc",
99            "htb"
100        ],
101        "plugins": {
102            "requires": "nsPlugin"
103        },
104        "setup": [
105            "$IP link add dev $DUMMY type dummy || /bin/true",
106            "$TC qdisc add dev $DUMMY handle 1: root htb"
107        ],
108        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 htb rate 20kbit burst 1000",
109        "expExitCode": "0",
110        "verifyCmd": "$TC class show dev $DUMMY",
111        "matchPattern": "class htb 1:1 root prio 0 rate 20Kbit ceil 20Kbit burst 1000b cburst 1600b",
112        "matchCount": "1",
113        "teardown": [
114            "$TC qdisc del dev $DUMMY handle 1: root",
115            "$IP link del dev $DUMMY type dummy"
116        ]
117    },
118    {
119        "id": "4359",
120        "name": "Create HTB with class mpu setting",
121        "category": [
122            "qdisc",
123            "htb"
124        ],
125        "plugins": {
126            "requires": "nsPlugin"
127        },
128        "setup": [
129            "$IP link add dev $DUMMY type dummy || /bin/true",
130            "$TC qdisc add dev $DUMMY handle 1: root htb"
131        ],
132        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 htb rate 20Kbit mpu 64",
133        "expExitCode": "0",
134        "verifyCmd": "$TC class show dev $DUMMY",
135        "matchPattern": "class htb 1:1 root prio 0 rate 20Kbit ceil 20Kbit burst 1600b cburst 1600b",
136        "matchCount": "1",
137        "teardown": [
138            "$TC qdisc del dev $DUMMY handle 1: root",
139            "$IP link del dev $DUMMY type dummy"
140        ]
141    },
142    {
143        "id": "9048",
144        "name": "Create HTB with class prio setting",
145        "category": [
146            "qdisc",
147            "htb"
148        ],
149        "plugins": {
150            "requires": "nsPlugin"
151        },
152        "setup": [
153            "$IP link add dev $DUMMY type dummy || /bin/true",
154            "$TC qdisc add dev $DUMMY handle 1: root htb"
155        ],
156        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 htb rate 20Kbit prio 1",
157        "expExitCode": "0",
158        "verifyCmd": "$TC class show dev $DUMMY",
159        "matchPattern": "class htb 1:1 root prio 1 rate 20Kbit ceil 20Kbit burst 1600b cburst 1600b",
160        "matchCount": "1",
161        "teardown": [
162            "$TC qdisc del dev $DUMMY handle 1: root",
163            "$IP link del dev $DUMMY type dummy"
164        ]
165    },
166    {
167        "id": "4994",
168        "name": "Create HTB with class ceil setting",
169        "category": [
170            "qdisc",
171            "htb"
172        ],
173        "plugins": {
174            "requires": "nsPlugin"
175        },
176        "setup": [
177            "$IP link add dev $DUMMY type dummy || /bin/true",
178            "$TC qdisc add dev $DUMMY handle 1: root htb"
179        ],
180        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 htb rate 20Kbit ceil 10Kbit",
181        "expExitCode": "0",
182        "verifyCmd": "$TC class show dev $DUMMY",
183        "matchPattern": "class htb 1:1 root prio 0 rate 20Kbit ceil 10Kbit burst 1600b cburst 1600b",
184        "matchCount": "1",
185        "teardown": [
186            "$TC qdisc del dev $DUMMY handle 1: root",
187            "$IP link del dev $DUMMY type dummy"
188        ]
189    },
190    {
191        "id": "9523",
192        "name": "Create HTB with class cburst setting",
193        "category": [
194            "qdisc",
195            "htb"
196        ],
197        "plugins": {
198            "requires": "nsPlugin"
199        },
200        "setup": [
201            "$IP link add dev $DUMMY type dummy || /bin/true",
202            "$TC qdisc add dev $DUMMY handle 1: root htb"
203        ],
204        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 htb rate 20Kbit cburst 2000",
205        "expExitCode": "0",
206        "verifyCmd": "$TC class show dev $DUMMY",
207        "matchPattern": "class htb 1:1 root prio 0 rate 20Kbit ceil 20Kbit burst 1600b cburst 2000b",
208        "matchCount": "1",
209        "teardown": [
210            "$TC qdisc del dev $DUMMY handle 1: root",
211            "$IP link del dev $DUMMY type dummy"
212        ]
213    },
214    {
215        "id": "5353",
216        "name": "Create HTB with class mtu setting",
217        "category": [
218            "qdisc",
219            "htb"
220        ],
221        "plugins": {
222            "requires": "nsPlugin"
223        },
224        "setup": [
225            "$IP link add dev $DUMMY type dummy || /bin/true",
226            "$TC qdisc add dev $DUMMY handle 1: root htb"
227        ],
228        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 htb rate 20Kbit mtu 2048",
229        "expExitCode": "0",
230        "verifyCmd": "$TC class show dev $DUMMY",
231        "matchPattern": "class htb 1:1 root prio 0 rate 20Kbit ceil 20Kbit burst 2Kb cburst 2Kb",
232        "matchCount": "1",
233        "teardown": [
234            "$TC qdisc del dev $DUMMY handle 1: root",
235            "$IP link del dev $DUMMY type dummy"
236        ]
237    },
238    {
239        "id": "346a",
240        "name": "Create HTB with class quantum setting",
241        "category": [
242            "qdisc",
243            "htb"
244        ],
245        "plugins": {
246            "requires": "nsPlugin"
247        },
248        "setup": [
249            "$IP link add dev $DUMMY type dummy || /bin/true",
250            "$TC qdisc add dev $DUMMY handle 1: root htb"
251        ],
252        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 htb rate 20Kbit quantum 2048",
253        "expExitCode": "0",
254        "verifyCmd": "$TC class show dev $DUMMY",
255        "matchPattern": "class htb 1:1 root prio 0 rate 20Kbit ceil 20Kbit burst 1600b cburst 1600b",
256        "matchCount": "1",
257        "teardown": [
258            "$TC qdisc del dev $DUMMY handle 1: root",
259            "$IP link del dev $DUMMY type dummy"
260        ]
261    },
262    {
263        "id": "303a",
264        "name": "Delete HTB with handle",
265        "category": [
266            "qdisc",
267            "htb"
268        ],
269        "plugins": {
270            "requires": "nsPlugin"
271        },
272        "setup": [
273            "$IP link add dev $DUMMY type dummy || /bin/true",
274            "$TC qdisc add dev $DUMMY handle 1: root htb r2q 5"
275        ],
276        "cmdUnderTest": "$TC qdisc del dev $DUMMY handle 1: root",
277        "expExitCode": "0",
278        "verifyCmd": "$TC qdisc show dev $DUMMY",
279        "matchPattern": "qdisc htb 1: root refcnt [0-9]+",
280        "matchCount": "0",
281        "teardown": [
282            "$IP link del dev $DUMMY type dummy"
283        ]
284    }
285]
286