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 "id": "85ee", 219 "name": "QFQ with big MTU", 220 "category": [ 221 "qdisc", 222 "qfq" 223 ], 224 "plugins": { 225 "requires": "nsPlugin" 226 }, 227 "setup": [ 228 "$IP link add dev $DUMMY type dummy || /bin/true", 229 "$IP link set dev $DUMMY mtu 2147483647 || /bin/true", 230 "$TC qdisc add dev $DUMMY handle 1: root qfq" 231 ], 232 "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 qfq weight 100", 233 "expExitCode": "2", 234 "verifyCmd": "$TC class show dev $DUMMY", 235 "matchPattern": "class qfq 1:", 236 "matchCount": "0", 237 "teardown": [ 238 "$IP link del dev $DUMMY type dummy" 239 ] 240 }, 241 { 242 "id": "ddfa", 243 "name": "QFQ with small MTU", 244 "category": [ 245 "qdisc", 246 "qfq" 247 ], 248 "plugins": { 249 "requires": "nsPlugin" 250 }, 251 "setup": [ 252 "$IP link add dev $DUMMY type dummy || /bin/true", 253 "$IP link set dev $DUMMY mtu 256 || /bin/true", 254 "$TC qdisc add dev $DUMMY handle 1: root qfq" 255 ], 256 "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 qfq weight 100", 257 "expExitCode": "2", 258 "verifyCmd": "$TC class show dev $DUMMY", 259 "matchPattern": "class qfq 1:", 260 "matchCount": "0", 261 "teardown": [ 262 "$IP link del dev $DUMMY type dummy" 263 ] 264 }, 265 { 266 "id": "5993", 267 "name": "QFQ with stab overhead greater than max packet len", 268 "category": [ 269 "qdisc", 270 "qfq", 271 "scapy" 272 ], 273 "plugins": { 274 "requires": [ 275 "nsPlugin", 276 "scapyPlugin" 277 ] 278 }, 279 "setup": [ 280 "$IP link add dev $DUMMY type dummy || /bin/true", 281 "$IP link set dev $DUMMY up || /bin/true", 282 "$TC qdisc add dev $DUMMY handle 1: stab mtu 2048 tsize 512 mpu 0 overhead 999999999 linklayer ethernet root qfq", 283 "$TC class add dev $DUMMY parent 1: classid 1:1 qfq weight 100", 284 "$TC qdisc add dev $DEV1 clsact", 285 "$TC filter add dev $DEV1 ingress protocol ip flower dst_ip 1.3.3.7/32 action mirred egress mirror dev $DUMMY" 286 ], 287 "cmdUnderTest": "$TC filter add dev $DUMMY parent 1: matchall classid 1:1", 288 "scapy": [ 289 { 290 "iface": "$DEV0", 291 "count": 22, 292 "packet": "Ether(type=0x800)/IP(src='10.0.0.10',dst='1.3.3.7')/TCP(sport=5000,dport=10)" 293 } 294 ], 295 "expExitCode": "0", 296 "verifyCmd": "$TC -s qdisc ls dev $DUMMY", 297 "matchPattern": "dropped 22", 298 "matchCount": "1", 299 "teardown": [ 300 "$TC qdisc del dev $DUMMY handle 1: root qfq" 301 ] 302 } 303] 304