1[ 2 { 3 "id": "f62b", 4 "name": "Add ingress matchall filter for protocol ipv4 and action PASS", 5 "category": [ 6 "filter", 7 "matchall" 8 ], 9 "setup": [ 10 "$IP link add dev $DUMMY type dummy || /bin/true", 11 "$TC qdisc add dev $DUMMY ingress" 12 ], 13 "cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ip matchall action ok", 14 "expExitCode": "0", 15 "verifyCmd": "$TC filter get dev $DUMMY parent ffff: handle 1 prio 1 protocol ip matchall", 16 "matchPattern": "^filter parent ffff: protocol ip pref 1 matchall.*handle 0x1.*gact action pass.*ref 1 bind 1", 17 "matchCount": "1", 18 "teardown": [ 19 "$TC qdisc del dev $DUMMY ingress", 20 "$IP link del dev $DUMMY type dummy" 21 ] 22 }, 23 { 24 "id": "7f09", 25 "name": "Add egress matchall filter for protocol ipv4 and action PASS", 26 "category": [ 27 "filter", 28 "matchall" 29 ], 30 "setup": [ 31 "$IP link add dev $DUMMY type dummy || /bin/true", 32 "$TC qdisc add dev $DUMMY root handle 1: prio" 33 ], 34 "cmdUnderTest": "$TC filter add dev $DUMMY parent 1: handle 0x1 prio 1 protocol ip matchall action ok", 35 "expExitCode": "0", 36 "verifyCmd": "$TC filter get dev $DUMMY parent 1: handle 1 prio 1 protocol ip matchall", 37 "matchPattern": "^filter parent 1: protocol ip pref 1 matchall.*handle 0x1.*gact action pass.*ref 1 bind 1", 38 "matchCount": "1", 39 "teardown": [ 40 "$TC qdisc del dev $DUMMY root handle 1: prio", 41 "$IP link del dev $DUMMY type dummy" 42 ] 43 }, 44 { 45 "id": "0596", 46 "name": "Add ingress matchall filter for protocol ipv6 and action DROP", 47 "category": [ 48 "filter", 49 "matchall" 50 ], 51 "setup": [ 52 "$IP link add dev $DUMMY type dummy || /bin/true", 53 "$TC qdisc add dev $DUMMY ingress" 54 ], 55 "cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ipv6 matchall action drop", 56 "expExitCode": "0", 57 "verifyCmd": "$TC filter get dev $DUMMY parent ffff: handle 1 prio 1 protocol ipv6 matchall", 58 "matchPattern": "^filter parent ffff: protocol ipv6 pref 1 matchall.*handle 0x1.*gact action drop.*ref 1 bind 1", 59 "matchCount": "1", 60 "teardown": [ 61 "$TC qdisc del dev $DUMMY ingress", 62 "$IP link del dev $DUMMY type dummy" 63 ] 64 }, 65 { 66 "id": "41df", 67 "name": "Add egress matchall filter for protocol ipv6 and action DROP", 68 "category": [ 69 "filter", 70 "matchall" 71 ], 72 "setup": [ 73 "$IP link add dev $DUMMY type dummy || /bin/true", 74 "$TC qdisc add dev $DUMMY root handle 1: prio" 75 ], 76 "cmdUnderTest": "$TC filter add dev $DUMMY parent 1: handle 0x1 prio 1 protocol ipv6 matchall action drop", 77 "expExitCode": "0", 78 "verifyCmd": "$TC filter get dev $DUMMY parent 1: handle 1 prio 1 protocol ipv6 matchall", 79 "matchPattern": "^filter parent 1: protocol ipv6 pref 1 matchall.*handle 0x1.*gact action drop.*ref 1 bind 1", 80 "matchCount": "1", 81 "teardown": [ 82 "$TC qdisc del dev $DUMMY root handle 1: prio", 83 "$IP link del dev $DUMMY type dummy" 84 ] 85 }, 86 { 87 "id": "e1da", 88 "name": "Add ingress matchall filter for protocol ipv4 and action PASS with priority at 16-bit maximum", 89 "category": [ 90 "filter", 91 "matchall" 92 ], 93 "setup": [ 94 "$IP link add dev $DUMMY type dummy || /bin/true", 95 "$TC qdisc add dev $DUMMY ingress" 96 ], 97 "cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 65535 protocol ipv4 matchall action pass", 98 "expExitCode": "0", 99 "verifyCmd": "$TC filter get dev $DUMMY parent ffff: handle 1 prio 65535 protocol ipv4 matchall", 100 "matchPattern": "^filter parent ffff: protocol ip pref 65535 matchall.*handle 0x1.*gact action pass.*ref 1 bind 1", 101 "matchCount": "1", 102 "teardown": [ 103 "$TC qdisc del dev $DUMMY ingress", 104 "$IP link del dev $DUMMY type dummy" 105 ] 106 }, 107 { 108 "id": "3de5", 109 "name": "Add egress matchall filter for protocol ipv4 and action PASS with priority at 16-bit maximum", 110 "category": [ 111 "filter", 112 "matchall" 113 ], 114 "setup": [ 115 "$IP link add dev $DUMMY type dummy || /bin/true", 116 "$TC qdisc add dev $DUMMY root handle 1: prio" 117 ], 118 "cmdUnderTest": "$TC filter add dev $DUMMY parent 1: handle 0x1 prio 65535 protocol ipv4 matchall action pass", 119 "expExitCode": "0", 120 "verifyCmd": "$TC filter get dev $DUMMY parent 1: handle 1 prio 65535 protocol ipv4 matchall", 121 "matchPattern": "^filter parent 1: protocol ip pref 65535 matchall.*handle 0x1.*gact action pass.*ref 1 bind 1", 122 "matchCount": "1", 123 "teardown": [ 124 "$TC qdisc del dev $DUMMY root handle 1: prio", 125 "$IP link del dev $DUMMY type dummy" 126 ] 127 }, 128 { 129 "id": "72d7", 130 "name": "Add ingress matchall filter for protocol ipv4 and action PASS with priority exceeding 16-bit maximum", 131 "category": [ 132 "filter", 133 "matchall" 134 ], 135 "setup": [ 136 "$IP link add dev $DUMMY type dummy || /bin/true", 137 "$TC qdisc add dev $DUMMY ingress" 138 ], 139 "cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 655355 protocol ipv4 matchall action pass", 140 "expExitCode": "255", 141 "verifyCmd": "$TC filter get dev $DUMMY parent ffff: handle 1 prio 655355 protocol ipv4 matchall", 142 "matchPattern": "^filter parent ffff: protocol ip pref 655355 matchall.*handle 0x1.*gact action pass.*ref 1 bind 1", 143 "matchCount": "0", 144 "teardown": [ 145 "$TC qdisc del dev $DUMMY ingress", 146 "$IP link del dev $DUMMY type dummy" 147 ] 148 }, 149 { 150 "id": "41d3", 151 "name": "Add egress matchall filter for protocol ipv4 and action PASS with priority exceeding 16-bit maximum", 152 "category": [ 153 "filter", 154 "matchall" 155 ], 156 "setup": [ 157 "$IP link add dev $DUMMY type dummy || /bin/true", 158 "$TC qdisc add dev $DUMMY root handle 1: prio" 159 ], 160 "cmdUnderTest": "$TC filter add dev $DUMMY parent 1: handle 0x1 prio 655355 protocol ipv4 matchall action pass", 161 "expExitCode": "255", 162 "verifyCmd": "$TC filter get dev $DUMMY parent 1: handle 1 prio 655355 protocol ipv4 matchall", 163 "matchPattern": "^filter parent 1: protocol ip pref 655355 matchall.*handle 0x1.*gact action pass.*ref 1 bind 1", 164 "matchCount": "0", 165 "teardown": [ 166 "$TC qdisc del dev $DUMMY root handle 1: prio", 167 "$IP link del dev $DUMMY type dummy" 168 ] 169 }, 170 { 171 "id": "f755", 172 "name": "Add ingress matchall filter for all protocols and action CONTINUE with handle at 32-bit maximum", 173 "category": [ 174 "filter", 175 "matchall" 176 ], 177 "setup": [ 178 "$IP link add dev $DUMMY type dummy || /bin/true", 179 "$TC qdisc add dev $DUMMY ingress" 180 ], 181 "cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0xffffffff prio 1 protocol all matchall action continue", 182 "expExitCode": "0", 183 "verifyCmd": "$TC filter get dev $DUMMY parent ffff: handle 0xffffffff prio 1 protocol all matchall", 184 "matchPattern": "^filter parent ffff: protocol all pref 1 matchall.*handle 0xffffffff.*gact action continue.*ref 1 bind 1", 185 "matchCount": "1", 186 "teardown": [ 187 "$TC qdisc del dev $DUMMY ingress", 188 "$IP link del dev $DUMMY type dummy" 189 ] 190 }, 191 { 192 "id": "2c33", 193 "name": "Add egress matchall filter for all protocols and action CONTINUE with handle at 32-bit maximum", 194 "category": [ 195 "filter", 196 "matchall" 197 ], 198 "setup": [ 199 "$IP link add dev $DUMMY type dummy || /bin/true", 200 "$TC qdisc add dev $DUMMY root handle 1: prio" 201 ], 202 "cmdUnderTest": "$TC filter add dev $DUMMY parent 1: handle 0xffffffff prio 1 protocol all matchall action continue", 203 "expExitCode": "0", 204 "verifyCmd": "$TC filter get dev $DUMMY parent 1: handle 0xffffffff prio 1 protocol all matchall", 205 "matchPattern": "^filter parent 1: protocol all pref 1 matchall.*handle 0xffffffff.*gact action continue.*ref 1 bind 1", 206 "matchCount": "1", 207 "teardown": [ 208 "$TC qdisc del dev $DUMMY root handle 1: prio", 209 "$IP link del dev $DUMMY type dummy" 210 ] 211 }, 212 { 213 "id": "0e4a", 214 "name": "Add ingress matchall filter for all protocols and action RECLASSIFY with skip_hw flag", 215 "category": [ 216 "filter", 217 "matchall" 218 ], 219 "setup": [ 220 "$IP link add dev $DUMMY type dummy || /bin/true", 221 "$TC qdisc add dev $DUMMY ingress" 222 ], 223 "cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol all matchall skip_hw action reclassify", 224 "expExitCode": "0", 225 "verifyCmd": "$TC filter get dev $DUMMY parent ffff: handle 0x1 prio 1 protocol all matchall", 226 "matchPattern": "^filter parent ffff: protocol all pref 1 matchall.*handle 0x1.*skip_hw.*not_in_hw.*gact action reclassify.*ref 1 bind 1", 227 "matchCount": "1", 228 "teardown": [ 229 "$TC qdisc del dev $DUMMY ingress", 230 "$IP link del dev $DUMMY type dummy" 231 ] 232 }, 233 { 234 "id": "7f60", 235 "name": "Add egress matchall filter for all protocols and action RECLASSIFY with skip_hw flag", 236 "category": [ 237 "filter", 238 "matchall" 239 ], 240 "setup": [ 241 "$IP link add dev $DUMMY type dummy || /bin/true", 242 "$TC qdisc add dev $DUMMY root handle 1: prio" 243 ], 244 "cmdUnderTest": "$TC filter add dev $DUMMY parent 1: handle 0x1 prio 1 protocol all matchall skip_hw action reclassify", 245 "expExitCode": "0", 246 "verifyCmd": "$TC filter get dev $DUMMY parent 1: handle 0x1 prio 1 protocol all matchall", 247 "matchPattern": "^filter parent 1: protocol all pref 1 matchall.*handle 0x1.*skip_hw.*not_in_hw.*gact action reclassify.*ref 1 bind 1", 248 "matchCount": "1", 249 "teardown": [ 250 "$TC qdisc del dev $DUMMY root handle 1: prio", 251 "$IP link del dev $DUMMY type dummy" 252 ] 253 }, 254 { 255 "id": "8bd2", 256 "name": "Add ingress matchall filter for protocol ipv6 and action PASS with classid", 257 "category": [ 258 "filter", 259 "matchall" 260 ], 261 "setup": [ 262 "$IP link add dev $DUMMY type dummy || /bin/true", 263 "$TC qdisc add dev $DUMMY ingress" 264 ], 265 "cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ipv6 matchall classid 1:1 action pass", 266 "expExitCode": "0", 267 "verifyCmd": "$TC filter get dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ipv6 matchall", 268 "matchPattern": "^filter parent ffff: protocol ipv6 pref 1 matchall.*handle 0x1.*flowid 1:1.*gact action pass.*ref 1 bind 1", 269 "matchCount": "1", 270 "teardown": [ 271 "$TC qdisc del dev $DUMMY ingress", 272 "$IP link del dev $DUMMY type dummy" 273 ] 274 }, 275 { 276 "id": "2a4a", 277 "name": "Add ingress matchall filter for protocol ipv6 and action PASS with invalid classid", 278 "category": [ 279 "filter", 280 "matchall" 281 ], 282 "setup": [ 283 "$IP link add dev $DUMMY type dummy || /bin/true", 284 "$TC qdisc add dev $DUMMY ingress" 285 ], 286 "cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ipv6 matchall classid 6789defg action pass", 287 "expExitCode": "1", 288 "verifyCmd": "$TC filter get dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ipv6 matchall", 289 "matchPattern": "^filter protocol ipv6 pref 1 matchall.*handle 0x1.*flowid 6789defg.*gact action pass.*ref 1 bind 1", 290 "matchCount": "0", 291 "teardown": [ 292 "$TC qdisc del dev $DUMMY ingress", 293 "$IP link del dev $DUMMY type dummy" 294 ] 295 }, 296 { 297 "id": "eaf8", 298 "name": "Delete single ingress matchall filter", 299 "category": [ 300 "filter", 301 "matchall" 302 ], 303 "setup": [ 304 "$IP link add dev $DUMMY type dummy || /bin/true", 305 "$TC qdisc add dev $DUMMY ingress", 306 "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ipv6 matchall classid 1:2 action pass" 307 ], 308 "cmdUnderTest": "$TC filter del dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ipv6 matchall", 309 "expExitCode": "0", 310 "verifyCmd": "$TC filter get dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ipv6 matchall", 311 "matchPattern": "^filter protocol ipv6 pref 1 matchall.*handle 0x1.*flowid 1:2.*gact action pass.*ref 1 bind 1", 312 "matchCount": "0", 313 "teardown": [ 314 "$TC qdisc del dev $DUMMY ingress", 315 "$IP link del dev $DUMMY type dummy" 316 ] 317 }, 318 { 319 "id": "76ad", 320 "name": "Delete all ingress matchall filters", 321 "category": [ 322 "filter", 323 "matchall" 324 ], 325 "setup": [ 326 "$IP link add dev $DUMMY type dummy || /bin/true", 327 "$TC qdisc add dev $DUMMY ingress", 328 "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol all matchall classid 1:2 action pass", 329 "$TC filter add dev $DUMMY parent ffff: handle 0x2 prio 2 protocol all matchall classid 1:3 action pass", 330 "$TC filter add dev $DUMMY parent ffff: handle 0x3 prio 3 protocol all matchall classid 1:4 action pass", 331 "$TC filter add dev $DUMMY parent ffff: handle 0x4 prio 4 protocol all matchall classid 1:5 action pass" 332 ], 333 "cmdUnderTest": "$TC filter del dev $DUMMY parent ffff:", 334 "expExitCode": "0", 335 "verifyCmd": "$TC filter show dev $DUMMY parent ffff:", 336 "matchPattern": "^filter protocol all pref.*matchall.*handle.*flowid.*gact action pass", 337 "matchCount": "0", 338 "teardown": [ 339 "$TC qdisc del dev $DUMMY ingress", 340 "$IP link del dev $DUMMY type dummy" 341 ] 342 }, 343 { 344 "id": "1eb9", 345 "name": "Delete single ingress matchall filter out of multiple", 346 "category": [ 347 "filter", 348 "matchall" 349 ], 350 "setup": [ 351 "$IP link add dev $DUMMY type dummy || /bin/true", 352 "$TC qdisc add dev $DUMMY ingress", 353 "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol all matchall classid 1:2 action pass", 354 "$TC filter add dev $DUMMY parent ffff: handle 0x2 prio 2 protocol all matchall classid 1:3 action pass", 355 "$TC filter add dev $DUMMY parent ffff: handle 0x3 prio 3 protocol all matchall classid 1:4 action pass", 356 "$TC filter add dev $DUMMY parent ffff: handle 0x4 prio 4 protocol all matchall classid 1:5 action pass" 357 ], 358 "cmdUnderTest": "$TC filter del dev $DUMMY parent ffff: protocol all handle 0x2 prio 2 matchall", 359 "expExitCode": "0", 360 "verifyCmd": "$TC filter show dev $DUMMY parent ffff:", 361 "matchPattern": "^filter protocol all pref 2 matchall.*handle 0x2 flowid 1:2.*gact action pass", 362 "matchCount": "0", 363 "teardown": [ 364 "$TC qdisc del dev $DUMMY ingress", 365 "$IP link del dev $DUMMY type dummy" 366 ] 367 }, 368 { 369 "id": "6d63", 370 "name": "Delete ingress matchall filter by chain ID", 371 "category": [ 372 "filter", 373 "matchall" 374 ], 375 "setup": [ 376 "$IP link add dev $DUMMY type dummy || /bin/true", 377 "$TC qdisc add dev $DUMMY ingress", 378 "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol all chain 1 matchall classid 1:1 action pass", 379 "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ipv4 chain 2 matchall classid 1:3 action continue" 380 ], 381 "cmdUnderTest": "$TC filter del dev $DUMMY parent ffff: chain 2", 382 "expExitCode": "0", 383 "verifyCmd": "$TC filter show dev $DUMMY parent ffff:", 384 "matchPattern": "^filter protocol all pref 1 matchall chain 1 handle 0x1 flowid 1:1.*gact action pass", 385 "matchCount": "1", 386 "teardown": [ 387 "$TC qdisc del dev $DUMMY ingress", 388 "$IP link del dev $DUMMY type dummy" 389 ] 390 }, 391 { 392 "id": "3329", 393 "name": "Validate flags of the matchall filter with skip_sw and police action with skip_hw", 394 "category": [ 395 "filter", 396 "matchall" 397 ], 398 "setup": [ 399 "$IP link add dev $DUMMY type dummy || /bin/true", 400 "$TC qdisc add dev $DUMMY ingress", 401 "$TC actions flush action police", 402 "$TC actions add action police rate 1mbit burst 100k index 199 skip_hw" 403 ], 404 "cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ipv4 matchall skip_sw action police index 199", 405 "expExitCode": "2", 406 "verifyCmd": "$TC filter get dev $DUMMY parent ffff: handle 1 prio 1 protocol ipv4 matchall", 407 "matchPattern": "^filter parent ffff: protocol ip pref 1 matchall.*handle 0x1.*", 408 "matchCount": "0", 409 "teardown": [ 410 "$TC qdisc del dev $DUMMY ingress", 411 "$IP link del dev $DUMMY type dummy", 412 "$TC actions del action police index 199" 413 ] 414 }, 415 { 416 "id": "0eeb", 417 "name": "Validate flags of the matchall filter with skip_hw and police action", 418 "category": [ 419 "filter", 420 "matchall" 421 ], 422 "setup": [ 423 "$IP link add dev $DUMMY type dummy || /bin/true", 424 "$TC qdisc add dev $DUMMY ingress", 425 "$TC actions flush action police", 426 "$TC actions add action police rate 1mbit burst 100k index 199" 427 ], 428 "cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ipv4 matchall skip_hw action police index 199", 429 "expExitCode": "2", 430 "verifyCmd": "$TC filter get dev $DUMMY parent ffff: handle 1 prio 1 protocol ipv4 matchall", 431 "matchPattern": "^filter parent ffff: protocol ip pref 1 matchall.*handle 0x1.*", 432 "matchCount": "0", 433 "teardown": [ 434 "$TC qdisc del dev $DUMMY ingress", 435 "$IP link del dev $DUMMY type dummy", 436 "$TC actions del action police index 199" 437 ] 438 }, 439 { 440 "id": "eee4", 441 "name": "Validate flags of the matchall filter with skip_sw and police action", 442 "category": [ 443 "filter", 444 "matchall" 445 ], 446 "setup": [ 447 "$IP link add dev $DUMMY type dummy || /bin/true", 448 "$TC qdisc add dev $DUMMY ingress", 449 "$TC actions flush action police", 450 "$TC actions add action police rate 1mbit burst 100k index 199" 451 ], 452 "cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ipv4 matchall skip_sw action police index 199", 453 "expExitCode": "2", 454 "verifyCmd": "$TC filter get dev $DUMMY parent ffff: handle 1 prio 1 protocol ipv4 matchall", 455 "matchPattern": "^filter parent ffff: protocol ip pref 1 matchall.*handle 0x1.*", 456 "matchCount": "0", 457 "teardown": [ 458 "$TC qdisc del dev $DUMMY ingress", 459 "$IP link del dev $DUMMY type dummy", 460 "$TC actions del action police index 199" 461 ] 462 } 463] 464