0001 [
0002 {
0003 "id": "6236",
0004 "name": "Add skbedit action with valid mark",
0005 "category": [
0006 "actions",
0007 "skbedit"
0008 ],
0009 "setup": [
0010 [
0011 "$TC actions flush action skbedit",
0012 0,
0013 1,
0014 255
0015 ]
0016 ],
0017 "cmdUnderTest": "$TC actions add action skbedit mark 1",
0018 "expExitCode": "0",
0019 "verifyCmd": "$TC actions list action skbedit",
0020 "matchPattern": "action order [0-9]*: skbedit mark 1",
0021 "matchCount": "1",
0022 "teardown": [
0023 "$TC actions flush action skbedit"
0024 ]
0025 },
0026 {
0027 "id": "c8cf",
0028 "name": "Add skbedit action with 32-bit maximum mark",
0029 "category": [
0030 "actions",
0031 "skbedit"
0032 ],
0033 "setup": [
0034 [
0035 "$TC actions flush action skbedit",
0036 0,
0037 1,
0038 255
0039 ]
0040 ],
0041 "cmdUnderTest": "$TC actions add action skbedit mark 4294967295 pipe index 1",
0042 "expExitCode": "0",
0043 "verifyCmd": "$TC actions get action skbedit index 1",
0044 "matchPattern": "action order [0-9]*: skbedit mark 4294967295.*pipe.*index 1",
0045 "matchCount": "1",
0046 "teardown": [
0047 "$TC actions flush action skbedit"
0048 ]
0049 },
0050 {
0051 "id": "407b",
0052 "name": "Add skbedit action with mark exceeding 32-bit maximum",
0053 "category": [
0054 "actions",
0055 "skbedit"
0056 ],
0057 "setup": [
0058 [
0059 "$TC actions flush action skbedit",
0060 0,
0061 1,
0062 255
0063 ]
0064 ],
0065 "cmdUnderTest": "$TC actions add action skbedit mark 666777888999",
0066 "expExitCode": "255",
0067 "verifyCmd": "$TC actions list action skbedit",
0068 "matchPattern": "action order [0-9]*: skbedit mark",
0069 "matchCount": "0",
0070 "teardown": []
0071 },
0072 {
0073 "id": "d4cd",
0074 "name": "Add skbedit action with valid mark and mask",
0075 "category": [
0076 "actions",
0077 "skbedit"
0078 ],
0079 "setup": [
0080 [
0081 "$TC actions flush action skbedit",
0082 0,
0083 1,
0084 255
0085 ]
0086 ],
0087 "cmdUnderTest": "$TC actions add action skbedit mark 1/0xaabb",
0088 "expExitCode": "0",
0089 "verifyCmd": "$TC actions list action skbedit",
0090 "matchPattern": "action order [0-9]*: skbedit mark 1/0xaabb",
0091 "matchCount": "1",
0092 "teardown": [
0093 "$TC actions flush action skbedit"
0094 ]
0095 },
0096 {
0097 "id": "baa7",
0098 "name": "Add skbedit action with valid mark and 32-bit maximum mask",
0099 "category": [
0100 "actions",
0101 "skbedit"
0102 ],
0103 "setup": [
0104 [
0105 "$TC actions flush action skbedit",
0106 0,
0107 1,
0108 255
0109 ]
0110 ],
0111 "cmdUnderTest": "$TC actions add action skbedit mark 1/0xffffffff",
0112 "expExitCode": "0",
0113 "verifyCmd": "$TC actions list action skbedit",
0114 "matchPattern": "action order [0-9]*: skbedit mark 1/0xffffffff",
0115 "matchCount": "1",
0116 "teardown": [
0117 "$TC actions flush action skbedit"
0118 ]
0119 },
0120 {
0121 "id": "62a5",
0122 "name": "Add skbedit action with valid mark and mask exceeding 32-bit maximum",
0123 "category": [
0124 "actions",
0125 "skbedit"
0126 ],
0127 "setup": [
0128 [
0129 "$TC actions flush action skbedit",
0130 0,
0131 1,
0132 255
0133 ]
0134 ],
0135 "cmdUnderTest": "$TC actions add action skbedit mark 1/0xaabbccddeeff112233",
0136 "expExitCode": "255",
0137 "verifyCmd": "$TC actions list action skbedit",
0138 "matchPattern": "action order [0-9]*: skbedit mark 1/0xaabbccddeeff112233",
0139 "matchCount": "0",
0140 "teardown": []
0141 },
0142 {
0143 "id": "bc15",
0144 "name": "Add skbedit action with valid mark and mask with invalid format",
0145 "category": [
0146 "actions",
0147 "skbedit"
0148 ],
0149 "setup": [
0150 [
0151 "$TC actions flush action skbedit",
0152 0,
0153 1,
0154 255
0155 ]
0156 ],
0157 "cmdUnderTest": "$TC actions add action skbedit mark 1/-1234",
0158 "expExitCode": "255",
0159 "verifyCmd": "$TC actions list action skbedit",
0160 "matchPattern": "action order [0-9]*: skbedit mark 1/-1234",
0161 "matchCount": "0",
0162 "teardown": []
0163 },
0164 {
0165 "id": "57c2",
0166 "name": "Replace skbedit action with new mask",
0167 "category": [
0168 "actions",
0169 "skbedit"
0170 ],
0171 "setup": [
0172 [
0173 "$TC actions flush action skbedit",
0174 0,
0175 1,
0176 255
0177 ],
0178 "$TC actions add action skbedit mark 1/0x11223344 index 1"
0179 ],
0180 "cmdUnderTest": "$TC actions replace action skbedit mark 1/0xaabb index 1",
0181 "expExitCode": "0",
0182 "verifyCmd": "$TC actions list action skbedit",
0183 "matchPattern": "action order [0-9]*: skbedit mark 1/0xaabb",
0184 "matchCount": "1",
0185 "teardown": [
0186 "$TC actions flush action skbedit"
0187 ]
0188 },
0189 {
0190 "id": "081d",
0191 "name": "Add skbedit action with priority",
0192 "category": [
0193 "actions",
0194 "skbedit"
0195 ],
0196 "setup": [
0197 [
0198 "$TC actions flush action skbedit",
0199 0,
0200 1,
0201 255
0202 ]
0203 ],
0204 "cmdUnderTest": "$TC actions add action skbedit prio 99",
0205 "expExitCode": "0",
0206 "verifyCmd": "$TC actions list action skbedit",
0207 "matchPattern": "action order [0-9]*: skbedit priority :99",
0208 "matchCount": "1",
0209 "teardown": [
0210 "$TC actions flush action skbedit"
0211 ]
0212 },
0213 {
0214 "id": "cc37",
0215 "name": "Add skbedit action with invalid priority",
0216 "category": [
0217 "actions",
0218 "skbedit"
0219 ],
0220 "setup": [
0221 [
0222 "$TC actions flush action skbedit",
0223 0,
0224 1,
0225 255
0226 ]
0227 ],
0228 "cmdUnderTest": "$TC actions add action skbedit prio foo",
0229 "expExitCode": "255",
0230 "verifyCmd": "$TC actions list action skbedit",
0231 "matchPattern": "action order [0-9]*: skbedit priority",
0232 "matchCount": "0",
0233 "teardown": [
0234 "$TC actions flush action skbedit"
0235 ]
0236 },
0237 {
0238 "id": "3c95",
0239 "name": "Add skbedit action with queue_mapping",
0240 "category": [
0241 "actions",
0242 "skbedit"
0243 ],
0244 "setup": [
0245 [
0246 "$TC actions flush action skbedit",
0247 0,
0248 1,
0249 255
0250 ]
0251 ],
0252 "cmdUnderTest": "$TC actions add action skbedit queue_mapping 909",
0253 "expExitCode": "0",
0254 "verifyCmd": "$TC actions list action skbedit",
0255 "matchPattern": "action order [0-9]*: skbedit queue_mapping 909",
0256 "matchCount": "1",
0257 "teardown": [
0258 "$TC actions flush action skbedit"
0259 ]
0260 },
0261 {
0262 "id": "985c",
0263 "name": "Add skbedit action with queue_mapping exceeding 16-bit maximum",
0264 "category": [
0265 "actions",
0266 "skbedit"
0267 ],
0268 "setup": [
0269 [
0270 "$TC actions flush action skbedit",
0271 0,
0272 1,
0273 255
0274 ]
0275 ],
0276 "cmdUnderTest": "$TC actions add action skbedit queue_mapping 67000",
0277 "expExitCode": "255",
0278 "verifyCmd": "$TC actions list action skbedit",
0279 "matchPattern": "action order [0-9]*: skbedit queue_mapping",
0280 "matchCount": "0",
0281 "teardown": [
0282 "$TC actions flush action skbedit"
0283 ]
0284 },
0285 {
0286 "id": "224f",
0287 "name": "Add skbedit action with ptype host",
0288 "category": [
0289 "actions",
0290 "skbedit"
0291 ],
0292 "setup": [
0293 [
0294 "$TC actions flush action skbedit",
0295 0,
0296 1,
0297 255
0298 ]
0299 ],
0300 "cmdUnderTest": "$TC actions add action skbedit ptype host",
0301 "expExitCode": "0",
0302 "verifyCmd": "$TC actions list action skbedit",
0303 "matchPattern": "action order [0-9]*: skbedit ptype host",
0304 "matchCount": "1",
0305 "teardown": [
0306 "$TC actions flush action skbedit"
0307 ]
0308 },
0309 {
0310 "id": "d1a3",
0311 "name": "Add skbedit action with ptype otherhost",
0312 "category": [
0313 "actions",
0314 "skbedit"
0315 ],
0316 "setup": [
0317 [
0318 "$TC actions flush action skbedit",
0319 0,
0320 1,
0321 255
0322 ]
0323 ],
0324 "cmdUnderTest": "$TC actions add action skbedit ptype otherhost",
0325 "expExitCode": "0",
0326 "verifyCmd": "$TC actions list action skbedit",
0327 "matchPattern": "action order [0-9]*: skbedit ptype otherhost",
0328 "matchCount": "1",
0329 "teardown": [
0330 "$TC actions flush action skbedit"
0331 ]
0332 },
0333 {
0334 "id": "b9c6",
0335 "name": "Add skbedit action with invalid ptype",
0336 "category": [
0337 "actions",
0338 "skbedit"
0339 ],
0340 "setup": [
0341 [
0342 "$TC actions flush action skbedit",
0343 0,
0344 1,
0345 255
0346 ]
0347 ],
0348 "cmdUnderTest": "$TC actions add action skbedit ptype openair",
0349 "expExitCode": "255",
0350 "verifyCmd": "$TC actions list action skbedit",
0351 "matchPattern": "action order [0-9]*: skbedit ptype openair",
0352 "matchCount": "0",
0353 "teardown": [
0354 "$TC actions flush action skbedit"
0355 ]
0356 },
0357 {
0358 "id": "464a",
0359 "name": "Add skbedit action with control pipe",
0360 "category": [
0361 "actions",
0362 "skbedit"
0363 ],
0364 "setup": [
0365 [
0366 "$TC actions flush action skbedit",
0367 0,
0368 1,
0369 255
0370 ]
0371 ],
0372 "cmdUnderTest": "$TC actions add action skbedit ptype host pipe index 11",
0373 "expExitCode": "0",
0374 "verifyCmd": "$TC actions get action skbedit index 11",
0375 "matchPattern": "action order [0-9]*: skbedit ptype host pipe.*index 11 ref",
0376 "matchCount": "1",
0377 "teardown": [
0378 "$TC actions flush action skbedit"
0379 ]
0380 },
0381 {
0382 "id": "212f",
0383 "name": "Add skbedit action with control reclassify",
0384 "category": [
0385 "actions",
0386 "skbedit"
0387 ],
0388 "setup": [
0389 [
0390 "$TC actions flush action skbedit",
0391 0,
0392 1,
0393 255
0394 ]
0395 ],
0396 "cmdUnderTest": "$TC actions add action skbedit mark 56789 reclassify index 90",
0397 "expExitCode": "0",
0398 "verifyCmd": "$TC actions get action skbedit index 90",
0399 "matchPattern": "action order [0-9]*: skbedit mark 56789 reclassify.*index 90 ref",
0400 "matchCount": "1",
0401 "teardown": [
0402 "$TC actions flush action skbedit"
0403 ]
0404 },
0405 {
0406 "id": "0651",
0407 "name": "Add skbedit action with control pass",
0408 "category": [
0409 "actions",
0410 "skbedit"
0411 ],
0412 "setup": [
0413 [
0414 "$TC actions flush action skbedit",
0415 0,
0416 1,
0417 255
0418 ]
0419 ],
0420 "cmdUnderTest": "$TC actions add action skbedit queue_mapping 3 pass index 271",
0421 "expExitCode": "0",
0422 "verifyCmd": "$TC actions get action skbedit index 271",
0423 "matchPattern": "action order [0-9]*: skbedit queue_mapping 3 pass.*index 271 ref",
0424 "matchCount": "1",
0425 "teardown": [
0426 "$TC actions flush action skbedit"
0427 ]
0428 },
0429 {
0430 "id": "cc53",
0431 "name": "Add skbedit action with control drop",
0432 "category": [
0433 "actions",
0434 "skbedit"
0435 ],
0436 "setup": [
0437 [
0438 "$TC actions flush action skbedit",
0439 0,
0440 1,
0441 255
0442 ]
0443 ],
0444 "cmdUnderTest": "$TC actions add action skbedit queue_mapping 3 drop index 271",
0445 "expExitCode": "0",
0446 "verifyCmd": "$TC actions get action skbedit index 271",
0447 "matchPattern": "action order [0-9]*: skbedit queue_mapping 3 drop.*index 271 ref",
0448 "matchCount": "1",
0449 "teardown": [
0450 "$TC actions flush action skbedit"
0451 ]
0452 },
0453 {
0454 "id": "ec16",
0455 "name": "Add skbedit action with control jump",
0456 "category": [
0457 "actions",
0458 "skbedit"
0459 ],
0460 "setup": [
0461 [
0462 "$TC actions flush action skbedit",
0463 0,
0464 1,
0465 255
0466 ]
0467 ],
0468 "cmdUnderTest": "$TC actions add action skbedit priority 8 jump 9 index 2",
0469 "expExitCode": "0",
0470 "verifyCmd": "$TC actions get action skbedit index 2",
0471 "matchPattern": "action order [0-9]*: skbedit priority :8 jump 9.*index 2 ref",
0472 "matchCount": "1",
0473 "teardown": [
0474 "$TC actions flush action skbedit"
0475 ]
0476 },
0477 {
0478 "id": "db54",
0479 "name": "Add skbedit action with control continue",
0480 "category": [
0481 "actions",
0482 "skbedit"
0483 ],
0484 "setup": [
0485 [
0486 "$TC actions flush action skbedit",
0487 0,
0488 1,
0489 255
0490 ]
0491 ],
0492 "cmdUnderTest": "$TC actions add action skbedit priority 16 continue index 32",
0493 "expExitCode": "0",
0494 "verifyCmd": "$TC actions get action skbedit index 32",
0495 "matchPattern": "action order [0-9]*: skbedit priority :16 continue.*index 32 ref",
0496 "matchCount": "1",
0497 "teardown": [
0498 "$TC actions flush action skbedit"
0499 ]
0500 },
0501 {
0502 "id": "1055",
0503 "name": "Add skbedit action with cookie",
0504 "category": [
0505 "actions",
0506 "skbedit"
0507 ],
0508 "setup": [
0509 [
0510 "$TC actions flush action skbedit",
0511 0,
0512 1,
0513 255
0514 ]
0515 ],
0516 "cmdUnderTest": "$TC actions add action skbedit priority 16 continue index 32 cookie deadbeef",
0517 "expExitCode": "0",
0518 "verifyCmd": "$TC actions get action skbedit index 32",
0519 "matchPattern": "action order [0-9]*: skbedit priority :16 continue.*index 32 ref.*cookie deadbeef",
0520 "matchCount": "1",
0521 "teardown": [
0522 "$TC actions flush action skbedit"
0523 ]
0524 },
0525 {
0526 "id": "5172",
0527 "name": "List skbedit actions",
0528 "category": [
0529 "actions",
0530 "skbedit"
0531 ],
0532 "setup": [
0533 [
0534 "$TC actions flush action skbedit",
0535 0,
0536 1,
0537 255
0538 ],
0539 "$TC actions add action skbedit ptype otherhost",
0540 "$TC actions add action skbedit ptype broadcast",
0541 "$TC actions add action skbedit mark 59",
0542 "$TC actions add action skbedit mark 409"
0543 ],
0544 "cmdUnderTest": "$TC actions list action skbedit",
0545 "expExitCode": "0",
0546 "verifyCmd": "$TC actions list action skbedit",
0547 "matchPattern": "action order [0-9]*: skbedit",
0548 "matchCount": "4",
0549 "teardown": [
0550 "$TC actions flush action skbedit"
0551 ]
0552 },
0553 {
0554 "id": "a6d6",
0555 "name": "Add skbedit action with index at 32-bit maximum",
0556 "category": [
0557 "actions",
0558 "skbedit"
0559 ],
0560 "setup": [
0561 [
0562 "$TC actions flush action skbedit",
0563 0,
0564 1,
0565 255
0566 ]
0567 ],
0568 "cmdUnderTest": "$TC actions add action skbedit mark 808 index 4294967295",
0569 "expExitCode": "0",
0570 "verifyCmd": "$TC actions get action skbedit index 4294967295",
0571 "matchPattern": "action order [0-9]*: skbedit mark 808.*index 4294967295",
0572 "matchCount": "1",
0573 "teardown": [
0574 "$TC actions flush action skbedit"
0575 ]
0576 },
0577 {
0578 "id": "f0f4",
0579 "name": "Add skbedit action with index exceeding 32-bit maximum",
0580 "category": [
0581 "actions",
0582 "skbedit"
0583 ],
0584 "setup": [
0585 [
0586 "$TC actions flush action skbedit",
0587 0,
0588 1,
0589 255
0590 ]
0591 ],
0592 "cmdUnderTest": "$TC actions add action skbedit mark 808 pass index 4294967297",
0593 "expExitCode": "255",
0594 "verifyCmd": "$TC actions get action skbedit index 4294967297",
0595 "matchPattern": "action order [0-9]*:.*skbedit.*mark 808.*pass.*index 4294967297",
0596 "matchCount": "0",
0597 "teardown": []
0598 },
0599 {
0600 "id": "38f3",
0601 "name": "Delete skbedit action",
0602 "category": [
0603 "actions",
0604 "skbedit"
0605 ],
0606 "setup": [
0607 [
0608 "$TC actions flush action skbedit",
0609 0,
0610 1,
0611 255
0612 ],
0613 "$TC actions add action skbedit mark 42 index 9009"
0614 ],
0615 "cmdUnderTest": "$TC actions del action skbedit index 9009",
0616 "expExitCode": "0",
0617 "verifyCmd": "$TC actions list action skbedit",
0618 "matchPattern": "action order [0-9]*: skbedit mark 42",
0619 "matchCount": "0",
0620 "teardown": [
0621 "$TC actions flush action skbedit"
0622 ]
0623 },
0624 {
0625 "id": "ce97",
0626 "name": "Flush skbedit actions",
0627 "category": [
0628 "actions",
0629 "skbedit"
0630 ],
0631 "setup": [
0632 "$TC actions add action skbedit mark 500",
0633 "$TC actions add action skbedit mark 501",
0634 "$TC actions add action skbedit mark 502",
0635 "$TC actions add action skbedit mark 503",
0636 "$TC actions add action skbedit mark 504",
0637 "$TC actions add action skbedit mark 505",
0638 "$TC actions add action skbedit mark 506"
0639 ],
0640 "cmdUnderTest": "$TC actions flush action skbedit",
0641 "expExitCode": "0",
0642 "verifyCmd": "$TC actions list action skbedit",
0643 "matchPattern": "action order [0-9]*: skbedit",
0644 "matchCount": "0",
0645 "teardown": [
0646 "$TC actions flush action skbedit"
0647 ]
0648 },
0649 {
0650 "id": "1b2b",
0651 "name": "Replace skbedit action with invalid goto_chain control",
0652 "category": [
0653 "actions",
0654 "skbedit"
0655 ],
0656 "setup": [
0657 [
0658 "$TC actions flush action skbedit",
0659 0,
0660 1,
0661 255
0662 ],
0663 "$TC actions add action skbedit ptype host pass index 90"
0664 ],
0665 "cmdUnderTest": "$TC actions replace action skbedit ptype host goto chain 42 index 90 cookie c1a0c1a0",
0666 "expExitCode": "255",
0667 "verifyCmd": "$TC actions list action skbedit",
0668 "matchPattern": "action order [0-9]*: skbedit ptype host pass.*index 90 ref",
0669 "matchCount": "1",
0670 "teardown": [
0671 "$TC actions flush action skbedit"
0672 ]
0673 },
0674 {
0675 "id": "630c",
0676 "name": "Add batch of 32 skbedit actions with all parameters and cookie",
0677 "category": [
0678 "actions",
0679 "skbedit"
0680 ],
0681 "setup": [
0682 [
0683 "$TC actions flush action skbedit",
0684 0,
0685 1,
0686 255
0687 ]
0688 ],
0689 "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action skbedit queue_mapping 2 priority 10 mark 7/0xaabbccdd ptype host inheritdsfield index \\$i cookie aabbccddeeff112233445566778800a1 \\\"; args=\"\\$args\\$cmd\"; done && $TC actions add \\$args\"",
0690 "expExitCode": "0",
0691 "verifyCmd": "$TC actions list action skbedit",
0692 "matchPattern": "^[ \t]+index [0-9]+ ref",
0693 "matchCount": "32",
0694 "teardown": [
0695 "$TC actions flush action skbedit"
0696 ]
0697 },
0698 {
0699 "id": "706d",
0700 "name": "Delete batch of 32 skbedit actions with all parameters",
0701 "category": [
0702 "actions",
0703 "skbedit"
0704 ],
0705 "setup": [
0706 [
0707 "$TC actions flush action skbedit",
0708 0,
0709 1,
0710 255
0711 ],
0712 "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action skbedit queue_mapping 2 priority 10 mark 7/0xaabbccdd ptype host inheritdsfield index \\$i \\\"; args=\\\"\\$args\\$cmd\\\"; done && $TC actions add \\$args\""
0713 ],
0714 "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action skbedit index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions del \\$args\"",
0715 "expExitCode": "0",
0716 "verifyCmd": "$TC actions list action skbedit",
0717 "matchPattern": "^[ \t]+index [0-9]+ ref",
0718 "matchCount": "0",
0719 "teardown": []
0720 }
0721 ]