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