1[ 2 { 3 "id": "a519", 4 "name": "Add bfifo qdisc with system default parameters on egress", 5 "__comment": "When omitted, queue size in bfifo is calculated as: txqueuelen * (MTU + LinkLayerHdrSize), where LinkLayerHdrSize=14 for Ethernet", 6 "category": [ 7 "qdisc", 8 "fifo" 9 ], 10 "setup": [ 11 "$IP link add dev $DUMMY type dummy || /bin/true" 12 ], 13 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root bfifo", 14 "expExitCode": "0", 15 "verifyCmd": "$TC qdisc show dev $DUMMY", 16 "matchPattern": "qdisc bfifo 1: root.*limit [0-9]+b", 17 "matchCount": "1", 18 "teardown": [ 19 "$TC qdisc del dev $DUMMY handle 1: root bfifo", 20 "$IP link del dev $DUMMY type dummy" 21 ] 22 }, 23 { 24 "id": "585c", 25 "name": "Add pfifo qdisc with system default parameters on egress", 26 "__comment": "When omitted, queue size in pfifo is defaulted to the interface's txqueuelen value.", 27 "category": [ 28 "qdisc", 29 "fifo" 30 ], 31 "setup": [ 32 "$IP link add dev $DUMMY type dummy || /bin/true" 33 ], 34 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root pfifo", 35 "expExitCode": "0", 36 "verifyCmd": "$TC qdisc show dev $DUMMY", 37 "matchPattern": "qdisc pfifo 1: root.*limit [0-9]+p", 38 "matchCount": "1", 39 "teardown": [ 40 "$TC qdisc del dev $DUMMY handle 1: root pfifo", 41 "$IP link del dev $DUMMY type dummy" 42 ] 43 }, 44 { 45 "id": "a86e", 46 "name": "Add bfifo qdisc with system default parameters on egress with handle of maximum value", 47 "category": [ 48 "qdisc", 49 "fifo" 50 ], 51 "setup": [ 52 "$IP link add dev $DUMMY type dummy || /bin/true" 53 ], 54 "cmdUnderTest": "$TC qdisc add dev $DUMMY root handle ffff: bfifo", 55 "expExitCode": "0", 56 "verifyCmd": "$TC qdisc show dev $DUMMY", 57 "matchPattern": "qdisc bfifo ffff: root.*limit [0-9]+b", 58 "matchCount": "1", 59 "teardown": [ 60 "$TC qdisc del dev $DUMMY handle ffff: root bfifo", 61 "$IP link del dev $DUMMY type dummy" 62 ] 63 }, 64 { 65 "id": "9ac8", 66 "name": "Add bfifo qdisc on egress with queue size of 3000 bytes", 67 "category": [ 68 "qdisc", 69 "fifo" 70 ], 71 "setup": [ 72 "$IP link add dev $DUMMY type dummy || /bin/true" 73 ], 74 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root bfifo limit 3000b", 75 "expExitCode": "0", 76 "verifyCmd": "$TC qdisc show dev $DUMMY", 77 "matchPattern": "qdisc bfifo 1: root.*limit 3000b", 78 "matchCount": "1", 79 "teardown": [ 80 "$TC qdisc del dev $DUMMY handle 1: root bfifo", 81 "$IP link del dev $DUMMY type dummy" 82 ] 83 }, 84 { 85 "id": "f4e6", 86 "name": "Add pfifo qdisc on egress with queue size of 3000 packets", 87 "category": [ 88 "qdisc", 89 "fifo" 90 ], 91 "setup": [ 92 "$IP link add dev $DUMMY txqueuelen 3000 type dummy || /bin/true" 93 ], 94 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root pfifo limit 3000", 95 "expExitCode": "0", 96 "verifyCmd": "$TC qdisc show dev $DUMMY", 97 "matchPattern": "qdisc pfifo 1: root.*limit 3000p", 98 "matchCount": "1", 99 "teardown": [ 100 "$TC qdisc del dev $DUMMY handle 1: root pfifo", 101 "$IP link del dev $DUMMY type dummy" 102 ] 103 }, 104 { 105 "id": "b1b1", 106 "name": "Add bfifo qdisc with system default parameters on egress with invalid handle exceeding maximum value", 107 "category": [ 108 "qdisc", 109 "fifo" 110 ], 111 "setup": [ 112 "$IP link add dev $DUMMY type dummy || /bin/true" 113 ], 114 "cmdUnderTest": "$TC qdisc add dev $DUMMY root handle 10000: bfifo", 115 "expExitCode": "255", 116 "verifyCmd": "$TC qdisc show dev $DUMMY", 117 "matchPattern": "qdisc bfifo 10000: root.*limit [0-9]+b", 118 "matchCount": "0", 119 "teardown": [ 120 "$IP link del dev $DUMMY type dummy" 121 ] 122 }, 123 { 124 "id": "8d5e", 125 "name": "Add bfifo qdisc on egress with unsupported argument", 126 "category": [ 127 "qdisc", 128 "fifo" 129 ], 130 "setup": [ 131 "$IP link add dev $DUMMY type dummy || /bin/true" 132 ], 133 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root bfifo foorbar", 134 "expExitCode": "1", 135 "verifyCmd": "$TC qdisc show dev $DUMMY", 136 "matchPattern": "qdisc bfifo 1: root", 137 "matchCount": "0", 138 "teardown": [ 139 "$IP link del dev $DUMMY type dummy" 140 ] 141 }, 142 { 143 "id": "7787", 144 "name": "Add pfifo qdisc on egress with unsupported argument", 145 "category": [ 146 "qdisc", 147 "fifo" 148 ], 149 "setup": [ 150 "$IP link add dev $DUMMY type dummy || /bin/true" 151 ], 152 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root pfifo foorbar", 153 "expExitCode": "1", 154 "verifyCmd": "$TC qdisc show dev $DUMMY", 155 "matchPattern": "qdisc pfifo 1: root", 156 "matchCount": "0", 157 "teardown": [ 158 "$IP link del dev $DUMMY type dummy" 159 ] 160 }, 161 { 162 "id": "c4b6", 163 "name": "Replace bfifo qdisc on egress with new queue size", 164 "category": [ 165 "qdisc", 166 "fifo" 167 ], 168 "setup": [ 169 "$IP link del dev $DUMMY type dummy || /bin/true", 170 "$IP link add dev $DUMMY txqueuelen 1000 type dummy", 171 "$TC qdisc add dev $DUMMY handle 1: root bfifo" 172 ], 173 "cmdUnderTest": "$TC qdisc replace dev $DUMMY handle 1: root bfifo limit 3000b", 174 "expExitCode": "0", 175 "verifyCmd": "$TC qdisc show dev $DUMMY", 176 "matchPattern": "qdisc bfifo 1: root.*limit 3000b", 177 "matchCount": "1", 178 "teardown": [ 179 "$TC qdisc del dev $DUMMY handle 1: root bfifo", 180 "$IP link del dev $DUMMY type dummy" 181 ] 182 }, 183 { 184 "id": "3df6", 185 "name": "Replace pfifo qdisc on egress with new queue size", 186 "category": [ 187 "qdisc", 188 "fifo" 189 ], 190 "setup": [ 191 "$IP link del dev $DUMMY type dummy || /bin/true", 192 "$IP link add dev $DUMMY txqueuelen 1000 type dummy", 193 "$TC qdisc add dev $DUMMY handle 1: root pfifo" 194 ], 195 "cmdUnderTest": "$TC qdisc replace dev $DUMMY handle 1: root pfifo limit 30", 196 "expExitCode": "0", 197 "verifyCmd": "$TC qdisc show dev $DUMMY", 198 "matchPattern": "qdisc pfifo 1: root.*limit 30p", 199 "matchCount": "1", 200 "teardown": [ 201 "$TC qdisc del dev $DUMMY handle 1: root pfifo", 202 "$IP link del dev $DUMMY type dummy" 203 ] 204 }, 205 { 206 "id": "7a67", 207 "name": "Add bfifo qdisc on egress with queue size in invalid format", 208 "category": [ 209 "qdisc", 210 "fifo" 211 ], 212 "setup": [ 213 "$IP link add dev $DUMMY type dummy || /bin/true" 214 ], 215 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root bfifo limit foo-bar", 216 "expExitCode": "1", 217 "verifyCmd": "$TC qdisc show dev $DUMMY", 218 "matchPattern": "qdisc bfifo 1: root.*limit foo-bar", 219 "matchCount": "0", 220 "teardown": [ 221 "$IP link del dev $DUMMY type dummy" 222 ] 223 }, 224 { 225 "id": "1298", 226 "name": "Add duplicate bfifo qdisc on egress", 227 "category": [ 228 "qdisc", 229 "fifo" 230 ], 231 "setup": [ 232 "$IP link add dev $DUMMY type dummy || /bin/true", 233 "$TC qdisc add dev $DUMMY handle 1: root bfifo" 234 ], 235 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root bfifo", 236 "expExitCode": "2", 237 "verifyCmd": "$TC qdisc show dev $DUMMY", 238 "matchPattern": "qdisc bfifo 1: root", 239 "matchCount": "1", 240 "teardown": [ 241 "$TC qdisc del dev $DUMMY handle 1: root bfifo", 242 "$IP link del dev $DUMMY type dummy" 243 ] 244 }, 245 { 246 "id": "45a0", 247 "name": "Delete nonexistent bfifo qdisc", 248 "category": [ 249 "qdisc", 250 "fifo" 251 ], 252 "setup": [ 253 "$IP link add dev $DUMMY type dummy || /bin/true" 254 ], 255 "cmdUnderTest": "$TC qdisc del dev $DUMMY root handle 1: bfifo", 256 "expExitCode": "2", 257 "verifyCmd": "$TC qdisc show dev $DUMMY", 258 "matchPattern": "qdisc bfifo 1: root", 259 "matchCount": "0", 260 "teardown": [ 261 "$IP link del dev $DUMMY type dummy" 262 ] 263 }, 264 { 265 "id": "972b", 266 "name": "Add prio qdisc on egress with invalid format for handles", 267 "category": [ 268 "qdisc", 269 "fifo" 270 ], 271 "setup": [ 272 "$IP link add dev $DUMMY type dummy || /bin/true" 273 ], 274 "cmdUnderTest": "$TC qdisc add dev $DUMMY root handle 123^ bfifo limit 100b", 275 "expExitCode": "255", 276 "verifyCmd": "$TC qdisc show dev $DUMMY", 277 "matchPattern": "qdisc bfifo 123 root", 278 "matchCount": "0", 279 "teardown": [ 280 "$IP link del dev $DUMMY type dummy" 281 ] 282 }, 283 { 284 "id": "4d39", 285 "name": "Delete bfifo qdisc twice", 286 "category": [ 287 "qdisc", 288 "fifo" 289 ], 290 "setup": [ 291 "$IP link add dev $DUMMY type dummy || /bin/true", 292 "$TC qdisc add dev $DUMMY root handle 1: bfifo", 293 "$TC qdisc del dev $DUMMY root handle 1: bfifo" 294 ], 295 "cmdUnderTest": "$TC qdisc del dev $DUMMY handle 1: root bfifo", 296 "expExitCode": "2", 297 "verifyCmd": "$TC qdisc show dev $DUMMY", 298 "matchPattern": "qdisc bfifo 1: root", 299 "matchCount": "0", 300 "teardown": [ 301 "$IP link del dev $DUMMY type dummy" 302 ] 303 } 304] 305