| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294 |
- [
- {
- "id": "d959",
- "name": "Add cBPF action with valid bytecode",
- "category": [
- "actions",
- "bpf"
- ],
- "setup": [
- [
- "$TC action flush action bpf",
- 0,
- 1,
- 255
- ]
- ],
- "cmdUnderTest": "$TC action add action bpf bytecode '4,40 0 0 12,21 0 1 2048,6 0 0 262144,6 0 0 0' index 100",
- "expExitCode": "0",
- "verifyCmd": "$TC action get action bpf index 100",
- "matchPattern": "action order [0-9]*: bpf bytecode '4,40 0 0 12,21 0 1 2048,6 0 0 262144,6 0 0 0' default-action pipe.*index 100 ref",
- "matchCount": "1",
- "teardown": [
- "$TC action flush action bpf"
- ]
- },
- {
- "id": "f84a",
- "name": "Add cBPF action with invalid bytecode",
- "category": [
- "actions",
- "bpf"
- ],
- "setup": [
- [
- "$TC actions flush action bpf",
- 0,
- 1,
- 255
- ]
- ],
- "cmdUnderTest": "$TC action add action bpf bytecode '4,40 0 0 12,31 0 1 2048,6 0 0 262144,6 0 0 0' index 100",
- "expExitCode": "255",
- "verifyCmd": "$TC action get action bpf index 100",
- "matchPattern": "action order [0-9]*: bpf bytecode '4,40 0 0 12,31 0 1 2048,6 0 0 262144,6 0 0 0' default-action pipe.*index 100 ref",
- "matchCount": "0",
- "teardown": [
- "$TC actions flush action bpf"
- ]
- },
- {
- "id": "e939",
- "name": "Add eBPF action with valid object-file",
- "category": [
- "actions",
- "bpf"
- ],
- "setup": [
- "make -C bpf",
- [
- "$TC action flush action bpf",
- 0,
- 1,
- 255
- ]
- ],
- "cmdUnderTest": "$TC action add action bpf object-file $EBPFDIR/action.o section action-ok index 667",
- "expExitCode": "0",
- "verifyCmd": "$TC action get action bpf index 667",
- "matchPattern": "action order [0-9]*: bpf action.o:\\[action-ok\\] id [0-9]* tag [0-9a-f]{16}( jited)? default-action pipe.*index 667 ref",
- "matchCount": "1",
- "teardown": [
- "$TC action flush action bpf",
- "make -C bpf clean"
- ]
- },
- {
- "id": "282d",
- "name": "Add eBPF action with invalid object-file",
- "category": [
- "actions",
- "bpf"
- ],
- "setup": [
- "make -C bpf",
- [
- "$TC action flush action bpf",
- 0,
- 1,
- 255
- ]
- ],
- "cmdUnderTest": "$TC action add action bpf object-file $EBPFDIR/action.o section action-ko index 667",
- "expExitCode": "255",
- "verifyCmd": "$TC action get action bpf index 667",
- "matchPattern": "action order [0-9]*: bpf action.o:\\[action-ko\\] id [0-9].*index 667 ref",
- "matchCount": "0",
- "teardown": [
- [
- "$TC action flush action bpf",
- 0,
- 1,
- 255
- ],
- "make -C bpf clean"
- ]
- },
- {
- "id": "d819",
- "name": "Replace cBPF bytecode and action control",
- "category": [
- "actions",
- "bpf"
- ],
- "setup": [
- [
- "$TC actions flush action bpf",
- 0,
- 1,
- 255
- ],
- [
- "$TC action add action bpf bytecode '4,40 0 0 12,21 0 1 2048,6 0 0 262144,6 0 0 0' index 555",
- 0,
- 1,
- 255
- ]
- ],
- "cmdUnderTest": "$TC action replace action bpf bytecode '4,40 0 0 12,21 0 1 2054,6 0 0 262144,6 0 0 0' drop index 555",
- "expExitCode": "0",
- "verifyCmd": "$TC action get action bpf index 555",
- "matchPattern": "action order [0-9]*: bpf bytecode '4,40 0 0 12,21 0 1 2054,6 0 0 262144,6 0 0 0' default-action drop.*index 555 ref",
- "matchCount": "1",
- "teardown": [
- "$TC action flush action bpf"
- ]
- },
- {
- "id": "6ae3",
- "name": "Delete cBPF action ",
- "category": [
- "actions",
- "bpf"
- ],
- "setup": [
- [
- "$TC actions flush action bpf",
- 0,
- 1,
- 255
- ],
- [
- "$TC action add action bpf bytecode '4,40 0 0 12,21 0 1 2048,6 0 0 262144,6 0 0 0' index 444",
- 0,
- 1,
- 255
- ]
- ],
- "cmdUnderTest": "$TC action delete action bpf index 444",
- "expExitCode": "0",
- "verifyCmd": "$TC action get action bpf index 444",
- "matchPattern": "action order [0-9]*: bpf bytecode '4,40 0 0 12,21 0 1 2048,6 0 0 262144,6 0 0 0' default-action pipe.*index 444 ref",
- "matchCount": "0",
- "teardown": [
- "$TC action flush action bpf"
- ]
- },
- {
- "id": "3e0d",
- "name": "List cBPF actions",
- "category": [
- "actions",
- "bpf"
- ],
- "setup": [
- [
- "$TC action flush action bpf",
- 0,
- 1,
- 255
- ],
- "$TC action add action bpf bytecode '4,40 0 0 12,21 0 1 2048,6 0 0 262144,6 0 0 0' ok index 101",
- "$TC action add action bpf bytecode '4,40 0 0 12,21 0 1 2054,6 0 0 262144,6 0 0 0' drop index 102",
- "$TC action add action bpf bytecode '4,40 0 0 12,21 0 1 33024,6 0 0 262144,6 0 0 0' continue index 103"
- ],
- "cmdUnderTest": "$TC action list action bpf",
- "expExitCode": "0",
- "verifyCmd": "$TC action list action bpf",
- "matchPattern": "action order [0-9]*: bpf bytecode",
- "matchCount": "3",
- "teardown": [
- "$TC actions flush action bpf"
- ]
- },
- {
- "id": "55ce",
- "name": "Flush BPF actions",
- "category": [
- "actions",
- "bpf"
- ],
- "setup": [
- [
- "$TC actions flush action bpf",
- 0,
- 1,
- 255
- ],
- "$TC action add action bpf bytecode '4,40 0 0 12,21 0 1 2048,6 0 0 262144,6 0 0 0' ok index 101",
- "$TC action add action bpf bytecode '4,40 0 0 12,21 0 1 2054,6 0 0 262144,6 0 0 0' drop index 102",
- "$TC action add action bpf bytecode '4,40 0 0 12,21 0 1 33024,6 0 0 262144,6 0 0 0' continue index 103"
- ],
- "cmdUnderTest": "$TC action flush action bpf",
- "expExitCode": "0",
- "verifyCmd": "$TC action list action bpf",
- "matchPattern": "action order [0-9]*: bpf bytecode",
- "matchCount": "0",
- "teardown": [
- "$TC actions flush action bpf"
- ]
- },
- {
- "id": "ccc3",
- "name": "Add cBPF action with duplicate index",
- "category": [
- "actions",
- "bpf"
- ],
- "setup": [
- [
- "$TC actions flush action bpf",
- 0,
- 1,
- 255
- ],
- "$TC action add action bpf bytecode '4,40 0 0 12,21 0 1 2048,6 0 0 262144,6 0 0 0' index 4294967295"
- ],
- "cmdUnderTest": "$TC action add action bpf bytecode '4,40 0 0 12,21 0 1 2054,6 0 0 262144,6 0 0 0' index 4294967295",
- "expExitCode": "255",
- "verifyCmd": "$TC action get action bpf index 4294967295",
- "matchPattern": "action order [0-9]*: bpf bytecode '4,40 0 0 12,21 0 1 2048,6 0 0 262144,6 0 0 0' default-action pipe.*index 4294967295",
- "matchCount": "1",
- "teardown": [
- "$TC action flush action bpf"
- ]
- },
- {
- "id": "89c7",
- "name": "Add cBPF action with invalid index",
- "category": [
- "actions",
- "bpf"
- ],
- "setup": [
- [
- "$TC actions flush action bpf",
- 0,
- 1,
- 255
- ]
- ],
- "cmdUnderTest": "$TC action add action bpf bytecode '4,40 0 0 12,21 0 1 2054,6 0 0 262144,6 0 0 0' index 4294967296 cookie 12345",
- "expExitCode": "255",
- "verifyCmd": "$TC action ls action bpf",
- "matchPattern": "action order [0-9]*: bpf bytecode '4,40 0 0 12,21 0 1 2048,6 0 0 262144,6 0 0 0' default-action pipe.*cookie 12345",
- "matchCount": "0",
- "teardown": [
- "$TC action flush action bpf"
- ]
- },
- {
- "id": "7ab9",
- "name": "Add cBPF action with cookie",
- "category": [
- "actions",
- "bpf"
- ],
- "setup": [
- [
- "$TC actions flush action bpf",
- 0,
- 1,
- 255
- ]
- ],
- "cmdUnderTest": "$TC action add action bpf bytecode '4,40 0 0 12,21 0 1 2054,6 0 0 262144,6 0 0 0' cookie d0d0d0d0d0d0d0d0",
- "expExitCode": "0",
- "verifyCmd": "$TC action list action bpf",
- "matchPattern": "action order [0-9]*: bpf.*cookie d0d0d0d0d0d0d0",
- "matchCount": "1",
- "teardown": [
- "$TC action flush action bpf"
- ]
- }
- ]
|