4 "name": "Add prio qdisc on egress",
10 "$IP link add dev $DUMMY type dummy || /bin/true"
12 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio",
14 "verifyCmd": "$TC qdisc show dev $DUMMY",
15 "matchPattern": "qdisc prio 1: root",
18 "$TC qdisc del dev $DUMMY handle 1: root prio",
19 "$IP link del dev $DUMMY type dummy"
24 "name": "Add prio qdisc on egress with handle of maximum value",
30 "$IP link add dev $DUMMY type dummy || /bin/true"
32 "cmdUnderTest": "$TC qdisc add dev $DUMMY root handle ffff: prio",
34 "verifyCmd": "$TC qdisc show dev $DUMMY",
35 "matchPattern": "qdisc prio ffff: root",
38 "$IP link del dev $DUMMY type dummy"
43 "name": "Add prio qdisc on egress with invalid handle exceeding maximum value",
49 "$IP link add dev $DUMMY type dummy || /bin/true"
51 "cmdUnderTest": "$TC qdisc add dev $DUMMY root handle 10000: prio",
53 "verifyCmd": "$TC qdisc show dev $DUMMY",
54 "matchPattern": "qdisc prio 10000: root",
57 "$IP link del dev $DUMMY type dummy"
62 "name": "Add prio qdisc on egress with unsupported argument",
68 "$IP link add dev $DUMMY type dummy || /bin/true"
70 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio foorbar",
72 "verifyCmd": "$TC qdisc show dev $DUMMY",
73 "matchPattern": "qdisc prio 1: root",
76 "$IP link del dev $DUMMY type dummy"
81 "name": "Add prio qdisc on egress with 4 bands and new priomap",
87 "$IP link add dev $DUMMY type dummy || /bin/true"
89 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio bands 4 priomap 1 1 2 2 3 3 0 0 1 2 3 0 0 0 0 0",
91 "verifyCmd": "$TC qdisc show dev $DUMMY",
92 "matchPattern": "qdisc prio 1: root.*bands 4 priomap.*1 1 2 2 3 3 0 0 1 2 3 0 0 0 0 0",
95 "$TC qdisc del dev $DUMMY handle 1: root prio",
96 "$IP link del dev $DUMMY type dummy"
101 "name": "Add prio qdisc on egress with 4 bands and priomap exceeding TC_PRIO_MAX entries",
107 "$IP link add dev $DUMMY type dummy || /bin/true"
109 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio bands 4 priomap 1 1 2 2 3 3 0 0 1 2 3 0 0 0 0 0 1 1",
111 "verifyCmd": "$TC qdisc show dev $DUMMY",
112 "matchPattern": "qdisc prio 1: root.*bands 4 priomap.*1 1 2 2 3 3 0 0 1 2 3 0 0 0 0 0 1 1",
115 "$IP link del dev $DUMMY type dummy"
120 "name": "Add prio qdisc on egress with 4 bands and priomap's values exceeding bands number",
126 "$IP link add dev $DUMMY type dummy || /bin/true"
128 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio bands 4 priomap 1 1 2 2 7 5 0 0 1 2 3 0 0 0 0 0",
130 "verifyCmd": "$TC qdisc show dev $DUMMY",
131 "matchPattern": "qdisc prio 1: root.*bands 4 priomap.*1 1 2 2 7 5 0 0 1 2 3 0 0 0 0 0",
134 "$IP link del dev $DUMMY type dummy"
139 "name": "Add prio qdisc on egress with invalid bands value (< 2)",
145 "$IP link add dev $DUMMY type dummy || /bin/true"
147 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio bands 1 priomap 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0",
149 "verifyCmd": "$TC qdisc show dev $DUMMY",
150 "matchPattern": "qdisc prio 1: root.*bands 1 priomap.*0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0",
153 "$IP link del dev $DUMMY type dummy"
158 "name": "Add prio qdisc on egress with invalid bands value exceeding TCQ_PRIO_BANDS",
164 "$IP link add dev $DUMMY type dummy || /bin/true"
166 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio bands 1024 priomap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16",
168 "verifyCmd": "$TC qdisc show dev $DUMMY",
169 "matchPattern": "qdisc prio 1: root.*bands 1024 priomap.*1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16",
172 "$IP link del dev $DUMMY type dummy"
177 "name": "Replace default prio qdisc on egress with 8 bands and new priomap",
183 "$IP link add dev $DUMMY type dummy || /bin/true",
184 "$TC qdisc add dev $DUMMY handle 1: root prio"
186 "cmdUnderTest": "$TC qdisc replace dev $DUMMY handle 1: root prio bands 8 priomap 1 1 2 2 3 3 4 4 5 5 6 6 7 7 0 0",
188 "verifyCmd": "$TC qdisc show dev $DUMMY",
189 "matchPattern": "qdisc prio 1: root.*bands 8 priomap.*1 1 2 2 3 3 4 4 5 5 6 6 7 7 0 0",
192 "$TC qdisc del dev $DUMMY handle 1: root prio",
193 "$IP link del dev $DUMMY type dummy"
198 "name": "Add duplicate prio qdisc on egress",
204 "$IP link add dev $DUMMY type dummy || /bin/true",
205 "$TC qdisc add dev $DUMMY handle 1: root prio"
207 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio",
209 "verifyCmd": "$TC qdisc show dev $DUMMY",
210 "matchPattern": "qdisc prio 1: root",
213 "$TC qdisc del dev $DUMMY handle 1: root prio",
214 "$IP link del dev $DUMMY type dummy"
219 "name": "Delete nonexistent prio qdisc",
225 "$IP link add dev $DUMMY type dummy || /bin/true"
227 "cmdUnderTest": "$TC qdisc del dev $DUMMY root handle 1: prio",
229 "verifyCmd": "$TC qdisc show dev $DUMMY",
230 "matchPattern": "qdisc prio 1: root",
233 "$IP link del dev $DUMMY type dummy"
238 "name": "Add prio qdisc on egress with invalid format for handles",
244 "$IP link add dev $DUMMY type dummy || /bin/true"
246 "cmdUnderTest": "$TC qdisc add dev $DUMMY root handle 123^ prio",
247 "expExitCode": "255",
248 "verifyCmd": "$TC qdisc show dev $DUMMY",
249 "matchPattern": "qdisc prio 123 root",
252 "$IP link del dev $DUMMY type dummy"
257 "name": "Delete prio qdisc twice",
263 "$IP link add dev $DUMMY type dummy || /bin/true",
264 "$TC qdisc add dev $DUMMY root handle 1: prio",
265 "$TC qdisc del dev $DUMMY root handle 1: prio"
267 "cmdUnderTest": "$TC qdisc del dev $DUMMY handle 1: root prio",
269 "verifyCmd": "$TC qdisc show dev $DUMMY",
270 "matchPattern": "qdisc ingress ffff:",
273 "$IP link del dev $DUMMY type dummy"