diff --git a/docs/netlink/gotc-status.md b/docs/netlink/gotc-status.md index 295d2b15e..6d957bfa4 100644 --- a/docs/netlink/gotc-status.md +++ b/docs/netlink/gotc-status.md @@ -300,6 +300,36 @@ tc's ematch grammar and the cmp, nbyte, u32, meta and canid modules; ipset, ipt kinds, not `not implemented`. Two rows pin the parser's 10000-state limit against the host's tc 7.2.0. The tree header names `TCF_EM_PROG_TC` (V059). +**Increment 22: action writes** (`tc actions add|change|replace|delete|flush`, and the parse side of police, mirred, +skbedit, vlan, csum, nat, simple, connmark, ctinfo, sample, skbmod and mpls, standalone and in filters; filter-side +police goes live for basic, cgroup, fw, route, u32 and flow; pedit, tunnel_key, ife, ct, gate and the bpf action are +increment 23, refused by name; branch `gotc/actwrite`; leads W156+, K63+). Dry-run, as in 17. + +- **22C (captures): done.** `tcactwrite`: 363 rows (269 writes, 94 refusals), each write with a `tc actions ls` or + `filter show` readback. Two batches on one boot agree on every row and on all 295 requests. The write-up starts + with W187 and W188 (new) and K63–K76 (V060). +- **22P (encoders and the request builder): done.** `Append` for the parms structs of the 12 kinds, each + matching tc's captured PARMS byte for byte; `IsAdmittedWriteType` admits RTM_NEWACTION and RTM_DELACTION; + `BuildTcActionWriteRequest` (gotc_write) matches tc's add, change, replace, delete and flush requests (V061). +- **22W (gotc writes): done.** `tc actions add|change|replace|delete|flush` and the 12 kinds' parsers, standalone + and in filters; filter-side police is live for basic, cgroup, fw, route, u32 and flow. All 363 `tcactwrite` rows + replay byte for byte (W189's environment bytes masked), and increment 23's six kinds are refused by name. tdc: 332 + action writes match and 184 are refused by kind; filter writes match 276 (was 245). W166 is copied, not refused as + planned (V062). +- **22B (write-up): done.** [upstream/iproute2-tc-action-write.md](upstream/iproute2-tc-action-write.md): W156–W215 + and K63–K76, each with file:line, its pinning rows, its status and gotc's behaviour. At HEAD every lead is open + apart from W172, which lib/ll_addr.c's 5faf18f672c1 partly fixes, and no K note's kernel file has changed. W179 is + corrected: the kernel deletes 32 of 33 and keeps the 33rd silently (K8's delete side). W188 is dropped as AC33's + duplicate. AC6, AC7, AC33, AC34 (corrected), AC70, K8 and nine filter-write leads have increment-22 extensions + where they live. Not submitted to netdev (DOC015). +- **22L (live diff): done.** On the workbench, tc and the gotc_write build agree on all 366 rows (the 363 tcactwrite + rows plus tcfwrite ec-111, ec-112 and ec-113) apart from named exceptions: increment 23's six kinds, refused by + name, and 18 mirred requests whose target ifindex differs because the capture namespace had nlmon0. W189's bytes + are masked. tc matches the corpus on every row. No new lead (V063). +- **22R (PR #375 review): done.** A MAC group that is a bare `0x` is now refused, as glibc's `%x` refuses it + (skbmod's dmac and smac, vlan's dst_mac and src_mac). The NULs tc's parsers leave in argv now persist in the batch + line buffer, so a later line's sdata copies them as tc does (V064). + ## Ledger | id | task | what was verified | @@ -373,6 +403,12 @@ tc's ematch grammar and the cmp, nbyte, u32, meta and canid modules; ipset, ipt | V057 | 21W | **Code** (`gotc_write`; each file matches no-write-encoders' `fw_[a-z0-9]+`): `fw_ematch.go` is emp_ematch.l and emp_ematch.y at v7.2.0 plus m_ematch.c's parse side. **Lexer:** flex 2.6.4's buffer (YY_INPUT feeds one word and a space per read, skips empty words, and prints `match argument too long.` at max_size; at EOF it restarts, keeping the start condition) and strbuf (calloc 512, grown by 512, quoted tokens kept as lengths into it). **Parser:** bison 3.8.2's LALR tables for the grammar's 21 states (only state 3 shifts `error`, so a complete tree followed by junk is accepted), and the unconditional undo of the look-ahead (F25). flatten_tree is ported literally, with child lists appended at the tail of the whole chain. **Process state** lives on `runner.em`: the leftover buffer, the start condition, strbuf and ematch_root, all carried across parses and batch lines (W124, W128, W129). **Messages:** em_parse_error's block word for word. `fw_emkinds.go` holds the five modules (meta's type-mask table and its adopt and compatibility rules; canid's 25→400 array) and the name-to-id map lookup (case-insensitive, first match, the second file only on ENOENT). ipset and ipt are refused by name. `fw_basic.go` holds basic (no words: no TCA_OPTIONS, W148) and cgroup (the nest always), each with strtol's handle (W147), and flow's `match` arm. `fops` gains `raw`, replayed through `PutRaw` with addraw_l's bound. **Refused** as `not implemented: tc ematch …`, each where tc reads or writes memory it doesn't own, or hangs: W123's run past strbuf, W124's realloc under a quoted token, W125's mask walk, W126's 63-byte kind, W127's parse that ends back on `match`, W128's stale root holding a container, and W132's reads past strbuf. **Read side:** `metaNames`' vlan id was 48 and is now 46 (TCF_META_ID_VLAN_TAG); ec-049's readback found it. **Corpus:** `tcematch`, 257 rows: 243 replay byte for byte, and 14 are refused by name (W123 ×3, W125, W126 ×2, police ×3, ipt, ipset ×2, and two trees past their bound: ec-137's 4096 and ng-095's 16384). tcfwrite ec-114, ec-115 and ec-118 come off `corpusRefused`. `TestGotcEmatchReadbacks` (untagged) replays the 144 readbacks through the read side, stdout identical; ec-137's dump ends in the kernel's EMSGSIZE for tc and gotc alike. **tdc:** 245 filter and chain writes match exactly (134 + 111). Kind basic, kind cgroup and flow match leave `tdcFilterSkips`, and five rows move to `action skbedit` (now 7). **Unit:** `TestGotcEmatchWrite`, 33 rows. Positive: basic cmp+classid, cgroup u32+gact, flow's EMATCHES in argv order with MODE last, each module's full keyword set, and the nested tree's flatten (A P P B notP C D, refs 3, 6 and 5). Negative: ipt and ipset by name, the Parse error block, an unknown kind, F25's `What is`. Boundary: quoted runs of 511, 512 (sent) and 513 (W123); an escape after 512 grows strbuf (513 sent, checked on the host tc 7.2.0); needles of 4095 and 4096 (len 0), and 4097 at layer link (len 1, layer 0); canid with 400 and 401 rules. Corner: W124's `xyc`, W124's realloc (on the host tc 7.2.0 it sends the freed block as the first needle), W133, W137, W130, W128 and W129 in a batch, W148, W147's del of handle 08, W146. **Fuzz:** `FuzzGotcFilterWrite` gains ten ematch seeds and the ematch_map sys (60 s, 833k execs); new `FuzzGotcEmatchBatch` runs two lines as a `-force -batch` (60 s, 536k execs). Neither found anything. **Mutants** (each under `systemd-run --user --scope -p MemoryMax=6G`, `go test -timeout=180s`), all 10 killed: each quoted string copied (W124), the undo made conditional (F25), u16 shifted at an odd offset (W133), the needle len's 12-bit mask dropped (W136), parse_layer comparing the whole word (W137), a breadth-first flatten, the INVERT bit dropped, the type adopted with the value on the right (W130), basic sending an empty nest (W148), and the lexer reset per line (W129). Mutant 4 survived at first, for two reasons: emNbyteParse masked Len again before the encoder did, and the 4096 row's overflow bit coincides with layer 1. The caller's mask was dropped (Append keeps the low twelve bits, as its comment says) and the 4097-at-layer-link row was added. **Coverage:** 85.1% of `internal/gotc`. **Gates:** `go test ./internal/gotc/ ./pkg/xtcpnl/ ./tools/nlcapgen/ ./internal/wsreplay/`, with and without `-tags gotc_write`; `CGO_ENABLED=0 go build ./...`; `gofmt -s`; lint-baseline (tiers 0-2), no-write-encoders and `nix build .#gotc` at `?rev=`. The first lint run found gocyclo on `emAction` (now bison's two tables, look-ahead actions and yydefact), funlen on `emU32Parse` (the offset forms moved to `emU32Offset`), goconst on the ematch kind and meta-id names (now constants shared with the read side and two qdisc parsers) and one prealloc; all were fixed in the code. | | V058 | 21L | **Live diff** on the workbench (kernel 7.3.1, tc 7.2.0 `/nix/store/x1pwsbz5cm23hk58b7fcpn3hhg9j7gwh-iproute2-7.2.0`). gotc was built with `-tags gotc_write` from 21W's code (`/nix/store/zi8w2may7djivfhm54ml5qma30j6r1nh-gotc-write-21l`; the later nil-return lint fix changes no behaviour), with `GOTC_CONF_USR_DIR` and `TC_LIB_DIR` set to tc's. V054's method: each of the 257 `tcematch.rows.jsonl` rows, and tcfwrite's ec-114, ec-115 and ec-118, runs its pre steps in a fresh named namespace, then gotc with `GOTC_WRITE_OUT`, then tc, each under a 60 s timeout. Requests (RTM_NEW/DELTFILTER, RTM_NEW/DELCHAIN) are compared with tc's from the corpus pcaps, with seq, pid and the tcmsg ifindex zeroed (gotc saw ifindexes 2, 3 and the block's ffffffff). **Result: 246/260 identical.** Nine of them are rows where the request is identical and only tc hears the kernel's refusal (ng-066, ng-067, ng-085, ng-102–ng-107). tcfwrite's three basic, cgroup and flow-match rows, refused in 20L, are identical. **Named exceptions:** the 14 refusals by name: W123 (ec-104, ng-100, ng-101), W125 (ng-068), W126 (ng-016, ng-017), police (ec-138, ec-139, ec-140), ipt (ng-108), ipset (ng-109, ng-110), and the two trees tc would truncate (ec-137's 4096, ng-095's 16384). **tc against the corpus:** stdout, stderr and rc match `ws/tcematch` and `ws/tcfwrite` on all 260 rows, except that the three crashing rows (ng-100 rc 134, ng-101 rc 139, ng-108 rc 134) match on rc and stdout, their stderr adding the harness's `timeout: the monitored command dumped core`. **K62 probe** (same run): `basic match 'canid(400 rules) or canid(k rules)'` adds for every k; `tc -d filter show` lists it for k = 0, 25 and 50 and fails with `Error: Buffer too small for object.` for k = 75–400, so between 3600 and 3800 bytes of rules (a page-sized first dump skb); K62 updated. **W155** checked on the host: a plain user's tc prints `Can't open socket to ipset.` before `unknown set name`, while root and a user namespace print only the latter; the write-up says so. **VM:** pre-checked (`free -g`: 49G available against the VM's 2.3G; port 12061 free; no workbench process), booted from off with `up`. The baseline was 86 modules, no namespace and no core files. The script loaded 14 modules and removed them with `modprobe -r` (86 again), removed the three tc core files its crashing rows made (no other core file existed), left no namespace and removed `/tmp/t21l`. The VM was then powered off with `down`: port 12061 free, no workbench process. | | V059 | 21R | **PR #373 review fixes.** (1) **Trailing police:** every filter kind's parse_opt runs NEXT_ARG before parse_police (f_basic.c:84-85, f_cgroup.c:57-58, f_fw.c:76-77, f_route.c:96-97, f_u32.c:1179-1180, f_flow.c:214-215), so ` police` at the end of the line is `Command line is not complete. Try option "help"`, rc 255 (checked on the host's tc 7.2.0 for all six). gotc's `errPolice` becomes `runner.policeArm`, which calls `nextArg` first. This applies to 20W's fw, route, u32 and flow too. Six new rows (basic and cgroup in TestGotcEmatchWrite; fw, route, u32 and flow in TestGotcFilterWrite), plus `basic police rate`, which stays refused by name. (2) **YYMAXDEPTH:** a bisect on the host's tc 7.2.0 puts the limit between 4995 and 4996 nested `(` words around one cmp: each `(` holds two states. Row 4995 parses and is then refused at the 16384 bound (W151). Row 4996 holds tc's full stderr (`Parse error: memory exhausted`, the context line, the EXPR usage, `Illegal "ematch"`; 10282 bytes, identical to tc's). (3) `TcfEmProgTc` (pkt_cls.h's TCF_EM_PROG_TC, 0) is added to xtcpnl and set in the tree header. **Mutants:** raising emYYMaxDepth to 10002 fails the 4996 row; dropping policeArm's nextArg fails all six police rows. | +| V060 | 22C | **Captures**: `tools/nlcapgen/matrix_tcactwrite.go` (`tcactwrite`, 363 rows: 269 writes and 94 refusals, on 20C's fixture: d0 with clsact, d1 with an htb root, two classes and ingress block 10), registered in `main.go`'s `families`; rows `nix/microvms/workbench/tcactwrite.rows.jsonl`; corpus `pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/`. Modules: sch_htb, sch_ingress, the seven cls_* and 18 act_* (increment 23's six included), all in `tdcGuestModules`. **Rows:** each of the twelve kinds' add, change, replace (of an existing index and of a new one), delete by index and flush, each with a `tc actions ls action K` readback. Every keyword of every kind (police's rate, burst, mtu and their `/cell` forms, peakrate, overhead, linklayer, mpu, both conform-exceed forms, pkts_rate/pkts_burst, rates past 32 bits; mirred's four direction×action pairs, dev and blockid; skbedit's five; vlan's push, pop, modify, push_eth, pop_eth with id, priority and protocol; csum's seven flags and `and`; nat both ways, /0 and `default`; simple's sdata of 5, 30 and 31 bytes; connmark's zone; ctinfo's dscp with statemask, cpmark and zone; sample's rate, group and trunc to u32 max; skbmod's set dmac/smac/etype, swap mac and ecn; mpls's five actions with label, tc, ttl, bos and protocol). The frame: cookie, hw_stats immediate/delayed/disabled, no_percpu, skip_sw (refused, K69), skip_sw with skip_hw, 32 actions and 33 (the kernel's refusal), a delete of 33, several kinds in one add, delete of two and of mixed kinds, `del`. m_action.c's own corners (W176–W187), two verbs on one line, and two adds. In filters: matchall carrying each kind, u32 with two actions, a list of four, a bind by index, and filter-side police on basic, cgroup, fw, route, u32 and flow. Batches: two adds, a flush then an add, W189's leftover line buffer, and three `-force` batches (W185 and W201 end tc; a -1 return carries on, rc 1). A row for every sweep lead W156–W215, plus W187 and W188. **Trial batch** (scratch output, same boot): 349 of 363 matched the host-checked expectations. The 14 that didn't were corrected in the generator. W169's conform goto (`can't goto NULL proto/chain`), W203's mac_push and the standalone `skip_sw` are kernel refusals. Label 3 is EINVAL, not ERANGE. `police index 1` with no rate, W166's `rate 7bit` and `rate nan`, and `ctinfo index 1` are accepted (K65, K76). Increment 23's six kinds are accepted by tc and the kernel, so they are positive `out-` rows that gotc will refuse by name in 22W. `TestTcActWriteSpace` checks that no other row uses them. **Final:** two batches on one boot, 363/363 OK each, agree on every row's rc, stdout, stderr and readback, and on all 295 requests byte for byte (seq and pid zeroed), W189's environment bytes included. **Write-up** (`docs/netlink/upstream/iproute2-tc-action-write.md`, new, not submitted to netdev): a summary row for each lead with its pinning rows and status. **New:** W187 (tc_action_gd returns 1 on a kernel refusal, so do_action reads `action` as a command: `Command "action" is unknown` after the kernel's error, ng-085, ng-086) and W188 (`rate … avrate` returns -1 with no message, ng-004). **Corrected from the sweep:** W167 wraps rather than clamps (1000 packets at 1 pps reads back as 274); W189 sends the process environment (`SHELL=/run/current-sy`) after argv's words, and in a batch line 1's leftover text. Kernel notes K63–K76, each cited to v7.4-rc4: rtab ENOMEM, avrate with no estimator, police with no rate, the offload warning on every reclassify police (the generic extack overwrites the specific one), goto with no chain, vlan's ERANGE, flag refusals with no extack, index 0, `per filter` for a standalone add, simple's DEF_DATA, skbedit and skbmod's flags, mpls's label rules, sample's rate and group, and ctinfo with no mode. Four bug-class candidates for the user's review (bug-classes.md is unchanged). 22W reads and pins the leads whose evidence is in the request bytes; 22B does the HEAD check and the extensions in their own docs. **Oracle correction:** `TestWsCorpusRows` classifies each row from its pcap, so six expectations were corrected in the generator after the batches: ec-119 (`dev if3junk`) is kernel-ignored ENODEV, since the GETLINK by name is refused and W75's `if%u` fallback then sends the action with rc 0; ng-021 is kernel ENODEV; ng-028, ng-092 and ng-093 are ack-then-fail with rc 255, because the GETLINK (or `-batch`'s opening link dump) is answered before tc fails; ng-094 is ack-then-fail with rc 1. Those six `cmd.json` files had only their `expect` field rewritten from the regenerated rows; tc never reads `expect`, and every rc is unchanged. **Unit:** `TestTcActWriteSpace` (161 sub-tests). Positive: the verb grid for each kind, and each keyword and frame word. Lead: every W, including W187 and W188. Boundary: 32 and 33 actions, the 33 delete, sdata 30–33, mtu 256, mpu 65535, vlan id 0 and 4094, u16 and u32 maxima, label 1048575 and 1048576, nat /0. Corner: increment 23 only in `out-` rows, bare kind words, the four batches' lines and `-force`, determinism. Negative: no `actions ls` or `get` command, no host device, no `dev lo` or `-netns`. **VM:** pre-checked (`free -g`: 59G available; port 12061 free; no workbench process), booted from off with `up`; baseline 86 modules, no namespace, no core files. The batches left no namespace and no core file. This run's 29 act_*/cls_*/sch_* modules (with act_meta_mark, ife and dummy) were removed with `modprobe -r`, which left 90 modules. The other four (bridge/stp/llc and one more) aren't in any row of this run, so they were left alone. The VM was then powered off with `down` (it was off before): port 12061 free, no workbench process. | +| V061 | 22P | **Encoders** (untagged, `pkg/xtcpnl/xtcpnl_tc_actencode.go`): `Append` for `TcGen` (tc_gen, the whole parms of skbedit, simple, ctinfo and sample), `TcPolice` (its own field order, both `TcRateSpec`s), `TcMirred`, `TcActInt` (vlan, mpls, csum), `TcNat`, `TcConnmark` (two zero bytes of tail padding, W214) and `TcSkbmod` (four zero bytes before the u64), each cited to pkt_cls.h or tc_act/*.h at v7.4-rc4. **Gate:** `IsAdmittedWriteType` admits RTM_NEWACTION and RTM_DELACTION (do_action, m_action.c:869-914). **Builder** (gotc_write, `xtcpnl_tc_action_write.go`, which `no-write-encoders`' `_write` pattern and `Build*WriteRequest` symbol pattern already cover): `BuildTcActionWriteRequest(msgType, flags, seq, attrs)` lays out tcamsg and the attributes in MAX_MSG less the 20-byte nlmsghdr+tcamsg (`TcActWriteRoomCst`, the room addattr_l's maxlen leaves); `ErrTcActionWriteType` for any other type; an attribute past the room is `ErrAttrNoSpace`, where tc prints `addattr_l ERROR` and sends what fit. `PutTcActDeleteTab` (tc_action_gd's TAB, shared with the get as `putActRefTab`) and `PutTcActFlushAttrs` (tc_act_list_or_flush's attributes, shared with the list as `putActListAttrs`; TIME_DELTA only when since is not 0). **Unit:** `TestAppendTcActStructs` (38 sub-tests): 21 captured rows, each kind's PARMS decoded by the read side and laid out again equal to tc's bytes (police with peakrate, mirred ingress, vlan id 4094, csum's seven flags, nat /0, connmark 65535 and its padding, skbmod's dmac/smac and ecn, mpls push); 17 round trips, including every field at its extreme and each zero struct as all-zero bytes. `TestAppendTcActStructsEdges`: a full destination grows and keeps its bytes, `TcConnmark{Zone: 1}` is 24 bytes ending in two zeros, skbmod's flags at offset 24, and ec-087's `rate 40gbit` as tc sends it (tc_police's rate ~0U, RATE64 5e9). `TestBuildTcActionWriteRequest` (10 rows, each tc's captured request): add ec-001, change ec-002, replace ec-003, delete ec-005, flush ec-006, a two-kind delete ec-234, 33 deletes ec-231 (W179), `index 0` with no INDEX ng-085 (W178), the empty TAB add ec-236 (W177), flush `since 1000` ec-237 (W180). `TestBuildTcActionWriteRequestRefusals`: GETACTION and NEWTFILTER refused, an attrs error returned, MAX_MSG to the byte built (nlmsg_len 16384) and one over refused, the bare 20-byte request, the 4-byte tcamsg header, a 16-byte kind cut to 15. `TestTcWriteAdmitted` gains the action pair, GETACTION and type 0x33. 2 allocations per request (`TestBuildTcActionWriteAllocs`); `BenchmarkAppendTcPolice` 13 ns, 0 allocs. **Repaired on the way:** the goip_write `TestBuildWriteRequestAdmitsOnlyListedWrites` had failed since 20W admitted the filter and chain pairs without adding them to its `admittedWriteTypes`; that set now holds them and the action pair. **Leads:** no struct or flag disagrees with the kernel headers, so no K note. The builder rows confirm W177, W178, W179 and W180 in the request bytes. netlink-audit and kernel-citation-audit: no findings. | +| V062 | 22W | **Code** (gotc_write unless noted; `no-write-encoders`' file pattern gains `awrite` and `aw_[a-z0-9]+`): `awrite.go` is do_action's write verbs: tc_action_modify (add EXCL\|CREATE, change and replace REPLACE\|CREATE), tc_action_gd(RTM_DELACTION) (no 32-action bound, W179; `index 0` sends no INDEX, W178; a failed talk returns 1 with argv after `delete`, so `action` is read as a command, W187) and tc_act_list_or_flush(RTM_DELACTION) (the word after `flush` skipped, W181; `bad action`, rc 0, W182; `since` as TIME_DELTA, W180). `awrite_off.go` keeps the untagged build's refusals. `act_parse.go`: the `actParsers` registry of 13 kinds replaces the hard-coded gact; `parseActionControlDflt` is `__parse_action_control`'s ignore-miss form. One file per kind: `aw_police.go` (act_parse_police and the filter side's parse_police, which `policeArm` now calls for the six filter kinds), `aw_mirred.go`, `aw_skbedit.go`, `aw_vlan.go` (with `llAddrA2N`, ll_addr_a2n), `aw_csum.go`, `aw_nat.go`, `aw_simple.go`, `aw_connmark.go` (connmark and ctinfo, sharing the kind-word loop `kindWords`, W210), `aw_sample.go`, `aw_skbmod.go` (`sscanfMac`/`scanfHex`, glibc's `%hhx`) and `aw_mpls.go`. Every message is tc's, word for word, and every exit(-1) is an `exitCode(-1)`, which ends a `-force` batch (W185, W201). **W189** (untagged `argmem.go`): the runner keeps argv's memory as tc has it. On the command line, the words each end in a NUL, then come the environment's bytes, which gotc sends as zeros. In a batch, getline's buffer is rebuilt: the line and its NUL over the old content, makeargs' NULs at the first separator after each word, and a comment's `#` as a NUL; past a continued line it is heap, which gotc sends as zeros. `batch.go`'s makeargs returns each word's offset and NUL. The replay masks the bytes gotc sends as zeros (`w189Canon` in corpus_test.go, used by the tdc test too). **Deviation from the plan:** W166's NaN and ≥ 2^64 rates are copied, not refused. x86's cast result is fixed (`cDoubleToU64`: NaN is 2^63, 2^64 or more is 0), ec-109 is tc sending it, and gotc's qdisc rates already copied it. **Fixed on the way:** `sizeCellShown` (units.go) is argv as get_size64_and_cell leaves it after a failure: cut at the `/` unless CELL parsed (W184). Police uses it, and tbf's `burst` and `mtu` explain1 now do too: before, gotc's tbf printed the whole word (W184 extended to tbf). **Corpus:** `tcactwrite` replays 363/363. ec-217–ec-222 (pedit, tunnel_key, ife, ct, gate, bpf) are refused by name in `corpusRefused`. tcfwrite ec-111, ec-112 and ec-113, and tcematch ec-138–ec-140 (filter police and mirred), come off it. tcaction/ng-006 and tcaction2/ng-007 are sent (W187). **tdc:** `TestGotcTdcActionWrites` (new) replays every `tc actions` add, change, replace, delete, del and flush row: 332 match tc's requests, output and rc (`tdcActionWritesSent`), and 184 are refused by kind (`tdcActionSkips`: pedit 69, ife 48, tunnel_key 35, ct 17, gate 8, bpf 7), with no mismatch and `tdcActionKnown` empty. `tdcFilterWritesSent` is 276 (was 245). **Unit** (aw_test.go, 232 sub-tests, each row a tcactwrite capture replayed with tc's rc and stderr, or a fake-ACK run checking the options): `TestGotcActionCmd` 17, `TestGotcActParsers` 21, `TestGotcPoliceWrite` 25, `TestGotcMirredWrite` 10, `TestGotcSkbeditWrite` 11, `TestGotcVlanWrite` 11, `TestLlAddrA2N` 8, `TestGotcCsumWrite` 8, `TestGotcNatWrite` 8, `TestGotcSimpleWrite` 14, `TestGotcConnmarkCtinfoWrite` 16, `TestGotcSampleWrite` 7, `TestGotcSkbmodWrite` 11, `TestScanfMac` 8, `TestGotcMplsWrite` 17, `TestGotcActionBatchExits` 4, `TestArgMem` 8 (untagged), `TestSizeCellShown` 8. Each table has positive, negative, boundary and corner rows. **Fuzz:** `FuzzGotcActionWrite` (23 seeds, one or more for each kind and verb) and `FuzzGotcActionBatch` (two `-force -batch -` lines: W189's leftover, W185's and W201's exits, a comment). `FuzzGotcFilterWrite` gains 8 action and filter-police seeds. Each checks no panic, an rc in {0, 1, 2, 255}, and every request one netlink message within MAX_MSG. 60s each under `systemd-run MemoryMax=6G`: 2.15M, 1.75M and 1.87M execs, nothing found. **Mutants** (10, each under `systemd-run --user --scope -p MemoryMax=6G go test -timeout=180s`): W156's message fixed, police taking jump and trap (W157), redirect taking a control word (W158), rtab[255] unwrapped (W165), sdata zeroed past its NUL (W189), nat's flags cleared on a repeat (W193), skbmod's index in base 10 (W200), `pop protocol 0` passing (W204), delete bounded at 32 (W179), flush checking its word (W181). All 10 were killed, each by its lead's own row. **Coverage:** internal/gotc 85.6% (gotc_write), 86.4% (untagged). **Leads:** the 13 leads whose evidence was in the request bytes are now confirmed (W157, W158, W163, W165, W167, W175, W177, W179, W180, W190, W196, W200, W214). W184 is extended to tbf, W189's batch buffer is written up, and W166's gotc behaviour is corrected in the doc. No new lead or K note. **Gates:** `go test ./internal/gotc/ ./pkg/xtcpnl/ ./tools/nlcapgen/ ./internal/wsreplay/`, with and without `-tags gotc_write`; `CGO_ENABLED=0 go build ./...` in both builds; `gofmt -s` clean. `checks.x86_64-linux.lint-baseline` (tiers 0-2) at `?rev=` first added 27 findings (goconst, gocyclo in policeLoop, funlen in routeWord, S1019, misspell, prealloc); 3639e89e5 and b9c99b513 fixed them in the code (word constants in util.go, policeLoop split by `policeWordClass`, route's to/from arms through `routeRealm`), and at b9c99b513 no tier adds a finding. `no-write-encoders` passes at 3639e89e5. | +| DOC015 | 22B | **Write-up:** `docs/netlink/upstream/iproute2-tc-action-write.md` (not submitted to netdev), finished: status block, contents, 60 summary rows (W156–W215) with a new gotc column, one section per kind and m_action.c, K63–K76 and four bug-class candidates for the user's review (bug-classes.md is unchanged). **At HEAD** (GitHub mirror `7f88aa3c8bab`, 2026-11-30, `gh api "repos/iproute2/iproute2/commits?path=&since=2026-08-18"`, each hit checked with `gh api …/compare/v7.2.0...`): no commit after v7.2.0 touches m_action.c, the twelve m_*.c, tc_util.c, tc_core.c, tc.c, q_tbf.c or utils_math.c. lib/ll_addr.c's `5faf18f672c1` (2026-08-23, "lib: fix warning from ll_addr_a2n") partly fixes W172: eight groups and trailing garbage are refused and the error names the whole argument, while a short MAC is still zero-filled and a dotted quad still taken as bytes (gotc keeps v7.2.0's behaviour, which the corpus pins). lib/utils.c's `fde561a2a135` and `e11870d5b941` change only getcmdline's error paths, so W189's line buffer is unchanged, and `552d9842b1f4` (resolve_address's cache) is out of reach. **Kernel at HEAD:** torvalds/linux `fe6ff8d5d675` (2026-11-29) has no commit after v7.4-rc4 in any net/sched/act_*.c that K63–K76 cite. **Corrected while checking the evidence:** W179 said the kernel deletes all 33 actions, but ec-231's readback still lists gact index 33. tca_action_gd parses with TCA_ACT_MAX_PRIO (act_api.c:2081-2082, 2094), so the 33rd is skipped with no error: K8's get-side note, now on the delete side too. W188 (`rate … avrate` returns -1 with no message) is AC33, found live in increment 12 (V014), so it is dropped as a duplicate with its number kept; AC33 now has ng-004's write-side stderr. **Entries added:** W200 (skbmod's base-0 index against the other eleven kinds' base 10, ec-206) and W202 (mpls usage() against its parser, ng-076) had only summary rows. **Extensions,** each an "Extended in increment 22" line where the lead lives: in iproute2-tc-action.md, AC6 (flush, W182), AC7 (flush's skipped word, W181), AC33 (W188, W169), AC34 (corrected by W178 and K70: the kernel refuses a get or delete without INDEX), AC70 (skbmod's debug lines, W199) and K8 (W179), plus a status pointer to the new doc; in iproute2-tc-filter-write.md, W65 and W75 (mirred's dev, W162), W68 (police's duparg, W166), W74 (skbedit priority, W174), W85 (skbmod MACs, W196), W113 (W179, K71), W114 (W161, W208), W117 (W158, W175, W190) and W121 (W185, W201), plus a status line. **Checklist** (no doc-audit test covers lead numbering, so a grep): every W156–W215 has a summary row and an entry, every K63–K76 a row, every ec-/ng- row the doc cites exists in `ws/tcactwrite/`, and all 15 extension leads have their line. The `goip-docs` link and whitespace gate is clean on the three docs. | +| V063 | 22L | **Live diff** on the workbench (kernel 7.3.1, tc 7.2.0 `/nix/store/x1pwsbz5cm23hk58b7fcpn3hhg9j7gwh-iproute2-7.2.0`). gotc was built with `-tags gotc_write` at a5fab166e (`/nix/store/6bfgnvxx3b6zfwwzllf23z71200mrr6c-gotc-write-22l`), with `GOTC_CONF_USR_DIR` and `TC_LIB_DIR` set to tc's. V058's method: each of the 363 `tcactwrite.rows.jsonl` rows, and tcfwrite's ec-111, ec-112 and ec-113, runs its pre steps in a fresh named namespace from its own directory (the six batch rows write `b.txt` there), then gotc with `GOTC_WRITE_OUT`, then tc, each under a 60 s timeout. Requests (RTM_NEW/DELACTION, RTM_NEW/DELTFILTER, RTM_NEW/DELCHAIN) are compared with tc's from the corpus pcaps, seq and pid zeroed, a tcmsg's ifindex zeroed (gotc saw 2 and 3), and W189's past-argv DEF_DATA bytes zeroed as `w189Canon` does. The comparer was first checked with the corpus on both sides (366/366). **Result: 342/366 identical**, 55 of them rows where the request is identical and only tc hears the kernel (K66's offload warning, K63–K75's refusals, W187's follow-on line) and 10 of them W189 rows identical once masked (ec-037–ec-040, ec-174, ec-175, ec-178, ec-179, ec-232, ec-250). **Named exceptions:** (1) increment 23's six refusals by name (ec-217–ec-222: pedit, tunnel_key, ife, ct, gate, bpf). (2) 18 rows whose one differing field is mirred's target ifindex, 4 in the corpus and 3 live, every other byte equal: ec-007–ec-010, ec-110–ec-112, ec-114–ec-118, ec-120, ec-121, ec-229, ec-245, ec-256 and tcfwrite ec-113. The capture harness gives each row its own nlmon0, which takes ifindex 2, so d0 and d1 are 3 and 4 there (the corpus tcmsg ifindexes are 3 and 4); without it they are 2 and 3, checked in a fresh namespace on the same boot. This is 20L's ec-032 exception. **tc against the corpus:** stdout, stderr and rc match `ws/tcactwrite` and `ws/tcfwrite` on all 366 rows, so every kernel answer the write-up cites (K63–K76, W164's ENOMEM, W171's ERANGE, W178's `Invalid TC action index value`, W183's EINVAL, W179's surviving index 33) recurred on a second boot. **Leads:** none new, none changed; the write-up's status block records 22L. tc made no core file. **VM:** pre-checked (`free -g`: 46G available; port 12061 free; no workbench process, the other qemu processes being unrelated libvirt guests), booted from off with `up`. The baseline was 86 modules, no namespace and no core files. The run took 105 s. It loaded 37 modules (the act_*, cls_* and sch_* modules, em_cmp, and the dependencies ife, mpls_gso, nf_flow_table, nf_nat and psample) and removed them with `modprobe -r` (none left), made no core file, left no namespace and removed `/tmp/t22l`. After the ifindex probe the VM was back at 86 modules, no namespace and no core file, and it was powered off with `down`: port 12061 free, no workbench process. | +| V064 | 22R | **PR #375 review fixes**, both reproduced against host tc 7.2.0 by the reviewer and again here. (1) **A bare `0x` MAC group:** glibc 2.44's `%x` takes `0x` as a prefix and cannot give the `x` back, so `0x` with no hex digit after it is no conversion (`sscanf("0x:2", "%x")` is 0; `00x:` is 0, its second 0 a digit). `scanfHex` (aw_skbmod.go) had read it as 0, so `skbmod set dmac 0x:2:3:4:5:6` sent a request where tc prints `Invalid dst mac address`, rc 255. vlan's `llAddrA2N` used the strtoul model (`strtoul16`), so `dst_mac 0x:…` was accepted too; it now uses `scanfHex`. Host tc and gotc agree on five probes (bare `0x` first and last, skbmod and vlan). `TestScanfMac` gains 5 rows (its old row "0x with no digit is 0" was the error), `TestLlAddrA2N` gains 4 and checks the colons cut. (2) **Parsers' NULs in the batch buffer (W189):** `argMem.nul` and `nulEach` write a parser's NUL into argv's memory, which in a batch is getline's buffer: ll_addr_a2n's colons (ll_addr.c:65), skbedit's mark slash (m_skbedit.c:86), get_size64_and_cell's slash on a failure (tc_util.c:265; police, tbf, htb, through `sizeCellCut`), flow_parse_keys' commas (f_flow.c:70) and fw's handle slash (f_fw.c:43, through `filterArgs.handleAt`). A sweep of tc/*.c and lib/ at v7.2.0 for in-place NULs found no other ported site: get_prefix_1 and the control word's `/` put the byte back; flower, ct and gate are not ported. `TestGotcBatchArgvNuls` (10 rows: vlan, skbedit, flow, fw; tbf's size and cell failures, htb, flow's unknown key; eight MAC groups; a size and cell that parse) is each case's DEF_DATA, checked against host tc 7.2.0 under `unshare -rn strace -e write=all`: every byte gotc knows matches, and the rest is tc's heap, which gotc sends as zeros and the replay masks. A mutant with `nul` disabled fails 9 of the 10 (the restored slash passes, as it should). `TestArgMemNul` (8 rows) is the helper. **Leads:** W196 and W189 extended in [upstream/iproute2-tc-action-write.md](upstream/iproute2-tc-action-write.md); no new lead. **Gates:** `go test ./internal/gotc/ ./pkg/xtcpnl/ ./internal/wsreplay/ ./tools/nlcapgen/`, with and without `-tags gotc_write`; `CGO_ENABLED=0 go build ./...` in both builds; `gofmt -s` clean. | | DOC009 | 16B | **Write-up:** `docs/netlink/upstream/iproute2-tc-aqm.md`: status header, reachability, contents, 24 summary rows, six sections, and K32–K43. Not submitted to netdev. **At HEAD** (GitHub mirror, `5d13122576d6`, 2026-11-26): none of the thirteen printers, `tc_red.c`, `tc_qevent.c` or `tc_qdisc.c` has a commit since v7.2.0, so all are present. **Confirmed in the corpus:** Q66 (ec-007), Q73 (ec-021, pw-021), Q79 (ec-038), Q80/Q81 (pw-035, ec-040, pw-040, pw-042), Q83 (pw-052), Q84 (pw-052, ec-055, pw-055), Q86 (ec-053), Q87 (ec-001, pw-005). **Latent, with unit rows:** Q67–Q72, Q74–Q78, Q82, Q85, Q88, Q89. **Dropped:** none. **New leads:** Q88 (gred_parse_vqs's plain parse_rtattr misses a VQ_ENTRY flagged NLA_F_NESTED), Q89 (an unknown dualpi2 ECN mask warns twice and prints an empty word). **Kernel notes:** K32–K42 confirmed at v7.4-rc4, refined: red's qevents only when bound; idle cake MIN_NETLEN 65535; cake_mq no dump_stats; plug no .dump; skbprio 64 classes; dualpi2 rejects both step_thresh forms (sch_dualpi2.c:812). **K43 (new):** codel times lose 1 µs (target 4ms dumps 3999, pw-024). **Unit rows:** TestGotcAqm adds Q88 (44 rows). **Bug classes:** none new; Q88 and Q89 fit C3/C15 and C10. | | DOC010 | 17B | **Write-up:** `docs/netlink/upstream/iproute2-tc-write.md`: status header, reachability, contents, 25 summary rows, eight sections, K44–K45. Not submitted to netdev. **At HEAD** (GitHub mirror, `35033e4713fe`, 2026-11-27): no tc file in scope has a commit since v7.2.0; `lib/utils.c`'s one (`552d9842b1f4`, resolve_address's cache) touches none of it, so all are present. **Confirmed in the corpus:** W1 (ec-088, ec-099), W2 (ec-079, ng-011), W3 (ec-089), W4 (ng-004, ng-005, ng-019), W9 (ng-013), W17 (ec-092), W22 (ec-062). **Latent, with unit rows:** W5, W6, W8, W10–W16, W18–W21, W23–W25. **Dropped:** W7. **Kernel notes:** K44 (each verb's errno and extack, ng-001–003, 007, 014, 020–025), K45 (extack errors and warnings printed in place of RTNETLINK answers). **Bug classes:** candidates for the user: a wrong option named in a copied error message (W15, W20) and a divide by a user-given zero (W21). | | V033 | 16C | **Captures** `tcaqm`: `tools/nlcapgen/matrix_tcaqm.go` (+ `TestTcAqmSpace`), rows in `nix/microvms/workbench/tcaqm.rows.jsonl`, corpus in `pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/` (132 rows, 2.7M). Modules: sch_cake (with cake_mq), sch_choke, sch_codel, sch_dualpi2, sch_fq_pie, sch_gred, sch_hhf, sch_pie, sch_plug, sch_red, sch_sfb, sch_skbprio. **Fixtures (26):** red default and `ecn harddrop adaptive qevent early_drop block 10`; choke with ecn; gred `setup vqs 4 default 0 grio` with VQs 0 and 1 changed in, and gred with no VQ configured; sfb default and `rehash 5000000 db 5000000` (Q73); codel, pie, fq_pie and hhf defaults plus an option variant each; cake default, plus four variants covering every diffserv mode, the flow modes, nat/wash/ingress, both ack-filters, no-split-gso, rtt, atm overhead mpu, memlimit, fwmark 0xff, autorate-ingress and docsis; cake_mq on a four-queue dummy; dualpi2 default, step_thresh in packets with drop_enqueue/drop_on_overload/any_ect/no_split_gso, and step_thresh in time; plug; skbprio (with `class show`). Each gets `qdisc show` plus `-s`/`-d`/`-o` forms; batches: cake `-s` qdisc/class/qdisc and red `-d` twice. **Refusals:** ng-001 cake_mq under plug (ENOTSUP, "Parent qdisc is not classful"), ng-002 cake_mq autorate-ingress (ENOTSUP, K39), ng-003 gred change over plug (EINVAL), ng-004 `show dev nosuch` (rc 1). **Notes:** batch lines take no options, so the batches pass `-s`/`-d` on tc's own command line; hhf's `admit_bytes 64Kb` is not accepted, so the fixture uses 65536. Q66 is confirmed live (`Scell_log 15qevent early_drop block 10`), and Q73 (sfb prints `rehash 705s`), Q80, Q81, Q83 and Q84 show in the captures. misspell flags dualpi2's `any_ect`; a scoped exclusion in both golangci configs covers the tcaqm and dualpi2 files. **Gate:** two batches on one boot, 132/132 OK, stdout, stderr and rc identical; `TestTcAqmSpace` pins 132 rows, 26 fixtures and 21 cases; no row sends packets. | diff --git a/docs/netlink/upstream/iproute2-tc-action-write.md b/docs/netlink/upstream/iproute2-tc-action-write.md new file mode 100644 index 000000000..78d169c38 --- /dev/null +++ b/docs/netlink/upstream/iproute2-tc-action-write.md @@ -0,0 +1,406 @@ +# iproute2 tc action writes: parsers that hand unknown words to the next action, a copy that sends the environment, and "0 means unset" + +**Status (2026-11-30, increment 22, tasks 22C, 22W, 22B and 22L):** + +- **Not submitted to netdev.** These are drafts for the user's review, recorded here only, like the other write-ups in + this directory. No patch, no PR, no sign-off. +- **Scope:** + - The write paths of `tc/m_action.c`: tc_action_modify, tc_action_gd(RTM_DELACTION), tc_act_list_or_flush(RTM_DELACTION) + and do_action's dispatch. + - The parse side of the twelve kinds increment 12 reads: `tc/m_police.c` (with the filter side's parse_police), + `m_mirred.c`, `m_skbedit.c`, `m_vlan.c`, `m_csum.c`, `m_nat.c`, `m_simple.c`, `m_connmark.c`, `m_ctinfo.c`, + `m_sample.c`, `m_skbmod.c` and `m_mpls.c`. + - The helpers they reach: `tc/tc_util.c` (parse_action_control and its slash form, get_size_and_cell), `tc/tc_core.c` + (tc_calc_rtable, tc_calc_xmittime), `lib/utils.c` (get_addr, get_prefix), `lib/ll_addr.c` (ll_addr_a2n). +- **Numbering:** leads continue [iproute2-tc-ematch-write.md](iproute2-tc-ematch-write.md) at **W156**, and kernel + notes continue at **K63**. W187 and W188 were kept free for leads found while capturing. W187 is new; W188 turned + out to be AC33 of [iproute2-tc-action.md](iproute2-tc-action.md) and is dropped as a duplicate, keeping its number. +- **Source:** + - Line numbers are iproute2 **v7.2.0**, the version the corpus was captured with. Kernel behaviour is from the + corpus (kernel 7.3.1) and linux **v7.4-rc4**. + - **HEAD check (22B, 2026-11-30):** iproute2's GitHub mirror at 7f88aa3c8bab (2026-11-30), with + `gh api "repos/iproute2/iproute2/commits?path=&since=2026-08-18"`. Every commit found was checked with + `gh api …/compare/v7.2.0...` (all are ahead of v7.2.0). + - **No commit after v7.2.0:** m_action.c, the twelve m_*.c, tc_util.c, tc_core.c, tc.c, q_tbf.c and + utils_math.c. Every lead in those files is open at HEAD. + - **lib/ll_addr.c, 5faf18f672c1 (2026-08-23) "lib: fix warning from ll_addr_a2n":** this fixes part of W172. At + HEAD, eight groups and trailing garbage (`00:11:zz`, `00:11:`) are refused, and the error names the whole + argument because arg is no longer cut. A short MAC (`aa`) is still zero-filled, and a dotted quad still taken as + bytes. See W172. + - **lib/utils.c:** fde561a2a135 and e11870d5b941 free getcmdline's buffers on its error paths (a missing + continuation line, realloc failure). The normal path is unchanged, so W189's line buffer is what it was. + 552d9842b1f4 bounds resolve_address's hostname cache, which nat's get_addr doesn't reach. No lead changes. + - **Kernel:** torvalds/linux at fe6ff8d5d675 (2026-11-29) has no commit after v7.4-rc4 (2026-11-22) in any + net/sched/act_*.c these notes cite, so K63–K76 stand at HEAD. +- **How they were found:** + - The plan's bug-class sweep ([bug-classes.md](bug-classes.md)) over the files above listed W156–W186 and W189–W215. + - 22C wrote a capture row for each one and ran them on the workbench. + - 22W ported the parsers. gotc's replay of all 363 rows matches tc's requests byte for byte, which confirms the + leads whose evidence is in the request bytes ("request bytes (22W)" below). + - 22L ran tc 7.2.0 and the gotc_write build side by side on the workbench (kernel 7.3.1) for all 363 rows and + tcfwrite's ec-111–ec-113. tc's stdout, stderr and rc equal the corpus on every row, so each kernel answer behind + K63–K76 recurred. gotc's requests equal tc's apart from W189's masked bytes, d1's ifindex (the capture + namespace's nlmon0 shifts it by one) and increment 23's six refusals by name. No new lead and no new K note. +- **Corpus:** `pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/` (363 rows), kernel 7.3.1, tc 7.2.0. "ec-N" and "ng-N" below + are its rows. + - Two batches on one boot agree on every row's rc, stdout, stderr and readback, and on all 295 requests byte for byte + (seq and pid zeroed). + - Every expected rc was first checked on the host's tc 7.2.0 under `unshare -rn`. That checks the parse side only: + on the host a standalone action needs CAP_NET_ADMIN in the initial user namespace, so every request is refused + with EPERM. +- **What changed from the sweep after the trial batch:** + - New, W187. W188 was new to the sweep but is AC33, found live in increment 12; it is dropped as a duplicate. + - Corrected: W169's goto, W203 and W207 are refused by the kernel; W166's NaN and `police index N` with no rate are + accepted; W167's burst wraps rather than clamps. + - Corrected kernel answers: `ctinfo index 1` (neither dscp nor cpmark) is accepted; label 3 is EINVAL, not ERANGE; + `skip_sw` alone is refused. + - Increment 23's six kinds are accepted by tc and the kernel alike, so their rows are positive and gotc refuses them + by name in 22W. +- **What gotc does** (22W): + - It reproduces every lead as tc does, including W166's NaN and ≥ 2^64 rates. The plan was to refuse those as a UB + cast. But x86's cvttsd2si result is fixed (NaN is 2^63, 2^64 or more is 0), and ec-109 shows tc sending it. So + gotc copies the cast (`cDoubleToU64`), as it already did for the qdisc rates. + - For W189's bytes past argv or the line buffer (the environment, or the heap after a continued line), gotc sends + zeros, and the replay masks those bytes. + - It refuses increment 23's six kinds by name. + - The tdc oracle: 332 `tc actions` writes match tc and 184 are refused by kind, with no mismatch. The tdc filter + writes that match rose from 245 to 276. + +## Contents + +- [Summary](#summary) +- [m_action.c: W176–W183, W186, W187](#m_actionc-w176w183-w186-w187) +- [police: W156, W157, W163–W170, W184, W188](#police-w156-w157-w163w170-w184-w188) +- [mirred: W158–W162](#mirred-w158w162) +- [skbedit, vlan, csum: W171–W175](#skbedit-vlan-csum-w171w175) +- [nat and simple: W189–W195, W213](#nat-and-simple-w189w195-w213) +- [connmark, ctinfo, sample: W208–W212, W214, W215](#connmark-ctinfo-sample-w208w212-w214-w215) +- [skbmod and mpls: W196–W207](#skbmod-and-mpls-w196w207) +- [Batches: W185, W201](#batches-w185-w201) +- [K63–K76. Kernel notes](#k63k76-kernel-notes) +- [Bug-class candidates](#bug-class-candidates) + +## Summary + +"Confirmed" means the capture shows the outcome: stderr, rc, the readback or the request. "Request bytes (22W)" means +the bytes that show the lead are in tc's captured request, and gotc's replay sends the same bytes (internal/gotc's +aw_test.go names the row). The gotc column is what 22W's port does; "copies it" means the same request bytes, stdout, +stderr and rc as tc. Every lead is open at iproute2 HEAD apart from W172's partial fix (see the status block). + +| lead | where (v7.2.0) | what | pinned by | status | gotc | +|---|---|---|---|---|---| +| W156 | m_police.c:177-186 | the message is inverted: `police rate 1mbit` prints `'burst' requires 'rate'.`; pps prints `'pkts_burst' requires 'pkts_rate'.` | ng-001, ng-002 | confirmed | copies it | +| W157 | m_police.c:117-127 | jump and trap aren't police controls: `… burst 10k trap` is police (reclassify) then a gact trap | ec-106 | confirmed (readback reclassify); request bytes (22W) | copies it | +| W158 | m_mirred.c:224-226 | only mirror reads a control: `redirect dev d1 pipe` is mirred (stolen), then a gact pipe | ec-117 | confirmed (readback stolen); request bytes (22W) | copies it | +| W159 | m_mirred.c:128-207 | an unknown word is skipped: `egress bogus egress redirect dev d1` is accepted | ec-118 | confirmed | copies it | +| W160 | m_mirred.c:181 | `blockid 0` prints `invalid block IDbad action parsing` (no newline) | ng-022 | confirmed | copies it | +| W161 | m_mirred.c:142,172,194,210 | the dev/blockid exclusion is dead: `dev d1 blockid 5` reads blockid as the next kind (`Bad action type blockid` and gact's usage) | ng-028 | confirmed | copies it | +| W162 | m_mirred.c:197,216-218 | `dev if3junk` redirects to an existing device (ifindex 3); a missing device prints four lines, rc 255 | ec-119, ng-021 | confirmed | copies it | +| W163 | m_police.c:207,223 | `mpu 65536` goes into a u16; without a rate, mpu and overhead are dropped silently | ec-098, ec-099 | request bytes (22W) | copies it | +| W164 | tc_core.c:157-161 | mtu 255, or `burst 10k/1`, gives cell_log 0, and the kernel's rtab refusal is ENOMEM (K63) | ng-007, ng-008 | confirmed | copies it | +| W165 | tc_core.c:164 | `(i+1)<`, `skbmod etype 0x0`) | ec-202–ec-204, ng-062 | confirmed | copies it | +| W200 | m_skbmod.c:127 | skbmod's index is base 0 (`010` is 8); the other kinds' are base 10 | ec-206 | request bytes (22W) | copies it | +| W201 | m_skbmod.c, m_sample.c, m_mpls.c | exit(-1) on the parse path ends a `-force` batch: `mpls push` without a label | ng-093 | confirmed | copies it | +| W202 | m_mpls.c:26-37 | the usage omits dec_ttl and index, and shows push's label as optional | ng-076 (mpls help) | reading | copies it | +| W203 | m_mpls.c:178-179 | only push requires a label: `mac_push` without one is sent, and the kernel refuses it (`Label is required for MPLS push`, K74) | ng-071 | confirmed | copies it | +| W204 | m_mpls.c:182-199 | 0 means unset: `pop protocol 0` prints `argument "protocol" is required`; `push label 5 protocol 0` sends no PROTO (readback mpls_uc) | ng-069, ec-215 | confirmed | copies it | +| W205 | m_mpls.c:94,162-163 | no action word: `mpls pipe` and `mpls ind 5` (strcmp) print `Command line is not complete` | ng-066, ng-067 | confirmed | copies it | +| W206 | m_mpls.c:98-140 | `p` is pop, `t` is tc: `push label 5 t 64` prints `tc field is 3 bits max` | ec-216, ng-068 | confirmed | copies it | +| W207 | m_mpls.c:123 | label 3 passes tc's check; the kernel refuses it as `MPLS label out of range` (EINVAL, K74) | ng-070 | confirmed | copies it | +| W208 | m_ctinfo.c:75-78 | a junk statemask is left unconsumed and read as the next kind: `Bad action type 0x1junk` | ng-056 | confirmed | copies it | +| W209 | m_ctinfo.c:143-151 | `cpmark 0` sends no CPMARK: the readback is `ctinfo zone 0`, as with no mode | ec-189 | confirmed | copies it | +| W210 | m_ctinfo.c:51, m_connmark.c:45, m_skbmod.c:63 | the kind-word loop eats any word: `ctinfo c dscp …`, `connmark co zone 5` | ec-191, ec-192 | confirmed | copies it | +| W211 | m_sample.c:17-20,48-49 | `sample` alone prints `argument "sample count" is required` | ng-057 | confirmed | copies it | +| W212 | m_sample.c:107-115 | `index` skips the rate and group checks: `sample rate 5 index 3` is refused by the kernel (`sample rate and group are required`, K75) | ng-058 | confirmed | copies it | +| W213 | m_simple.c:122-139 | `simple index 5` with no sdata: EINVAL, no extack (K72) | ng-049 | confirmed | copies it | +| W214 | m_connmark.c:38 | the struct's tail padding is zeroed by `= {}` | ec-180–ec-183 | request bytes (22W) | copies it | +| W215 | tc_util.c:391-418 | `connmark goto chain x` prints `Illegal "chain index"` twice, then gact's usage, rc 255 | ng-054 | confirmed | copies it | + +## m_action.c: W176–W183, W186, W187 + +- **W176** + - **Trigger:** `tc actions add action drop flowid 1:1`. + - **Outcome:** tc_action_modify sends the add, which is ACKed (the pcap holds the ACK). Back in do_action's loop, + `flowid` isn't a command, so tc prints `Command "flowid" is unknown, try "tc actions help".` and exits 255 with + the action installed. + - **gotc:** copies it. +- **W177:** `actions add action get action gact index 1`. parse_action stops at `get`, so the add carries an empty + TCA_ACT_TAB, which the kernel accepts. do_action then runs `get action gact index 1`, which prints the action: + rc 0. +- **W178** + - **Trigger:** `actions delete action gact index 0`. + - **Outcome:** tc_action_gd adds INDEX only when it isn't 0 (m_action.c:678-679). The kernel answers + `Error: Invalid TC action index value.` (act_api.c:1770-1774), then W187 follows. + - **AC34's correction:** the delete reaches the kernel and is refused there; tc doesn't refuse it. +- **W179:** 33 `action gact index N` pairs in one delete are all sent, rc 0. The kernel deletes only the first 32: + ec-231's readback still lists gact index 33. tca_action_gd parses the tab with TCA_ACT_MAX_PRIO + (act_api.c:2081-2082) and its loop stops at order 32 (act_api.c:2094), so order 33 is dropped with no error or + extack. That is K8 (a get of 33 answers 32) on the delete side, recorded as K8's extension in + [iproute2-tc-action.md](iproute2-tc-action.md). tc says nothing either, so the user is told every delete worked. + The add side's 33 is the kernel's `Only 32 actions supported per filter` (K71, ng-083). + - **Correction (22B):** this entry said the kernel deleted all 33 until the readback was checked. +- **W180:** `since 1000` on a flush is sent as TCA_ROOT_TIME_DELTA, rc 0. gotc's request matches (ec-237). +- **W181:** tc_act_list_or_flush is called with argv advanced by two (m_action.c:911-912), so `flush foo gact` flushes + gact. +- **W182:** `flush action nosuch` prints `bad action nosuch` and returns 0, so the rc is 0. +- **W183:** `skip_sw skip_hw` are both sent; act_api.c:171-176's validity check fails with EINVAL and no extack (K69). +- **W186:** `tc actions` with no verb runs no loop iteration: nothing is printed, rc 0. `actions add help` prints only + `Illegal "action"` (ng-089). +- **W187** (new) + - **Where:** tc_action_gd (m_action.c:598-719). + - **Mechanism:** + - When rtnl_talk fails it prints `We have an error talking to the kernel` and returns **1** (m_action.c:697-699). + - argc and argv are written back only on success (m_action.c:715-716). + - do_action leaves its loop only on `ret < 0` (m_action.c:925-926). So it carries on with argv one word past + `delete`, where `action` is now taken as a command. + - **Outcome:** after the kernel's own error, tc prints `Command "action" is unknown, try "tc actions help".`, rc 255. + The rc is right, but the last line blames the user's words. + - **Scope:** a failed `get` takes the same path. + - **Pinned by:** ng-085 and ng-086. **gotc:** copies it. + +## police: W156, W157, W163–W170, W184, W188 + +- **W156:** the check is right, but the message names the arguments the wrong way round: `police rate 1mbit` prints + `'burst' requires 'rate'.`, and `pkts_rate 10` prints `'pkts_burst' requires 'pkts_rate'.`. +- **W157 and W168** + - **W157:** police's control is parse_action_control_slash's one-word form, which takes no jump or trap. `trap` + ends police (readback `action reclassify`) and starts a gact action. + - **W168:** the one-word form reads one word, as exceed: `conform-exceed drop pass` is exceed drop, and `pass` is + then police's own control word (readback `action pass`). +- **W163:** the request's rate spec carries mpu 0 for `mpu 65536`, the u16 truncation; gotc sends the same (ec-098). + The kernel doesn't print mpu at 0. +- **W164:** `mtu 255` and `burst 10k/1` both give cell_log 0. The kernel's qdisc_get_rtab refuses the table, and + tcf_police_init reports it as -ENOMEM (K63). +- **W165:** `mtu 4294967295` is accepted (readback `mtu 4Gb`). cell_log is 24, and rtab[255] is 0 in tc's request: + `256<<24` is int overflow, which x86 wraps. gotc copies the wrap (ec-100; a mutant without it is killed). +- **W166:** + - `rate 7bit` rounds to 0, so no rtab is sent: readback rate 0bit, burst 0b. + - `rate 0 rate 1mbit` gets past duparg because duparg tests rate64 != 0. + - `rate nan`: get_rate64's double-to-u64 cast is UB. On x86 it gives 2^63, which the u32 field truncates to 0, so + rate is 0 while the burst computed from the 64-bit rate reads back as 590295810358b. + - gotc copies the x86 cast: NaN is 2^63, and 2^64 or more is 0 (ec-109). The plan said to refuse these, but the + result is fixed on x86, so there was no reason to. +- **W167:** `ppsburst64 = tc_calc_xmittime(pps64, ppsburst64)` (m_police.c:251). tc_calc_xmittime returns an unsigned + tick count, so 1000 packets at 1 pps overflows it, and the kernel reads back `pkts_burst 274`. +- **W169:** goto in the slash form is goto chain 0. + - **Conform side:** `goto/pass` sends tcf_action GOTO_CHAIN, which a standalone action can't hold: + `can't goto NULL proto/chain` (act_api.c:84-90). + - **Exceed side:** `pass/goto` sends RESULT GOTO_CHAIN: `goto chain not allowed on fallback` (act_police.c:136-141). + - **Other forms:** `foo/pass` returns -1 with no message of its own. `jump 1/pass` is `Invalid "jump count" (1/pass)`. +- **W170:** `p 2mbit` is peakrate, and `o` is `ok` (readback `action pass`). +- **W184:** get_size_and_cell writes a NUL over the `/` before invarg prints, so `burst 10k/x` names `"10k"`. + - The slash is put back only once CELL parses as an integer. A CELL that isn't a power of 2 (`10k/3`), or a SIZE past + u32, prints the whole word. + - **Extended in 22W to tbf:** q_tbf.c's `burst` and `mtu` go through the same helper, so its explain1 prints the cut + word too. Before 22W, gotc's tbf printed the whole word; `sizeCellShown` now serves both, pinned by + TestSizeCellShown. +- **W188** (dropped: a duplicate of AC33) + - **Why dropped:** [iproute2-tc-action.md](iproute2-tc-action.md)'s AC33 is this lead, found live in increment 12 + (V014). The sweep missed it because AC33 was recorded against the read increment. The number is kept; AC33 has + the write-side evidence below as an extension. + - **Where:** m_police.c:167-168. + - **Trigger:** `police rate 1mbit burst 10k avrate 1mbit index 1`. + - **Outcome:** `if (rate64 && avrate) return -1;` prints nothing, so the user sees only `bad action parsing`, + `parse_action: bad value (9:police)!` and `Illegal "action"`, rc 255. + - **Pinned by:** ng-004. **gotc:** copies it. + - **Related:** avrate alone reaches the kernel and is refused, because tc actions add never sends an estimator + (K64, ng-005). + +## mirred: W158–W162 + +- **W158:** redirect's arm never reads a control word, so `redirect dev d1 pipe` is mirred (stolen) followed by a + gact pipe action. W175 is the index-then-control variant. +- **W159:** unknown words between keywords are skipped by NEXT_ARG. +- **W160:** the missing newline in `invalid block ID` runs it into `bad action parsing`. +- **W161:** once `dev` is seen, mirred stops reading, so `blockid 5` is the next action's kind. tc prints + `Bad action type blockid` and gact's full usage, rc 255. +- **W162:** ll_name_to_index falls back to `if%u` parsing, so `if3junk` is ifindex 3, which here is d0 (readback + `Redirect to device d0`). A missing device prints `Cannot find device "nosuch"`, `bad action parsing`, + `parse_action: bad value (7:mirred)!` and `Illegal "action"`. + +## skbedit, vlan, csum: W171–W175 + +- **W171:** `id 010` is 8 (readback `push id 8`). `id 4095` reaches the kernel: ERANGE with no extack (K68). +- **W172:** ll_addr_a2n zero-fills a short MAC, takes a dotted quad as bytes, and stops at six groups. + `zz:00:…` prints `"zz" is invalid lladdr.` then `argument "zz" is wrong: dst_mac is invalid`: both are cut at the + first `:`. + - **At HEAD** (5faf18f672c1, 2026-08-23, after v7.2.0): ll_addr_a2n parses with strtoul and no longer writes to + arg. Eight groups and trailing garbage are refused, and both messages name the whole argument. A short MAC is still + zero-filled and a dotted quad still taken as bytes, so ec-147 and ec-148 would still pass at HEAD, and ng-038's + stderr would change. + - **gotc:** `llAddrA2N` copies v7.2.0, the version the corpus was captured with. +- **W173:** with `index` first, csum's loop never sees an UPDATE word. The kernel stores flags 0, and tc prints them + as `csum (?empty)`. +- **W174:** + - `priority 10` is read as hex (`:10`), and `100000001` wraps to `:1`. + - A second `mark` replaces the value but keeps the first mask (`6/0xff`). + - `mark 010` is base 0, so 8. +- **W175:** each kind reads its control before `index`. A control after `index` is the next action, a gact. tc's + request holds two actions, and gotc's matches it (ec-121, ec-137, ec-150, ec-163). + +## nat and simple: W189–W195, W213 + +- **W189** + - **Where:** m_simple.c:150, `addattr_l(n, MAX_MSG, TCA_DEF_DATA, simpdata, SIMP_MAX_DATA)`. + - **Mechanism:** simpdata points at the argv word, and 32 bytes are copied whatever its length. + - **Outcome:** + - `sdata hi index 7` sends `hi\0index\07\0` and then the first bytes of the **environment**: + `SHELL=/run/current-sy` (ec-178). `sdata x index 5 drop` likewise (ec-179). + - In a batch, argv points into the line buffer, so line 2's `sdata hi` sends the rest of line 1's longer text + (`\0LLLLLLLL\0index\01\0coo`, ec-269). + - The kernel stores DEF_DATA only up to the first NUL (readback `Simple `, K72), so nothing persists. But the + bytes reach the kernel, and anyone listening on nlmon. + - **Determinism:** the two batches agree byte for byte, because the guest's environment is the same each run. + - **The batch line buffer** (22W): getline reuses one buffer, and makeargs (tc.c) cuts the line in place. + - The line and its NUL are written over the old content, so a shorter line 2 is followed by line 1's tail. + - makeargs writes a NUL at the first separator after each word. A second space stays a space, and a `#` comment's + `#` becomes a NUL with the comment text left after it. + - A continued line (`\` at the end) is joined in a heap buffer, so what follows is heap: gotc sends zeros there. + - **Other parsers' NULs** (22R, PR #375 review): several parsers write a NUL into their argv word and never put it + back, so a later, shorter batch line's sdata copies the NUL, not the original byte: + - ll_addr_a2n's colons (ll_addr.c:65; vlan's `dst_mac` and `src_mac`), each written before its group is read; + - skbedit's `mark A/B` slash (m_skbedit.c:86); + - get_size64_and_cell's slash (tc_util.c:265), only when the size or the cell fails to parse, which is put back + otherwise (police's invarg ends the batch, so this is seen after tbf and htb); + - flow_parse_keys' commas (f_flow.c:70), up to the comma after an unknown key; + - fw's `handle A/B` slash (f_fw.c:43). + Checked against host tc 7.2.0 under strace in an unprivileged netns: every byte gotc knows matches + (TestGotcBatchArgvNuls). get_prefix_1 and the `/` of a control word put the byte back. flower (whose writes gotc + doesn't port yet), ct and gate (increment 23) do the same. + - **In a filter:** `filter add … matchall action simple sdata hi` is the end of argv, then the environment (ec-250). + - **tdc:** the tdc simple rows send the tdc runner's environment. Their replay masks it, as for the corpus. + - **gotc:** sends what tc reads from argv or the line buffer (TestArgMem), zeros past them, and the replay masks those + bytes. +- **W190:** simple reads `index` and then stops; `drop` after it is a gact action. +- **W191:** a bare kind word hits NEXT_ARG first, so the user sees `Command line is not complete. Try option "help"` + rather than the kind's explain text. +- **W192:** `nat ingress 10.0.0.0/33 1.1.1.1` prints `Illegal nat construct (ingress)` then nat's usage. +- **W193:** parse_nat_args ORs the egress flag into sel.flags and overwrites the addresses, so the second `nat`'s + addresses are kept under the first's direction: readback `egress 11.0.0.0/8 3.0.0.0`. +- **W194:** NEW is read with get_addr, which drops `/16` silently. +- **W195:** get_addr_ipv4's inet_aton accepts `010` (octal) and `10.1`. get_prefix accepts `/0x10` and a dotted + netmask. +- **W213:** with no sdata no DEF_DATA is sent, and act_simple.c:127-133 refuses with EINVAL, no extack. + +## connmark, ctinfo, sample: W208–W212, W214, W215 + +- **W208:** the statemask's get_u32 fails, so the word is left for parse_action, which reads it as a kind. +- **W209:** cpmark 0 is "unset", so no CPMARK is sent. The kernel accepts a ctinfo with no mode at all (K76). +- **W210:** the loop that skips the kind word matches any word, so a stray word after the kind is eaten. +- **W211 and W212** + - **W211:** the missing-count message is the first check. + - **W212:** `index` short-circuits the checks, and the kernel refuses with extack + `sample rate and group are required` (act_sample.c:83-87). + - **Related:** `rate 0` is `invalid sample rate` (act_sample.c:94-97, ng-060). +- **W214:** tc's TcConnmark has its 2 bytes of tail padding zeroed, and gotc's encoder zeroes them too (ec-180–ec-183). +- **W215:** parse_action_control reports the bad chain index, then connmark's own fallback reports it again. gact's + usage follows, rc 255. + +## skbmod and mpls: W196–W207 + +- **W196:** `sscanf("%hhx:%hhx:…")` takes the first six fields and ignores what follows. + - **A bare `0x`** (22R, PR #375 review): glibc's `%x` takes `0x` as a prefix and can't give the `x` back, so a group + that is `0x` with no hex digit after it is no conversion. `skbmod set dmac 0x:2:3:4:5:6` is refused with + `Invalid dst mac address`, rc 255, and vlan's `dst_mac 0x:…` (ll_addr_a2n's `%x`) with `"0x" is invalid lladdr.` + `00x:` is 0, the second 0 being a digit. Checked against glibc 2.44 and host tc 7.2.0. gotc had read `0x` as 0 + and sent the request; it now refuses as tc does (TestScanfMac, TestLlAddrA2N). +- **W197:** + - act_skbmod.c:152-155 replaces the whole flag set with SWAPMAC, so the dmac in `set dmac X swap mac` is dropped + (readback `swap mac`). + - `skbmod mac` alone is swap mac, because the kind loop eats words (W210). +- **W198 and W199** + - **W198:** etype 0 sends the flag with no ETYPE attribute; the kernel refuses with EINVAL, no extack. + - **W199:** the debug lines are printed on success too. +- **W200:** skbmod reads its index with `get_u32(&p.index, *argv, 0)` (m_skbmod.c:127), base 0, where the other + eleven kinds pass base 10: `skbmod swap mac index 010` creates index 8 (ec-206). gotc copies it, and a mutant that + reads it in base 10 is killed by that row. +- **W201:** mpls's missarg is exit(-1), so the rest of a `-force` batch never runs (ng-093). Compare nat's -1 return in + ng-094, which carries on, rc 1. +- **W202:** `mpls help` (ng-076, rc 255) prints usage() from m_mpls.c:26-37. It lists pop, push, mac_push and modify, + but not dec_ttl, which the parser takes (m_mpls.c:114), nor `index`. It shows push's label in brackets, though + push without a label is a missarg exit (m_mpls.c:179; W201, ng-093). This is from reading the text against the + parser: the row pins the text, not a wrong outcome. gotc prints the same usage. +- **W203 and W207:** the kernel refuses both, each with an extack (K74). `mac_push` with no label passes tc's check. +- **W204:** + - `pop protocol 0` is tc's own refusal. + - `push label 5 protocol 0` sends no PROTO, and the kernel defaults to mpls_uc. +- **W205 and W206:** `ind` is compared with strcmp, so it isn't `index`, and the action word is never found. `t` is + matches()' prefix of `tc`. + +## Batches: W185, W201 + +- **The rows:** ng-092 (police's invarg), ng-093 (mpls's missarg) and ng-094 (nat's -1 return), each under `-force`. +- **Outcome:** the first two end tc on line 1 (rc 255, line 2 never runs). The third prints `Command failed b.txt:1` + and runs line 2 (rc 1). + +## K63–K76. Kernel notes + +Each note is cited to linux v7.4-rc4 and observed on 7.3.1. + +| note | where | what | pinned by | +|---|---|---|---| +| K63 | act_police.c:100-112 | a rate table qdisc_get_rtab refuses (cell_log 0) is reported as -ENOMEM, `Cannot allocate memory` | ng-007, ng-008 | +| K64 | act_police.c:114-127 | AVRATE on a create with no estimator is EINVAL with no extack; m_action.c has no estimator keyword, so a standalone police can never have avrate | ng-005 | +| K65 | act_police.c | a police with no rate, burst or pps is created: `police index 3` is rate 0bit, burst 0b, mtu 4Gb, action reclassify; `rate 7bit` likewise | ec-107, ec-108 | +| K66 | act_api.c:269-273; act_police.c:411-436 | every software-only police whose conform or exceed is reclassify (the default) gets `Warning: act_api: Failed to setup tc actions for offload.`: the offload translation is tried with no device to offload to, and the generic message overwrites act_police.c:424's specific `Offload not supported when conform/exceed action is "reclassify"` | every police row with the default action (ec-001 …) | +| K67 | act_api.c:84-90; act_police.c:136-141 | a standalone action can't goto a chain (`can't goto NULL proto/chain`); police's RESULT can't either (`goto chain not allowed on fallback`) | ng-006, ng-012 | +| K68 | act_vlan.c:165-172 | a push vid ≥ 4095 is ERANGE with no extack | ng-034 | +| K69 | act_api.c:171-176,1452-1458; 280-281,1582-1584 | SKIP_SW with SKIP_HW is EINVAL with no extack; SKIP_SW alone on a standalone action is EINVAL with no extack when nothing took it into hardware | ng-077, ng-078 | +| K70 | act_api.c:1770-1774 | a delete or get with no INDEX is `Invalid TC action index value` (EINVAL); a missing index is `TC action with specified index not found` (ENOENT) | ng-085, ng-086 | +| K71 | act_api.c:1516-1519 | 33 actions in a standalone add are refused as `Only 32 actions supported per filter`: the message says filter for a request with no filter | ng-083 | +| K72 | act_simple.c:127-133 | no DEF_DATA is EINVAL with no extack; DEF_DATA is kept only up to its first NUL, so W189's trailing bytes are dropped | ng-049, ec-178 | +| K73 | act_skbedit.c:215-220; act_skbmod.c:146-155 | skbedit with no flags, and skbmod with none (or etype 0), are EINVAL with no extack; skbmod's SWAPMAC or ECN replaces the whole flag set | ng-030, ng-064, ng-062, ec-204 | +| K74 | act_mpls.c:130-145,241-245 | label 3 (MPLS_LABEL_IMPLNULL) is `MPLS label out of range`; mac_push without a label is `Label is required for MPLS push`; both EINVAL | ng-070, ng-071 | +| K75 | act_sample.c:83-97 | rate and group are required (`sample rate and group are required`), and rate 0 is `invalid sample rate` | ng-058, ng-060 | +| K76 | act_ctinfo.c:171-186 | only TCA_CTINFO_ACT is required: a ctinfo with neither dscp nor cpmark is created and does nothing | ec-190, ec-189 | + +22B's HEAD check: none of the act_*.c files these notes cite has a commit after v7.4-rc4 at torvalds/linux +fe6ff8d5d675 (2026-11-29), so every note stands. K8 of [iproute2-tc-action.md](iproute2-tc-action.md) also covers the +delete side (W179). The m_action.c claim in K64 was checked at v7.2.0: no `estimator` or TCA_RATE appears in it. + +## Bug-class candidates + +These are for the user's review. [bug-classes.md](bug-classes.md) is unchanged. + +- **A fixed-length copy from a variable-length source** (W189): `addattr_l(…, ptr, FIXED)` where ptr is a user string. + Here it sends the process environment to the kernel. +- **"0 means unset" sentinels that swallow a legal 0** (W163, W166, W204, W209): a value the user typed is dropped, or + turned into a missing-argument error. +- **A parser that hands an unrecognised word to the next action as its kind** (W158, W161, W173, W175, W190, W208): + the user's typo becomes a gact action, or a `Bad action type` with gact's usage. +- **A positive error return that the caller's `< 0` test misses** (W187): the loop carries on over words it has + already used. diff --git a/docs/netlink/upstream/iproute2-tc-action.md b/docs/netlink/upstream/iproute2-tc-action.md index 1dfdd4390..df7954b52 100644 --- a/docs/netlink/upstream/iproute2-tc-action.md +++ b/docs/netlink/upstream/iproute2-tc-action.md @@ -1,7 +1,10 @@ # iproute2 `tc actions` and action printers: totals that aren't totals, JSON that drops or doubles keys, spacing by kind, and reads tc never checked -**Status (2026-11-24, increment 12; extended 2026-11-25, increment 13):** +**Status (2026-11-24, increment 12; extended 2026-11-25, increment 13; extended 2026-11-30, increment 22):** +- **The write side** of these twelve kinds and m_action.c is + [iproute2-tc-action-write.md](iproute2-tc-action-write.md) (W156–W215, K63–K76). Increment 22 extends AC6, AC7, + AC33, AC34 (a correction) and AC70 and K8 below, each marked "Extended in increment 22". - **Not submitted to netdev.** These are drafts for the user's review, recorded here only, like the other write-ups in this directory. No patch, no PR, no sign-off. - **Source:** @@ -171,8 +174,14 @@ - **AC6:** `tc_act_list_or_flush` prints `bad action %s` for a kind it can't find and returns 0 (`goto bad_val` with `ret = 0`). `actions ls action nosuch` exits 0 (ec-004). + - **Extended in increment 22:** the flush takes the same path (W182 in + [iproute2-tc-action-write.md](iproute2-tc-action-write.md)): `actions flush action nosuch` prints `bad action + nosuch` and exits 0 (tcactwrite/ec-239). gotc copies it (22W). - **AC7:** `do_action` passes `argv + 2` to the list: the word after `list` is skipped whatever it is. After the kind, only `since` is read. `actions list foo gact bar` lists every gact (ec-056). + - **Extended in increment 22:** flush is passed `argv + 2` too (W181 in + [iproute2-tc-action-write.md](iproute2-tc-action-write.md)): `actions flush foo gact` flushes every gact + (tcactwrite/ec-238). gotc copies it (22W). - **AC8:** when `rtnl_talk` fails, `tc_action_gd` prints "We have an error talking to the kernel" and returns 1 without updating `*argc_p`/`*argv_p`. 1 is not < 0, so `do_action` loops on the words it already passed, from `action`: `Command "action" is unknown, try "tc actions help".`, rc 255 (ng-004 for a missing index, ng-005 for a @@ -189,6 +198,10 @@ - **AC34:** `tc_action_gd` requires `index` after each kind, though it puts `TCA_ACT_INDEX` only when the index is non-zero and the kernel accepts a get without it. `get action gact` is `Error: no index specified action: gact`, rc 255 (ng-002). + - **Extended in increment 22:** **correction** (W178 in [iproute2-tc-action-write.md](iproute2-tc-action-write.md)). + The kernel doesn't answer a get or delete without TCA_ACT_INDEX: tcf_action_get_1 refuses it with `Invalid TC + action index value` (act_api.c:1770-1774, K70). tc reaches that with `delete action gact index 0`, which sends no + INDEX (tcactwrite/ng-085); its `index` check only stops a get or delete with no index word at all. - **AC38:** `tc_action_gd` builds into `MAX_MSG` (16384, tc_util.h:5) and never checks the return values of `addattr_nest`, `addattr_l` or `addattr32` (m_action.c:627, 676-679). Past the bound, `addattr_l` prints `addattr_l ERROR: message exceeded bound of 16384` and appends nothing (libnetlink.c:1380-1384). The loop goes @@ -224,6 +237,11 @@ gotc refuses the writes, so these are from the source only. 0bit burst 0b mtu 4Gb pkts_rate 1000 pkts_burst 10` (ec-015). - **AC33:** `act_parse_police` returns -1 with no message when both `rate` and `avrate` are given, so tc says only "bad action parsing" (V014, live). + - **Extended in increment 22:** confirmed on the write side by tcactwrite/ng-004 (`police rate 1mbit burst 10k avrate + 1mbit index 1`): stderr is only `bad action parsing`, `parse_action: bad value (9:police)!` and `Illegal + "action"`, rc 255. The sweep listed it again as W188, which + [iproute2-tc-action-write.md](iproute2-tc-action-write.md) drops as a duplicate. The slash form's `foo/pass` + (W169) is the same silent -1. gotc now sends police (22W) and copies both. - **AC37:** `print_police` prints `"kind"` with `PRINT_JSON`; the text kind is the `" police 0x%x "` inside the options. A terse dump sends no options, so `-br` text has no kind at all: `action order 0: \t index 1` (ec-010), where the other kinds print theirs first (`mirred \t index 1`, ec-021). JSON has `"kind":"police"` (pw-010). @@ -331,6 +349,10 @@ no NUL, a skbmod MAC of length 0 or over 21, and a tab of more than 1024 orders. the length; an empty one prints `allow`. JSON's `"mark"` is then a number or the string `"allow"` (pw-018). - **AC70:** on the write side, `parse_ife` reports what it parsed on stderr: `IFE type 0x%04X` for a given type and, at m_ife.c:179, `IFE type 0xED3E` when none was given, plus the MAC addresses. Seen in every ife pre step of 13C. + - **Extended in increment 22:** skbmod does the same (W199 in + [iproute2-tc-action-write.md](iproute2-tc-action-write.md)): every `set` writes `dst MAC address <…>`, `src MAC + address <…>` or `skbmod etype 0x…` to stderr (tcactwrite/ec-202–ec-204, ng-062). gotc copies skbmod's lines (22W); + ife stays refused until increment 23. ## AC54–AC58. ct @@ -410,6 +432,10 @@ no NUL, a skbmod MAC of length 0 or over 21, and a tab of more than 1024 orders. So a get of 33 actions is answered with the first 32, with no error or extack. tc prints them, `action order 1:` to `32:`, and exits 0 (ec-066, pw-066). A gap stops the loop early too: orders 1, 2 and 4 are answered with 1 and 2. That is from the code: tc numbers its orders without gaps. + - **Extended in increment 22:** a delete is parsed the same way (W179 in + [iproute2-tc-action-write.md](iproute2-tc-action-write.md)): 33 `action gact index N` pairs in one `tc actions + delete` delete the first 32, and the 33rd is kept with no error or extack, rc 0. tcactwrite/ec-231's readback + still lists index 33. - **K9:** `tunnel_key_dump` puts TOS and TTL only when non-zero (act_tunnel_key.c:762-766), so tc's `!= 0` tests never fail on a dump. - **K10:** `tcf_pedit_dump` puts PARMS_EX and KEYS_EX when any key is extended, otherwise PARMS diff --git a/docs/netlink/upstream/iproute2-tc-filter-write.md b/docs/netlink/upstream/iproute2-tc-filter-write.md index aa22f54a0..4559c5c1a 100644 --- a/docs/netlink/upstream/iproute2-tc-filter-write.md +++ b/docs/netlink/upstream/iproute2-tc-filter-write.md @@ -1,7 +1,9 @@ # iproute2 tc filter writes: narrowed selectors, a renamed check, sticky cookies and a realm cache that answers with the wrong number -**Status (2026-11-29, increment 20):** +**Status (2026-11-29, increment 20; extended 2026-11-30, increment 22):** +- **Increment 22** extends W65, W68, W74, W75, W85, W113, W114, W117 and W121 below, each marked "Extended in + increment 22", from the action write-up [iproute2-tc-action-write.md](iproute2-tc-action-write.md). - **Not submitted to netdev.** These are drafts for the user's review, recorded here only, like the other write-ups in this directory. No patch, no PR, no sign-off. - **Scope:** the write path of `tc filter` and `tc chain` (`tc/tc_filter.c` tc_filter_modify, which `chain add` and @@ -120,6 +122,8 @@ - **W65.** `strncpy(d, *argv, sizeof(d)-1)` into `d[IFNAMSIZ]`: a 17-byte altname is looked up as its first 15 bytes, `Cannot find device "abcdefghijklmno"`, rc 1 (ng-002), naming text the user never typed. tc_class.c:74,408 does the same; W1–W63 don't list it. + - **Extended in increment 22:** mirred's `dev` is copied the same way, `strncpy(d, *argv, sizeof(d) - 1)` at + m_mirred.c:197 (W162 in [iproute2-tc-action-write.md](iproute2-tc-action-write.md)). - **W66.** With no `dev` and no `block`, modify calls ll_init_map (a link dump) and sends tcm_ifindex 0, which the kernel refuses with ENODEV (K49): `RTNETLINK answers: No such device`, `We have an error talking to the kernel`, rc 2 (ng-003). tc_filter_get refuses the case itself (`Must specify netdevice`). @@ -128,6 +132,8 @@ - **W68.** `if (prio) duparg(...)`, `if (req.t.tcm_parent) duparg(...)`, `if (d[0]) duparg(...)`: a first value of 0 is not a value. `pref 0 pref 5` installs pref 5 (ec-079); `parent none ingress` installs on ingress (ec-080). W3's class for the qdisc `handle`. + - **Extended in increment 22:** police's duparg tests rate64 != 0, so `police rate 0 rate 1mbit burst 10k` is accepted + (W166 in [iproute2-tc-action-write.md](iproute2-tc-action-write.md)). - **W69, W70.** get_filter_kind never returns NULL and the loop leaves only at the kind or the last word, so the no-kind `Garbage instead of arguments` and its `help` can't be reached; no kind at all is the kernel's refusal (ng-004). The device is looked up after the loop and before parse_fopt, so `dev nosuch ingress pref 1 u32 bogus` @@ -143,8 +149,12 @@ `classid 100000001` is 0:1 (ec-081), `classid -1` is ffff:ffff (ec-082), and `parent 1ffffffff` is root, where htb has no class ffff (ng-009). With a colon both halves are range-checked as unsigned longs, so `100000001:1` is refused. This hits every `classid`, `flowid`, `baseclass` and `parent`. + - **Extended in increment 22:** skbedit's `priority` is get_tc_classid too: `priority 10` is :10 (hex) and `100000001` + wraps to :1 (W174 in [iproute2-tc-action-write.md](iproute2-tc-action-write.md), tcactwrite/ec-132–ec-135). - **W75.** ll_name_to_index's last fallback is `sscanf(name, "if%u")`, which takes trailing text: `dev if1junk` is ifindex 1 (lo, ec-083) when no device has that name. The bridge write-up's ng-022 note is the same line. + - **Extended in increment 22:** mirred's `dev if3junk` redirects to ifindex 3 the same way (W162 in + [iproute2-tc-action-write.md](iproute2-tc-action-write.md), tcactwrite/ec-119). ## W76–W95. u32 @@ -173,6 +183,9 @@ "mark" mask`. - **W85.** parse_ether_addr is `sscanf("%hhx:%hhx:%hhx:%hhx:%hhx:%hhx")`: anything after the sixth byte is ignored (`aa:bb:cc:dd:ee:ffzz`, ec-089), and each part is strtoul cut to a byte (`1ff` is ff, `-1` is ff, ec-090). + - **Extended in increment 22:** skbmod's dmac and smac are `sscanf %hhx` per byte as well: `…:01:junk` and + `0x02:1aa:-1:…` are accepted (W196 in [iproute2-tc-action-write.md](iproute2-tc-action-write.md), + tcactwrite/ec-202, ec-203). - **W86–W89.** parse_offset and parse_hashkey read ints with get_integer and store them in narrower fields: `plus` into the `__u16` off (`70000` is 4464, ec-091); `at` into the `short` offoff, after an even test on the int (`65538` is 2, ec-092); `shift` into the `__u8` offshift (`258` is 2 and accepted, ec-093; `300` is 44, which the @@ -245,11 +258,17 @@ length to 0 and turns it off again. - **W113.** parse_action numbers actions 1, 2, … with no TCA_ACT_MAX_PRIO (32) check; 33 actions are sent and the kernel refuses the whole filter, `Only 32 actions supported per filter` (K51, ng-035). + - **Extended in increment 22:** a delete has no bound either: 33 actions in `tc actions delete` are all sent, and the + kernel deletes 32 and silently keeps the 33rd (W179 and K8's extension, tcactwrite/ec-231). A standalone add of 33 + is refused as K51 is, `Only 32 actions supported per filter` (K71, ng-083). - **W114.** A word that is not a control word is the kind, and get_action_kind falls back to gact's util when no `m_.so` or `_action_util` exists, but TCA_ACT_KIND keeps the typed word. After `action drop cookie aa`, `index 5` is a second action of kind "index" with gact's PARMS {index 5} and the sticky cookie; the kernel can't load act_index (`Failed to load TC action module`, ng-036). `action foo` is `Bad action type foo` and gact's usage, rc 255 (ng-037). The `noact` stub is dead code: CONFIG_GACT is always set. + - **Extended in increment 22:** the kinds' own parsers hand words on as kinds too: mirred's `dev d1 blockid 5` reads + blockid as a kind (W161, ng-028), and ctinfo's unconsumed statemask `0x1junk` is `Bad action type 0x1junk` (W208, + ng-056), both in [iproute2-tc-action-write.md](iproute2-tc-action-write.md). - **W115.** parse_action_control checks a jump count only against TC_ACT_EXT_VAL_MASK: `jump 0` and `jump 512` are sent (ec-104, ec-105) and fail only at run time. A gact `random … goto chain 5` is built and sent; the workbench kernel has no CONFIG_GACT_PROB (ng-038, EOPNOTSUPP). @@ -260,6 +279,10 @@ `action drop act pass` is `Bad action type act` and gact's usage, rc 255 (ng-040). After each action the modifiers are taken in a fixed order, cookie, hw_stats, no_percpu, skip flags, and a modifier out of that order is a new action. + - **Extended in increment 22:** each kind takes its control word and then `index`, in that order, and a word out of + order is another action: mirred redirect takes no control (W158), `skbedit mark 1 index 5 pipe` is skbedit then a + gact pipe (W175), and `simple sdata x index 5 drop` is two actions (W190), all in + [iproute2-tc-action-write.md](iproute2-tc-action-write.md). - **W118.** gact takes control, then random, then index: `action drop index 5 random determ pass 10` makes `random` a new action (ng-041). After the control word, `h` is gact's help, rc 255 (ng-042), where parse_action would read `h` as `hw_stats`. @@ -271,6 +294,9 @@ - **W121.** gact's usage() and parse_action's invarg and NEXT_ARG call exit(-1) on the parse path, so in `tc -force -batch` one bad action ends the batch before its next line (ng-064); an ordinary parse failure returns 1 and `-force` goes on. W4's and the bridge write-up's B30 class. + - **Extended in increment 22:** police and four other invarg/duparg paths (W185, tcactwrite/ng-092), and skbmod's, + sample's and mpls' usage and missarg paths (W201, ng-093), exit(-1) the same way and end a `-force` batch; see + [iproute2-tc-action-write.md](iproute2-tc-action-write.md). ## W122. The rt_names caches diff --git a/internal/gotc/act_parse.go b/internal/gotc/act_parse.go index dd5e18f5f..159673ce3 100644 --- a/internal/gotc/act_parse.go +++ b/internal/gotc/act_parse.go @@ -11,12 +11,38 @@ import ( "golang.org/x/sys/unix" ) -// The filter side of tc's actions at iproute2 v7.2.0: m_action.c -// parse_action (each action's prio nest, kind, options, cookie, hw_stats -// and flags), tc_util.c action_a2n and parse_action_control, and m_gact.c -// parse_gact. Every other action kind is refused by name until the -// actions increment; an unknown name is get_action_kind's fallback to -// gact's parser, with the name kept as TCA_ACT_KIND (W114). +// tc's action parsing at iproute2 v7.2.0, for filters and `tc actions`: +// m_action.c parse_action (each action's prio nest, kind, options, cookie, +// hw_stats and flags), tc_util.c action_a2n and parse_action_control, and +// each kind's parse_aopt by name (actParsers: m_gact.c here, the 12 kinds +// of increment 22 in aw_*.go). pedit, tunnel_key, ife, ct, gate and bpf +// are refused by name until increment 23; an unknown name is +// get_action_kind's fallback to gact's parser, with the name kept as +// TCA_ACT_KIND (W114). + +// actParser is an action_util's parse_aopt(a, &argc, &argv, tca_id, n): +// args starts at the kind word (for gact, possibly a control word); it +// records its options nest, of type tcaID, in ops and returns the words +// after it. ok false is its -1, after which parse_action prints "bad +// action parsing"; a non-nil error is an exit, or a refusal. +type actParser func(r *runner, ops *fops, args []string, tcaID uint16) (rest []string, ok bool, err error) + +// actParsers are the parse_aopts gotc clones, by action_util id. +var actParsers = map[string]actParser{ + xtcpnl.TcActKindGact: (*runner).parseGact, + xtcpnl.TcActKindPolice: (*runner).parsePoliceAct, + xtcpnl.TcActKindMirred: (*runner).parseMirred, + xtcpnl.TcActKindSkbedit: (*runner).parseSkbedit, + xtcpnl.TcActKindVlan: (*runner).parseVlan, + xtcpnl.TcActKindCsum: (*runner).parseCsum, + xtcpnl.TcActKindNat: (*runner).parseNat, + xtcpnl.TcActKindConnmark: (*runner).parseConnmark, + xtcpnl.TcActKindCtinfo: (*runner).parseCtinfo, + xtcpnl.TcActKindSample: (*runner).parseSample, + xtcpnl.TcActKindSkbmod: (*runner).parseSkbmod, + xtcpnl.TcActKindMpls: (*runner).parseMpls, + xtcpnl.TcActKindSimple: (*runner).parseSimple, +} // tcCookieMax is TC_COOKIE_MAX_SIZE. const tcCookieMax = 16 @@ -41,9 +67,9 @@ func actionA2N(arg string) (int32, bool) { a string n int32 }{ - {"continue", tcActUnspec}, {wordDrop, tcActShot}, {"shot", tcActShot}, {"pass", tcActOK}, - {"ok", tcActOK}, {"reclassify", tcActReclassify}, {"pipe", tcActPipe}, - {"goto", tcActGotoChain}, {"jump", tcActJump}, {"trap", tcActTrap}, + {wordContinue, tcActUnspec}, {wordDrop, tcActShot}, {"shot", tcActShot}, {wordPass, tcActOK}, + {"ok", tcActOK}, {wordReclassify, tcActReclassify}, {wordPipe, tcActPipe}, + {wordGoto, tcActGotoChain}, {"jump", tcActJump}, {"trap", tcActTrap}, } { if matches(arg, c.a) { return c.n, true @@ -56,12 +82,40 @@ func actionA2N(arg string) (int32, bool) { // control word, with goto's "chain N" and jump's count, and the step past // it. ok false is its -1, after its message. func (r *runner) parseActionControl(args []string) (rest []string, result int32, ok bool, err error) { + return r.parseActionControlNum(args, false) +} + +// parseActionControlNum is parse_action_control with allow_num: with it, a +// whole decimal is a control too (police's conform-exceed). +func (r *runner) parseActionControlNum(args []string, allowNum bool) (rest []string, result int32, ok bool, err error) { + return r.parseActionControlMiss(args, allowNum, false) +} + +// parseActionControlDflt is parse_action_control_dflt(…, allow_num false, +// dflt): a word that is no control is silently dflt with args unmoved, as +// is a bad goto chain or jump count, after its message. +func (r *runner) parseActionControlDflt(args []string, dflt int32) (rest []string, result int32, err error) { + rest, result, ok, err := r.parseActionControlMiss(args, false, true) + if err != nil { + return nil, 0, err + } + if !ok { + return args, dflt, nil + } + return rest, result, nil +} + +// parseActionControlMiss is __parse_action_control: ignoreMiss leaves a +// word that is no control unremarked. +func (r *runner) parseActionControlMiss(args []string, allowNum, ignoreMiss bool) (rest []string, result int32, ok bool, err error) { if len(args) == 0 { return nil, 0, false, nil } - result, found := actionA2N(args[0]) + result, found := actionA2NNum(args[0], allowNum) if !found { - r.errf("Bad action type %s\n", args[0]) + if !ignoreMiss { + r.errf("Bad action type %s\n", args[0]) + } return nil, 0, false, nil } switch result { @@ -178,8 +232,16 @@ func (r *runner) parseOneAction(m *fmod, args []string, prio int, ck *actionCook if _, isCtl := actionA2N(args[0]); !isCtl { k = truncKind(args[0]) } - if k != xtcpnl.TcActKindGact && linkedActKinds[k] { - return nil, false, fmt.Errorf("%w: tc filter action kind %s", errNotImplemented, k) + parse, ok := actParsers[k] + if !ok { + if linkedActKinds[k] { + where := "filter" + if m.standalone { + where = "actions" + } + return nil, false, fmt.Errorf("%w: tc %s action kind %s", errNotImplemented, where, k) + } + parse = (*runner).parseGact // get_action_kind's fallback (W114) } if prio > math.MaxUint16 { return nil, false, fmt.Errorf("%w: action prio %d past a u16 attribute type", errNotImplemented, prio) @@ -187,7 +249,7 @@ func (r *runner) parseOneAction(m *fmod, args []string, prio int, ck *actionCook nest := m.ops.begin(maxMsg, uint16(prio)) m.ops.str(maxMsg, xtcpnl.TcaActKind, k) kindAt := args - args, ok, err = r.parseGact(m, args, xtcpnl.TcaActOptions|unix.NLA_F_NESTED) + args, ok, err = parse(r, &m.ops, args, xtcpnl.TcaActOptions|unix.NLA_F_NESTED) if err != nil { return nil, false, err } @@ -296,7 +358,7 @@ func (r *runner) gactUsage() error { // parseGact is m_gact.c parse_gact: args starts at the kind word (a // control word, "gact", or the unknown name gact stands in for). ok false // is its -1. -func (r *runner) parseGact(m *fmod, args []string, tcaID uint16) (rest []string, ok bool, err error) { +func (r *runner) parseGact(ops *fops, args []string, tcaID uint16) (rest []string, ok bool, err error) { var p xtcpnl.TcGact var pp xtcpnl.TcGactP rd := false @@ -346,12 +408,12 @@ func (r *runner) parseGact(m *fmod, args []string, tcaID uint16) (rest []string, return nil, false, r.gactUsage() } } - nest := m.ops.begin(maxMsg, tcaID) - m.ops.put(maxMsg, xtcpnl.TcaGactParms, p.Append(nil)) + nest := ops.begin(maxMsg, tcaID) + ops.put(maxMsg, xtcpnl.TcaGactParms, p.Append(nil)) if rd { - m.ops.put(maxMsg, xtcpnl.TcaGactProb, pp.Append(nil)) + ops.put(maxMsg, xtcpnl.TcaGactProb, pp.Append(nil)) } - m.ops.end(nest) + ops.end(nest) return args, true, nil } diff --git a/internal/gotc/action.go b/internal/gotc/action.go index 3f5eb5bf1..f2ab24890 100644 --- a/internal/gotc/action.go +++ b/internal/gotc/action.go @@ -314,21 +314,21 @@ func probN2A(p uint16) string { func actionN2A(a int32) string { switch a &^ tcActExtValMask { case tcActGotoChain: - return "goto" + return wordGoto case tcActJump: return "jump" } switch a { case tcActUnspec: - return "continue" + return wordContinue case tcActOK: - return "pass" + return wordPass case tcActShot: return wordDrop case tcActReclassify: - return "reclassify" + return wordReclassify case tcActPipe: - return "pipe" + return wordPipe case tcActStolen: return "stolen" case tcActTrap: diff --git a/internal/gotc/action_cmd.go b/internal/gotc/action_cmd.go index 279e0d3b4..21302d61b 100644 --- a/internal/gotc/action_cmd.go +++ b/internal/gotc/action_cmd.go @@ -9,7 +9,8 @@ import ( // tc/m_action.c do_action, tc_action_gd (get), tc_act_list_or_flush // (list), print_action and act_usage (iproute2 v7.2.0). The writes (add, -// change, replace, delete and flush) are refused. +// change, replace, delete and flush) are awrite.go's, behind gotc_write; +// without it they are refused (awrite_off.go). // actUsageText is act_usage's text. const actUsageText = "usage: tc actions *\n" + @@ -43,16 +44,33 @@ func actKindArg(s string) string { return s } -// doAction is do_action: each sub-command in turn. A get that fails to -// talk returns 1 with its words unconsumed, so the loop meets the word -// after "get" as a command (AC8); list returns whatever follows the kind -// unread (AC7). +// doAction is do_action: each sub-command in turn. A get or delete that +// fails to talk returns 1 with its words unconsumed, so the loop meets the +// word after "get" or "delete" as a command (AC8, W187); list and flush +// return whatever follows the kind unread (AC7). An add's words after its +// actions are the next command (W176). func (r *runner) doAction(args []string) error { for len(args) > 0 { w := args[0] switch { - case matches(w, "add"), matches(w, "change"), matches(w, "replace"), matches(w, "delete"): - return fmt.Errorf("%w: tc actions %s", errNotImplemented, w) + case matches(w, "add"): + rest, err := r.actionModify(unix.NLM_F_EXCL|unix.NLM_F_CREATE, args) + if err != nil { + return err + } + args = rest + case matches(w, "change"), matches(w, "replace"): + rest, err := r.actionModify(unix.NLM_F_CREATE|unix.NLM_F_REPLACE, args) + if err != nil { + return err + } + args = rest + case matches(w, "delete"): + rest, err := r.actionDelete(args) + if err != nil { + return err + } + args = rest case matches(w, "get"): rest, ret, err := r.actionGet(args[1:]) if err != nil { @@ -68,7 +86,7 @@ func (r *runner) doAction(args []string) error { } return r.actList(args[2:]) case matches(w, "flush"): - return fmt.Errorf("%w: tc actions %s", errNotImplemented, w) + return r.actionFlush(args) case matches(w, helpWord): return r.actUsage() default: @@ -84,11 +102,43 @@ func (r *runner) doAction(args []string) error { // (AC9). On success the words are consumed (rest is empty); on a failed // talk or print it returns 1 and args as given. func (r *runner) actionGet(args []string) (rest []string, ret int, err error) { + acts, ret, err := r.actGDRefs(args, "get") + if err != nil || ret < 0 { + return nil, ret, err + } + req, berr := xtcpnl.BuildTcActionGet(acts, r.nextSeq()) + m, ok, err := r.talkAnswer(req, berr) + if err != nil { + return nil, 0, err + } + if !ok { + r.errf("We have an error talking to the kernel\n") + return args, 1, nil + } + r.o.newJSONObj() + rc, err := r.printAction(m) + if err != nil { + return nil, 0, err + } + if rc < 0 { + r.errf("Dump terminated\n") + r.o.deleteJSONObj() + return args, 1, nil + } + r.o.deleteJSONObj() + return nil, 0, nil +} + +// actGDRefs is tc_action_gd's loop, the same for a get and a delete: it +// skips the word after the verb whatever it is (AC9), then reads `[action] +// KIND index N` until the words run out. ret -1 is its return -1, after its +// message. A request past MAX_MSG, which tc truncates and sends (AC38), is +// refused. +func (r *runner) actGDRefs(args []string, verb string) (acts []xtcpnl.TcActRef, ret int, err error) { g := args if len(g) > 0 { g = g[1:] } - var acts []xtcpnl.TcActRef for len(g) > 0 { switch g[0] { case wordAction: @@ -120,31 +170,11 @@ func (r *runner) actionGet(args []string) (rest []string, ret int, err error) { acts = append(acts, xtcpnl.TcActRef{Kind: k, Index: i}) } if n := xtcpnl.TcActGetLen(acts); n > xtcpnl.TcActMaxMsgCst { - return nil, 0, fmt.Errorf("%w: tc actions get of %d actions is %d bytes, past tc's MAX_MSG of %d: "+ + return nil, 0, fmt.Errorf("%w: tc actions %s of %d actions is %d bytes, past tc's MAX_MSG of %d: "+ "tc ignores addattr_l's failures and sends what fit (AC38)", - errNotImplemented, len(acts), n, xtcpnl.TcActMaxMsgCst) - } - req, berr := xtcpnl.BuildTcActionGet(acts, r.nextSeq()) - m, ok, err := r.talkAnswer(req, berr) - if err != nil { - return nil, 0, err + errNotImplemented, verb, len(acts), n, xtcpnl.TcActMaxMsgCst) } - if !ok { - r.errf("We have an error talking to the kernel\n") - return args, 1, nil - } - r.o.newJSONObj() - rc, err := r.printAction(m) - if err != nil { - return nil, 0, err - } - if rc < 0 { - r.errf("Dump terminated\n") - r.o.deleteJSONObj() - return args, 1, nil - } - r.o.deleteJSONObj() - return nil, 0, nil + return acts, 0, nil } // actList is tc_act_list_or_flush(RTM_GETACTION) on the words after the @@ -152,22 +182,9 @@ func (r *runner) actionGet(args []string) (rest []string, ret int, err error) { // returns 0 (AC6); only `since` is read after the kind (AC7), and it // sends TCA_ROOT_TIME_DELTA only when non-zero. func (r *runner) actList(args []string) error { - k := actKindArg(args[0]) - if !linkedActKinds[k] { - r.errf("bad action %s\n", k) - return nil - } - args = args[1:] - var since uint32 - if len(args) > 0 && args[0] == "since" { - if len(args) < 2 { - return r.incomplete() - } - v, ok := getU32(args[1], 0) - if !ok { - return r.invarg("dump time \"since\" is invalid", args[1]) - } - since = v + k, since, ok, err := r.actListArgs(args) + if err != nil || !ok { + return err } req, berr := xtcpnl.BuildTcActionDump(k, r.brief > 0, since, since != 0, r.nextSeq()) r.o.newJSONObj() @@ -193,6 +210,29 @@ func (r *runner) actList(args []string) error { return nil } +// actListArgs is tc_act_list_or_flush's words, the same for a list and a +// flush: the kind, then only `since` (AC7). ok false is "bad action" for a +// kind tc does not link, which returns 0 with nothing sent (AC6). +func (r *runner) actListArgs(args []string) (kind string, since uint32, ok bool, err error) { + k := actKindArg(args[0]) + if !linkedActKinds[k] { + r.errf("bad action %s\n", k) + return "", 0, false, nil + } + args = args[1:] + if len(args) > 0 && args[0] == "since" { + if len(args) < 2 { + return "", 0, false, r.incomplete() + } + v, ok := getU32(args[1], 0) + if !ok { + return "", 0, false, r.invarg("dump time \"since\" is invalid", args[1]) + } + since = v + } + return k, since, true, nil +} + // printAction is print_action: "total acts" from TCA_ROOT_COUNT, read // unchecked (here MIN-copied) and absent from a get's reply, so a get // prints 0 (AC2); it prints before the tab is checked (AC3), as a JSON diff --git a/internal/gotc/action_test.go b/internal/gotc/action_test.go index 45076406e..797dc55da 100644 --- a/internal/gotc/action_test.go +++ b/internal/gotc/action_test.go @@ -380,6 +380,9 @@ func TestGotcActionUnit(t *testing.T) { }, } for _, tc := range tests { + if writesBuilt && strings.Contains(tc.expected.stderr, notImpl+"tc actions ") { + continue // the gotc_write build sends these (awrite_test.go) + } t.Run(tc.description, func(t *testing.T) { src := &fakeSource{replies: tc.replies} var out, errb bytes.Buffer @@ -511,6 +514,9 @@ func TestDoActionArgs(t *testing.T) { want{req: dump("gact", false, 16)}}, } for _, tc := range tests { + if writesBuilt && strings.Contains(tc.expected.stderr, notImpl+"tc actions ") { + continue // the gotc_write build sends these (awrite_test.go) + } t.Run(tc.description, func(t *testing.T) { src := &fakeSource{replies: tc.replies} var out, errb bytes.Buffer diff --git a/internal/gotc/argmem.go b/internal/gotc/argmem.go new file mode 100644 index 000000000..7c0aa213d --- /dev/null +++ b/internal/gotc/argmem.go @@ -0,0 +1,119 @@ +package gotc + +import "strings" + +// argMem is the memory tc's argv words sit in, as far as gotc can know it, +// for a parser that reads past a word's NUL (m_simple.c's 32-byte copy, +// W189). On the command line the words are contiguous, each with its NUL, +// and what follows the last is the environment, which gotc does not know. +// In a batch they are getline's buffer as makeargs left it: the line with a +// NUL after each word, then whatever earlier, longer lines left there. +type argMem struct { + b []byte // the bytes gotc knows, from the start of the buffer + off []int // each word's offset in b + argv []string // the words, as the command got them +} + +// cmdlineMem is the command line's argv: the words and a NUL after each. +func cmdlineMem(argv []string) argMem { + m := argMem{argv: argv, off: make([]int, len(argv))} + for i, w := range argv { + m.off[i] = len(m.b) + m.b = append(m.b, w...) + m.b = append(m.b, 0) + } + return m +} + +// bytesAt is the n bytes from word words[0] on, words being a tail of the +// command's argv: what gotc knows of them, then zeros. known is how many +// of the n it knew. +func (m *argMem) bytesAt(words []string, n int) (out []byte, known int) { + out = make([]byte, n) + for i := range m.argv { + if &m.argv[i] == &words[0] { + known = copy(out, m.b[m.off[i]:]) + return out, known + } + } + return out, copy(out, words[0]+"\x00") +} + +// nul is a parser's write of a NUL at byte k of word words[0], words being +// a tail of the command's argv, which tc does not undo: ll_addr_a2n's +// colons, skbedit's mark slash, get_size64_and_cell's slash on a failure, +// flow_parse_keys' commas and fw's handle slash. In a batch the byte stays +// in getline's buffer, where a later, shorter line's sdata copy reads it +// (W189). A word that is not argv's, or a k past the bytes gotc knows, +// changes nothing. +func (m *argMem) nul(words []string, k int) { + if len(words) == 0 || k < 0 { + return + } + for i := range m.argv { + if &m.argv[i] == &words[0] { + if j := m.off[i] + k; k < len(words[0]) && j < len(m.b) { + m.b[j] = 0 + } + return + } + } +} + +// nulEach is nul at each of the first n bytes c in words[0]. +func (m *argMem) nulEach(words []string, c byte, n int) { + if len(words) == 0 { + return + } + w := words[0] + for k := 0; k < len(w) && n > 0; k++ { + if w[k] == c { + m.nul(words, k) + n-- + } + } +} + +// batchMem is getline's buffer across a batch's lines. +type batchMem struct { + b []byte +} + +// load is a getline into the buffer: the line and its NUL over what was +// there, the rest left as it was. +func (m *batchMem) load(line string) { + n := len(line) + 1 + if n > len(m.b) { + m.b = append(m.b, make([]byte, n-len(m.b))...) + } + copy(m.b, line) + m.b[len(line)] = 0 +} + +// cut is getcmdline's *cp = '\0' at i. +func (m *batchMem) cut(i int) { + if i < len(m.b) { + m.b[i] = 0 + } +} + +// joined is a continuation's realloc and strcat: the joined line, and +// nothing gotc knows after it. +func (m *batchMem) joined(line string) { + m.b = append([]byte(line), 0) +} + +// args is makeargs's NULs written into the buffer, and the argMem of the +// words at offs. +func (m *batchMem) args(argv []string, offs, nuls []int) argMem { + for _, i := range nuls { + m.cut(i) + } + return argMem{b: m.b, off: offs, argv: argv} +} + +// commentAt is getcmdline's strchr(line, '#'), in the string up to its +// first NUL. +func commentAt(line string) int { + return strings.IndexByte(cstr(line), '#') +} diff --git a/internal/gotc/argmem_test.go b/internal/gotc/argmem_test.go new file mode 100644 index 000000000..6a5671d9c --- /dev/null +++ b/internal/gotc/argmem_test.go @@ -0,0 +1,124 @@ +package gotc + +import ( + "bufio" + "bytes" + "strings" + "testing" +) + +// TestArgMem is the argv memory simple's 32-byte copy reads (W189): the +// command line's words, and getline's buffer across batch lines. +// +// go test ./internal/gotc/ -run TestArgMem +func TestArgMem(t *testing.T) { + tests := []struct { + description string + lines []string // batch lines; one entry with no newline is a command line + word int // the word of the last line read from + expected struct { + b string // the 12 bytes from it + known int + } + }{ + {"positive: a command line's words, each with its NUL", []string{"actions add action simple sdata hi index 7"}, 5, + argExp("hi\x00index\x007\x00", 11)}, + {"positive: a batch line, makeargs' NULs at each separator", []string{"a sdata hi index 2\n"}, 2, + argExp("hi\x00index\x002\x00\x00", 12)}, + {"negative: a word not in argv is itself and its NUL", nil, -1, argExp("zz\x00", 3)}, + {"boundary: the last word on a command line, then nothing known", []string{"sdata hello"}, 1, + argExp("hello\x00", 6)}, + {"boundary: a longer earlier line's leftover follows the line's NUL", + []string{"x sdata LLLLLLLLLLLL index 1\n", "x sdata hi\n"}, 2, argExp("hi\x00\x00LLLLLLLL", 12)}, + {"corner: a comment's # is a NUL; what follows it stays", + []string{"x sdata hi #note\n"}, 2, argExp("hi\x00\x00note\n\x00", 10)}, + {"corner: a continuation leaves nothing known past the joined line", + []string{"x sdata LLLLLLLLLLLLLLLLLLLLLL\n", "x sdata hi \\\n", "y\n"}, 2, argExp("hi\x00y\x00\x00", 6)}, + {"corner: several spaces: only the first after a word is a NUL", []string{"x sdata hi index\n"}, 2, + argExp("hi\x00 index\x00\x00", 11)}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + r := &runner{stderr: &bytes.Buffer{}} + var argv []string + switch { + case len(tc.lines) == 1 && !strings.HasSuffix(tc.lines[0], "\n"): + argv = strings.Fields(tc.lines[0]) + r.mem = cmdlineMem(argv) + case len(tc.lines) > 0: + br := bufio.NewReader(strings.NewReader(strings.Join(tc.lines, ""))) + lineno := 0 + for { + line, ok := r.getcmdline(br, &lineno) + if !ok { + break + } + var offs, nuls []int + var err error + if argv, offs, nuls, err = r.makeargs(line); err != nil { + t.Fatal(err) + } + r.mem = r.lineMem.args(argv, offs, nuls) + } + } + words := []string{"zz"} + if tc.word >= 0 { + words = argv[tc.word:] + } + out, known := r.mem.bytesAt(words, 12) + want := append([]byte(tc.expected.b), make([]byte, 12-len(tc.expected.b))...) + if !bytes.Equal(out, want) || known != tc.expected.known { + t.Errorf("got %q (%d known), want %q (%d)", out, known, want, tc.expected.known) + } + }) + } +} + +func argExp(b string, known int) struct { + b string + known int +} { + return struct { + b string + known int + }{b, known} +} + +// TestArgMemNul is a parser's NUL written into argv's memory: at the word's +// offset when the word is argv's, nothing otherwise. +func TestArgMemNul(t *testing.T) { + tests := []struct { + description string + word int // the argv word written into; -1 is a word not argv's + k int // the byte, or for nulEach the count + each byte // nulEach's byte; 0 is nul + expected string // the memory after + }{ + {"positive: a byte inside the word", 1, 1, 0, "ab\x00a\x00f\x00c:d:e\x00"}, + {"positive: nulEach cuts the first n colons", 2, 1, ':', "ab\x00a/f\x00c\x00d:e\x00"}, + {"negative: a word that is not argv's changes nothing", -1, 0, 0, "ab\x00a/f\x00c:d:e\x00"}, + {"negative: a negative byte changes nothing", 1, -1, 0, "ab\x00a/f\x00c:d:e\x00"}, + {"boundary: the word's last byte", 1, 2, 0, "ab\x00a/\x00\x00c:d:e\x00"}, + {"boundary: k at the word's length (its own NUL) changes nothing", 0, 2, 0, "ab\x00a/f\x00c:d:e\x00"}, + {"corner: nulEach with more than there are cuts them all", 2, 9, ':', "ab\x00a/f\x00c\x00d\x00e\x00"}, + {"corner: nulEach with none asked changes nothing", 2, 0, ':', "ab\x00a/f\x00c:d:e\x00"}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + argv := []string{"ab", "a/f", "c:d:e"} + m := cmdlineMem(argv) + words := []string{"zz"} + if tc.word >= 0 { + words = argv[tc.word:] + } + if tc.each != 0 { + m.nulEach(words, tc.each, tc.k) + } else { + m.nul(words, tc.k) + } + if string(m.b) != tc.expected { + t.Errorf("memory %q, want %q", m.b, tc.expected) + } + }) + } +} diff --git a/internal/gotc/aw_connmark.go b/internal/gotc/aw_connmark.go new file mode 100644 index 000000000..44d8c5af6 --- /dev/null +++ b/internal/gotc/aw_connmark.go @@ -0,0 +1,203 @@ +//go:build gotc_write + +package gotc + +import ( + "encoding/binary" + "math/bits" + + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// tc/m_connmark.c parse_connmark and tc/m_ctinfo.c parse_ctinfo at +// iproute2 v7.2.0. + +// connmarkExplain is m_connmark.c explain. +func (r *runner) connmarkExplain() { + r.errf("%s", "Usage: ... connmark [zone ZONE] [CONTROL] [index ]\n"+ + "where :\n"+ + "\tZONE is the conntrack zone\n"+ + "\tCONTROL := reclassify | pipe | drop | continue | ok |\n"+ + "\t goto chain \n") +} + +// ctinfoExplain is m_ctinfo.c explain. +func (r *runner) ctinfoExplain() { + r.errf("%s", "Usage: ... ctinfo [dscp mask [statemask]] [cpmark [mask]] [zone ZONE] [CONTROL] [index ]\n"+ + "where :\n"+ + "\tdscp MASK bitmask location of stored DSCP\n"+ + "\t STATEMASK bitmask to determine conditional restoring\n"+ + "\tcpmark MASK mask applied to mark on restoration\n"+ + "\tZONE is the conntrack zone\n"+ + "\tCONTROL := reclassify | pipe | drop | continue | ok |\n"+ + "\t goto chain \n") +} + +// kindWords is the connmark and ctinfo opening loop: every word the kind +// is a prefix of is eaten (W210), help is usage's exit(-1). ok is whether +// any was. +func (r *runner) kindWords(args []string, kind string, explain func()) (rest []string, ok bool, err error) { + for len(args) > 0 { + switch { + case matches(args[0], kind): + ok = true + args = args[1:] + case matches(args[0], helpWord): + explain() + return nil, false, exitCode(-1) + default: + return args, ok, nil + } + } + return args, ok, nil +} + +// actIndex is the `index N` most kinds read last: NEXT_ARG, get_u32 base +// 10, msg on a bad one (a -1, done). A word other than index is left. +func (r *runner) actIndex(args []string, idx *uint32, msg string) (rest []string, done bool, err error) { + if len(args) == 0 || !matches(args[0], "index") { + return args, false, nil + } + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + i, ok := getU32(args[0], 10) + if !ok { + r.errf("%s", msg) + return nil, true, nil + } + *idx = i + return args[1:], false, nil +} + +// parseConnmark is parse_connmark: zone, the control word, then index, in +// that order; tc_connmark's tail padding is zero (W214). +func (r *runner) parseConnmark(ops *fops, args []string, tcaID uint16) ([]string, bool, error) { + args, ok, err := r.kindWords(args, xtcpnl.TcActKindConnmark, r.connmarkExplain) + if err != nil { + return nil, false, err + } + if !ok { + r.connmarkExplain() + return nil, false, nil + } + var sel xtcpnl.TcConnmark + if len(args) > 0 && matches(args[0], "zone") { + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + z, good := getU16(args[0], 10) + if !good { + r.errf("connmark: Illegal \"zone\"\n") + return nil, false, nil + } + sel.Zone = z + args = args[1:] + } + if args, sel.Action, err = r.parseActionControlDflt(args, tcActPipe); err != nil { + return nil, false, err + } + args, done, err := r.actIndex(args, &sel.Index, "connmark: Illegal \"index\"\n") + if err != nil || done { + return nil, false, err + } + nest := ops.begin(maxMsg, tcaID) + ops.put(maxMsg, xtcpnl.TcaConnmarkParms, sel.Append(nil)) + ops.end(nest) + return args, true, nil +} + +// ctinfoArgs is parse_ctinfo's locals. +type ctinfoArgs struct { + cpmarkmask, dscpmask, dscpstatemask uint32 + zone uint16 + sel xtcpnl.TcGen +} + +// parseCtinfo is parse_ctinfo: dscp MASK [STATEMASK], cpmark [MASK], zone, +// the control word and index, each once and in that order. A statemask or +// cpmark mask that is no number is left for the next action (W208); a +// zero mask is not sent (W209). +func (r *runner) parseCtinfo(ops *fops, args []string, tcaID uint16) ([]string, bool, error) { + args, ok, err := r.kindWords(args, xtcpnl.TcActKindCtinfo, r.ctinfoExplain) + if err != nil { + return nil, false, err + } + if !ok { + r.ctinfoExplain() + return nil, false, nil + } + var a ctinfoArgs + if len(args) > 0 && matches(args[0], "dscp") { + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + m, good := getU32(args[0], 0) + if !good { + r.errf("ctinfo: Illegal dscp \"mask\"\n") + return nil, false, nil + } + a.dscpmask = m + args = optionalU32(args, &a.dscpstatemask) + } + if len(args) > 0 && matches(args[0], "cpmark") { + a.cpmarkmask = ^uint32(0) + args = optionalU32(args, &a.cpmarkmask) + } + if len(args) > 0 && matches(args[0], "zone") { + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + z, good := getU16(args[0], 10) + if !good { + r.errf("ctinfo: Illegal \"zone\"\n") + return nil, false, nil + } + a.zone = z + args = args[1:] + } + if args, a.sel.Action, err = r.parseActionControlDflt(args, tcActPipe); err != nil { + return nil, false, err + } + args, done, err := r.actIndex(args, &a.sel.Index, "ctinfo: Illegal \"index\"\n") + if err != nil || done { + return nil, false, err + } + if a.dscpmask&a.dscpstatemask != 0 { + r.errf("ctinfo: dscp mask & statemask must NOT overlap\n") + return nil, false, nil + } + if a.dscpmask != 0 && a.dscpmask>>bits.TrailingZeros32(a.dscpmask) != 0x3f { + r.errf("ctinfo: dscp mask must be 6 contiguous bits long\n") + return nil, false, nil + } + nest := ops.begin(maxMsg, tcaID) + ops.put(maxMsg, xtcpnl.TcaCtinfoAct, a.sel.Append(nil)) + ops.put(maxMsg, xtcpnl.TcaCtinfoZone, binary.LittleEndian.AppendUint16(nil, a.zone)) + if a.dscpmask != 0 { + ops.u32(maxMsg, xtcpnl.TcaCtinfoParmsDscpMask, a.dscpmask) + } + if a.dscpstatemask != 0 { + ops.u32(maxMsg, xtcpnl.TcaCtinfoParmsDscpStatemask, a.dscpstatemask) + } + if a.cpmarkmask != 0 { + ops.u32(maxMsg, xtcpnl.TcaCtinfoParmsCpmarkMask, a.cpmarkmask) + } + ops.end(nest) + return args, true, nil +} + +// optionalU32 is ctinfo's optional number after a keyword's word, args[0]: +// with a word after it (NEXT_ARG_OK) that word is read by get_u32 base 0 +// and stepped over only when it is a number; with none, args runs out. +func optionalU32(args []string, v *uint32) []string { + if len(args) <= 1 { + return args[1:] + } + args = args[1:] + if n, ok := getU32(args[0], 0); ok { + *v = n + return args[1:] + } + return args +} diff --git a/internal/gotc/aw_csum.go b/internal/gotc/aw_csum.go new file mode 100644 index 000000000..d6a5f8be8 --- /dev/null +++ b/internal/gotc/aw_csum.go @@ -0,0 +1,107 @@ +//go:build gotc_write + +package gotc + +import ( + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// tc/m_csum.c parse_csum and parse_csum_args at iproute2 v7.2.0. + +// csumExplain is m_csum.c explain. +func (r *runner) csumExplain() { + r.errf("%s", "Usage: ... csum \n"+ + "Where: UPDATE := []\n"+ + " TARGET := { ip4h | icmp | igmp | tcp | udp | udplite | sctp | }\n"+ + " SWEETS := { and | or | '+' }\n") +} + +// parseCsum is parse_csum: each word csum is a prefix of starts another +// list (so `c` does), and `index` straight after it jumps past the empty +// list check and the control word (W173). parse_csum_args never fails, so +// "Illegal csum construct (%s)" cannot be reached. +func (r *runner) parseCsum(ops *fops, args []string, tcaID uint16) ([]string, bool, error) { + var sel xtcpnl.TcActInt + ok := 0 + var err error + skip := false +loop: + for len(args) > 0 { + switch { + case matches(args[0], xtcpnl.TcActKindCsum): + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + if args[0] == wordIndex { + skip = true + break loop + } + args = csumArgs(args, &sel.V) + ok++ + case matches(args[0], helpWord): + r.csumExplain() + return nil, false, exitCode(-1) + default: + break loop + } + } + if !skip { + if ok == 0 { + r.csumExplain() + return nil, false, nil + } + if sel.V == 0 { + r.errf("Illegal csum construct, empty list\n") + return nil, false, nil + } + if args, sel.Action, err = r.parseActionControlDflt(args, tcActOK); err != nil { + return nil, false, err + } + skip = len(args) > 0 && matches(args[0], wordIndex) + } + if skip { + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + i, good := getU32(args[0], 10) + if !good { + r.errf("Illegal \"index\" (%s) \n", args[0]) + return nil, false, nil + } + sel.Index = i + args = args[1:] + } + nest := ops.begin(maxMsg, tcaID) + ops.put(maxMsg, xtcpnl.TcaCsumParms, sel.Append(nil)) + ops.end(nest) + return args, true, nil +} + +// csumArgs is parse_csum_args: update targets by prefix, in tc's order (so +// `i` is iph and `u` is udp, W170), with and, or and + skipped; it stops +// at the first other word. +func csumArgs(args []string, flags *uint32) []string { + for ; len(args) > 0; args = args[1:] { + w := args[0] + switch { + case matches(w, "iph"), matches(w, "ip4h"), matches(w, "ipv4h"): + *flags |= xtcpnl.TcaCsumUpdateFlagIPv4Hdr + case matches(w, "icmp"): + *flags |= xtcpnl.TcaCsumUpdateFlagICMP + case matches(w, "igmp"): + *flags |= xtcpnl.TcaCsumUpdateFlagIGMP + case matches(w, "tcp"): + *flags |= xtcpnl.TcaCsumUpdateFlagTCP + case matches(w, "udp"): + *flags |= xtcpnl.TcaCsumUpdateFlagUDP + case matches(w, "udplite"): + *flags |= xtcpnl.TcaCsumUpdateFlagUDPLite + case matches(w, "sctp"): + *flags |= xtcpnl.TcaCsumUpdateFlagSCTP + case matches(w, "and"), matches(w, "or"), matches(w, "+"): + default: + return args + } + } + return args +} diff --git a/internal/gotc/aw_mirred.go b/internal/gotc/aw_mirred.go new file mode 100644 index 000000000..0aef3b495 --- /dev/null +++ b/internal/gotc/aw_mirred.go @@ -0,0 +1,245 @@ +//go:build gotc_write + +package gotc + +import ( + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// tc/m_mirred.c parse_mirred and parse_direction at iproute2 v7.2.0. + +// mirredExplain is m_mirred.c explain. +func (r *runner) mirredExplain() { + r.errf("%s", "Usage: mirred [index INDEX] \n"+ + "where:\n"+ + "\tDIRECTION := \n"+ + "\tACTION := \n"+ + "\tINDEX is the specific policy instance id\n"+ + "\tTARGET := \n"+ + "\tDEVICE := dev DEVICENAME\n"+ + "\tDEVICENAME is the devicename\n"+ + "\tBLOCK := blockid BLOCKID\n"+ + "\tBLOCKID := 32-bit unsigned block ID\n") +} + +// parseMirred is parse_mirred: NEXT_ARG past "mirred", then +// parse_direction for a word egress, ingress or index is led by; help is +// usage's exit(-1). +func (r *runner) parseMirred(ops *fops, args []string, tcaID uint16) ([]string, bool, error) { + args, err := r.nextArg(args) + if err != nil { + return nil, false, err + } + w := args[0] + switch { + case matches(w, "egress"), matches(w, "ingress"), matches(w, "index"): + return r.mirredDirection(ops, args, tcaID) + case matches(w, helpWord): + r.mirredExplain() + return nil, false, exitCode(-1) + } + r.errf("mirred option not supported %s\n", w) + return nil, false, nil +} + +// mirredArgs is parse_direction's locals. +type mirredArgs struct { + p xtcpnl.TcMirred + ok, iok int + mirror, redir, ingress, egress bool + d string + blockid uint32 +} + +// mirredDirection is parse_direction. A word the loop does not know is +// stepped over by its closing NEXT_ARG (W159); only mirror takes a control +// word (W158); and the blockid and dev checks are dead, as each target +// ends the loop (W161). +func (r *runner) mirredDirection(ops *fops, args []string, tcaID uint16) ([]string, bool, error) { + a := mirredArgs{} + args, done, err := r.mirredLoop(&a, args) + if err != nil || done { + return nil, false, err + } + if a.ok == 0 && a.iok == 0 { + return nil, false, nil + } + if a.d != "" { + idx, err := r.nameToIndex(a.d) + if err != nil { + return nil, false, err + } + if idx == 0 { + r.errf("Cannot find device \"%s\"\n", a.d) // nodev's -1 + return nil, false, nil + } + a.p.Ifindex = idx + } + if a.p.Eaction == xtcpnl.TcaEgressMirrorCst || a.p.Eaction == xtcpnl.TcaIngressMirrorCst { + if args, a.p.Action, err = r.parseActionControlDflt(args, tcActPipe); err != nil { + return nil, false, err + } + } + if len(args) > 0 { + if a.iok > 0 && matches(args[0], "index") { + r.errf("mirred: Illegal double index\n") + return nil, false, nil + } + if matches(args[0], "index") { + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + i, ok := getU32(args[0], 10) + if !ok { + r.errf("mirred: Illegal \"index\"\n") + return nil, false, nil + } + a.p.Index = i + args = args[1:] + } + } + nest := ops.begin(maxMsg, tcaID) + ops.put(maxMsg, xtcpnl.TcaMirredParms, a.p.Append(nil)) + if a.blockid != 0 { + ops.u32(maxMsg, xtcpnl.TcaMirredBlockid, a.blockid) + } + ops.end(nest) + return args, true, nil +} + +// mirredLoop is parse_direction's while loop. done is a return -1 from +// inside it. +func (r *runner) mirredLoop(a *mirredArgs, args []string) (rest []string, done bool, err error) { + for len(args) > 0 { + w := args[0] + switch { + case matches(w, wordAction): + args, err = r.nextArg(args) + return args, false, err + case !a.egress && matches(w, "egress"): + a.egress = true + if a.ingress { + r.errf("Can't have both egress and ingress\n") + return nil, true, nil + } + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + a.ok++ + continue + case !a.ingress && matches(w, "ingress"): + a.ingress = true + if a.egress { + r.errf("Can't have both ingress and egress\n") + return nil, true, nil + } + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + a.ok++ + continue + } + rest, stop, done, err := r.mirredWord(a, args) + if err != nil || done || stop { + return rest, done, err + } + if args, err = r.nextArg(rest); err != nil { + return nil, false, err + } + } + return args, false, nil +} + +// mirredWord is the loop's else arm, for args[0]: stop is its break, with +// rest where the loop left argv; otherwise rest is where the loop's closing +// NEXT_ARG steps from (an index's value, or the word itself). +func (r *runner) mirredWord(a *mirredArgs, args []string) (rest []string, stop, done bool, err error) { + w := args[0] + switch { + case matches(w, "index"): + if args, err = r.nextArg(args); err != nil { + return nil, false, false, err + } + i, ok := getU32(args[0], 10) + if !ok { + r.errf("Illegal \"index\"\n") + return nil, false, true, nil + } + a.p.Index = i + a.iok++ + if a.ok == 0 { + return args[1:], true, false, nil + } + // args is at the index's value, which the closing NEXT_ARG steps over. + return args, false, false, nil + case a.ok == 0: + r.errf("was expecting egress or ingress (%s)\n", w) + return args, true, false, nil + case !a.mirror && matches(w, "mirror"): + a.mirror = true + if a.redir { + r.errf("Can't have both mirror and redir\n") + return nil, false, true, nil + } + a.p.Eaction = xtcpnl.TcaIngressMirrorCst + if a.egress { + a.p.Eaction = xtcpnl.TcaEgressMirrorCst + } + a.p.Action = tcActPipe + a.ok++ + case !a.redir && matches(w, "redirect"): + a.redir = true + if a.mirror { + r.errf("Can't have both mirror and redir\n") + return nil, false, true, nil + } + a.p.Eaction = xtcpnl.TcaIngressRedirCst + if a.egress { + a.p.Eaction = xtcpnl.TcaEgressRedirCst + } + a.p.Action = tcActStolen + a.ok++ + case a.redir || a.mirror: + rest, done, err := r.mirredTarget(a, args) + return rest, true, done, err + } + return args, false, false, nil +} + +// mirredTarget is the redirect and mirror arm's target: blockid by strcmp +// (non-zero, base 0; its message has no newline, W160), then dev by +// matches, cut to IFNAMSIZ-1 (W162); the loop then breaks, whatever the +// word was. +func (r *runner) mirredTarget(a *mirredArgs, args []string) (rest []string, done bool, err error) { + if args[0] == "blockid" { + if a.d != "" { + r.errf("blockid and device are mutually exclusive.\n") + return nil, true, nil + } + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + b, ok := getU32(args[0], 0) + if !ok || b == 0 { + r.errf("invalid block ID") + return nil, true, nil + } + a.blockid = b + args = args[1:] + } + if len(args) > 0 && matches(args[0], "dev") { + if a.blockid != 0 { + r.errf("blockid and device are mutually exclusive.\n") + return nil, true, nil + } + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + if a.d != "" { + return nil, false, r.duparg("dev", args[0]) + } + a.d = cutName(args[0], ifNameSize-1) + args = args[1:] + } + return args, false, nil +} diff --git a/internal/gotc/aw_mpls.go b/internal/gotc/aw_mpls.go new file mode 100644 index 000000000..e4ecd8604 --- /dev/null +++ b/internal/gotc/aw_mpls.go @@ -0,0 +1,227 @@ +//go:build gotc_write + +package gotc + +import ( + "encoding/binary" + "math/bits" + + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" + "golang.org/x/sys/unix" +) + +// tc/m_mpls.c parse_mpls at iproute2 v7.2.0. + +// tcaMplsActDecTTL is TCA_MPLS_ACT_DEC_TTL, which m_mpls.go does not name. +const tcaMplsActDecTTL = 4 + +// mplsLabelUnset is parse_mpls's label before any `label`. +const mplsLabelUnset = 0xffffffff + +// mplsExplain is m_mpls.c explain. +func (r *runner) mplsExplain() { + r.errf("%s", "Usage: mpls pop [ protocol MPLS_PROTO ] [CONTROL]\n"+ + " mpls push [ protocol MPLS_PROTO ] [ label MPLS_LABEL ] [ tc MPLS_TC ]\n"+ + " [ ttl MPLS_TTL ] [ bos MPLS_BOS ] [CONTROL]\n"+ + " mpls mac_push [ protocol MPLS_PROTO ] [ label MPLS_LABEL ] [ tc MPLS_TC ]\n"+ + " [ ttl MPLS_TTL ] [ bos MPLS_BOS ] [CONTROL]\n"+ + " mpls modify [ label MPLS_LABEL ] [ tc MPLS_TC ] [ ttl MPLS_TTL ]\n"+ + " [ bos MPLS_BOS ] [CONTROL]\n"+ + " for pop, MPLS_PROTO is next header of packet - e.g. ip or mpls_uc\n"+ + " for push and mac_push, MPLS_PROTO is one of mpls_uc or mpls_mc\n"+ + " with default: mpls_uc\n"+ + " CONTROL := reclassify | pipe | drop | continue | pass |\n"+ + " goto chain \n") +} + +// mplsArgs is parse_mpls's locals. +type mplsArgs struct { + parm xtcpnl.TcActInt + label uint32 + action uint32 + proto uint16 + bos, tc, ttl uint8 +} + +// canModifyMplsFields is can_modify_mpls_fields. +func canModifyMplsFields(action uint32) bool { + return action == tcaMplsActPush || action == tcaMplsActMacPush || action == tcaMplsActModify +} + +// canSetEthtype is can_set_ethtype. +func canSetEthtype(action uint32) bool { + return action == tcaMplsActPush || action == tcaMplsActMacPush || action == tcaMplsActPop +} + +// parseMpls is parse_mpls: `index` straight after mpls skips the action +// check, the control word and the label and protocol checks; with no +// action word it is incomplete_command (W205); `p` is pop, `m` modify and +// `t` tc (W206); only push needs a label (W203); a protocol of 0 is unset +// (W204). +func (r *runner) parseMpls(ops *fops, args []string, tcaID uint16) ([]string, bool, error) { + args, err := r.nextArg(args) + if err != nil { + return nil, false, err + } + a := mplsArgs{label: mplsLabelUnset, bos: 0xff, tc: 0xff} + skip := args[0] == wordIndex + if !skip { + var done bool + if args, done, err = r.mplsLoop(&a, args); err != nil || done { + return nil, false, err + } + if a.action == 0 { + return nil, false, r.incomplete() + } + if args, a.parm.Action, err = r.parseActionControlDflt(args, tcActPipe); err != nil { + return nil, false, err + } + skip = len(args) > 0 && matches(args[0], wordIndex) + } + if skip { + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + i, good := getU32(args[0], 10) + if !good { + return nil, false, r.invarg("illegal index", args[0]) + } + a.parm.Index = i + args = args[1:] + } + if a.action == tcaMplsActPush && a.label == mplsLabelUnset { + return nil, false, r.missarg("label") + } + if (a.action == tcaMplsActPush || a.action == tcaMplsActMacPush) && a.proto != 0 && + a.proto != bits.ReverseBytes16(unix.ETH_P_MPLS_UC) && a.proto != bits.ReverseBytes16(unix.ETH_P_MPLS_MC) { + mac := "" + if a.action == tcaMplsActMacPush { + mac = "mac_" + } + r.errf("invalid %spush protocol \"0x%04x\" - use mpls_(uc|mc)\n", mac, bits.ReverseBytes16(a.proto)) + return nil, false, nil + } + if a.action == tcaMplsActPop && a.proto == 0 { + return nil, false, r.missarg("protocol") + } + a.parm.V = a.action + nest := ops.begin(maxMsg, tcaID) + ops.put(maxMsg, xtcpnl.TcaMplsParms, a.parm.Append(nil)) + if a.label != mplsLabelUnset { + ops.u32(maxMsg, xtcpnl.TcaMplsLabel, a.label) + } + if a.proto != 0 { + ops.put(maxMsg, xtcpnl.TcaMplsProto, binary.LittleEndian.AppendUint16(nil, a.proto)) + } + if a.tc != 0xff { + ops.put(maxMsg, xtcpnl.TcaMplsTC, []byte{a.tc}) + } + if a.ttl != 0 { + ops.put(maxMsg, xtcpnl.TcaMplsTTL, []byte{a.ttl}) + } + if a.bos != 0xff { + ops.put(maxMsg, xtcpnl.TcaMplsBos, []byte{a.bos}) + } + ops.end(nest) + return args, true, nil +} + +// mplsActionA2N is the action words, in tc's order. +func mplsActionA2N(w string) (uint32, bool) { + for _, c := range [...]struct { + n string + v uint32 + }{ + {wordPop, tcaMplsActPop}, {wordPush, tcaMplsActPush}, {wordModify, tcaMplsActModify}, + {"mac_push", tcaMplsActMacPush}, {"dec_ttl", tcaMplsActDecTTL}, + } { + if matches(w, c.n) { + return c.v, true + } + } + return 0, false +} + +// mplsLoop is parse_mpls's keyword loop: done is a second action word's +// return -1. +func (r *runner) mplsLoop(a *mplsArgs, args []string) (rest []string, done bool, err error) { + for len(args) > 0 { + w := args[0] + if act, ok := mplsActionA2N(w); ok { + if a.action != 0 { + r.errf("Error: got \"%s\" but action already set to \"%s\"\n", w, mplsActionNames[a.action]) + r.mplsExplain() + return nil, true, nil + } + a.action = act + args = args[1:] + continue + } + switch { + case matches(w, "label"), matches(w, "tc"), matches(w, "ttl"), matches(w, "bos"): + if args, err = r.mplsField(a, args); err != nil { + return nil, false, err + } + case matches(w, "protocol"): + if !canSetEthtype(a.action) { + return nil, false, r.invarg("only valid for push, mac_push and pop", w) + } + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + p, ok := llProtoA2N(args[0]) + if !ok { + return nil, false, r.invarg("protocol is invalid", args[0]) + } + a.proto = p + case matches(w, helpWord): + r.mplsExplain() + return nil, false, exitCode(-1) + default: + return args, false, nil + } + args = args[1:] + } + return args, false, nil +} + +// mplsField is the label, tc, ttl and bos arms, each invarg's exit unless +// the action is push, mac_push or modify; it returns args at the value. +func (r *runner) mplsField(a *mplsArgs, args []string) ([]string, error) { + w := args[0] + if !canModifyMplsFields(a.action) { + return nil, r.invarg("only valid for push, mac_push and modify", w) + } + args, err := r.nextArg(args) + if err != nil { + return nil, err + } + v := args[0] + switch { + case matches(w, "label"): + l, ok := getU32(v, 0) + if !ok || l > 0xfffff { + return nil, r.invarg("label must be <=0xFFFFF", v) + } + a.label = l + case matches(w, "tc"): + t, ok := getU8(v, 0) + if !ok || t&^0x7 != 0 { + return nil, r.invarg("tc field is 3 bits max", v) + } + a.tc = t + case matches(w, "ttl"): + t, ok := getU8(v, 0) + if !ok || t == 0 { + return nil, r.invarg("ttl must be >0 and <=255", v) + } + a.ttl = t + default: + b, ok := getU8(v, 0) + if !ok || b&^0x1 != 0 { + return nil, r.invarg("bos must be 0 or 1", v) + } + a.bos = b + } + return args, nil +} diff --git a/internal/gotc/aw_nat.go b/internal/gotc/aw_nat.go new file mode 100644 index 000000000..0a3e84e01 --- /dev/null +++ b/internal/gotc/aw_nat.go @@ -0,0 +1,120 @@ +//go:build gotc_write + +package gotc + +import ( + "encoding/binary" + + "github.com/randomizedcoder/xtcp2/pkg/cint" + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" + "golang.org/x/sys/unix" +) + +// tc/m_nat.c parse_nat and parse_nat_args at iproute2 v7.2.0. + +// natExplain is m_nat.c explain. +func (r *runner) natExplain() { + r.errf("%s", "Usage: ... nat NAT\n"+ + "NAT := DIRECTION OLD NEW\n"+ + "DIRECTION := { ingress | egress }\n"+ + "OLD := PREFIX\n"+ + "NEW := ADDRESS\n") +} + +// parseNat is parse_nat: each word nat is a prefix of starts another +// DIRECTION OLD NEW, whose flags are ORed into the first's (W193); a bad +// one is reported by its direction word, as parse_nat_args writes argv +// back only on success (W192); `index` straight after nat skips the +// control word. +func (r *runner) parseNat(ops *fops, args []string, tcaID uint16) ([]string, bool, error) { + var sel xtcpnl.TcNat + ok := 0 + var err error + skip := false +loop: + for len(args) > 0 { + switch { + case matches(args[0], xtcpnl.TcActKindNat): + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + if args[0] == wordIndex { + skip = true + break loop + } + rest, good, err := r.natArgs(args, &sel) + if err != nil { + return nil, false, err + } + if !good { + r.errf("Illegal nat construct (%s)\n", args[0]) + r.natExplain() + return nil, false, nil + } + args = rest + ok++ + case matches(args[0], helpWord): + r.natExplain() + return nil, false, exitCode(-1) + default: + break loop + } + } + if !skip { + if ok == 0 { + r.natExplain() + return nil, false, nil + } + if args, sel.Action, err = r.parseActionControlDflt(args, tcActOK); err != nil { + return nil, false, err + } + skip = len(args) > 0 && matches(args[0], wordIndex) + } + if skip { + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + i, good := getU32(args[0], 10) + if !good { + r.errf("Nat: Illegal \"index\"\n") + return nil, false, nil + } + sel.Index = i + args = args[1:] + } + nest := ops.begin(maxMsg, tcaID) + ops.put(maxMsg, xtcpnl.TcaNatParms, sel.Append(nil)) + ops.end(nest) + return args, true, nil +} + +// natArgs is parse_nat_args: egress or ingress by prefix, OLD by +// get_prefix_1 (its mask ~0 << (32 - bitlen) in 64 bits, so /0 is 0), and +// NEW by get_prefix_1 too, its length dropped (W194). Both are legacy +// IPv4 (W195). +func (r *runner) natArgs(args []string, sel *xtcpnl.TcNat) (rest []string, ok bool, err error) { + switch { + case matches(args[0], "egress"): + sel.Flags |= xtcpnl.TcaNatFlagEgress + case !matches(args[0], "ingress"): + return nil, false, nil + } + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + old, good := getPrefix1(args[0], unix.AF_INET) + if !good { + return nil, false, nil + } + copy(sel.OldAddr[:], old.data[:4]) + binary.BigEndian.PutUint32(sel.Mask[:], cint.Low32(^uint64(0)<<(32-old.bitlen))) + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + nw, good := getPrefix1(args[0], unix.AF_INET) + if !good { + return nil, false, nil + } + copy(sel.NewAddr[:], nw.data[:4]) + return args[1:], true, nil +} diff --git a/internal/gotc/aw_police.go b/internal/gotc/aw_police.go new file mode 100644 index 000000000..09afc7f8a --- /dev/null +++ b/internal/gotc/aw_police.go @@ -0,0 +1,490 @@ +//go:build gotc_write + +package gotc + +import ( + "encoding/binary" + "math" + "strings" + + "github.com/randomizedcoder/xtcp2/pkg/cint" + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// tc/m_police.c act_parse_police and parse_police at iproute2 v7.2.0, and +// tc_util.c's parse_action_control_slash, which only police calls. As an +// action (`action police ...`) the kind word is skipped first; in a filter +// (`police ...`) the filter's own NEXT_ARG has done it, and the nest is the +// filter's TCA_*_POLICE. + +// tcPoliceReclassify is TC_POLICE_RECLASSIFY (TC_ACT_RECLASSIFY), tc_police's +// action before any control word. +const tcPoliceReclassify = tcActReclassify + +// policeUsage is m_police.c usage: exit(-1). +func (r *runner) policeUsage() error { + r.errf("%s", "Usage: ... police [ rate BPS burst BYTES[/BYTES] ] \n"+ + "\t\t[ pkts_rate RATE pkts_burst PACKETS ] [ mtu BYTES[/BYTES] ]\n"+ + "\t\t[ peakrate BPS ] [ avrate BPS ] [ overhead BYTES ]\n"+ + "\t\t[ linklayer TYPE ] [ CONTROL ]\n"+ + "Where: CONTROL := conform-exceed [/NOTEXCEEDACT]\n"+ + "\t\t Define how to handle packets which exceed ()\n"+ + "\t\t or conform () the configured bandwidth limit.\n"+ + " EXCEEDACT/NOTEXCEEDACT := { pipe | ok | reclassify | drop | continue |\n"+ + "\t\t\t\t goto chain }\n") + return exitCode(-1) +} + +// parsePoliceAct is police_action_util's parse_aopt: NEXT_ARG past the +// kind word, then act_parse_police. +func (r *runner) parsePoliceAct(ops *fops, args []string, tcaID uint16) ([]string, bool, error) { + args, err := r.nextArg(args) + if err != nil { + return nil, false, err + } + return r.actParsePolice(ops, args, tcaID) +} + +// policeArm is a filter's police keyword: NEXT_ARG, then parse_police +// into the filter's TCA_*_POLICE; its -1 is "Illegal \"police\"" and the +// filter's -1. rest is where the filter's loop goes on (`continue`, with no +// step past it). +func (r *runner) policeArm(m *fmod, args []string, tcaID uint16) ([]string, error) { + args, err := r.nextArg(args) + if err != nil { + return nil, err + } + rest, ok, err := r.actParsePolice(&m.ops, args, tcaID) + if err != nil { + return nil, err + } + if !ok { + r.errf("Illegal \"police\"\n") + return nil, errKindParse + } + return rest, nil +} + +// policeArgs is what act_parse_police's loop gathers. +type policeArgs struct { + p xtcpnl.TcPolice + avrate uint32 + presult int32 + mtu, mpu uint32 + overhead uint16 + linklayer uint32 + rcell, pcell int + rate64, prate64, buf64 uint64 + pps64, ppsburst64 uint64 + ok int +} + +// actParsePolice is act_parse_police from its loop on: args starts at the +// first word after the kind (or after a filter's police). ok false is its +// -1, which is silent for `rate` with `avrate` (W188). +func (r *runner) actParsePolice(ops *fops, args []string, tcaID uint16) ([]string, bool, error) { + if len(args) == 0 { + return nil, false, nil + } + a := policeArgs{p: xtcpnl.TcPolice{Action: tcPoliceReclassify}, linklayer: linklayerEthernet, rcell: -1, pcell: -1} + args, done, err := r.policeLoop(&a, args) + if err != nil || done { + return nil, false, err + } + if !r.policeChecks(&a) { + return nil, false, nil + } + var rtab, ptab [256]uint32 + if a.rate64 != 0 { + rs := rateSpec{rate: sat32(a.rate64), mpu: uint16(a.mpu & math.MaxUint16), overhead: a.overhead} + r.core.calcRtable(&rs, &rtab, a.rcell, a.mtu, a.linklayer, a.rate64) + a.p.Rate = rs.spec() + a.p.Burst = r.core.calcXmittime(a.rate64, a.buf64) + if a.p.Burst == math.MaxUint32 { + r.errf("POLICE: burst out of range\n") + return nil, false, nil + } + } + a.p.Mtu = a.mtu + if a.prate64 != 0 { + ps := rateSpec{rate: sat32(a.prate64), mpu: uint16(a.mpu & math.MaxUint16), overhead: a.overhead} + r.core.calcRtable(&ps, &ptab, a.pcell, a.mtu, a.linklayer, a.prate64) + a.p.PeakRate = ps.spec() + } + nest := ops.begin(maxMsg, tcaID) + ops.put(maxMsg, xtcpnl.TcaPoliceTbf, a.p.Append(nil)) + if a.rate64 != 0 { + ops.put(maxMsg, xtcpnl.TcaPoliceRate, tableBytes(&rtab)) + if a.rate64 > math.MaxUint32 { + ops.put(maxMsg, xtcpnl.TcaPoliceRate64, binary.LittleEndian.AppendUint64(nil, a.rate64)) + } + } + if a.prate64 != 0 { + ops.put(maxMsg, xtcpnl.TcaPolicePeakrate, tableBytes(&ptab)) + if a.prate64 > math.MaxUint32 { + ops.put(maxMsg, xtcpnl.TcaPolicePeakrate64, binary.LittleEndian.AppendUint64(nil, a.prate64)) + } + } + if a.avrate != 0 { + ops.u32(maxMsg, xtcpnl.TcaPoliceAvrate, a.avrate) + } + if a.presult != 0 { + ops.u32(maxMsg, xtcpnl.TcaPoliceResult, cint.Bits(a.presult)) + } + if a.pps64 != 0 { + ops.put(maxMsg, xtcpnl.TcaPolicePktrate64, binary.LittleEndian.AppendUint64(nil, a.pps64)) + // tc_calc_xmittime's unsigned, into the __u64 (W167: the packet + // count is not clamped, its time is). + burst := r.core.calcXmittime(a.pps64, a.ppsburst64) + ops.put(maxMsg, xtcpnl.TcaPolicePktburst64, binary.LittleEndian.AppendUint64(nil, uint64(burst))) + } + ops.end(nest) + return args, true, nil +} + +// policeLoop is act_parse_police's while loop. done is a -1 from a control +// word (parse_action_control's, after its message). +func (r *runner) policeLoop(a *policeArgs, args []string) (rest []string, done bool, err error) { + for len(args) > 0 { + w := args[0] + switch policeWordClass(w) { + case polValue: + v, err := r.nextArg(args) + if err != nil { + return nil, false, err + } + if err := r.policeValue(a, w, v); err != nil { + return nil, false, err + } + args = v[1:] // NEXT_ARG_FWD + a.ok++ + case polControl: + // jump and trap are not among them: they end police, and the + // next action is a gact (W157). + rest, res, ok, err := r.parseActionControlNum(args, false) + if err != nil { + return nil, false, err + } + if !ok { + return nil, true, nil + } + a.p.Action = res + args = rest + a.ok++ + case polConform: + v, err := r.nextArg(args) + if err != nil { + return nil, false, err + } + rest, ok, err := r.parseActionControlSlash(v, &a.p.Action, &a.presult) + if err != nil { + return nil, false, err + } + if !ok { + return nil, true, nil + } + args = rest + a.ok++ + case polHelp: + return nil, false, r.policeUsage() + default: + if a.ok == 0 { + return nil, true, nil + } + return args, false, nil + } + } + if a.ok == 0 { + return nil, true, nil + } + return args, false, nil +} + +// police's keywords that no other file names. +const ( + wordAvrate = "avrate" + wordPktsRate = "pkts_rate" + wordPktsBurst = "pkts_burst" +) + +// The classes of a word in act_parse_police's loop. +const ( + polOther = iota + polValue + polControl + polConform + polHelp +) + +// policeWordClass is act_parse_police's arms in their order, which the +// prefixes need (W170: `p` is peakrate, before pass and pipe; `o` is ok, +// before overhead). +func policeWordClass(w string) int { + switch { + case matches(w, wordIndex), matches(w, wordBurst), w == wordBuffer, w == wordMaxburst, + w == wordMtu, w == wordMinburst, w == wordMpu, w == wordRate, w == wordAvrate, matches(w, wordPeakrate): + return polValue + case policeControlWord(w): + return polControl + case w == "conform-exceed": + return polConform + case matches(w, wordOverhead), matches(w, wordLinklayer), matches(w, wordPktsRate), matches(w, wordPktsBurst): + return polValue + case w == helpWord: + return polHelp + } + return polOther +} + +// policeValue is a value keyword's arm after its NEXT_ARG: duparg, then +// the parse's invarg. The arms keep act_parse_police's order. +func (r *runner) policeValue(a *policeArgs, w string, vs []string) error { + v := vs[0] + switch { + case matches(w, wordIndex): + i, ok := getU32(v, 10) + if !ok { + return r.invarg(wordIndex, v) + } + a.p.Index = i + case matches(w, wordBurst), w == wordBuffer, w == wordMaxburst: + if a.buf64 != 0 { + return r.duparg("buffer/burst", v) + } + b, ok := getSize64AndCell(v, &a.rcell) + if !ok { + return r.invarg(wordBuffer, r.sizeCellCut(vs)) + } + a.buf64 = b + case w == wordMtu, w == wordMinburst: + if a.mtu != 0 { + return r.duparg("mtu/minburst", v) + } + m, ok := getSizeAndCell(v, &a.pcell) + if !ok { + return r.invarg(wordMtu, r.sizeCellCut(vs)) + } + a.mtu = m + case w == wordMpu: + if a.mpu != 0 { + return r.duparg(wordMpu, v) + } + m, ok := getSize(v) + if !ok { + return r.invarg(wordMpu, v) + } + a.mpu = m + case w == wordRate, w == wordAvrate, matches(w, wordPeakrate): + return r.policeRateValue(a, w, v) + case matches(w, wordOverhead): + o, ok := getU16(v, 10) + if !ok { + return r.invarg(wordOverhead, v) + } + a.overhead = o + case matches(w, wordLinklayer): + l, ok := getLinklayer(v) + if !ok { + return r.invarg(wordLinklayer, v) + } + a.linklayer = l + default: // pkts_rate, pkts_burst + return r.policeRateValue(a, w, v) + } + return nil +} + +// policeRateValue is the rate, avrate, peakrate, pkts_rate and pkts_burst +// arms. A rate that came out 0 is no rate to duparg (W166). +func (r *runner) policeRateValue(a *policeArgs, w, v string) error { + switch { + case w == wordRate, matches(w, wordPeakrate): + dst, name := &a.rate64, wordRate + if w != wordRate { + dst, name = &a.prate64, wordPeakrate + } + if *dst != 0 { + return r.duparg(name, v) + } + rt, ok := getRate64(v) + if !ok { + return r.invarg(name, v) + } + *dst = rt + case w == wordAvrate: + if a.avrate != 0 { + return r.duparg(wordAvrate, v) + } + rt, ok := getRate(v) + if !ok { + return r.invarg(wordAvrate, v) + } + a.avrate = rt + default: // pkts_rate, pkts_burst + dst, name := &a.pps64, wordPktsRate + if !matches(w, wordPktsRate) { + dst, name = &a.ppsburst64, wordPktsBurst + } + if *dst != 0 { + return r.duparg(name, v) + } + n, ok := getU64(v, 10) + if !ok { + return r.invarg(name, v) + } + *dst = n + } + return nil +} + +// policeControlWord is the control-word arm's matches() list: no jump, no +// trap. +func policeControlWord(w string) bool { + for _, c := range [...]string{wordReclassify, wordDrop, "shot", wordContinue, wordPass, "ok", wordPipe, wordGoto} { + if matches(w, c) { + return true + } + } + return false +} + +// policeChecks is act_parse_police's checks after the loop, each a -1; +// `rate` with `avrate` is one with no message (W188). +func (r *runner) policeChecks(a *policeArgs) bool { + switch { + case a.rate64 != 0 && a.avrate != 0: + return false + case a.rate64 == 0 && a.avrate == 0 && a.p.Index == 0 && a.mtu == 0 && a.pps64 == 0: + r.errf("'rate' or 'avrate' or 'mtu' or 'pkts_rate' MUST be specified.\n") + return false + case a.rate64 != 0 && a.buf64 == 0 && a.avrate == 0: + r.errf("'burst' requires 'rate'.\n") // inverted (W156) + return false + case a.pps64 != 0 && a.ppsburst64 == 0: + r.errf("'pkts_burst' requires 'pkts_rate'.\n") + return false + case a.pps64 != 0 && a.rate64 != 0: + r.errf("'rate' and 'pkts_rate' are not allowed in same action.\n") + return false + case a.prate64 != 0 && a.rate64 == 0: + r.errf("'peakrate' requires 'rate'.\n") + return false + case a.prate64 != 0 && a.mtu == 0: + r.errf("'mtu' is required, if 'peakrate' is requested.\n") + return false + } + return true +} + +// tableBytes is a rate table as addattr_l(…, rtab, 1024) sends it. +func tableBytes(tab *[256]uint32) []byte { + b := make([]byte, 0, 1024) + for _, v := range tab { + b = binary.LittleEndian.AppendUint32(b, v) + } + return b +} + +// parseActionControlSlash is parse_action_control_slash(…, allow_num +// true): EXCEED[/NOTEXCEED] in one word, each through action_a2n, whose +// goto takes no chain here (W169), a miss being -1 with no message; with +// no '/', the spaced form. ok false is its -1. +func (r *runner) parseActionControlSlash(args []string, res1, res2 *int32) ([]string, bool, error) { + w := args[0] + e, n, slash := strings.Cut(w, "/") + if !slash { + return r.parseActionControlSlashSpaces(args, res1, res2) + } + v1, ok := actionA2NNum(e, true) + if !ok { + return nil, false, nil + } + v2, ok := actionA2NNum(n, true) + if !ok { + return nil, false, nil + } + *res1, *res2 = v1, v2 + return args[1:], true, nil +} + +// parseActionControlSlashSpaces is parse_action_control_slash_spaces: a +// control, then optionally "/" and a second; anything else after the +// first ends it, the second unset (W168). +func (r *runner) parseActionControlSlashSpaces(args []string, res1, res2 *int32) ([]string, bool, error) { + r1, r2 := int32(-1), int32(-1) + got := 0 + for len(args) > 0 && got < 2 { + dst := &r1 + if got == 1 { + if args[0] != "/" { + break + } + dst = &r2 + v, err := r.nextArg(args) + if err != nil { + return nil, false, err + } + args = v + } + rest, res, ok, err := r.parseActionControlNum(args, true) + if err != nil || !ok { + return nil, false, err + } + *dst, args = res, rest + got++ + } + *res1 = r1 + if got == 2 { + *res2 = r2 + } + return args, true, nil +} + +// actionA2NNum is action_a2n: a control word by prefix, or with allowNum a +// whole "%d" (sscanf(arg, "%d%c") == 1). +func actionA2NNum(arg string, allowNum bool) (int32, bool) { + if v, ok := actionA2N(arg); ok { + return v, true + } + if !allowNum { + return 0, false + } + return scanfIntOnly(arg) +} + +// scanfIntOnly is sscanf(s, "%d%c", &n, &dummy) == 1: white space, a sign +// and decimal digits, and nothing after them. glibc reads the digits with +// strtol and stores the long's low 32 bits. +func scanfIntOnly(s string) (int32, bool) { + t := skipSpace(s) + neg := false + if t != "" && (t[0] == '+' || t[0] == '-') { + neg, t = t[0] == '-', t[1:] + } + i := 0 + var mag uint64 + over := false + for i < len(t) && t[i] >= '0' && t[i] <= '9' { + if mag > (math.MaxUint64-9)/10 { + over = true + } else { + mag = mag*10 + uint64(t[i]-'0') + } + i++ + } + if i == 0 || i != len(t) { + return 0, false + } + var l int64 + switch { + case !neg && (over || mag > math.MaxInt64): + l = math.MaxInt64 + case neg && (over || mag > 1<<63): + l = math.MinInt64 + case neg: + l, _ = cint.NegInt64(mag) + default: + l = cint.LongLong(mag) + } + return cint.Int(cint.Low32(cint.U64Bits(l))), true +} diff --git a/internal/gotc/aw_sample.go b/internal/gotc/aw_sample.go new file mode 100644 index 000000000..a6ae108da --- /dev/null +++ b/internal/gotc/aw_sample.go @@ -0,0 +1,119 @@ +//go:build gotc_write + +package gotc + +import ( + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// tc/m_sample.c parse_sample at iproute2 v7.2.0. + +// sampleExplain is m_sample.c explain. +func (r *runner) sampleExplain() { + r.errf("%s", "Usage: sample SAMPLE_CONF\n"+ + "where:\n"+ + "\tSAMPLE_CONF := SAMPLE_PARAMS | SAMPLE_INDEX\n"+ + "\tSAMPLE_PARAMS := rate RATE group GROUP [trunc SIZE] [SAMPLE_INDEX]\n"+ + "\tSAMPLE_INDEX := index INDEX\n"+ + "\tRATE := The ratio of packets observed at the data source to the samples generated.\n"+ + "\tGROUP := the psample sampling group\n"+ + "\tSIZE := the truncation size\n"+ + "\tINDEX := integer index of the sample action\n") +} + +// sampleUsage is m_sample.c usage: exit(-1), which ends a -force batch +// (W201). +func (r *runner) sampleUsage() error { + r.sampleExplain() + return exitCode(-1) +} + +// missarg is lib/utils.c missarg: exit(-1). +func (r *runner) missarg(key string) error { + r.errf("Error: argument \"%s\" is required\n", key) + return exitCode(-1) +} + +// sampleArgs is parse_sample's locals. +type sampleArgs struct { + p xtcpnl.TcGen + trunc, group, rate uint32 + truncSet, groupSet, rateSet bool +} + +// parseSample is parse_sample: the bare kind is missarg("sample count") +// (W211); an index skips the rate and group checks (W212). +func (r *runner) parseSample(ops *fops, args []string, tcaID uint16) ([]string, bool, error) { + if len(args) <= 1 { + return nil, false, r.missarg("sample count") + } + args = args[1:] + var a sampleArgs + args, err := r.sampleLoop(&a, args) + if err != nil { + return nil, false, err + } + if args, a.p.Action, err = r.parseActionControlDflt(args, tcActPipe); err != nil { + return nil, false, err + } + args, done, err := r.actIndex(args, &a.p.Index, "sample: Illegal \"index\"\n") + if err != nil || done { + return nil, false, err + } + if a.p.Index == 0 && !a.groupSet { + r.errf("param \"group\" not set\n") + return nil, false, r.sampleUsage() + } + if a.p.Index == 0 && !a.rateSet { + r.errf("param \"rate\" not set\n") + return nil, false, r.sampleUsage() + } + nest := ops.begin(maxMsg, tcaID) + ops.put(maxMsg, xtcpnl.TcaSampleParms, a.p.Append(nil)) + if a.rateSet { + ops.u32(maxMsg, xtcpnl.TcaSampleRate, a.rate) + } + if a.groupSet { + ops.u32(maxMsg, xtcpnl.TcaSamplePsampleGroup, a.group) + } + if a.truncSet { + ops.u32(maxMsg, xtcpnl.TcaSampleTruncSize, a.trunc) + } + ops.end(nest) + return args, true, nil +} + +// sampleLoop is parse_sample's keyword loop; each bad value is its message +// and usage's exit(-1). +func (r *runner) sampleLoop(a *sampleArgs, args []string) ([]string, error) { + var err error + for len(args) > 0 { + w := args[0] + var dst *uint32 + var set *bool + var msg string + switch { + case matches(w, "rate"): + dst, set, msg = &a.rate, &a.rateSet, "Illegal rate %s\n" + case matches(w, "group"): + dst, set, msg = &a.group, &a.groupSet, "Illegal group num %s\n" + case matches(w, "trunc"): + dst, set, msg = &a.trunc, &a.truncSet, "Illegal truncation size %s\n" + case matches(w, helpWord): + return nil, r.sampleUsage() + default: + return args, nil + } + if args, err = r.nextArg(args); err != nil { + return nil, err + } + v, ok := getU32(args[0], 10) + if !ok { + r.errf(msg, args[0]) + return nil, r.sampleUsage() + } + *dst, *set = v, true + args = args[1:] + } + return args, nil +} diff --git a/internal/gotc/aw_simple.go b/internal/gotc/aw_simple.go new file mode 100644 index 000000000..399153394 --- /dev/null +++ b/internal/gotc/aw_simple.go @@ -0,0 +1,85 @@ +//go:build gotc_write + +package gotc + +import ( + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// tc/m_simple.c parse_simple at iproute2 v7.2.0. + +// simpMaxData is SIMP_MAX_DATA: the length of TCA_DEF_DATA, whatever the +// string's. +const simpMaxData = 32 + +// simpleExplain is m_simple.c explain. +func (r *runner) simpleExplain() { + r.errf("%s", "Usage:... simple [sdata STRING] [index INDEX] [CONTROL]\n"+ + "\tSTRING being an arbitrary string\n"+ + "\tINDEX := optional index value used\n"+ + "\tCONTROL := reclassify|pipe|drop|continue|ok\n") +} + +// parseSimple is parse_simple: the usage's order is not the parser's, +// which reads the control word before the index (W190); a bare kind or +// sdata is incomplete (W191); and TCA_DEF_DATA is SIMP_MAX_DATA bytes +// from the string on, whatever its length (W189): the words after it and, +// past them, memory gotc cannot know and sends as zeros. +func (r *runner) parseSimple(ops *fops, args []string, tcaID uint16) ([]string, bool, error) { + var sel xtcpnl.TcGen + var simp []string // argv from simpdata on, nil for none + ok := 0 + var err error +loop: + for len(args) > 0 { + switch { + case matches(args[0], xtcpnl.TcActKindSimple): + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + case matches(args[0], "sdata"): + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + ok++ + simp, args = args, args[1:] + case matches(args[0], helpWord): + r.simpleExplain() + return nil, false, exitCode(-1) + default: + break loop + } + } + if args, sel.Action, err = r.parseActionControlDflt(args, tcActPipe); err != nil { + return nil, false, err + } + if len(args) > 0 && matches(args[0], "index") { + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + i, good := getU32(args[0], 10) + if !good { + r.errf("simple: Illegal \"index\" (%s)\n", args[0]) + return nil, false, nil + } + sel.Index = i + ok++ + args = args[1:] + } + if ok == 0 { + r.simpleExplain() + return nil, false, nil + } + if simp != nil && len(cstr(simp[0])) > simpMaxData-1 { + r.errf("simple: Illegal string len %d <%s>\n", len(cstr(simp[0])), cstr(simp[0])) + return nil, false, nil + } + nest := ops.begin(maxMsg, tcaID) + ops.put(maxMsg, xtcpnl.TcaDefParms, sel.Append(nil)) + if simp != nil { + data, _ := r.mem.bytesAt(simp, simpMaxData) + ops.put(maxMsg, xtcpnl.TcaDefData, data) + } + ops.end(nest) + return args, true, nil +} diff --git a/internal/gotc/aw_skbedit.go b/internal/gotc/aw_skbedit.go new file mode 100644 index 000000000..1d17da6a1 --- /dev/null +++ b/internal/gotc/aw_skbedit.go @@ -0,0 +1,198 @@ +//go:build gotc_write + +package gotc + +import ( + "encoding/binary" + "math" + "strings" + + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// tc/m_skbedit.c parse_skbedit at iproute2 v7.2.0. + +// The SKBEDIT_F_* bits parse_skbedit keeps for itself. +const ( + skbeditFPriority = 0x1 + skbeditFQueueMapping = 0x2 + skbeditFMark = 0x4 + skbeditFPtype = 0x8 + skbeditFMask = 0x10 +) + +// skbeditExplain is m_skbedit.c explain. +func (r *runner) skbeditExplain() { + r.errf("%s", "Usage: ... skbedit <[QM] [PM] [MM] [PT] [IF]>\n"+ + "QM = queue_mapping QUEUE_MAPPING\n"+ + "PM = priority PRIORITY\n"+ + "MM = mark MARK[/MASK]\n"+ + "PT = ptype PACKETYPE\n"+ + "IF = inheritdsfield\n"+ + "PACKETYPE = is one of:\n"+ + " host, otherhost, broadcast, multicast\n"+ + "QUEUE_MAPPING = device transmit queue to use\n"+ + "PRIORITY = classID to assign to priority field\n"+ + "MARK = firewall mark to set\n"+ + "MASK = mask applied to firewall mark (0xffffffff by default)\n"+ + "note: inheritdsfield maps DS field to skb->priority\n") +} + +// skbeditArgs is parse_skbedit's locals. +type skbeditArgs struct { + ok int + flags uint32 + queueMapping, ptype uint16 + priority, mark, mask uint32 + pureFlags uint64 + sel xtcpnl.TcGen +} + +// parseSkbedit is parse_skbedit. A second mark keeps the first's mask +// (W174); priority is get_tc_classid, so hex (W174); the control word and +// index are read once, after the keywords, in that order (W175); `p` is +// priority (W170). +func (r *runner) parseSkbedit(ops *fops, args []string, tcaID uint16) ([]string, bool, error) { + args, err := r.nextArg(args) + if err != nil { + return nil, false, err + } + a := skbeditArgs{} + args, done, err := r.skbeditLoop(&a, args) + if err != nil || done { + return nil, false, err + } + if args, a.sel.Action, err = r.parseActionControlDflt(args, tcActPipe); err != nil { + return nil, false, err + } + if len(args) > 0 && matches(args[0], "index") { + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + i, ok := getU32(args[0], 10) + if !ok { + r.errf("skbedit: Illegal \"index\"\n") + return nil, false, nil + } + a.sel.Index = i + args = args[1:] + a.ok++ + } + if a.ok == 0 { + r.skbeditExplain() + return nil, false, nil + } + nest := ops.begin(maxMsg, tcaID) + ops.put(maxMsg, xtcpnl.TcaSkbeditParms, a.sel.Append(nil)) + if a.flags&skbeditFQueueMapping != 0 { + ops.put(maxMsg, xtcpnl.TcaSkbeditQueueMapping, binary.LittleEndian.AppendUint16(nil, a.queueMapping)) + } + if a.flags&skbeditFPriority != 0 { + ops.u32(maxMsg, xtcpnl.TcaSkbeditPriority, a.priority) + } + if a.flags&skbeditFMark != 0 { + ops.u32(maxMsg, xtcpnl.TcaSkbeditMark, a.mark) + } + if a.flags&skbeditFMask != 0 { + ops.u32(maxMsg, xtcpnl.TcaSkbeditMask, a.mask) + } + if a.flags&skbeditFPtype != 0 { + ops.put(maxMsg, xtcpnl.TcaSkbeditPtype, binary.LittleEndian.AppendUint16(nil, a.ptype)) + } + if a.pureFlags != 0 { + ops.put(maxMsg, xtcpnl.TcaSkbeditFlags, binary.LittleEndian.AppendUint64(nil, a.pureFlags)) + } + ops.end(nest) + return args, true, nil +} + +// skbeditLoop is parse_skbedit's keyword loop: done is a return -1. +func (r *runner) skbeditLoop(a *skbeditArgs, args []string) (rest []string, done bool, err error) { + for len(args) > 0 { + w := args[0] + switch { + case matches(w, "queue_mapping"): + a.flags |= skbeditFQueueMapping + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + v, ok := getUnsigned(args[0], 10) + if !ok || v > math.MaxUint16 { + r.errf("Illegal queue_mapping\n") + return nil, true, nil + } + a.queueMapping = uint16(v) + a.ok++ + case matches(w, "priority"): + a.flags |= skbeditFPriority + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + v, ok := tcClassid(args[0]) + if !ok { + r.errf("Illegal priority\n") + return nil, true, nil + } + a.priority = v + a.ok++ + case matches(w, "mark"): + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + mark, mask, slash := strings.Cut(args[0], "/") + if slash { + r.mem.nul(args, len(mark)) // m_skbedit.c:86, never put back + } + a.flags |= skbeditFMark + v, ok := getU32(mark, 0) + if !ok { + r.errf("Illegal mark\n") + return nil, true, nil + } + a.mark = v + if slash { + m, ok := getU32(mask, 0) + if !ok { + r.errf("Illegal mask\n") + return nil, true, nil + } + a.mask = m + a.flags |= skbeditFMask + } + a.ok++ + case matches(w, "ptype"): + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + p, ok := skbeditPtypeA2N(args[0]) + if !ok { + r.errf("Illegal ptype (%s)\n", args[0]) + return nil, true, nil + } + a.ptype = p + a.flags |= skbeditFPtype + a.ok++ + case matches(w, "inheritdsfield"): + a.pureFlags |= xtcpnl.SkbeditFInheritDsfield + a.ok++ + case matches(w, helpWord): + r.skbeditExplain() + return nil, false, exitCode(-1) + default: + return args, false, nil + } + args = args[1:] + } + return args, false, nil +} + +// skbeditPtypeA2N is the ptype arm's matches, in tc's order: host, +// broadcast, multicast, otherhost. +func skbeditPtypeA2N(s string) (uint16, bool) { + for i, n := range skbeditPtypes { + if matches(s, n) { + return uint16(i), true + } + } + return 0, false +} diff --git a/internal/gotc/aw_skbmod.go b/internal/gotc/aw_skbmod.go new file mode 100644 index 000000000..45f8352af --- /dev/null +++ b/internal/gotc/aw_skbmod.go @@ -0,0 +1,227 @@ +//go:build gotc_write + +package gotc + +import ( + "encoding/binary" + "math" + + "github.com/randomizedcoder/xtcp2/pkg/cint" + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// tc/m_skbmod.c parse_skbmod at iproute2 v7.2.0. + +// The SKBMOD_F_* bits xtcpnl does not name. +const ( + skbmodFDmac = 1 << 0 + skbmodFSmac = 1 << 1 + skbmodFEtype = 1 << 2 +) + +// skbmodExplain is m_skbmod.c skbmod_explain. +func (r *runner) skbmodExplain() { + r.errf("%s", "Usage:... skbmod { set | swap | ecn } [CONTROL] [index INDEX]\n"+ + "where SETTABLE is: [dmac DMAC] [smac SMAC] [etype ETYPE]\n"+ + "where SWAPPABLE is: \"mac\" to swap mac addresses\n"+ + "\tDMAC := 6 byte Destination MAC address\n"+ + "\tSMAC := optional 6 byte Source MAC address\n"+ + "\tETYPE := optional 16 bit ethertype\n"+ + "\tCONTROL := reclassify | pipe | drop | continue | ok |\n"+ + "\t goto chain \n"+ + "\tINDEX := skbmod index value to use\n") +} + +// skbmodUsage is skbmod_usage: exit(-1) (W201). +func (r *runner) skbmodUsage() error { + r.skbmodExplain() + return exitCode(-1) +} + +// skbmodArgs is parse_skbmod's locals. +type skbmodArgs struct { + p xtcpnl.TcSkbmod + ok int + dbuf, sbuf [ethAlenCst]byte + daddr, saddr bool + etype uint16 +} + +// parseSkbmod is parse_skbmod: free keywords in any order and mix (W197), +// skbmod, swap and set each a NEXT_ARG (so a bare `set` is incomplete, +// W191), the MACs by sscanf "%hhx:..." (W196), debug lines on stderr for +// each set (W199), etype 0 a flag with no ETYPE (W198), and the index in +// base 0 (W200). +func (r *runner) parseSkbmod(ops *fops, args []string, tcaID uint16) ([]string, bool, error) { + var a skbmodArgs + args, done, err := r.skbmodLoop(&a, args) + if err != nil || done { + return nil, false, err + } + if args, a.p.Action, err = r.parseActionControlDflt(args, tcActPipe); err != nil { + return nil, false, err + } + if len(args) > 0 && matches(args[0], "index") { + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + i, good := getU32(args[0], 0) + if !good { + r.errf("skbmod: Illegal \"index\"\n") + return nil, false, nil + } + a.p.Index = i + a.ok++ + args = args[1:] + } + if a.ok == 0 { + r.errf("skbmod requires at least one option\n") + return nil, false, r.skbmodUsage() + } + nest := ops.begin(maxMsg, tcaID) + ops.put(maxMsg, xtcpnl.TcaSkbmodParms, a.p.Append(nil)) + if a.daddr { + ops.put(maxMsg, xtcpnl.TcaSkbmodDmac, append([]byte(nil), a.dbuf[:]...)) + } + if a.etype != 0 { + ops.put(maxMsg, xtcpnl.TcaSkbmodEtype, binary.LittleEndian.AppendUint16(nil, a.etype)) + } + if a.saddr { + ops.put(maxMsg, xtcpnl.TcaSkbmodSmac, append([]byte(nil), a.sbuf[:]...)) + } + ops.end(nest) + return args, true, nil +} + +// skbmodLoop is parse_skbmod's keyword loop, in tc's order: `s` is skbmod, +// `e` etype. done is a return -1. +func (r *runner) skbmodLoop(a *skbmodArgs, args []string) (rest []string, done bool, err error) { + for len(args) > 0 { + w := args[0] + switch { + case matches(w, xtcpnl.TcActKindSkbmod), matches(w, "swap"), matches(w, "set"): + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + continue + case matches(w, "mac"): + a.p.Flags |= xtcpnl.SkbmodFSwapmac + a.ok++ + case matches(w, "etype"): + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + e, good := getU16(args[0], 0) + if !good { + return nil, false, r.invarg("ethertype is invalid", args[0]) + } + a.etype = e + r.errf("skbmod etype 0x%x\n", e) + a.p.Flags |= skbmodFEtype + a.ok++ + case matches(w, "dmac"), matches(w, "smac"): + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + if !r.skbmodMac(a, matches(w, "dmac"), args[0]) { + return nil, true, nil + } + case matches(w, "ecn"): + a.p.Flags |= xtcpnl.SkbmodFEcn + a.ok++ + case matches(w, helpWord): + return nil, false, r.skbmodUsage() + default: + return args, false, nil + } + args = args[1:] + } + return args, false, nil +} + +// skbmodMac is the dmac and smac arms: false is their -1. +func (r *runner) skbmodMac(a *skbmodArgs, dst bool, v string) bool { + buf, n := sscanfMac(v) + switch { + case dst && n != ethAlenCst: + r.errf("Invalid dst mac address %s\n", v) + return false + case !dst && n != ethAlenCst: + r.errf("Invalid smac address %s\n", v) + return false + case dst: + a.dbuf, a.daddr = buf, true + a.p.Flags |= skbmodFDmac + r.errf("dst MAC address <%s>\n", v) + default: + a.sbuf, a.saddr = buf, true + a.p.Flags |= skbmodFSmac + r.errf("src MAC address <%s>\n", v) + } + a.ok++ + return true +} + +// sscanfMac is glibc sscanf(s, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", ...): the +// conversions made, each value's low byte, and what follows the sixth is +// never looked at (W196). +func sscanfMac(s string) (b [ethAlenCst]byte, n int) { + for n < ethAlenCst { + if n > 0 { + if s == "" || s[0] != ':' { + return b, n + } + s = s[1:] + } + v, rest, ok := scanfHex(s) + if !ok { + return b, n + } + b[n] = byte(v & math.MaxUint8) + s = rest + n++ + } + return b, n +} + +// scanfHex is one glibc scanf %x conversion: leading space, a sign, a +// leading 0 and its x, then hex digits, as strtoul reads them: a minus +// negates and overflow is ULONG_MAX. ok is false when no digit was read, +// and a 0x with no hex digit after it is no conversion at all: glibc has +// taken the x and cannot give it back, so `0x:` fails where strtoul reads +// the 0 (checked against glibc 2.44: sscanf("0x:2", "%x") is 0). +func scanfHex(s string) (v uint64, rest string, ok bool) { + t := skipSpace(s) + neg := false + if t != "" && (t[0] == '+' || t[0] == '-') { + neg = t[0] == '-' + t = t[1:] + } + zero := t != "" && t[0] == '0' + if zero { + t = t[1:] + if t != "" && t[0]|0x20 == 'x' { + t = t[1:] + zero = false // the 0 was the prefix's, so a digit must follow + } + } + i, over := 0, false + for ; i < len(t) && hexVal(t[i]) >= 0; i++ { + d8, _ := cint.U8(hexVal(t[i])) + d := uint64(d8) + if v > (math.MaxUint64-d)/16 { + over = true + } + v = v*16 + d + } + if i == 0 && !zero { + return 0, s, false + } + switch { + case over: + v = math.MaxUint64 + case neg: + v = -v + } + return v, t[i:], true +} diff --git a/internal/gotc/aw_test.go b/internal/gotc/aw_test.go new file mode 100644 index 000000000..7fe412209 --- /dev/null +++ b/internal/gotc/aw_test.go @@ -0,0 +1,800 @@ +//go:build gotc_write + +package gotc + +import ( + "bytes" + "encoding/binary" + "path/filepath" + "strconv" + "strings" + "testing" + + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" + "golang.org/x/sys/unix" +) + +// The action write tests (22W). A row names a tcactwrite capture, whose +// cmd gotc runs against the capture's ip.pcap: the replay holds each +// request to tc's, byte for byte (simple's environment bytes masked, +// W189), and the row's expected rc and stderr, which are tc's, are checked +// too. A row with no capture runs `tc actions add action` and its words +// against one ACK, and checks the first action's options. + +const tcactwriteDir = "../../pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite" + +// awExpected is a row's outcome. +type awExpected struct { + rc int + stderr string // exact, unless has is set + has string // a substring stderr holds + // opts checks the first action's options (fake rows); nil skips. + opts func(t *testing.T, opts map[uint16][]byte) + reqs int // fake rows: the requests sent +} + +// awCase is one row of an action write table. +type awCase struct { + description string + row string // a tcactwrite capture + args []string // else: words after `tc actions add action` + expected awExpected +} + +// runAwCases runs a table. +func runAwCases(t *testing.T, cases []awCase) { + t.Helper() + for _, tc := range cases { + t.Run(tc.description, func(t *testing.T) { + var got result + var reqs [][]byte + if tc.row != "" { + got = awReplayRow(t, tc.row) + if got.pending != 0 { + t.Errorf("%d recorded requests not asked for", got.pending) + } + } else { + var replies []Reply + if tc.expected.reqs > 0 { + replies = []Reply{rep(ack())} + } + src := &fakeSource{replies: replies} + var out, errb bytes.Buffer + args := append([]string{"actions", "add", "action"}, tc.args...) + rc := run(config{src: src, stdin: strings.NewReader(""), sys: emptySys(t)}, args, &out, &errb) + got = result{stdout: out.String(), stderr: errb.String(), rc: rc} + reqs = src.reqs + if len(reqs) != tc.expected.reqs { + t.Errorf("%d requests sent, want %d", len(reqs), tc.expected.reqs) + } + } + e := tc.expected + if got.rc != e.rc { + t.Errorf("rc %d, want %d (stderr %q)", got.rc, e.rc, got.stderr) + } + switch { + case e.has != "" && !strings.Contains(got.stderr, e.has): + t.Errorf("stderr %q, want it to hold %q", got.stderr, e.has) + case e.has == "" && got.stderr != e.stderr: + t.Errorf("stderr\n got %q\n want %q", got.stderr, e.stderr) + } + if e.opts != nil && len(reqs) > 0 { + e.opts(t, firstActOpts(t, reqs[0])) + } + }) + } +} + +// awReplayRow runs a tcactwrite row's cmd against its capture. +func awReplayRow(t *testing.T, id string) result { + t.Helper() + dir, err := filepath.Abs(filepath.Join(tcactwriteDir, id)) + if err != nil { + t.Fatal(err) + } + c := readCmdJSON(t, dir) + pschedContent = readFile(t, pschedRow) + got, want := corpusRow(t, dir, c) + if got.stdout != want.stdout { + t.Errorf("stdout\n got %q\n want %q", got.stdout, want.stdout) + } + if got.stderr != want.stderr || got.rc != want.rc { + t.Errorf("tc printed %q, rc %d; gotc %q, rc %d", want.stderr, want.rc, got.stderr, got.rc) + } + return got +} + +// rtAttrs is the attributes in b by type (NLA_TYPE_MASK'd), first of each. +func rtAttrs(b []byte) map[uint16][]byte { + m := map[uint16][]byte{} + for len(b) >= 4 { + l := int(binary.LittleEndian.Uint16(b)) + if l < 4 || l > len(b) { + break + } + typ := binary.LittleEndian.Uint16(b[2:]) &^ (unix.NLA_F_NESTED | unix.NLA_F_NET_BYTEORDER) + if _, ok := m[typ]; !ok { + m[typ] = b[4:l] + } + b = b[min((l+3)&^3, len(b)):] + } + return m +} + +// firstActOpts is the options of a standalone add's first action: TAB, +// then prio 1, then TCA_ACT_OPTIONS. +func firstActOpts(t *testing.T, req []byte) map[uint16][]byte { + t.Helper() + tab := rtAttrs(req[xtcpnl.NlMsgHdrSizeCst+xtcpnl.TcaMsgSizeCst:])[xtcpnl.TcaRootTab] + act := rtAttrs(tab)[1] + opts, ok := rtAttrs(act)[xtcpnl.TcaActOptions] + if !ok { + t.Fatalf("no TCA_ACT_OPTIONS in % x", req) + } + return rtAttrs(opts) +} + +// optBytes checks attribute typ is want. +func optBytes(typ uint16, want []byte) func(*testing.T, map[uint16][]byte) { + return func(t *testing.T, opts map[uint16][]byte) { + t.Helper() + if got, ok := opts[typ]; !ok || !bytes.Equal(got, want) { + t.Errorf("attribute %d = % x (present %v), want % x", typ, got, ok, want) + } + } +} + +// optAbsent checks attribute typ was not sent. +func optAbsent(typ uint16) func(*testing.T, map[uint16][]byte) { + return func(t *testing.T, opts map[uint16][]byte) { + t.Helper() + if got, ok := opts[typ]; ok { + t.Errorf("attribute %d = % x, want it absent", typ, got) + } + } +} + +// parmsU32At checks the u32 at off in the PARMS-like attribute typ. +func parmsU32At(typ uint16, off int, want uint32) func(*testing.T, map[uint16][]byte) { + return func(t *testing.T, opts map[uint16][]byte) { + t.Helper() + p := opts[typ] + if len(p) < off+4 { + t.Fatalf("attribute %d is %d bytes", typ, len(p)) + } + if got := binary.LittleEndian.Uint32(p[off:]); got != want { + t.Errorf("attribute %d u32 at %d = %#x, want %#x", typ, off, got, want) + } + } +} + +// all runs each check. +func all(checks ...func(*testing.T, map[uint16][]byte)) func(*testing.T, map[uint16][]byte) { + return func(t *testing.T, opts map[uint16][]byte) { + t.Helper() + for _, c := range checks { + c(t, opts) + } + } +} + +// le16b and le32b are little-endian payloads; u8b one byte. +func le16b(v uint16) []byte { return binary.LittleEndian.AppendUint16(nil, v) } +func le32b(v uint32) []byte { return binary.LittleEndian.AppendUint32(nil, v) } +func u8b(v uint8) []byte { return []byte{v} } + +// actAPIWarn is the kernel's extack for an action no driver offloads. +const actAPIWarn = "Warning: act_api: Failed to setup tc actions for offload.\n" + +// parseTail is parse_action's report of a kind's -1 for an action whose +// kind word leaves n words. +func parseTail(n int, kind string) string { + return "bad action parsing\nparse_action: bad value (" + strconv.Itoa(n) + ":" + kind + ")!\nIllegal \"action\"\n" +} + +const talkErr = "We have an error talking to the kernel\n" + +// TestGotcActionCmd is do_action's write verbs (awrite.go). +// +// go test -tags gotc_write ./internal/gotc/ -run TestGotcActionCmd +func TestGotcActionCmd(t *testing.T) { + runAwCases(t, []awCase{ + {"positive: add one action (EXCL|CREATE)", "ec-001", nil, awExpected{stderr: actAPIWarn}}, + {"positive: change (CREATE|REPLACE)", "ec-002", nil, awExpected{stderr: actAPIWarn}}, + {"positive: replace (CREATE|REPLACE)", "ec-003", nil, awExpected{stderr: actAPIWarn}}, + {"positive: delete by index", "ec-005", nil, awExpected{}}, + {"positive: flush a kind (NLM_F_ROOT, TAB with KIND only)", "ec-006", nil, awExpected{}}, + {"negative: trailing junk after a complete add is sent, then unknown (W176)", "ng-084", nil, + awExpected{rc: 255, stderr: "Command \"flowid\" is unknown, try \"tc actions help\".\n"}}, + {"negative: flush of an unknown kind is bad action, rc 0, nothing sent (W182)", "ec-239", nil, + awExpected{stderr: "bad action nosuch\n"}}, + {"negative: delete with index 0 sends no INDEX, then reads action as a command (W178, W187)", "ng-085", nil, + awExpected{rc: 255, stderr: "Error: Invalid TC action index value.\n" + talkErr + + "Command \"action\" is unknown, try \"tc actions help\".\n"}}, + {"negative: add help is Illegal \"action\" (W186)", "", []string{"help"}, + awExpected{rc: 255, stderr: "Illegal \"action\"\n"}}, + {"boundary: 32 actions in an add are sent", "ec-230", nil, awExpected{}}, + {"boundary: 33 actions in an add are sent; the kernel refuses", "ng-083", nil, + awExpected{rc: 255, stderr: "Error: Only 32 actions supported per filter.\n" + talkErr}}, + {"boundary: a delete of 33 actions sends all 33 (W179)", "ec-231", nil, awExpected{}}, + {"corner: a new command before any action sends an empty TAB, then the get (W177)", "ec-236", nil, awExpected{}}, + {"corner: flush skips its first word whatever it is (W181)", "ec-238", nil, awExpected{}}, + {"corner: since on a flush is sent as TIME_DELTA (W180)", "ec-237", nil, awExpected{}}, + {"corner: tc actions alone prints nothing, rc 0 (W186)", "ec-241", nil, awExpected{}}, + {"corner: skip_sw and skip_hw are both sent; bare EINVAL (W183)", "ng-077", nil, + awExpected{rc: 255, stderr: "RTNETLINK answers: Invalid argument\n" + talkErr}}, + }) +} + +// TestGotcActParsers is the kind registry. +// +// go test -tags gotc_write ./internal/gotc/ -run TestGotcActParsers +func TestGotcActParsers(t *testing.T) { + cases := make([]awCase, 0, 21) + cases = append(cases, awCase{"positive: gact's flow is unchanged (hw_stats d is delayed, W170)", "ec-228", nil, awExpected{}}) + for _, r := range []struct{ kind, row string }{ + {"police", "ec-244"}, {"mirred", "ec-245"}, {"skbedit", "ec-246"}, {"vlan", "ec-247"}, + {"csum", "ec-248"}, {"nat", "ec-249"}, {"simple", "ec-250"}, {"connmark", "ec-251"}, + {"ctinfo", "ec-252"}, {"sample", "ec-253"}, {"skbmod", "ec-254"}, {"mpls", "ec-255"}, + } { + cases = append(cases, awCase{"positive: matchall carries " + r.kind, r.row, nil, awExpected{}}) + } + for _, r := range []struct{ kind, row string }{ + {"pedit", "ec-217"}, {"tunnel_key", "ec-218"}, {"ife", "ec-219"}, {"ct", "ec-220"}, {"gate", "ec-221"}, {"bpf", "ec-222"}, + } { + cases = append(cases, awCase{"negative: increment 23's " + r.kind + " is refused by name", "", []string{r.kind, "index", "1"}, + awExpected{rc: 255, stderr: "gotc: not implemented: tc actions action kind " + r.kind + "\n"}}) + } + cases = append(cases, + awCase{"boundary: an unlinked name falls back to gact, which reads it as a control (W114)", "", []string{"nosuchkind", "drop"}, + awExpected{rc: 255, stderr: "Bad action type nosuchkind\n" + gactExplainText}}, + awCase{"corner: the kind lookup is exact, so a prefix of mirred is gact's too", "", []string{"mir", "egress"}, + awExpected{rc: 255, stderr: "Bad action type mir\n" + gactExplainText}}, + ) + runAwCases(t, cases) +} + +// TestGotcPoliceWrite is aw_police.go. +// +// go test -tags gotc_write ./internal/gotc/ -run TestGotcPoliceWrite +func TestGotcPoliceWrite(t *testing.T) { + police := func(f func(t *testing.T, p xtcpnl.TcPolice)) func(*testing.T, map[uint16][]byte) { + return func(t *testing.T, opts map[uint16][]byte) { + t.Helper() + b := opts[xtcpnl.TcaPoliceTbf] + if len(b) < xtcpnl.TcPoliceSizeCst { + t.Fatalf("TBF is %d bytes", len(b)) + } + attr := binary.LittleEndian.AppendUint16(nil, uint16(4+len(b))) + attr = binary.LittleEndian.AppendUint16(attr, xtcpnl.TcaPoliceTbf) + o, err := xtcpnl.ParseTcPolice(append(attr, b...)) + if err != nil { + t.Fatal(err) + } + f(t, o.P) + } + } + runAwCases(t, []awCase{ + {"positive: rate and burst", "ec-001", nil, awExpected{stderr: actAPIWarn}}, + {"positive: peakrate by its prefix p, with mtu (W170)", "ec-104", nil, awExpected{stderr: actAPIWarn}}, + {"positive: filter-side police on basic", "ec-259", nil, awExpected{}}, + {"positive: filter-side police on cgroup", "ec-260", nil, awExpected{}}, + {"positive: filter-side police on fw", "ec-261", nil, awExpected{}}, + {"positive: filter-side police on route", "ec-262", nil, awExpected{}}, + {"positive: filter-side police on u32", "ec-263", nil, awExpected{}}, + {"positive: filter-side police on flow", "ec-264", nil, awExpected{}}, + {"negative: rate without burst has the inverted message (W156)", "ng-001", nil, + awExpected{rc: 255, stderr: "'burst' requires 'rate'.\n" + parseTail(5, "police")}}, + {"negative: pkts_rate without pkts_burst likewise (W156)", "ng-002", nil, + awExpected{rc: 255, stderr: "'pkts_burst' requires 'pkts_rate'.\n" + parseTail(5, "police")}}, + {"negative: rate with avrate is a silent -1 (W188)", "ng-004", nil, + awExpected{rc: 255, stderr: parseTail(9, "police")}}, + {"negative: a bad burst (W184)", "ng-009", nil, + awExpected{rc: 255, stderr: "Error: argument \"10x\" is wrong: buffer\n"}}, + {"negative: a bad cell prints argv cut at the slash (W184)", "ng-010", nil, + awExpected{rc: 255, stderr: "Error: argument \"10k\" is wrong: buffer\n"}}, + {"negative: a conform-exceed word that is no control is a silent -1 (W169)", "ng-011", nil, + awExpected{rc: 255, stderr: parseTail(9, "police")}}, + {"boundary: mtu 255 is cell_log 0; the kernel's rtab refusal is ENOMEM (W164)", "ng-007", nil, + awExpected{rc: 255, stderr: "RTNETLINK answers: Cannot allocate memory\n" + talkErr}}, + {"boundary: mtu 256 is cell_log 0 too, 257 is 1", "", []string{"police", "rate", "1mbit", "burst", "10k", "mtu", "257"}, + awExpected{reqs: 1, opts: police(func(t *testing.T, p xtcpnl.TcPolice) { + if p.Rate.CellLog != 1 || p.Mtu != 257 { + t.Errorf("cell_log %d mtu %d, want 1, 257", p.Rate.CellLog, p.Mtu) + } + })}}, + {"boundary: mpu 65535 is kept", "", []string{"police", "rate", "1mbit", "burst", "10k", "mpu", "65535"}, + awExpected{reqs: 1, opts: police(func(t *testing.T, p xtcpnl.TcPolice) { + if p.Rate.Mpu != 65535 { + t.Errorf("mpu %d, want 65535", p.Rate.Mpu) + } + })}}, + {"boundary: mpu 65536 is 0 in the u16 (W163)", "ec-098", nil, awExpected{stderr: actAPIWarn}}, + {"boundary: mtu 4294967295 is cell_log 24 and rtab wraps, as x86 tc (W165)", "ec-100", nil, + awExpected{stderr: actAPIWarn}}, + {"corner: the slash form stops at a space: exceed pass, no conform (W168)", "ec-103", nil, awExpected{}}, + {"corner: trap is no police control: police, then gact trap (W157)", "ec-106", nil, awExpected{stderr: actAPIWarn}}, + {"corner: rate 0 then a rate passes duparg (W166)", "ec-101", nil, awExpected{stderr: actAPIWarn}}, + {"corner: a rate that rounds to 0 is absent (W166)", "ec-108", nil, awExpected{stderr: actAPIWarn}}, + {"corner: rate nan is the x86 cast, as tc sends it (W166)", "ec-109", nil, awExpected{stderr: actAPIWarn}}, + {"corner: goto in the slash form has no chain; the kernel refuses (W169)", "ng-006", nil, + awExpected{rc: 255, stderr: "Error: can't goto NULL proto/chain.\n" + talkErr}}, + }) +} + +// TestGotcMirredWrite is aw_mirred.go. +// +// go test -tags gotc_write ./internal/gotc/ -run TestGotcMirredWrite +func TestGotcMirredWrite(t *testing.T) { + runAwCases(t, []awCase{ + {"positive: egress redirect in a filter", "ec-245", nil, awExpected{}}, + {"positive: ingress by its prefix i (W170)", "ec-120", nil, awExpected{}}, + {"negative: a missing device is nodev, then parse_action's lines (W162)", "ng-021", nil, + awExpected{rc: 255, stderr: "Cannot find device \"nosuch\"\n" + parseTail(7, "mirred")}}, + {"negative: blockid 0 has no newline (W160)", "ng-022", nil, + awExpected{rc: 255, stderr: "invalid block ID" + parseTail(7, "mirred")}}, + {"negative: a bare mirred is incomplete", "", []string{"mirred"}, + awExpected{rc: 255, stderr: "Command line is not complete. Try option \"help\"\n"}}, + {"negative: an unknown first word is not supported", "", []string{"mirred", "bogus"}, + awExpected{rc: 255, stderr: "mirred option not supported bogus\n" + parseTail(2, "mirred")}}, + {"boundary: dev if3junk is ifindex 3 (W162)", "ec-119", nil, awExpected{}}, + {"corner: a control word after redirect is a second action (W158)", "ec-117", nil, awExpected{}}, + {"corner: an unknown word is stepped over (W159)", "ec-118", nil, awExpected{}}, + {"corner: blockid after dev is read as the next kind (W161)", "ng-028", nil, + awExpected{rc: 255, has: "Bad action type blockid\n"}}, + }) +} + +// TestGotcSkbeditWrite is aw_skbedit.go. +// +// go test -tags gotc_write ./internal/gotc/ -run TestGotcSkbeditWrite +func TestGotcSkbeditWrite(t *testing.T) { + runAwCases(t, []awCase{ + {"positive: mark in a filter", "ec-246", nil, awExpected{}}, + {"positive: queue_mapping, ptype and inheritdsfield", "", []string{"skbedit", "queue_mapping", "3", "ptype", "otherhost", "inheritdsfield"}, + awExpected{reqs: 1, opts: all(optBytes(xtcpnl.TcaSkbeditQueueMapping, le16b(3)), + optBytes(xtcpnl.TcaSkbeditPtype, le16b(3)), + optBytes(xtcpnl.TcaSkbeditFlags, binary.LittleEndian.AppendUint64(nil, xtcpnl.SkbeditFInheritDsfield)))}}, + {"negative: a bad ptype", "", []string{"skbedit", "ptype", "nosuch"}, + awExpected{rc: 255, stderr: "Illegal ptype (nosuch)\n" + parseTail(3, "skbedit")}}, + {"negative: no keyword is explain and -1", "", []string{"skbedit", "pipe"}, + awExpected{rc: 255, has: "Usage: ... skbedit <[QM] [PM] [MM] [PT] [IF]>\n"}}, + {"boundary: queue_mapping 65535 is sent", "", []string{"skbedit", "queue_mapping", "65535"}, + awExpected{reqs: 1, opts: optBytes(xtcpnl.TcaSkbeditQueueMapping, le16b(65535))}}, + {"boundary: queue_mapping 65536 is illegal", "", []string{"skbedit", "queue_mapping", "65536"}, + awExpected{rc: 255, stderr: "Illegal queue_mapping\n" + parseTail(3, "skbedit")}}, + {"boundary: priority is hex (W174)", "ec-132", nil, awExpected{}}, + {"boundary: priority 100000001 is 1:1 past 16 bits (W174)", "ec-133", nil, awExpected{}}, + {"corner: a second mark keeps the first's mask (W174)", "ec-134", nil, awExpected{}}, + {"corner: p is priority (W170)", "ec-136", nil, awExpected{}}, + {"corner: a control word after the index is a second action (W175)", "ec-137", nil, awExpected{}}, + }) +} + +// TestGotcVlanWrite is aw_vlan.go. +// +// go test -tags gotc_write ./internal/gotc/ -run TestGotcVlanWrite +func TestGotcVlanWrite(t *testing.T) { + runAwCases(t, []awCase{ + {"positive: pop in a filter", "ec-247", nil, awExpected{}}, + {"positive: push with protocol and priority", "", []string{"vlan", "push", "id", "10", "priority", "3", "protocol", "802.1ad"}, + awExpected{reqs: 1, opts: all(optBytes(xtcpnl.TcaVlanPushVlanID, le16b(10)), + optBytes(xtcpnl.TcaVlanPushVlanPriority, u8b(3)), + optBytes(xtcpnl.TcaVlanPushVlanProtocol, []byte{0x88, 0xa8}))}}, + {"negative: a bad MAC is printed cut at its first colon (W172)", "ng-038", nil, + awExpected{rc: 255, stderr: "\"zz\" is invalid lladdr.\nError: argument \"zz\" is wrong: dst_mac is invalid\n"}}, + {"negative: id without push or modify", "", []string{"vlan", "pop", "id", "5"}, + awExpected{rc: 255, stderr: "Error: argument \"id\" is wrong: only valid for push/modify\n"}}, + {"negative: a protocol other than 802.1Q and 802.1ad", "", []string{"vlan", "push", "id", "5", "protocol", "ip"}, + awExpected{rc: 255, has: "protocol not supported\n"}}, + {"boundary: id 4094 is sent", "", []string{"vlan", "push", "id", "4094"}, + awExpected{reqs: 1, opts: optBytes(xtcpnl.TcaVlanPushVlanID, le16b(4094))}}, + {"boundary: id 4095 is sent; the kernel's ERANGE has no extack (W171)", "ng-034", nil, + awExpected{rc: 255, stderr: "RTNETLINK answers: Numerical result out of range\n" + talkErr}}, + {"boundary: a one-group and an eight-group MAC (W172)", "ec-148", nil, awExpected{}}, + {"corner: id is base 0 (W171)", "ec-146", nil, awExpected{}}, + {"corner: aa and a dotted MAC are accepted (W172)", "ec-147", nil, awExpected{}}, + {"corner: p is pop (W170)", "ec-149", nil, awExpected{}}, + }) +} + +// TestLlAddrA2N is ll_addr_a2n. +func TestLlAddrA2N(t *testing.T) { + tests := []struct { + description string + arg string + expected struct { + addr [6]byte + shown string + cut int + ok bool + stderr string + } + }{ + {"positive: six groups", "02:00:00:00:00:01", exp6([6]byte{2, 0, 0, 0, 0, 1}, "02", 5, true, "")}, + {"positive: 0x on each group", "0x2:0x0:0x0:0x0:0x0:0x1", exp6([6]byte{2, 0, 0, 0, 0, 1}, "0x2", 5, true, "")}, + {"negative: a group past 255", "100:00", exp6([6]byte{}, "100", 1, false, "\"100\" is invalid lladdr.\n")}, + {"negative: a group that is no hex is printed cut at its colon", "aa:zz:cc", exp6([6]byte{0xaa}, "aa", 2, false, "\"zz\" is invalid lladdr.\n")}, + {"negative: -1 is negative as an int", "-1", exp6([6]byte{}, "-1", 0, false, "\"-1\" is invalid lladdr.\n")}, + {"negative: 0x with no digit is no conversion", "0x:2:3:4:5:6", exp6([6]byte{}, "0x", 1, false, "\"0x\" is invalid lladdr.\n")}, + {"negative: 0x in the last group", "1:2:3:4:5:0x", exp6([6]byte{1, 2, 3, 4, 5}, "1", 5, false, "\"0x\" is invalid lladdr.\n")}, + {"boundary: one group zero-pads", "aa", exp6([6]byte{0xaa}, "aa", 0, true, "")}, + {"boundary: eight groups keep the first six, cutting six colons", "1:2:3:4:5:6:7:8", exp6([6]byte{1, 2, 3, 4, 5, 6}, "1", 6, true, "")}, + {"corner: a dot is an IPv4 address in the first four, nothing cut", "1.2.3.4", exp6([6]byte{1, 2, 3, 4}, "1.2.3.4", 0, true, "")}, + {"corner: an empty group", "aa::bb", exp6([6]byte{0xaa}, "aa", 2, false, "\"\" is invalid lladdr.\n")}, + {"corner: trailing junk in a group is ignored, as sscanf does", "aaz:1", exp6([6]byte{0xaa, 1}, "aaz", 1, true, "")}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + var errb bytes.Buffer + r := &runner{stderr: &errb} + var addr [6]byte + shown, cut, ok := r.llAddrA2N(addr[:], tc.arg) + e := tc.expected + if addr != e.addr || shown != e.shown || cut != e.cut || ok != e.ok || errb.String() != e.stderr { + t.Errorf("got (% x, %q, %d, %v, %q), want (% x, %q, %d, %v, %q)", addr, shown, cut, ok, errb.String(), e.addr, e.shown, e.cut, e.ok, e.stderr) + } + }) + } +} + +func exp6(a [6]byte, shown string, cut int, ok bool, stderr string) struct { + addr [6]byte + shown string + cut int + ok bool + stderr string +} { + return struct { + addr [6]byte + shown string + cut int + ok bool + stderr string + }{a, shown, cut, ok, stderr} +} + +// TestGotcCsumWrite is aw_csum.go. +// +// go test -tags gotc_write ./internal/gotc/ -run TestGotcCsumWrite +func TestGotcCsumWrite(t *testing.T) { + flags := func(v uint32) func(*testing.T, map[uint16][]byte) { return parmsU32At(xtcpnl.TcaCsumParms, 20, v) } + runAwCases(t, []awCase{ + {"positive: iph in a filter", "ec-248", nil, awExpected{}}, + {"positive: every target joined by and, or and +", "", []string{"csum", "iph", "and", "icmp", "or", "igmp", "+", "tcp", "udp", "udplite", "sctp"}, + awExpected{reqs: 1, opts: flags(0x7f)}}, + {"negative: no target is the empty list (W173)", "ng-041", nil, + awExpected{rc: 255, stderr: "Illegal csum construct, empty list\n" + parseTail(4, "csum")}}, + {"boundary: one target is its bit", "", []string{"csum", "sctp"}, awExpected{reqs: 1, opts: flags(0x40)}}, + {"boundary: udplite is not read as udp's prefix", "", []string{"csum", "udplite"}, awExpected{reqs: 1, opts: flags(0x20)}}, + {"corner: index straight after csum skips the list check (W173)", "ec-160", nil, awExpected{}}, + {"corner: i and u are iph and udp (W170)", "ec-162", nil, awExpected{}}, + {"corner: a second csum word starts another list", "", []string{"csum", "tcp", "c", "udp"}, awExpected{reqs: 1, opts: flags(0x18)}}, + }) +} + +// TestGotcNatWrite is aw_nat.go. +// +// go test -tags gotc_write ./internal/gotc/ -run TestGotcNatWrite +func TestGotcNatWrite(t *testing.T) { + mask := func(m []byte) func(*testing.T, map[uint16][]byte) { + return func(t *testing.T, opts map[uint16][]byte) { + t.Helper() + p := opts[xtcpnl.TcaNatParms] + if len(p) < 32 || !bytes.Equal(p[28:32], m) { + t.Errorf("parms % x, want mask % x", p, m) + } + } + } + runAwCases(t, []awCase{ + {"positive: ingress in a filter", "ec-249", nil, awExpected{}}, + {"negative: a bad prefix names the direction word (W192)", "ng-044", nil, + awExpected{rc: 255, has: "Illegal nat construct (ingress)\nUsage: ... nat NAT\n"}}, + {"negative: a bare nat is incomplete (W191)", "ng-047", nil, + awExpected{rc: 255, stderr: "Command line is not complete. Try option \"help\"\n"}}, + {"boundary: /0 is mask 0", "", []string{"nat", "egress", "0.0.0.0/0", "1.2.3.4"}, awExpected{reqs: 1, opts: mask([]byte{0, 0, 0, 0})}}, + {"boundary: /32 is all ones", "", []string{"nat", "egress", "10.0.0.1/32", "1.2.3.4"}, awExpected{reqs: 1, opts: mask([]byte{255, 255, 255, 255})}}, + {"corner: a repeated nat ORs egress in (W193)", "ec-169", nil, awExpected{}}, + {"corner: NEW's prefix length is dropped (W194)", "ec-170", nil, awExpected{}}, + {"corner: legacy IPv4 forms (W195)", "ec-171", nil, awExpected{}}, + }) +} + +// TestGotcSimpleWrite is aw_simple.go. +// +// go test -tags gotc_write ./internal/gotc/ -run TestGotcSimpleWrite +func TestGotcSimpleWrite(t *testing.T) { + runAwCases(t, []awCase{ + {"positive: sdata and index", "ec-178", nil, awExpected{}}, + {"positive: in a filter, the end of argv then the environment (W189)", "ec-250", nil, awExpected{}}, + {"negative: a bare kind is incomplete (W191)", "ng-048", nil, + awExpected{rc: 255, stderr: "Command line is not complete. Try option \"help\"\n"}}, + {"negative: no sdata is sent; the kernel's bare EINVAL (W213)", "ng-049", nil, + awExpected{rc: 255, stderr: "RTNETLINK answers: Invalid argument\n" + talkErr}}, + {"negative: help is usage's exit(-1)", "", []string{"simple", "help"}, + awExpected{rc: 255, has: "Usage:... simple [sdata STRING] [index INDEX] [CONTROL]\n"}}, + {"negative: a control word alone is explain and -1", "", []string{"simple", "pipe"}, + awExpected{rc: 255, has: "Usage:... simple [sdata STRING]"}}, + {"boundary: sdata of 30 bytes", "ec-177", nil, awExpected{}}, + {"boundary: sdata of 31 bytes fills DEF_DATA", "ec-176", nil, awExpected{}}, + {"boundary: sdata of 32 bytes is too long", "ng-051", nil, + awExpected{rc: 255, stderr: "simple: Illegal string len 32 <" + strings.Repeat("s", 32) + ">\n" + parseTail(5, "simple")}}, + {"boundary: sdata of 33 bytes is too long", "ng-052", nil, + awExpected{rc: 255, stderr: "simple: Illegal string len 33 <" + strings.Repeat("s", 33) + ">\n" + parseTail(5, "simple")}}, + {"corner: the next action's words fill DEF_DATA (W189)", "ec-232", nil, awExpected{}}, + {"corner: the batch line buffer's leftover fills DEF_DATA (W189)", "ec-269", nil, awExpected{}}, + {"corner: a control word after the index is a second action (W190)", "ec-179", nil, awExpected{}}, + {"corner: words past argv are zeros in gotc", "", []string{"simple", "sdata", "hi"}, + awExpected{reqs: 1, opts: optBytes(xtcpnl.TcaDefData, append([]byte("hi\x00"), make([]byte, 29)...))}}, + }) +} + +// TestGotcConnmarkCtinfoWrite is aw_connmark.go. +// +// go test -tags gotc_write ./internal/gotc/ -run TestGotcConnmarkCtinfoWrite +func TestGotcConnmarkCtinfoWrite(t *testing.T) { + zone := func(z uint16) func(*testing.T, map[uint16][]byte) { + return func(t *testing.T, opts map[uint16][]byte) { + t.Helper() + p := opts[xtcpnl.TcaConnmarkParms] + if len(p) != xtcpnl.TcConnmarkSizeCst || binary.LittleEndian.Uint16(p[20:]) != z || p[22] != 0 || p[23] != 0 { + t.Errorf("parms % x, want zone %d and 2 bytes of zero padding (W214)", p, z) + } + } + } + runAwCases(t, []awCase{ + {"positive: connmark zone in a filter", "ec-251", nil, awExpected{}}, + {"positive: ctinfo dscp in a filter", "ec-252", nil, awExpected{}}, + {"positive: ctinfo dscp, statemask, cpmark and zone", "", []string{"ctinfo", "dscp", "0xfc000000", "0x1", "cpmark", "0xff", "zone", "3"}, + awExpected{reqs: 1, opts: all(optBytes(xtcpnl.TcaCtinfoParmsDscpMask, le32b(0xfc000000)), + optBytes(xtcpnl.TcaCtinfoParmsDscpStatemask, le32b(1)), + optBytes(xtcpnl.TcaCtinfoParmsCpmarkMask, le32b(0xff)), optBytes(xtcpnl.TcaCtinfoZone, le16b(3)))}}, + {"negative: a mask that is not 6 contiguous bits", "", []string{"ctinfo", "dscp", "0xf0f00000"}, + awExpected{rc: 255, stderr: "ctinfo: dscp mask must be 6 contiguous bits long\n" + parseTail(3, "ctinfo")}}, + {"negative: a mask and statemask that overlap", "", []string{"ctinfo", "dscp", "0xfc000000", "0x4000000"}, + awExpected{rc: 255, stderr: "ctinfo: dscp mask & statemask must NOT overlap\n" + parseTail(4, "ctinfo")}}, + {"negative: connmark help is usage's exit(-1)", "", []string{"connmark", "help"}, + awExpected{rc: 255, has: "Usage: ... connmark [zone ZONE] [CONTROL] [index ]\n"}}, + {"negative: ctinfo help is usage's exit(-1)", "", []string{"ctinfo", "help"}, + awExpected{rc: 255, has: "Usage: ... ctinfo [dscp mask [statemask]]"}}, + {"boundary: zone 0 is sent", "", []string{"connmark", "zone", "0"}, awExpected{reqs: 1, opts: zone(0)}}, + {"boundary: zone 65535 is sent", "", []string{"connmark", "zone", "65535"}, awExpected{reqs: 1, opts: zone(65535)}}, + {"boundary: zone 65536 is illegal", "", []string{"connmark", "zone", "65536"}, + awExpected{rc: 255, stderr: "connmark: Illegal \"zone\"\n" + parseTail(3, "connmark")}}, + {"corner: a junk statemask is the next action's kind (W208)", "ng-056", nil, + awExpected{rc: 255, has: "Bad action type 0x1junk\n"}}, + {"corner: cpmark 0 sends no mask (W209)", "ec-189", nil, awExpected{}}, + {"corner: a statemask with mask 0 is sent alone (W209)", "", []string{"ctinfo", "dscp", "0", "0x3"}, + awExpected{reqs: 1, opts: all(optAbsent(xtcpnl.TcaCtinfoParmsDscpMask), optBytes(xtcpnl.TcaCtinfoParmsDscpStatemask, le32b(3)))}}, + {"corner: ctinfo's prefix c is eaten (W210)", "ec-191", nil, awExpected{}}, + {"corner: connmark's prefix co is eaten (W210)", "ec-192", nil, awExpected{}}, + {"corner: goto with a bad chain is reported twice and read as gact (W215)", "ng-054", nil, + awExpected{rc: 255, has: "Illegal \"chain index\"\nIllegal \"chain index\"\n"}}, + }) +} + +// TestGotcSampleWrite is aw_sample.go. +// +// go test -tags gotc_write ./internal/gotc/ -run TestGotcSampleWrite +func TestGotcSampleWrite(t *testing.T) { + runAwCases(t, []awCase{ + {"positive: rate and group in a filter", "ec-253", nil, awExpected{}}, + {"positive: rate, group and trunc", "", []string{"sample", "rate", "100", "group", "5", "trunc", "128"}, + awExpected{reqs: 1, opts: all(optBytes(xtcpnl.TcaSampleRate, le32b(100)), + optBytes(xtcpnl.TcaSamplePsampleGroup, le32b(5)), optBytes(xtcpnl.TcaSampleTruncSize, le32b(128)))}}, + {"negative: a bare kind is missarg sample count (W211)", "ng-057", nil, + awExpected{rc: 255, stderr: "Error: argument \"sample count\" is required\n"}}, + {"negative: a bad rate is usage's exit", "", []string{"sample", "rate", "x"}, + awExpected{rc: 255, has: "Illegal rate x\nUsage: sample SAMPLE_CONF\n"}}, + {"boundary: trunc 0 is sent", "", []string{"sample", "rate", "1", "group", "1", "trunc", "0"}, + awExpected{reqs: 1, opts: optBytes(xtcpnl.TcaSampleTruncSize, le32b(0))}}, + {"corner: an index skips the group check; the kernel refuses (W212)", "ng-058", nil, + awExpected{rc: 255, stderr: "Error: sample rate and group are required.\n" + talkErr}}, + {"corner: no group is usage's exit", "", []string{"sample", "rate", "5"}, + awExpected{rc: 255, has: "param \"group\" not set\nUsage: sample SAMPLE_CONF\n"}}, + }) +} + +// TestGotcSkbmodWrite is aw_skbmod.go. +// +// go test -tags gotc_write ./internal/gotc/ -run TestGotcSkbmodWrite +func TestGotcSkbmodWrite(t *testing.T) { + runAwCases(t, []awCase{ + {"positive: swap mac in a filter", "ec-254", nil, awExpected{}}, + {"positive: set dmac with debug text on stderr (W199)", "ec-204", nil, + awExpected{stderr: "dst MAC address <02:00:00:00:00:01>\n"}}, + {"positive: ecn", "", []string{"skbmod", "ecn"}, + awExpected{reqs: 1, opts: func(t *testing.T, opts map[uint16][]byte) { + t.Helper() + p := opts[xtcpnl.TcaSkbmodParms] + if len(p) != 32 || binary.LittleEndian.Uint64(p[24:]) != xtcpnl.SkbmodFEcn { + t.Errorf("parms % x, want flags SKBMOD_F_ECN", p) + } + }}}, + {"negative: a bare set is incomplete (W191)", "ng-061", nil, + awExpected{rc: 255, stderr: "Command line is not complete. Try option \"help\"\n"}}, + {"negative: a short MAC", "", []string{"skbmod", "set", "dmac", "02:00"}, + awExpected{rc: 255, stderr: "Invalid dst mac address 02:00\n" + parseTail(4, "skbmod")}}, + {"negative: help is skbmod_usage's exit(-1) (W201)", "", []string{"skbmod", "help"}, + awExpected{rc: 255, has: "Usage:... skbmod { set | swap | ecn }"}}, + {"negative: no option is skbmod_usage's exit(-1) (W201)", "", []string{"skbmod", "pipe"}, + awExpected{rc: 255, has: "skbmod requires at least one option\nUsage:... skbmod"}}, + {"boundary: etype 0 sets the flag with no ETYPE (W198)", "ng-062", nil, + awExpected{rc: 255, stderr: "skbmod etype 0x0\nRTNETLINK answers: Invalid argument\n" + talkErr}}, + {"corner: trailing junk after six groups is accepted (W196)", "ec-202", nil, + awExpected{stderr: "dst MAC address <02:00:00:00:00:01:junk>\n"}}, + {"corner: 0x and over-long groups are sscanf's (W196)", "ec-203", nil, + awExpected{stderr: "dst MAC address <0x02:1aa:00:00:00:01>\n"}}, + {"corner: index is base 0 (W200)", "ec-206", nil, awExpected{}}, + }) +} + +// TestScanfMac is sscanf "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx". +func TestScanfMac(t *testing.T) { + tests := []struct { + description string + s string + expected struct { + b [6]byte + n int + } + }{ + {"positive: six groups", "02:00:00:00:00:01", macN([6]byte{2, 0, 0, 0, 0, 1}, 6)}, + {"negative: a missing colon stops it", "02 00", macN([6]byte{2}, 1)}, + {"negative: nothing to convert", "zz", macN([6]byte{}, 0)}, + {"boundary: a group's low byte (1aa is aa)", "1aa:1:2:3:4:5", macN([6]byte{0xaa, 1, 2, 3, 4, 5}, 6)}, + {"boundary: -1 is ff", "-1:0:0:0:0:0", macN([6]byte{0xff}, 6)}, + {"negative: 0x with no digit is no conversion", "0x:1:2:3:4:5", macN([6]byte{}, 0)}, + {"negative: 0X in a later group stops it there", "1:0X:3:4:5:6", macN([6]byte{1}, 1)}, + {"boundary: 0x with one digit", "0x1:2:3:4:5:6", macN([6]byte{1, 2, 3, 4, 5, 6}, 6)}, + {"corner: 00x is 0, the second 0 a digit and the x left", "00x:1:2:3:4:5", macN([6]byte{}, 1)}, + {"corner: a lone 0 is a digit", "0:1:2:3:4:5", macN([6]byte{0, 1, 2, 3, 4, 5}, 6)}, + {"corner: trailing junk after the sixth", "1:2:3:4:5:6junk", macN([6]byte{1, 2, 3, 4, 5, 6}, 6)}, + {"corner: leading space in a group", "1: 2:3:4:5:6", macN([6]byte{1, 2, 3, 4, 5, 6}, 6)}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + b, n := sscanfMac(tc.s) + if b != tc.expected.b || n != tc.expected.n { + t.Errorf("got (% x, %d), want (% x, %d)", b, n, tc.expected.b, tc.expected.n) + } + }) + } +} + +func macN(b [6]byte, n int) struct { + b [6]byte + n int +} { + return struct { + b [6]byte + n int + }{b, n} +} + +// TestGotcMplsWrite is aw_mpls.go. +// +// go test -tags gotc_write ./internal/gotc/ -run TestGotcMplsWrite +func TestGotcMplsWrite(t *testing.T) { + inv := func(v, msg string) awExpected { + return awExpected{rc: 255, stderr: "Error: argument \"" + v + "\" is wrong: " + msg + "\n"} + } + runAwCases(t, []awCase{ + {"positive: pop in a filter", "ec-255", nil, awExpected{}}, + {"positive: push with label, tc, ttl and bos", "", []string{"mpls", "push", "label", "100", "tc", "3", "ttl", "64", "bos", "1"}, + awExpected{reqs: 1, opts: all(optBytes(xtcpnl.TcaMplsLabel, le32b(100)), optBytes(xtcpnl.TcaMplsTC, u8b(3)), + optBytes(xtcpnl.TcaMplsTTL, u8b(64)), optBytes(xtcpnl.TcaMplsBos, u8b(1)))}}, + {"negative: push with no label is missarg", "", []string{"mpls", "push"}, + awExpected{rc: 255, stderr: "Error: argument \"label\" is required\n"}}, + {"negative: no action word is incomplete (W205)", "ng-066", nil, + awExpected{rc: 255, stderr: "Command line is not complete. Try option \"help\"\n"}}, + {"negative: ind is no index, so incomplete too (W205)", "ng-067", nil, + awExpected{rc: 255, stderr: "Command line is not complete. Try option \"help\"\n"}}, + {"boundary: label 1048575 is sent", "", []string{"mpls", "push", "label", "1048575"}, + awExpected{reqs: 1, opts: optBytes(xtcpnl.TcaMplsLabel, le32b(1048575))}}, + {"boundary: label 1048576", "", []string{"mpls", "push", "label", "1048576"}, inv("1048576", "label must be <=0xFFFFF")}, + {"boundary: label 3 is the kernel's to refuse (W207)", "ng-070", nil, + awExpected{rc: 255, stderr: "Error: act_mpls: MPLS label out of range.\n" + talkErr}}, + {"boundary: tc 8", "", []string{"mpls", "push", "label", "1", "tc", "8"}, inv("8", "tc field is 3 bits max")}, + {"boundary: ttl 0", "", []string{"mpls", "push", "label", "1", "ttl", "0"}, inv("0", "ttl must be >0 and <=255")}, + {"boundary: ttl 255 is sent", "", []string{"mpls", "push", "label", "1", "ttl", "255"}, + awExpected{reqs: 1, opts: optBytes(xtcpnl.TcaMplsTTL, u8b(255))}}, + {"boundary: pop protocol 0 is missarg (W204)", "ng-069", nil, + awExpected{rc: 255, stderr: "Error: argument \"protocol\" is required\n"}}, + {"boundary: push protocol 0 sends no PROTO (W204)", "ec-215", nil, awExpected{}}, + {"corner: t is tc (W206)", "ng-068", nil, inv("64", "tc field is 3 bits max")}, + {"corner: p is pop (W206)", "ec-216", nil, awExpected{}}, + {"corner: mac_push needs no label; the kernel refuses (W203)", "ng-071", nil, + awExpected{rc: 255, stderr: "Error: act_mpls: Label is required for MPLS push.\n" + talkErr}}, + {"corner: a second action word", "", []string{"mpls", "pop", "push"}, + awExpected{rc: 255, has: "Error: got \"push\" but action already set to \"pop\"\n"}}, + }) +} + +// TestGotcActionBatchExits is the exit(-1) paths in a -force batch: each +// ends the batch where tc's does (W185, W201); a parser's -1 does not. +// +// go test -tags gotc_write ./internal/gotc/ -run TestGotcActionBatchExits +func TestGotcActionBatchExits(t *testing.T) { + runAwCases(t, []awCase{ + {"negative: police's invarg ends a -force batch (W185)", "ng-092", nil, + awExpected{rc: 255, stderr: "Error: argument \"10x\" is wrong: buffer\n"}}, + {"negative: mpls's missarg ends a -force batch (W201)", "ng-093", nil, + awExpected{rc: 255, stderr: "Error: argument \"label\" is required\n"}}, + {"boundary: nat's -1 does not: the batch goes on, rc 1", "ng-094", nil, + awExpected{rc: 1, has: "Illegal nat construct (sideways)\n"}}, + {"corner: the line buffer survives between lines (W189)", "ec-269", nil, awExpected{}}, + }) +} + +// TestGotcBatchArgvNuls is the NULs tc's parsers write into argv and leave +// there, read back by the next, shorter batch line's sdata copy (W189). +// Line 2 is padded so its sdata word sits two bytes before line 1's +// mutated word. Each expected DEF_DATA is the bytes gotc knows (line 1's +// leftover up to its NUL, then zeros where tc reads the heap), each +// checked against tc 7.2.0's request under strace, which matched every +// known byte. +func TestGotcBatchArgvNuls(t *testing.T) { + sdata := func(pad int) string { return strings.Repeat(" ", pad) + "actions add action simple sdata x" } + tests := []struct { + description string + lines [2]string + expected string // DEF_DATA's known bytes; the rest of the 32 are zero + }{ + {"positive: vlan's MAC colons are NULs (ll_addr_a2n)", + [2]string{"actions add action vlan push_eth dst_mac 01:02:03:04:05:06 src_mac 0a:0b:0c:0d:0e:0f", sdata(7)}, + "x\x00\x001\x0002\x0003\x0004\x0005\x0006\x00src_mac\x000a\x000"}, + {"positive: skbedit's mark slash is a NUL", + [2]string{"actions add action skbedit mark 0x12345/0xffff", sdata(0)}, "x\x00\x002345\x000xffff\x00"}, + {"positive: flow's key commas are NULs", + [2]string{"filter add dev d0 prio 1 flow hash keys src,dst,proto divisor 4", sdata(6)}, + "x\x00\x00rc\x00dst\x00proto\x00divisor\x004\x00"}, + {"positive: fw's handle slash is a NUL", + [2]string{"filter add dev d0 parent ffff: handle 0x10/0xff fw classid 1:1", sdata(4)}, + "x\x00\x00x10\x000xff\x00fw\x00classid\x001:1\x00"}, + {"negative: tbf's failed burst size leaves its slash a NUL", + [2]string{"qdisc add dev d0 root tbf rate 1mbit burst 10x/8 latency 10ms", sdata(9)}, + "x\x00\x000x\x008\x00latency\x0010ms\x00"}, + {"negative: tbf's failed cell leaves its slash a NUL", + [2]string{"qdisc add dev d0 root tbf rate 1mbit burst 10k/z latency 10ms", sdata(9)}, + "x\x00\x000k\x00z\x00latency\x0010ms\x00"}, + {"negative: htb's failed burst leaves its slash a NUL", + [2]string{"class add dev d0 parent 1: classid 1:1 htb rate 1mbit burst 10x/8", sdata(26)}, "x\x00\x000x\x008\x00"}, + {"negative: flow's unknown key: the comma after it is cut too", + [2]string{"filter add dev d0 prio 1 flow hash keys src,nosuch,proto divisor 4", sdata(6)}, + "x\x00\x00rc\x00nosuch\x00proto\x00divisor\x004\x00"}, + {"boundary: eight MAC groups: six colons cut, the seventh kept", + [2]string{"actions add action vlan push_eth dst_mac 1:2:3:4:5:6:7:8", sdata(7)}, + "x\x00\x00\x002\x003\x004\x005\x006\x007:8\x00"}, + {"corner: a size and cell that parse put the slash back", + [2]string{"qdisc add dev d0 root tbf rate 1mbit burst 10k/8 latency 10ms", sdata(9)}, + "x\x00\x000k/8\x00latency\x0010ms\x00"}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + replies := make([]Reply, 7) + replies[0] = links() + for i := 1; i < len(replies); i++ { + replies[i] = rep(ack()) + } + src := &fakeSource{replies: replies} + var out, errb bytes.Buffer + stdin := strings.NewReader(tc.lines[0] + "\n" + tc.lines[1] + "\n") + run(config{src: src, stdin: stdin, sys: shareSys(t)}, []string{"-force", "-batch", "-"}, &out, &errb) + var last []byte // line 2's add: the last RTM_NEWACTION + for _, req := range src.reqs { + if binary.NativeEndian.Uint16(req[4:6]) == unix.RTM_NEWACTION { + last = req + } + } + if last == nil { + t.Fatalf("no action add sent; stderr %q", errb.String()) + } + got := firstActOpts(t, last)[xtcpnl.TcaDefData] + want := []byte(tc.expected + strings.Repeat("\x00", simpMaxData-len(tc.expected))) + if !bytes.Equal(got, want) { + t.Errorf("DEF_DATA\n got %q\n want %q", got, want) + } + }) + } +} diff --git a/internal/gotc/aw_vlan.go b/internal/gotc/aw_vlan.go new file mode 100644 index 000000000..655c53d7c --- /dev/null +++ b/internal/gotc/aw_vlan.go @@ -0,0 +1,279 @@ +//go:build gotc_write + +package gotc + +import ( + "encoding/binary" + "math/bits" + "strings" + + "github.com/randomizedcoder/xtcp2/pkg/cint" + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" + "golang.org/x/sys/unix" +) + +// tc/m_vlan.c parse_vlan and lib/ll_addr.c ll_addr_a2n at iproute2 v7.2.0. + +// The TCA_VLAN_ACT_* values parse_vlan sets that m_vlan.go does not name. +const ( + tcaVlanActPop = 1 + tcaVlanActPopEth = 4 +) + +// vlanExplain is m_vlan.c explain. +func (r *runner) vlanExplain() { + r.errf("%s", "Usage: vlan pop [CONTROL]\n"+ + " vlan push [ protocol VLANPROTO ] id VLANID [ priority VLANPRIO ] [CONTROL]\n"+ + " vlan modify [ protocol VLANPROTO ] id VLANID [ priority VLANPRIO ] [CONTROL]\n"+ + " vlan pop_eth [CONTROL]\n"+ + " vlan push_eth dst_mac LLADDR src_mac LLADDR [CONTROL]\n"+ + " VLANPROTO is one of 802.1Q or 802.1AD\n"+ + " with default: 802.1Q\n"+ + " CONTROL := reclassify | pipe | drop | continue | pass |\n"+ + " goto chain \n") +} + +// vlanArgs is parse_vlan's locals. +type vlanArgs struct { + action uint32 + dst, src [ethAlenCst]byte + dstSet, srcSet bool + id, proto uint16 + prio uint8 + idSet, protoSet, prioSet bool + parm xtcpnl.TcActInt +} + +// hasPushAttribs is has_push_attribs. +func hasPushAttribs(action uint32) bool { + return action == tcaVlanActPush || action == tcaVlanActModify +} + +// parseVlan is parse_vlan: `p` is pop (W170); id is get_u16 in base 0, so +// 010 is 8, and 4095 is not checked (W171); the control word and index +// come after the keywords, in that order (W175). +func (r *runner) parseVlan(ops *fops, args []string, tcaID uint16) ([]string, bool, error) { + args, err := r.nextArg(args) + if err != nil { + return nil, false, err + } + a := vlanArgs{} + args, done, err := r.vlanLoop(&a, args) + if err != nil || done { + return nil, false, err + } + if args, a.parm.Action, err = r.parseActionControlDflt(args, tcActPipe); err != nil { + return nil, false, err + } + if len(args) > 0 && matches(args[0], "index") { + if args, err = r.nextArg(args); err != nil { + return nil, false, err + } + i, ok := getU32(args[0], 10) + if !ok { + r.errf("vlan: Illegal \"index\"\n") + return nil, false, nil + } + a.parm.Index = i + args = args[1:] + } + if hasPushAttribs(a.action) && !a.idSet { + r.errf("id needs to be set for %s\n", vlanActionNames[a.action]) + r.vlanExplain() + return nil, false, nil + } + if a.action == tcaVlanActPushEth { + switch { + case !a.dstSet: + r.errf("dst_mac needs to be set for %s\n", vlanActionNames[a.action]) + r.vlanExplain() + return nil, false, nil + case !a.srcSet: + r.errf("src_mac needs to be set for %s\n", vlanActionNames[a.action]) + r.vlanExplain() + return nil, false, nil + } + } + a.parm.V = a.action + nest := ops.begin(maxMsg, tcaID) + ops.put(maxMsg, xtcpnl.TcaVlanParms, a.parm.Append(nil)) + if a.idSet { + ops.put(maxMsg, xtcpnl.TcaVlanPushVlanID, binary.LittleEndian.AppendUint16(nil, a.id)) + } + if a.protoSet { + if a.proto != bits.ReverseBytes16(unix.ETH_P_8021Q) && a.proto != bits.ReverseBytes16(unix.ETH_P_8021AD) { + r.errf("protocol not supported\n") + r.vlanExplain() + return nil, false, nil + } + ops.put(maxMsg, xtcpnl.TcaVlanPushVlanProtocol, binary.LittleEndian.AppendUint16(nil, a.proto)) + } + if a.prioSet { + ops.put(maxMsg, xtcpnl.TcaVlanPushVlanPriority, []byte{a.prio}) + } + if a.dstSet { + ops.put(maxMsg, xtcpnl.TcaVlanPushEthDst, append([]byte(nil), a.dst[:]...)) + } + if a.srcSet { + ops.put(maxMsg, xtcpnl.TcaVlanPushEthSrc, append([]byte(nil), a.src[:]...)) + } + ops.end(nest) + return args, true, nil +} + +// vlanLoop is parse_vlan's keyword loop: done is a return -1. +func (r *runner) vlanLoop(a *vlanArgs, args []string) (rest []string, done bool, err error) { + for len(args) > 0 { + w := args[0] + if act, ok := vlanActionA2N(w); ok { + if a.action != 0 { + r.errf("unexpected \"%s\" - action already specified\n", w) + r.vlanExplain() + return nil, true, nil + } + a.action = act + args = args[1:] + continue + } + switch { + case matches(w, "id"), matches(w, "protocol"), matches(w, "priority"): + if args, err = r.vlanPushAttr(a, args); err != nil { + return nil, false, err + } + case matches(w, "dst_mac"), matches(w, "src_mac"): + if args, err = r.vlanMac(a, args); err != nil { + return nil, false, err + } + case matches(w, helpWord): + r.vlanExplain() + return nil, false, exitCode(-1) + default: + return args, false, nil + } + args = args[1:] + } + return args, false, nil +} + +// vlanActionA2N is the action words, in tc's order: pop before pop_eth, +// push before push_eth, so a prefix of both is the first. +func vlanActionA2N(w string) (uint32, bool) { + for _, c := range [...]struct { + n string + v uint32 + }{ + {wordPop, tcaVlanActPop}, {wordPush, tcaVlanActPush}, {wordModify, tcaVlanActModify}, + {"pop_eth", tcaVlanActPopEth}, {"push_eth", tcaVlanActPushEth}, + } { + if matches(w, c.n) { + return c.v, true + } + } + return 0, false +} + +// vlanPushAttr is the id, protocol and priority arms, each invarg's exit +// unless the action is push or modify; it returns args at the value. +func (r *runner) vlanPushAttr(a *vlanArgs, args []string) ([]string, error) { + w := args[0] + if !hasPushAttribs(a.action) { + return nil, r.invarg("only valid for push/modify", w) + } + args, err := r.nextArg(args) + if err != nil { + return nil, err + } + v := args[0] + switch { + case matches(w, "id"): + id, ok := getU16(v, 0) + if !ok { + return nil, r.invarg("id is invalid", v) + } + a.id, a.idSet = id, true + case matches(w, "protocol"): + p, ok := llProtoA2N(v) + if !ok { + return nil, r.invarg("protocol is invalid", v) + } + a.proto, a.protoSet = p, true + default: + p, ok := getU8(v, 0) + if !ok || p&^0x7 != 0 { + return nil, r.invarg("prio is invalid", v) + } + a.prio, a.prioSet = p, true + } + return args, nil +} + +// vlanMac is the dst_mac and src_mac arms: invarg's exit unless the action +// is push_eth; ll_addr_a2n has cut argv at its first colon by the time +// invarg prints it (W172). +func (r *runner) vlanMac(a *vlanArgs, args []string) ([]string, error) { + w := args[0] + if a.action != tcaVlanActPushEth { + return nil, r.invarg("only valid for push_eth", w) + } + args, err := r.nextArg(args) + if err != nil { + return nil, err + } + dst, msg := &a.dst, "dst_mac is invalid" + if matches(w, "src_mac") { + dst, msg = &a.src, "src_mac is invalid" + } + shown, cut, ok := r.llAddrA2N(dst[:], args[0]) + r.mem.nulEach(args, ':', cut) + if !ok { + return nil, r.invarg(msg, shown) + } + if dst == &a.dst { + a.dstSet = true + } else { + a.srcSet = true + } + return args, nil +} + +// llAddrA2N is ll_addr_a2n(lladdr, len(lladdr), arg): with a dot anywhere, +// get_addr_1's IPv4 address in the first 4 bytes; otherwise up to +// len(lladdr) colon-separated groups, each glibc sscanf "%x" (scanfHex, +// so `0x` with no digit is no conversion) in 0..255, so `aa` is one byte +// and an eighth group is never read (W172). Each colon reached is written +// to NUL before its group is read, and cut is how many: shown is argv as +// tc then prints it, cut at its first colon, and the caller writes the +// NULs into argv's memory. +func (r *runner) llAddrA2N(lladdr []byte, arg string) (shown string, cut int, ok bool) { + if strings.Contains(arg, ".") { + pfx, ok := getAddr1(arg, unix.AF_INET) + if !ok { + r.errf("\"%s\" is invalid lladdr.\n", arg) + return arg, 0, false + } + if len(lladdr) < 4 { + return arg, 0, false + } + copy(lladdr, pfx.data[:4]) + return arg, 0, true + } + shown, _, _ = strings.Cut(arg, ":") + for i := range lladdr { + g, next, more := strings.Cut(arg, ":") + if more { + cut++ + } + v, _, ok := scanfHex(g) + temp := cint.Int(cint.Low32(v)) // sscanf %x into an int + if !ok || temp < 0 || temp > 255 { + r.errf("\"%s\" is invalid lladdr.\n", g) + return shown, cut, false + } + lladdr[i] = byte(temp) + if !more { + break + } + arg = next + } + return shown, cut, true +} diff --git a/internal/gotc/awrite.go b/internal/gotc/awrite.go new file mode 100644 index 000000000..662f3d0f2 --- /dev/null +++ b/internal/gotc/awrite.go @@ -0,0 +1,104 @@ +//go:build gotc_write + +package gotc + +import ( + "errors" + + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" + "golang.org/x/sys/unix" +) + +// tc/m_action.c's write verbs at iproute2 v7.2.0: tc_action_modify (add, +// change, replace), tc_action_gd(RTM_DELACTION) (delete) and +// tc_act_list_or_flush(RTM_DELACTION) (flush). Dry-run, as the qdisc and +// filter writes (qwrite.go, fwrite.go): a replay matches each request with +// tc's, and the kernel socket writes it to GOTC_WRITE_OUT. + +// actionModify is tc_action_modify(RTM_NEWACTION, flags): args starts at +// the verb, which it skips; parse_action fills TCA_ACT_TAB, whose length +// tc_action_modify sets itself after, so a table parse_action leaves open +// (a new command before any action, W177) is sent closed. rest is what +// parse_action left: the first flowid, classid or new command, which +// do_action then reads as a command (W176). +func (r *runner) actionModify(flags int, args []string) (rest []string, err error) { + m := &fmod{standalone: true} + m.ops.hdr = tcaReqHdr + rest, ok, err := r.parseAction(m, args[1:], xtcpnl.TcaRootTab) + if err != nil { + return nil, err + } + if !ok { + r.errf("Illegal \"action\"\n") + return nil, retCode(-1) + } + req, berr := xtcpnl.BuildTcActionWriteRequest(unix.RTM_NEWACTION, uint16(flags|unix.NLM_F_ACK), r.nextSeq(), + func(ab *xtcpnl.AttrBuilder) error { return m.ops.replay(ab) }) + if err := r.actTalk(req, berr); err != nil { + var rc retCode + if errors.As(err, &rc) { + r.errf("We have an error talking to the kernel\n") + return nil, retCode(-1) + } + return nil, err + } + return rest, nil +} + +// actionDelete is do_action's delete arm, then tc_action_gd(RTM_DELACTION): +// the get's words (actGDRefs: `index 0` sends no INDEX, W178, and there is +// no 32-action bound, W179). A failed talk returns 1 with argv as it was +// after "delete", so do_action reads the next word, usually "action", as a +// command (W187). +func (r *runner) actionDelete(args []string) (rest []string, err error) { + args = args[1:] + acts, ret, err := r.actGDRefs(args, "delete") + if err != nil { + return nil, err + } + if ret < 0 { + return nil, retCode(-1) + } + req, berr := xtcpnl.BuildTcActionWriteRequest(unix.RTM_DELACTION, unix.NLM_F_ACK, r.nextSeq(), + func(ab *xtcpnl.AttrBuilder) error { return xtcpnl.PutTcActDeleteTab(ab, acts) }) + if err := r.actTalk(req, berr); err != nil { + var rc retCode + if errors.As(err, &rc) { + r.errf("We have an error talking to the kernel\n") + return args, nil + } + return nil, err + } + return nil, nil +} + +// actionFlush is do_action's flush arm, then +// tc_act_list_or_flush(RTM_DELACTION): two words or fewer is act_usage; +// the word after "flush" is skipped whatever it is (W181); a kind tc does +// not link is "bad action" and rc 0 with nothing sent (W182); since is sent +// as TIME_DELTA, which the kernel's flush ignores (W180). A failed talk is +// "We have an error flushing" and 1. +func (r *runner) actionFlush(args []string) error { + if len(args) <= 2 { + return r.actUsage() + } + k, since, ok, err := r.actListArgs(args[2:]) + if err != nil || !ok { + return err + } + req, berr := xtcpnl.BuildTcActionWriteRequest(unix.RTM_DELACTION, unix.NLM_F_ROOT|unix.NLM_F_ACK, r.nextSeq(), + func(ab *xtcpnl.AttrBuilder) error { return xtcpnl.PutTcActFlushAttrs(ab, k, r.brief > 0, since) }) + if err := r.actTalk(req, berr); err != nil { + var rc retCode + if errors.As(err, &rc) { + r.errf("We have an error flushing\n") + return retCode(1) + } + return err + } + return nil +} + +// actTalk delivers an action write as sendWrite does a filter's; a kernel +// error is retCode(2), rtnl_talk's < 0, which each verb words its own way. +func (r *runner) actTalk(req []byte, berr error) error { return r.deliverWrite(req, berr) } diff --git a/internal/gotc/awrite_fuzz_test.go b/internal/gotc/awrite_fuzz_test.go new file mode 100644 index 000000000..ada6acc9d --- /dev/null +++ b/internal/gotc/awrite_fuzz_test.go @@ -0,0 +1,106 @@ +//go:build gotc_write + +package gotc + +import ( + "encoding/binary" + "strings" + "testing" + + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// awFuzzSeeds are one or more seeds a kind and verb: what the action write +// tables run, as `tc actions` words. +var awFuzzSeeds = []string{ + "actions add action gact drop index 1", + "actions change action police rate 1mbit burst 10k mtu 2k/8 peakrate 2mbit conform-exceed drop/pipe index 1", + "actions replace action police pkts_rate 1000 pkts_burst 100 overhead 4 linklayer atm avrate 1mbit index 2", + "actions add action police rate 1mbit burst 10k conform-exceed goto chain 3 pass trap", + "actions add action mirred egress mirror dev d0 pipe index 3 cookie aabb", + "actions add action mirred ingress redirect blockid 10 index 4", + "actions add action skbedit queue_mapping 3 priority 1:2 mark 5/0xff ptype host inheritdsfield pipe index 5", + "actions add action vlan push_eth dst_mac aa:bb:cc:dd:ee:ff src_mac 1.2.3.4 index 6", + "actions add action vlan modify id 010 priority 7 protocol 802.1q goto chain 1", + "actions add action csum iph and icmp or igmp + tcp udp udplite sctp c udp index 7", + "actions add action nat egress 10.0.0.0/8 1.2.3.4 nat ingress 010.1 2.2.2.2/16 drop index 8", + "actions add action simple sdata hello index 9 action simple sdata b", + "actions add action connmark co zone 65535 continue index 10", + "actions add action ctinfo c dscp 0xfc000000 0x1 cpmark 0xff zone 3 index 11", + "actions add action sample rate 100 group 5 trunc 0 index 12", + "actions add action skbmod set dmac 0x02:1aa:-1:0:0:1junk smac 1:2:3:4:5:6 etype 0x800 swap mac ecn index 010", + "actions add action mpls push protocol mpls_mc label 1048575 tc 7 ttl 255 bos 1 pipe index 13", + "actions add action mpls index 5", + "actions delete action gact index 0 action police index 1", + "actions flush foo gact since 1000", + "actions add action get", + "actions add action drop flowid 1:1", + "actions add action gact pass index 1 skip_sw skip_hw no_percpu hw_stats d", +} + +// FuzzGotcActionWrite runs `tc ` through do_action's write verbs +// and the 13 action parsers, words split on single spaces. A run must not +// panic, must exit with one of tc's codes, and every request it sends must +// be one well-formed netlink message within MAX_MSG. +// +// go test -tags gotc_write ./internal/gotc/ -run '^$' -fuzz FuzzGotcActionWrite -fuzztime 60s +func FuzzGotcActionWrite(f *testing.F) { + for _, s := range awFuzzSeeds { + f.Add(s) + } + sys := shareSys(f) + f.Fuzz(func(t *testing.T, s string) { + if len(s) > fuzzFilterMaxIn { + t.Skip() + } + src := &fakeSource{replies: []Reply{rep(linkMsg(2, "d0")), rep(ack()), rep(ack()), rep(ack())}} + var out, errb strings.Builder + rc := run(config{src: src, stdin: strings.NewReader(""), sys: sys}, strings.Split(s, " "), &out, &errb) + awFuzzCheck(t, rc, src.reqs, s) + }) +} + +// FuzzGotcActionBatch runs two `tc actions` lines as one `-force -batch -`, +// so simple's line-buffer copy (W189) and the exits that end a -force batch +// (W185, W201) are driven from both sides. +// +// go test -tags gotc_write ./internal/gotc/ -run '^$' -fuzz FuzzGotcActionBatch -fuzztime 60s +func FuzzGotcActionBatch(f *testing.F) { + for _, s := range [][2]string{ + {"actions add action simple sdata LLLLLLLLLLLLLLLLLLLL index 1 cookie abab", "actions add action simple sdata hi index 2"}, + {"actions add action police rate 1mbit burst 10x index 1", "actions add action gact pass index 1"}, + {"actions add action mpls push index 1", "actions flush action mpls"}, + {"actions add action nat sideways 1.1.1.1 2.2.2.2", "actions add action simple sdata x # tail"}, + } { + f.Add(s[0], s[1]) + } + sys := shareSys(f) + f.Fuzz(func(t *testing.T, a, b string) { + if len(a)+len(b) > fuzzFilterMaxIn || strings.ContainsAny(a+b, "\n") { + t.Skip() + } + stdin := a + "\n" + b + "\n" + src := &fakeSource{replies: []Reply{links(), rep(ack()), rep(ack()), rep(ack())}} + var out, errb strings.Builder + rc := run(config{src: src, stdin: strings.NewReader(stdin), sys: sys}, []string{"-force", "-batch", "-"}, &out, &errb) + awFuzzCheck(t, rc, src.reqs, stdin) + }) +} + +// awFuzzCheck is the fuzz targets' invariants. +func awFuzzCheck(t *testing.T, rc int, reqs [][]byte, in string) { + t.Helper() + switch rc { + case 0, 1, 2, 255: + default: + t.Fatalf("rc %d for %q; tc exits 0, 1, 2 or 255", rc, in) + } + for i, req := range reqs { + if len(req) < nlHeaderLen || len(req) > xtcpnl.TcFilterWriteBufCst { + t.Fatalf("request %d is %d bytes for %q", i, len(req), in) + } + if n := binary.LittleEndian.Uint32(req[0:4]); int(n) != len(req) { + t.Fatalf("request %d: nlmsg_len %d, %d bytes sent, for %q", i, n, len(req), in) + } + } +} diff --git a/internal/gotc/awrite_off.go b/internal/gotc/awrite_off.go new file mode 100644 index 000000000..8b05e2b38 --- /dev/null +++ b/internal/gotc/awrite_off.go @@ -0,0 +1,24 @@ +//go:build !gotc_write + +package gotc + +import "fmt" + +// Without gotc_write gotc cannot lay out a write: every `tc actions` write +// verb is refused, as before increment 22 (awrite.go is the tagged +// build's). + +// actionModify refuses add, change and replace. +func (r *runner) actionModify(_ int, args []string) ([]string, error) { + return nil, fmt.Errorf("%w: tc actions %s", errNotImplemented, args[0]) +} + +// actionDelete refuses delete. +func (r *runner) actionDelete(args []string) ([]string, error) { + return nil, fmt.Errorf("%w: tc actions %s", errNotImplemented, args[0]) +} + +// actionFlush refuses flush. +func (r *runner) actionFlush(args []string) error { + return fmt.Errorf("%w: tc actions %s", errNotImplemented, args[0]) +} diff --git a/internal/gotc/awrite_tdc_test.go b/internal/gotc/awrite_tdc_test.go new file mode 100644 index 000000000..1751d9021 --- /dev/null +++ b/internal/gotc/awrite_tdc_test.go @@ -0,0 +1,125 @@ +//go:build gotc_write + +package gotc + +import ( + "bytes" + "encoding/json" + "io/fs" + "path/filepath" + "regexp" + "slices" + "strconv" + "strings" + "testing" + + "github.com/randomizedcoder/xtcp2/internal/wsreplay" +) + +// tdcActionSkips pins the tdc `tc actions` writes gotc refuses, by the +// action kind named: increment 23's six. +var tdcActionSkips = map[string]int{ + "bpf": 7, "ct": 17, "gate": 8, "ife": 48, "pedit": 69, "tunnel_key": 35, +} + +// tdcActionKnown are the `tc actions` rows gotc cannot match, each with why. +var tdcActionKnown = map[string]string{} + +// tdcActionWritesSent pins how many tdc `tc actions` writes gotc matches +// exactly (22W: gact and the 12 kinds of increment 12). +const tdcActionWritesSent = 332 + +var actionWriteRefused = regexp.MustCompile(`not implemented: tc actions action kind (\S+)`) + +// TestGotcTdcActionWrites replays every tdc `tc actions` write (add, +// change, replace, delete, del and flush): tc's request bytes, output and +// exit code matched, simple's environment bytes masked (W189), or the +// refusal counted by kind. +// +// go test -tags gotc_write ./internal/gotc/ -run TestGotcTdcActionWrites +func TestGotcTdcActionWrites(t *testing.T) { + roots, err := filepath.Glob(tdcGlob) + if err != nil || len(roots) == 0 { + t.Fatalf("no tdc corpus: %v", err) + } + pschedContent = readFile(t, pschedRow) + var dirs []string + for _, root := range roots { + err := filepath.WalkDir(root, func(p string, d fs.DirEntry, err error) error { + if err == nil && d.Name() == "ip.pcap" { + dirs = append(dirs, filepath.Dir(p)) + } + return err + }) + if err != nil { + t.Fatal(err) + } + } + slices.Sort(dirs) + skips := map[string]int{} + sent := 0 + for _, dir := range dirs { + var row tdcCmdRow + if err := json.Unmarshal([]byte(readFile(t, filepath.Join(dir, "cmd.json"))), &row); err != nil { + t.Fatal(err) + } + if strings.ContainsAny(row.Cmd, "|;&<>$") { + continue + } + args := shellWords(row.Cmd) + if len(args) < 3 || args[0] != "tc" { + continue + } + obj := tcShowObject(args[1:]) + i := slices.Index(args, obj) + if i+1 >= len(args) || !matches(obj, "actions") { + continue + } + if !writeVerb(args[i+1], "add", "change", "replace", "delete", "flush") { + continue + } + path := filepath.Join(dir, "ip.pcap") + r, err := wsreplay.Open(path, wsreplay.Options{Err: ErrReplay, Canon: w189Canon(args[1:]), Clone: "gotc", Tool: "tc"}) + if err != nil { + t.Fatal(err) + } + src := &ReplaySource{Replay: r, path: path} + var out, errb bytes.Buffer + rc := run(config{src: src, sys: testSys(t, dir)}, args[1:], &out, &errb) + if m := actionWriteRefused.FindStringSubmatch(errb.String()); m != nil { + skips[m[1]]++ + continue + } + wantRC, err := strconv.Atoi(strings.TrimSpace(readFile(t, filepath.Join(dir, "ip.rc")))) + if err != nil { + t.Fatal(err) + } + got := result{stdout: out.String(), stderr: errb.String(), rc: rc, pending: src.Pending()} + want := result{stdout: readFile(t, filepath.Join(dir, "ip.out")), stderr: readFile(t, filepath.Join(dir, "ip.err")), rc: wantRC} + if got != want { + if _, ok := tdcActionKnown[row.ID]; ok { + continue + } + t.Errorf("%s: %s\n got %#v\n want %#v", row.ID, row.Cmd, got, want) + continue + } + if _, ok := tdcActionKnown[row.ID]; ok { + t.Errorf("%s now matches; drop it from tdcActionKnown", row.ID) + } + sent++ + } + t.Logf("matched %d tdc action writes; refused %v", sent, skips) + if sent != tdcActionWritesSent { + t.Errorf("matched %d tdc action writes, want %d", sent, tdcActionWritesSent) + } + for k, n := range skips { + if tdcActionSkips[k] != n { + t.Errorf("%s refused %d times, want %d", k, n, tdcActionSkips[k]) + } + } + for k, n := range tdcActionSkips { + if skips[k] != n { + t.Errorf("%s refused %d times, want %d", k, skips[k], n) + } + } +} diff --git a/internal/gotc/batch.go b/internal/gotc/batch.go index 51d321627..4fe9bd45c 100644 --- a/internal/gotc/batch.go +++ b/internal/gotc/batch.go @@ -61,13 +61,14 @@ func (r *runner) doBatch(name string, stdin io.Reader, force bool) error { if !ok { break } - argv, err := r.makeargs(line) + argv, offs, nuls, err := r.makeargs(line) if err != nil { return err } if len(argv) == 0 { continue // a blank line } + r.mem = r.lineMem.args(argv, offs, nuls) if err := r.doCmd(argv[0], argv[1:]); err != nil { var ret retCode if !errors.As(err, &ret) { @@ -106,6 +107,10 @@ func (r *runner) getcmdline(br *bufio.Reader, lineno *int) (string, bool) { return "", false } *lineno++ + r.lineMem.load(line) + if i := commentAt(line); i >= 0 { + r.lineMem.cut(i) + } line = cstr(line) if i := strings.IndexByte(line, '#'); i >= 0 { line = line[:i] @@ -126,16 +131,17 @@ func (r *runner) getcmdline(br *bufio.Reader, lineno *int) (string, bool) { line1 = line1[:j] } line = line[:i] + line1 + r.lineMem.joined(line) } return line, true } // makeargs is lib/utils.c makeargs: words split on " \t\r\n"; a word that // begins with a quote runs to the next same quote, which ends it even with -// no space after. An unterminated quote and a 512th word exit 1. -func (r *runner) makeargs(line string) ([]string, error) { +// no space after. An unterminated quote and a 512th word exit 1. offs are +// the words' offsets in line, nuls where makeargs wrote a NUL. +func (r *runner) makeargs(line string) (argv []string, offs, nuls []int, err error) { const ws = " \t\r\n" - var argv []string cp := 0 for cp < len(line) { for cp < len(line) && strings.IndexByte(ws, line[cp]) >= 0 { @@ -146,27 +152,28 @@ func (r *runner) makeargs(line string) ([]string, error) { } if len(argv) >= maxArgs-1 { r.errf("Too many arguments to command\n") - return nil, exitCode(1) + return nil, nil, nil, exitCode(1) } if q := line[cp]; q == '\'' || q == '"' { cp++ j := strings.IndexByte(line[cp:], q) if j < 0 { r.errf("Unterminated quoted string\n") - return nil, exitCode(1) + return nil, nil, nil, exitCode(1) } - argv = append(argv, line[cp:cp+j]) + argv, offs = append(argv, line[cp:cp+j]), append(offs, cp) cp += j } else { j := strings.IndexAny(line[cp:], ws) if j < 0 { - argv = append(argv, line[cp:]) + argv, offs = append(argv, line[cp:]), append(offs, cp) break } - argv = append(argv, line[cp:cp+j]) + argv, offs = append(argv, line[cp:cp+j]), append(offs, cp) cp += j } + nuls = append(nuls, cp) cp++ // *cp++ = 0: the separator or closing quote } - return argv, nil + return argv, offs, nuls, nil } diff --git a/internal/gotc/corpus_test.go b/internal/gotc/corpus_test.go index 40fbf3ee3..f6addb810 100644 --- a/internal/gotc/corpus_test.go +++ b/internal/gotc/corpus_test.go @@ -7,9 +7,12 @@ import ( "io" "os" "path/filepath" + "slices" "strconv" "strings" "testing" + + "github.com/randomizedcoder/xtcp2/internal/wsreplay" ) // corpusRows is how many rows each space holds (V002). @@ -38,14 +41,12 @@ var corpusRefused = map[string]string{ // 20W: what waits for a later increment (police and the other actions, // basic, cgroup, flower, bpf and flow's ematch), and W110, where tc // prints a tc_gact_p nothing set. - "tcfwrite/ec-111": "not implemented: tc filter fw police", - "tcfwrite/ec-112": "not implemented: tc filter u32 police", - "tcfwrite/ec-113": "not implemented: tc filter action kind mirred", "tcfwrite/ec-116": "not implemented: tc filter write of kind flower", "tcfwrite/ec-117": "not implemented: tc filter write of kind bpf", "tcfwrite/ng-033": "uninitialised tc_gact_p (W110)", - // 21W: where tc writes or reads memory it does not own, police and the - // two ematch kinds refused by name, and trees past their bound, which + // 21W: where tc writes or reads memory it does not own, the two + // ematch kinds refused by name (police went live in 22W), and trees + // past their bound, which // tc truncates and sends (W97, W151). "tcematch/ec-104": "quoted run past strbuf (W123)", "tcematch/ng-100": "quoted run past strbuf (W123)", @@ -53,14 +54,18 @@ var corpusRefused = map[string]string{ "tcematch/ng-068": "meta mask walk past its NUL (W125)", "tcematch/ng-016": "kind of 63 bytes or more (W126)", "tcematch/ng-017": "kind of 63 bytes or more (W126)", - "tcematch/ec-138": "not implemented: tc filter basic police", - "tcematch/ec-139": "not implemented: tc filter basic police", - "tcematch/ec-140": "not implemented: tc filter cgroup police", "tcematch/ng-108": "not implemented: tc filter write of ematch kind ipt", "tcematch/ng-109": "not implemented: tc filter write of ematch kind ipset", "tcematch/ng-110": "not implemented: tc filter write of ematch kind ipset", "tcematch/ec-137": "addattr_l exceeded its bound of 4096", "tcematch/ng-095": "addraw_l exceeded its bound of 16384", + // 22W: the kinds increment 23 ports, refused by name. + "tcactwrite/ec-217": "not implemented: tc actions action kind pedit", + "tcactwrite/ec-218": "not implemented: tc actions action kind tunnel_key", + "tcactwrite/ec-219": "not implemented: tc actions action kind ife", + "tcactwrite/ec-220": "not implemented: tc actions action kind ct", + "tcactwrite/ec-221": "not implemented: tc actions action kind gate", + "tcactwrite/ec-222": "not implemented: tc actions action kind bpf", } // qwriteSent are the corpusWrites rows the gotc_write build sends and @@ -72,6 +77,9 @@ var qwriteSent = map[string]bool{ "tcsched/ng-001": true, "tcsched/ng-002": true, "tcsched/ng-003": true, "tcsched/ng-004": true, "tcaqm/ng-001": true, "tcaqm/ng-002": true, "tcaqm/ng-003": true, "tcfilter/ng-024": true, "tcflower/ng-009": true, + // 22W: the deletes 9C recorded; tc's failed talk leaves "action" for + // do_action to read as a command (W187). + "tcaction/ng-006": true, "tcaction2/ng-007": true, } var corpusWrites = map[string]bool{ @@ -222,15 +230,61 @@ func testSys(t *testing.T, rowDir string) sysFS { // replayIn replays dir's ip.pcap through gotc, with stdin for `-batch -`. func replayIn(t *testing.T, dir string, stdin io.Reader, args ...string) result { t.Helper() - src, err := NewReplaySource(filepath.Join(dir, "ip.pcap")) + return replayCanon(t, dir, stdin, nil, args...) +} + +// replayCanon is replayIn with requests matched through canon (nil is +// CanonSeqPID). +func replayCanon(t *testing.T, dir string, stdin io.Reader, canon func([]byte) []byte, args ...string) result { + t.Helper() + path := filepath.Join(dir, "ip.pcap") + r, err := wsreplay.Open(path, wsreplay.Options{Err: ErrReplay, Canon: canon, Clone: "gotc", Tool: "tc"}) if err != nil { t.Fatal(err) } + src := &ReplaySource{Replay: r, path: path} var out, errb bytes.Buffer rc := run(config{src: src, stdin: stdin, sys: testSys(t, dir)}, args, &out, &errb) return result{stdout: out.String(), stderr: errb.String(), rc: rc, pending: src.Pending()} } +// w189Canon is the canon for a command line whose simple actions copy +// SIMP_MAX_DATA bytes from their sdata word on (W189): past the words' +// NULs tc copies its environment, which gotc sends as zeros, so each +// TCA_DEF_DATA is masked from the end of argv on, worked out here from the +// row's own words. Nil (CanonSeqPID) when nothing reaches past argv, and +// for a batch, whose line buffer gotc rebuilds in full. +func w189Canon(args []string) func([]byte) []byte { + var known []int // per sdata word, in order: the bytes argv holds from it + for i := 0; i+1 < len(args); i++ { + if args[i] == "-batch" || args[i] == "-b" { + return nil + } + if args[i] == "sdata" { + n := len(strings.Join(args[i+1:], "\x00")) + 1 + known = append(known, min(n, 32)) + } + } + if !slices.ContainsFunc(known, func(n int) bool { return n < 32 }) { + return nil + } + // tc_defact PARMS (an rtattr of 24, type 2), then DEF_DATA (36, type 3). + parms, data := []byte{24, 0, 2, 0}, []byte{36, 0, 3, 0} + return func(req []byte) []byte { + b := wsreplay.CanonSeqPID(req) + k := 0 + for i := 0; i+4+20+4+32 <= len(b) && k < len(known); i++ { + if !bytes.Equal(b[i:i+4], parms) || !bytes.Equal(b[i+24:i+28], data) { + continue + } + clear(b[i+28+known[k] : i+28+32]) + k++ + i += 24 + 4 + 32 - 1 + } + return b + } +} + // jsonStream checks s is one or more JSON documents and nothing else. func jsonStream(s string) error { dec := json.NewDecoder(strings.NewReader(s)) @@ -275,6 +329,8 @@ func TestGotcCorpus(t *testing.T) { corpusRows["tcfwrite"] = 183 spaces = append(spaces, "tcematch") corpusRows["tcematch"] = 257 + spaces = append(spaces, "tcactwrite") + corpusRows["tcactwrite"] = 363 } for _, sp := range spaces { more, err := filepath.Glob("../../pkg/xtcpnl/testdata/*/ws/" + sp) @@ -372,7 +428,7 @@ func corpusRow(t *testing.T, dir string, c cmdJSON) (got, want result) { stdin, args = f, args[:n-2] } t.Chdir(dir) - got = replayIn(t, dir, stdin, args...) + got = replayCanon(t, dir, stdin, w189Canon(args), args...) wantRC, err := strconv.Atoi(strings.TrimSpace(readFile(t, filepath.Join(dir, "ip.rc")))) if err != nil { t.Fatal(err) diff --git a/internal/gotc/filter.go b/internal/gotc/filter.go index f6ffdbe78..f17142152 100644 --- a/internal/gotc/filter.go +++ b/internal/gotc/filter.go @@ -108,6 +108,7 @@ type filterArgs struct { blockIndex uint32 parent uint32 handle string + handleAt []string // argv from the handle's word, for fw's NUL hasHandle bool prio uint32 protocol uint16 @@ -173,6 +174,7 @@ func (r *runner) filterWord(a *filterArgs, args []string, get bool) (rest []stri return nil, true, r.duparg("handle", v) } a.handle, a.hasHandle = v, true // a list parses it and never uses it (Q29h) + a.handleAt = args[1:] case matches(w, "preference") || matches(w, wordPriority): err = r.prioArg(a, v, get) case matches(w, "protocol"): diff --git a/internal/gotc/fw_basic.go b/internal/gotc/fw_basic.go index dd110e983..ce46653b9 100644 --- a/internal/gotc/fw_basic.go +++ b/internal/gotc/fw_basic.go @@ -115,7 +115,10 @@ func parseBasicFopt(r *runner, m *fmod) error { } continue case matches(a, "police"): - return r.policeArm(args, xtcpnl.TcFKindBasic) + if args, err = r.policeArm(m, args, xtcpnl.TcaBasicPolice); err != nil { + return err + } + continue case a == helpWord: // strcmp: "h" is not help (W150) r.basicExplain() return errKindParse @@ -147,7 +150,7 @@ func parseCgroupFopt(r *runner, m *fmod) error { case matches(a, wordAction): args, err = r.emActionArm(m, args, xtcpnl.TcaCgroupAct) case matches(a, "police"): - return r.policeArm(args, xtcpnl.TcFKindCgroup) + args, err = r.policeArm(m, args, xtcpnl.TcaCgroupPolice) case a == helpWord: r.cgroupExplain() return errKindParse diff --git a/internal/gotc/fw_ematch_test.go b/internal/gotc/fw_ematch_test.go index 7072ea39f..3a4f29306 100644 --- a/internal/gotc/fw_ematch_test.go +++ b/internal/gotc/fw_ematch_test.go @@ -202,8 +202,8 @@ func TestGotcEmatchWrite(t *testing.T) { {"negative: cgroup's trailing police is NEXT_ARG's exit", []string{"filter", "add", "dev", "d0", "egress", "pref", "1", "protocol", "all", "handle", "1", "cgroup", "police"}, "", d0, "Command line is not complete. Try option \"help\"\n", false, 255, 1, nil}, - {"negative: police with a word is refused by name", - basic("police", "rate"), "", d0, "gotc: not implemented: tc filter basic police\n", false, 255, 1, nil}, + {"negative: police rate with no value is incomplete (police is live, 22W)", + basic("police", "rate"), "", d0, "Command line is not complete. Try option \"help\"\n", false, 255, 1, nil}, {"boundary: a quoted run of 511 bytes is sent", basic("match", `nbyte("`+xs(511)+`" at 0)`, "classid", "1:1"), "", d0, "", false, 0, 2, bf(be(emNbyteM(0, 0, 511, 1, []byte(xs(511)))), cls11)}, diff --git a/internal/gotc/fw_flow.go b/internal/gotc/fw_flow.go index 4df05a36c..1996d034a 100644 --- a/internal/gotc/fw_flow.go +++ b/internal/gotc/fw_flow.go @@ -42,9 +42,11 @@ func (r *runner) flowExplain() { // flowParseKeys is flow_parse_keys: comma-separated keys, each the first // flow_keys entry (fkind.go's flowKeys) it is a prefix of, so "p" is -// proto; nkeys counts duplicates (W107). -func (r *runner) flowParseKeys(arg string) (keys, nkeys uint32, ok bool) { - for s := range strings.SplitSeq(arg, ",") { +// proto; nkeys counts duplicates (W107). Each comma reached is written to +// NUL before its key is matched, and stays so in argv's memory (W189). +func (r *runner) flowParseKeys(words []string) (keys, nkeys uint32, ok bool) { + for s := range strings.SplitSeq(words[0], ",") { + r.mem.nulEach(words, ',', 1+int(nkeys)) i := 0 for i < len(flowKeys) && !matches(s, flowKeys[i]) { i++ @@ -175,7 +177,7 @@ func (r *runner) flowWord(m *fmod, f *flowState, args []string) (rest []string, return nil, false, err } var ok bool - if f.keys, f.nkeys, ok = r.flowParseKeys(args[0]); !ok { + if f.keys, f.nkeys, ok = r.flowParseKeys(args); !ok { return nil, false, errKindParse } m.ops.u32(fwBound, xtcpnl.TcaFlowKeys, f.keys) @@ -241,7 +243,11 @@ func (r *runner) flowTail(m *fmod, args []string) ([]string, bool, error) { a := args[0] switch { case matches(a, "police"): - return nil, false, r.policeArm(args, xtcpnl.TcFKindFlow) + rest, err := r.policeArm(m, args, xtcpnl.TcaFlowPolice) + if err != nil { + return nil, false, err + } + return rest, false, nil case matches(a, wordAction): v, err := r.nextArg(args) if err != nil { diff --git a/internal/gotc/fw_simple.go b/internal/gotc/fw_simple.go index 03725a330..201806573 100644 --- a/internal/gotc/fw_simple.go +++ b/internal/gotc/fw_simple.go @@ -3,7 +3,6 @@ package gotc import ( - "fmt" "math" "strings" @@ -16,16 +15,6 @@ import ( // tests in tc's order, NEXT_ARG's exit for a missing value, and the // attributes in argv order. -// policeArm is a filter's police keyword: NEXT_ARG first, as every -// kind's parse_opt does, so a trailing police is tc's incomplete; then -// parse_police, which waits for the actions increment. -func (r *runner) policeArm(args []string, kind string) error { - if _, err := r.nextArg(args); err != nil { - return err - } - return fmt.Errorf("%w: tc filter %s police", errNotImplemented, kind) -} - // fwExplain is f_fw.c explain. func (r *runner) fwExplain() { r.errf("%s", "Usage: ... fw [ classid CLASSID ] [ indev DEV ] [ action ACTION_SPEC ]\n"+ @@ -45,6 +34,9 @@ func parseFwFopt(r *runner, m *fmod) error { maskSet := false if m.a.hasHandle { h, ms, slash := strings.Cut(m.handle, "/") + if slash { + r.mem.nul(m.a.handleAt, len(h)) // f_fw.c:43, never put back + } v, ok := getU32(h, 0) if !ok { r.errf("Illegal \"handle\"\n") @@ -83,7 +75,12 @@ func parseFwFopt(r *runner, m *fmod) error { } m.ops.u32(fwBound, xtcpnl.TcaFwClassid, c) case matches(a, "police"): - return r.policeArm(args, xtcpnl.TcFKindFw) + rest, err := r.policeArm(m, args, xtcpnl.TcaFwPolice) + if err != nil { + return err + } + args = rest + continue case matches(a, wordAction): v, err := r.nextArg(args) if err != nil { @@ -179,28 +176,13 @@ func (r *runner) routeWord(m *fmod, rs *routeState, args []string) ([]string, bo a := args[0] var err error switch { - case matches(a, "to"): + case matches(a, "to"), matches(a, "from"): // no prefix is both if args, err = r.nextArg(args); err != nil { return nil, false, err } - id, ok := r.rtrealmA2N(args[0]) - if !ok { - r.errf("Illegal \"to\"\n") - return nil, false, errKindParse - } - m.ops.u32(fwBound, xtcpnl.TcaRoute4To, id) - rs.fh = rs.fh&^0x80FF | id&0xFF - case matches(a, "from"): - if args, err = r.nextArg(args); err != nil { + if err := r.routeRealm(m, rs, matches(a, "to"), args[0]); err != nil { return nil, false, err } - id, ok := r.rtrealmA2N(args[0]) - if !ok { - r.errf("Illegal \"from\"\n") - return nil, false, errKindParse - } - m.ops.u32(fwBound, xtcpnl.TcaRoute4From, id) - rs.fh = rs.fh&0xFFFF | id<<16 case matches(a, "fromif"): if args, err = r.nextArg(args); err != nil { return nil, false, err @@ -226,7 +208,11 @@ func (r *runner) routeWord(m *fmod, rs *routeState, args []string) ([]string, bo } m.ops.u32(fwBound, xtcpnl.TcaRoute4Classid, c) case matches(a, "police"): - return nil, false, r.policeArm(args, xtcpnl.TcFKindRoute) + rest, err := r.policeArm(m, args, xtcpnl.TcaRoute4Police) + if err != nil { + return nil, false, err + } + return rest, false, nil case matches(a, wordAction): v, err := r.nextArg(args) if err != nil { @@ -262,6 +248,27 @@ func (r *runner) routeWord(m *fmod, rs *routeState, args []string) ([]string, bo return args, true, nil } +// routeRealm is the to and from arms' value: the realm, its attribute, +// and its bits in the handle tc computes. +func (r *runner) routeRealm(m *fmod, rs *routeState, to bool, v string) error { + id, ok := r.rtrealmA2N(v) + switch { + case !ok && to: + r.errf("Illegal \"to\"\n") + return errKindParse + case !ok: + r.errf("Illegal \"from\"\n") + return errKindParse + case to: + m.ops.u32(fwBound, xtcpnl.TcaRoute4To, id) + rs.fh = rs.fh&^0x80FF | id&0xFF + default: + m.ops.u32(fwBound, xtcpnl.TcaRoute4From, id) + rs.fh = rs.fh&0xFFFF | id<<16 + } + return nil +} + // rtrealmA2N is rt_names.c rtnl_rtrealm_a2n: the one-entry cache, the // realm table (read once, as rtnl_rtrealm_n2a reads it), then strtoul // base 0 up to 255. diff --git a/internal/gotc/fw_u32.go b/internal/gotc/fw_u32.go index 00bdd782d..73356838b 100644 --- a/internal/gotc/fw_u32.go +++ b/internal/gotc/fw_u32.go @@ -730,7 +730,12 @@ func (r *runner) u32Word2(m *fmod, st *u32State, args []string) ([]string, bool, st.terminal = true return rest, false, nil case matches(w, "police"): - return nil, false, r.policeArm(args, xtcpnl.TcFKindU32) + rest, err := r.policeArm(m, args, xtcpnl.TcaU32Police) + if err != nil { + return nil, false, err + } + st.terminal = true // terminal_ok++ + return rest, false, nil case w == wordSkipHw: st.flags |= xtcpnl.TcaClsFlagsSkipHw case w == wordSkipSw: diff --git a/internal/gotc/fwrite.go b/internal/gotc/fwrite.go index be8dfce87..fc21db257 100644 --- a/internal/gotc/fwrite.go +++ b/internal/gotc/fwrite.go @@ -30,6 +30,10 @@ const fwBound = 4096 // addattr_l's maxlen counts before the attributes. const tcReqHdr = xtcpnl.NlMsgHdrSizeCst + xtcpnl.TcMsgSizeCst +// tcaReqHdr is sizeof(struct nlmsghdr) + sizeof(struct tcamsg): what it +// counts in a `tc actions` request. +const tcaReqHdr = xtcpnl.NlMsgHdrSizeCst + xtcpnl.TcaMsgSizeCst + // ethPAllBE is htons(ETH_P_ALL), the protocol an add or replace sends when // none is given. var ethPAllBE = bits.ReverseBytes16(unix.ETH_P_ALL) @@ -74,6 +78,9 @@ type fmod struct { rest []string ops fops handle string // fhandle; "" with hasHandle false is NULL + // standalone is a `tc actions` request, which parse_action writes into + // with no filter around it. + standalone bool } // filterModify is tc_filter_modify. @@ -240,6 +247,18 @@ type fop struct { // ended keeps addattr_nest's rta_len of 4, as tc leaves it. type fops struct { ops []fop + // hdr is what addattr_l's maxlen counts before the attributes: 0 is a + // filter's nlmsghdr and tcmsg (tcReqHdr), and a standalone action's is + // nlmsghdr and tcamsg (tcaReqHdr). + hdr int +} + +// reqHdr is f.hdr, or tcReqHdr when unset. +func (f *fops) reqHdr() int { + if f.hdr == 0 { + return tcReqHdr + } + return f.hdr } // put is addattr_l(n, maxlen, t, b, len(b)). @@ -286,7 +305,7 @@ func (f *fops) replay(ab *xtcpnl.AttrBuilder) error { continue case fopRaw: // addraw_l's own test and message: NLMSG_ALIGN(len) past maxlen. - if tcReqHdr+ab.Len()+len(o.b)+xtcpnl.FourByteAlignPadding(len(o.b)) > o.maxlen { + if f.reqHdr()+ab.Len()+len(o.b)+xtcpnl.FourByteAlignPadding(len(o.b)) > o.maxlen { return fmt.Errorf("%w of %d", errAddrawBound, o.maxlen) } if err := ab.PutRaw(o.b); err != nil { @@ -296,7 +315,7 @@ func (f *fops) replay(ab *xtcpnl.AttrBuilder) error { case fopPut, fopBegin: } alen := xtcpnl.RTAttrSizeCst + len(o.b) - if tcReqHdr+ab.Len()+alen+xtcpnl.FourByteAlignPadding(alen) > o.maxlen { + if f.reqHdr()+ab.Len()+alen+xtcpnl.FourByteAlignPadding(alen) > o.maxlen { return fmt.Errorf("%w of %d", errAddattrBound, o.maxlen) } if o.kind == fopBegin { diff --git a/internal/gotc/fwrite_fuzz_test.go b/internal/gotc/fwrite_fuzz_test.go index 4c983bb16..d8557669e 100644 --- a/internal/gotc/fwrite_fuzz_test.go +++ b/internal/gotc/fwrite_fuzz_test.go @@ -57,6 +57,14 @@ func FuzzGotcFilterWrite(f *testing.F) { "filter add dev d0 ingress basic match \"abc", "filter add dev d0 ingress basic match ipt(-m mark --mark 1) classid 1:1", "filter del dev d0 ingress pref 1 handle 08 basic", + "filter add dev d0 ingress matchall action mirred egress redirect dev d0 pipe action police rate 1mbit burst 10k trap", + "filter add dev d0 ingress u32 match u32 0 0 action skbedit mark 1 index 5 pipe action vlan pop action csum i", + "filter add dev d0 ingress matchall action nat egress 10.1 1.2.3.4 action simple sdata hi action connmark zone 1", + "filter add dev d0 ingress matchall action ctinfo dscp 0xfc000000 0x1junk action sample rate 5 index 3", + "filter add dev d0 ingress matchall action skbmod set etype 0 action mpls mac_push action pedit ex munge", + "filter add dev d0 parent 1: basic police rate 1mbit burst 10k mtu 255 conform-exceed drop/pipe classid 1:1", + "filter add dev d0 parent 1: handle 1 fw police pkts_rate 1000 pkts_burst 100 action drop", + "filter add dev d0 parent 1: route to 5 police rate 1mbit burst 10k/x", } { f.Add(s) } diff --git a/internal/gotc/fwrite_test.go b/internal/gotc/fwrite_test.go index 890c24521..54abedec2 100644 --- a/internal/gotc/fwrite_test.go +++ b/internal/gotc/fwrite_test.go @@ -121,10 +121,11 @@ func TestGotcFilterWrite(t *testing.T) { []string{"filter", "change", "dev", "d0", "egress", "pref", "1", "handle", "1", "matchall", "action", "pass"}, d0, "", 0, 2, &sentFilter{sentWrite{typ: unix.RTM_NEWTFILTER, flags: fReq, ifindex: 2, handle: 1, parent: tcHClsactEgress, attrs: cat(kind("matchall"), opts(attr(xtcpnl.TcaMatchallAct, fwGact(1, tcActOK))))}, 1 << 16}}, - {"negative: police is refused by name after the device", with("pref", "1", "handle", "5", "fw", "police", "rate", "1mbit"), - d0[:1], notImpl + "tc filter fw police\n", 255, 1, nil}, - {"negative: a non-gact action is refused by name", m("action", "mirred", "egress", "redirect", "dev", "d1"), - d0[:1], notImpl + "tc filter action kind mirred\n", 255, 1, nil}, + {"negative: fw police rate with no burst is W156's inverted message, after the device", + with("pref", "1", "handle", "5", "fw", "police", "rate", "1mbit"), + d0[:1], "'burst' requires 'rate'.\nIllegal \"police\"\n", 1, 1, nil}, + {"negative: an increment-23 action is refused by name", m("action", "pedit", "ex", "munge", "ip", "ttl", "set", "10"), + d0[:1], notImpl + "tc filter action kind pedit\n", 255, 1, nil}, {"negative: flower on a missing device is nodev first", []string{"filter", "add", "dev", "nosuch", "ingress", "flower"}, []Reply{rep(nlErr(unix.ENODEV))}, "Cannot find device \"nosuch\"\n", 1, 1, nil}, {"negative: flow addend foo is get_addr's exit 1 (W104)", diff --git a/internal/gotc/gotc.go b/internal/gotc/gotc.go index 17b0bc702..564c31dff 100644 --- a/internal/gotc/gotc.go +++ b/internal/gotc/gotc.go @@ -58,16 +58,18 @@ type runner struct { seq uint32 sys sysFS - stats int // show_stats - details int // show_details - raw int // show_raw - graph bool // show_graph - iec int // use_iec - numeric int // numeric - useNames bool // use_names - confFile *string // conf_file, nil for NULL - batchMode bool // batch_mode - brief int // brief + stats int // show_stats + details int // show_details + raw int // show_raw + graph bool // show_graph + iec int // use_iec + numeric int // numeric + useNames bool // use_names + confFile *string // conf_file, nil for NULL + batchMode bool // batch_mode + mem argMem // the memory the command's words sit in (W189) + lineMem batchMem // getline's buffer, across batch lines + brief int // brief core tcCore nlFlags uint16 // n->nlmsg_flags a kind parser ORs in (gred setup: NLM_F_CREATE) names *namesDB @@ -240,6 +242,7 @@ func (r *runner) main(cfg config, args []string) error { return err } } + r.mem = cmdlineMem(args) return r.doCmd(args[0], args[1:]) } diff --git a/internal/gotc/m_mpls.go b/internal/gotc/m_mpls.go index 26ef959e0..5a923f0f4 100644 --- a/internal/gotc/m_mpls.go +++ b/internal/gotc/m_mpls.go @@ -6,7 +6,7 @@ import "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" // mplsActionNames is m_mpls.c action_names, TCA_MPLS_ACT_POP (1) to // TCA_MPLS_ACT_MAC_PUSH (5). -var mplsActionNames = [...]string{"", "pop", "push", "modify", "dec_ttl", "mac_push"} +var mplsActionNames = [...]string{"", wordPop, wordPush, wordModify, "dec_ttl", "mac_push"} // The tc_mpls m_action values print_mpls switches on. const ( diff --git a/internal/gotc/m_vlan.go b/internal/gotc/m_vlan.go index ac4a2f98f..7316470ed 100644 --- a/internal/gotc/m_vlan.go +++ b/internal/gotc/m_vlan.go @@ -10,7 +10,7 @@ import ( // vlanActionNames is m_vlan.c action_names, TCA_VLAN_ACT_POP (1) to // TCA_VLAN_ACT_PUSH_ETH (5). -var vlanActionNames = [...]string{"", "pop", "push", "modify", "pop_eth", "push_eth"} +var vlanActionNames = [...]string{"", wordPop, wordPush, wordModify, "pop_eth", "push_eth"} // The tc_vlan v_action values print_vlan switches on. const ( diff --git a/internal/gotc/qw_htb.go b/internal/gotc/qw_htb.go index 51d628c5a..42e5ddf44 100644 --- a/internal/gotc/qw_htb.go +++ b/internal/gotc/qw_htb.go @@ -308,6 +308,7 @@ func (r *runner) htbClassArg(c *htbCopt, args *[]string, dev string) error { return err } if c.buffer, ok = getSize64AndCell(w, &c.cellLog); !ok { + r.sizeCellCut(*args) return r.htbExplain1(a) } case matches(a, "cburst"), a == "cbuffer", a == "cmaxburst": @@ -316,6 +317,7 @@ func (r *runner) htbClassArg(c *htbCopt, args *[]string, dev string) error { return err } if c.cbuffer, ok = getSizeAndCell(w, &c.ccellLog); !ok { + r.sizeCellCut(*args) return r.htbExplain1(a) } case a == "ceil", a == wordRate: diff --git a/internal/gotc/qw_tbf.go b/internal/gotc/qw_tbf.go index da6eb4cd5..e2c36e2d9 100644 --- a/internal/gotc/qw_tbf.go +++ b/internal/gotc/qw_tbf.go @@ -59,7 +59,8 @@ func (r *runner) tbfRate(name, arg, dev string, v *uint64) bool { // tbfWord is one turn of tbf_parse_opt's loop; args[0] is the word, and // the value (NEXT_ARG) is args[1]. It returns false for tc's return -1. -func (r *runner) tbfWord(t *tbfArgs, a, v, dev string) bool { +func (r *runner) tbfWord(t *tbfArgs, a string, vs []string, dev string) bool { + v := vs[0] dup := func(what string) bool { r.errf("tbf: duplicate \"%s\" specification\n", what); return false } ok := true switch { @@ -90,14 +91,14 @@ func (r *runner) tbfWord(t *tbfArgs, a, v, dev string) bool { return dup("buffer/burst/maxburst") } if t.buf64, ok = getSize64AndCell(v, &t.rcell); !ok { - r.tbfExplain1(a, v) + r.tbfExplain1(a, r.sizeCellCut(vs)) } - case a == wordMtu, a == "minburst": + case a == wordMtu, a == wordMinburst: if t.mtu != 0 { return dup("mtu/minburst") } if t.mtu, ok = getSizeAndCell(v, &t.pcell); !ok { - r.tbfExplain1(a, v) + r.tbfExplain1(a, r.sizeCellCut(vs)) } case a == wordMpu: if t.mpu != 0 { @@ -138,7 +139,7 @@ func (r *runner) tbfWord(t *tbfArgs, a, v, dev string) bool { // value) or "help"/unknown. func tbfTakesValue(a string) bool { return matches(a, wordLimit) || matches(a, wordLatency) || matches(a, wordBurst) || a == wordBuffer || - a == wordMaxburst || a == wordMtu || a == "minburst" || a == wordMpu || a == wordRate || + a == wordMaxburst || a == wordMtu || a == wordMinburst || a == wordMpu || a == wordRate || matches(a, wordPeakrate) || matches(a, wordOverhead) || matches(a, wordLinklayer) } @@ -158,7 +159,7 @@ func parseTbfQopt(r *runner, args []string, dev string) (func(*xtcpnl.AttrBuilde return nil, r.incomplete() } args = args[1:] - if !r.tbfWord(&t, a, args[0], dev) { + if !r.tbfWord(&t, a, args, dev) { return nil, errKindParse } } diff --git a/internal/gotc/qwrite.go b/internal/gotc/qwrite.go index 088f9f203..f16e3a2af 100644 --- a/internal/gotc/qwrite.go +++ b/internal/gotc/qwrite.go @@ -681,6 +681,11 @@ func (r *runner) readProp(dev, prop string) (int64, bool) { // and return 2 on an error), or, on the kernel socket, to GOTC_WRITE_OUT. func (r *runner) sendWrite(w *xtcpnl.TcWrite) error { req, err := xtcpnl.BuildTcWriteRequest(w, r.nextSeq()) + return r.deliverWrite(req, err) +} + +// deliverWrite is sendWrite after the build: req, or the build's error. +func (r *runner) deliverWrite(req []byte, err error) error { if err != nil { return fmt.Errorf("%w: a request tc would truncate or cannot be laid out: %w", errNotImplemented, err) } diff --git a/internal/gotc/qwrite_tdc_test.go b/internal/gotc/qwrite_tdc_test.go index fbbfd1a4c..7540b3060 100644 --- a/internal/gotc/qwrite_tdc_test.go +++ b/internal/gotc/qwrite_tdc_test.go @@ -131,21 +131,21 @@ func TestGotcTdcWrites(t *testing.T) { // tdcFilterSkips pins the tdc filter writes gotc refuses, by what it // names: a filter kind (flower, bpf), police, an action kind, an ematch // kind, or an ematch lead. basic, cgroup and flow's match are sent since -// 21W; five of their rows carry skbedit. +// 21W; police and the other 11 increment-12 action kinds since 22W, which +// leaves increment 23's six. var tdcFilterSkips = map[string]int{ "kind bpf": 4, "kind flower": 2, - "action bpf": 1, "action connmark": 1, "action csum": 1, "action ct": 7, "action ctinfo": 1, - "action gate": 1, "action ife": 2, "action mirred": 10, "action mpls": 1, "action nat": 1, - "action pedit": 1, "action police": 6, "action sample": 1, "action skbedit": 7, "action skbmod": 1, - "action tunnel_key": 1, "action vlan": 1, + "action bpf": 1, "action ct": 7, "action gate": 1, "action ife": 2, "action pedit": 1, + "action tunnel_key": 1, } // tdcFilterKnown are the filter rows gotc cannot match, each with why. var tdcFilterKnown = map[string]string{} // tdcFilterWritesSent pins how many tdc filter and chain writes gotc -// matches exactly (20W 134, 21W's basic, cgroup and flow match 111 more). -const tdcFilterWritesSent = 245 +// matches exactly (20W 134, 21W's basic, cgroup and flow match 111 more, +// 22W's police and the other 11 action kinds 31 more). +const tdcFilterWritesSent = 276 var filterWriteRefused = regexp.MustCompile(`not implemented: (?:tc filter (?:write of kind (\S+)|(\S+) police|action kind (\S+)|write of ematch kind (\S+))|tc ematch .*\((W\d+)\))`) diff --git a/internal/gotc/units.go b/internal/gotc/units.go index 08b3128b8..f23ffe512 100644 --- a/internal/gotc/units.go +++ b/internal/gotc/units.go @@ -325,6 +325,36 @@ func getSize64AndCell(s string, cellLog *int) (uint64, bool) { return v, true } +// sizeCellShown is s as tc prints it after get_size64_and_cell fails: +// the slash is written to NUL before SIZE is parsed and put back only once +// CELL is an integer, so a bad SIZE or CELL leaves argv cut at the slash +// ("10k/x" is printed "10k", W184), and a CELL that is no power of 2 does +// not. +func sizeCellShown(s string) string { + sz, cell, slash := strings.Cut(s, "/") + if !slash { + return s + } + if _, ok := getSize64(sz); !ok { + return sz + } + if _, ok := getInteger(cell, 0); !ok { + return sz + } + return s +} + +// sizeCellCut is sizeCellShown for words[0], argv's word, with the NUL +// get_size64_and_cell leaves at the slash written into argv's memory +// (W189's batch buffer). +func (r *runner) sizeCellCut(words []string) string { + shown := sizeCellShown(words[0]) + if len(shown) < len(words[0]) { + r.mem.nul(words, len(shown)) + } + return shown +} + // getSizeAndCell is get_size_and_cell: the same within 32 bits. func getSizeAndCell(s string, cellLog *int) (uint32, bool) { v, ok := getSize64AndCell(s, cellLog) diff --git a/internal/gotc/units_test.go b/internal/gotc/units_test.go index 7dcb7c921..63c3596ca 100644 --- a/internal/gotc/units_test.go +++ b/internal/gotc/units_test.go @@ -249,3 +249,32 @@ func TestTcEstimatorTables(t *testing.T) { }) } } + +// TestSizeCellShown is argv as get_size64_and_cell leaves it for the +// message after a failure (W184): the slash is a NUL until CELL parses. +// police's burst and mtu and tbf's burst and mtu print it. +// +// go test -tags gotc_write ./internal/gotc/ -run TestSizeCellShown +func TestSizeCellShown(t *testing.T) { + tests := []struct { + description string + in string + expected string + }{ + {"positive: no slash is the word itself", "10x", "10x"}, + {"positive: a bad CELL is cut at the slash", "10k/x", "10k"}, + {"negative: a bad SIZE is cut at the slash", "10x/8", "10x"}, + {"negative: a CELL that is no power of 2 has the slash put back", "10k/3", "10k/3"}, + {"boundary: an empty CELL is cut", "10k/", "10k"}, + {"boundary: a SIZE past u32 has the slash put back (get_size_and_cell's own check)", "5gb/8", "5gb/8"}, + {"corner: only the first slash is cut", "10k/x/8", "10k"}, + {"corner: an empty SIZE is cut to nothing", "/8", ""}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + if got := sizeCellShown(tc.in); got != tc.expected { + t.Errorf("sizeCellShown(%q) = %q, want %q", tc.in, got, tc.expected) + } + }) + } +} diff --git a/internal/gotc/util.go b/internal/gotc/util.go index 0401a086a..d6063c694 100644 --- a/internal/gotc/util.go +++ b/internal/gotc/util.go @@ -40,6 +40,16 @@ const ( wordSkipHw = "skip_hw" wordSkipSw = "skip_sw" wordDrop = "drop" + wordContinue = "continue" + wordGoto = "goto" + wordPass = "pass" + wordPipe = "pipe" + wordReclassify = "reclassify" + wordIndex = "index" + wordModify = "modify" + wordPop = "pop" + wordPush = "push" + wordMinburst = "minburst" wordPerturb = "perturb" wordPrecedence = "precedence" wordRandom = "random" diff --git a/nix/checks/no-write-encoders.nix b/nix/checks/no-write-encoders.nix index af5605378..ef23e49d6 100644 --- a/nix/checks/no-write-encoders.nix +++ b/nix/checks/no-write-encoders.nix @@ -73,10 +73,11 @@ let # The files goip_write and gotc_write gate, in the packages that hold them. writePkgs = "^github.com/randomizedcoder/xtcp2/(internal/goip|internal/gotc|pkg/xtcpnl|pkg/nlparity)$"; # gotc's write files are not named *_write (qwrite.go, qw_htb.go, fwrite.go, - # fw_u32.go, act_parse.go, inet.go, units.go), so they are matched by name; + # fw_u32.go, awrite.go, aw_police.go, act_parse.go, inet.go, units.go), so + # they are matched by name; # the gotc control in the script fails when a gotc_write file in # internal/gotc falls outside gotcWriteFiles, or any other file inside it. - gotcWriteFiles = "^(qwrite|fwrite|qw_[a-z0-9]+|fw_[a-z0-9]+|act_parse|inet|units)[.]go$"; + gotcWriteFiles = "^(qwrite|fwrite|awrite|qw_[a-z0-9]+|fw_[a-z0-9]+|aw_[a-z0-9]+|act_parse|inet|units)[.]go$"; writeFiles = "${gotcWriteFiles}|(_write[a-z0-9_]*|_flush|_restore|link_property|stats_set)[.]go$"; # minio-go's process credential provider (the s3parquet destination) runs diff --git a/nix/microvms/workbench/tcactwrite.rows.jsonl b/nix/microvms/workbench/tcactwrite.rows.jsonl new file mode 100644 index 000000000..2957ad57f --- /dev/null +++ b/nix/microvms/workbench/tcactwrite.rows.jsonl @@ -0,0 +1,366 @@ +# Generated by `nlcapgen matrix -family tcactwrite -seed 1 -random 0`. +# Do not edit; regenerate. tools/nlcapgen/matrix.go explains the strategies. +# 363 rows. +{"id":"tcactwrite/ec-001","desc":"positive: opt=plain cmd=v-add:actions_add_action_police_rate_1mbit_burst_10k_index_1","cmd":"tc actions add action police rate 1mbit burst 10k index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-add","json":"0","words":"actions add action police rate 1mbit burst 10k index 1"}} +{"id":"tcactwrite/ec-002","desc":"positive: opt=plain cmd=v-change:actions_change_action_police_rate_2mbit_burst_20k_index_1","cmd":"tc actions change action police rate 2mbit burst 20k index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action police rate 1mbit burst 10k index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-change","json":"0","words":"actions change action police rate 2mbit burst 20k index 1"}} +{"id":"tcactwrite/ec-003","desc":"positive: opt=plain cmd=v-replace:actions_replace_action_police_rate_2mbit_burst_20k_index_1","cmd":"tc actions replace action police rate 2mbit burst 20k index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action police rate 1mbit burst 10k index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace","json":"0","words":"actions replace action police rate 2mbit burst 20k index 1"}} +{"id":"tcactwrite/ec-004","desc":"positive: opt=plain cmd=v-replace-new:actions_replace_action_police_rate_2mbit_burst_20k_index_2","cmd":"tc actions replace action police rate 2mbit burst 20k index 2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace-new","json":"0","words":"actions replace action police rate 2mbit burst 20k index 2"}} +{"id":"tcactwrite/ec-005","desc":"positive: opt=plain cmd=v-delete:actions_delete_action_police_index_1","cmd":"tc actions delete action police index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action police rate 1mbit burst 10k index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-delete","json":"0","words":"actions delete action police index 1"}} +{"id":"tcactwrite/ec-006","desc":"positive: opt=plain cmd=v-flush:actions_flush_action_police","cmd":"tc actions flush action police","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action police rate 1mbit burst 10k index 1","tc actions add action police rate 1mbit burst 10k index 2"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-flush","json":"0","words":"actions flush action police"}} +{"id":"tcactwrite/ec-007","desc":"positive: opt=plain cmd=v-add:actions_add_action_mirred_egress_redirect_dev_d1_index_1","cmd":"tc actions add action mirred egress redirect dev d1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mirred"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-add","json":"0","words":"actions add action mirred egress redirect dev d1 index 1"}} +{"id":"tcactwrite/ec-008","desc":"positive: opt=plain cmd=v-change:actions_change_action_mirred_egress_mirror_dev_d1_index_1","cmd":"tc actions change action mirred egress mirror dev d1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action mirred egress redirect dev d1 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action mirred"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-change","json":"0","words":"actions change action mirred egress mirror dev d1 index 1"}} +{"id":"tcactwrite/ec-009","desc":"positive: opt=plain cmd=v-replace:actions_replace_action_mirred_egress_mirror_dev_d1_index_1","cmd":"tc actions replace action mirred egress mirror dev d1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action mirred egress redirect dev d1 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action mirred"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace","json":"0","words":"actions replace action mirred egress mirror dev d1 index 1"}} +{"id":"tcactwrite/ec-010","desc":"positive: opt=plain cmd=v-replace-new:actions_replace_action_mirred_egress_mirror_dev_d1_index_2","cmd":"tc actions replace action mirred egress mirror dev d1 index 2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mirred"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace-new","json":"0","words":"actions replace action mirred egress mirror dev d1 index 2"}} +{"id":"tcactwrite/ec-011","desc":"positive: opt=plain cmd=v-delete:actions_delete_action_mirred_index_1","cmd":"tc actions delete action mirred index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action mirred egress redirect dev d1 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action mirred"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-delete","json":"0","words":"actions delete action mirred index 1"}} +{"id":"tcactwrite/ec-012","desc":"positive: opt=plain cmd=v-flush:actions_flush_action_mirred","cmd":"tc actions flush action mirred","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action mirred egress redirect dev d1 index 1","tc actions add action mirred egress redirect dev d1 index 2"],"readback":[{"name":"dump","cmd":"tc actions ls action mirred"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-flush","json":"0","words":"actions flush action mirred"}} +{"id":"tcactwrite/ec-013","desc":"positive: opt=plain cmd=v-add:actions_add_action_skbedit_mark_5_index_1","cmd":"tc actions add action skbedit mark 5 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-add","json":"0","words":"actions add action skbedit mark 5 index 1"}} +{"id":"tcactwrite/ec-014","desc":"positive: opt=plain cmd=v-change:actions_change_action_skbedit_priority_5_index_1","cmd":"tc actions change action skbedit priority 5 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action skbedit mark 5 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-change","json":"0","words":"actions change action skbedit priority 5 index 1"}} +{"id":"tcactwrite/ec-015","desc":"positive: opt=plain cmd=v-replace:actions_replace_action_skbedit_priority_5_index_1","cmd":"tc actions replace action skbedit priority 5 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action skbedit mark 5 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace","json":"0","words":"actions replace action skbedit priority 5 index 1"}} +{"id":"tcactwrite/ec-016","desc":"positive: opt=plain cmd=v-replace-new:actions_replace_action_skbedit_priority_5_index_2","cmd":"tc actions replace action skbedit priority 5 index 2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace-new","json":"0","words":"actions replace action skbedit priority 5 index 2"}} +{"id":"tcactwrite/ec-017","desc":"positive: opt=plain cmd=v-delete:actions_delete_action_skbedit_index_1","cmd":"tc actions delete action skbedit index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action skbedit mark 5 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-delete","json":"0","words":"actions delete action skbedit index 1"}} +{"id":"tcactwrite/ec-018","desc":"positive: opt=plain cmd=v-flush:actions_flush_action_skbedit","cmd":"tc actions flush action skbedit","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action skbedit mark 5 index 1","tc actions add action skbedit mark 5 index 2"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-flush","json":"0","words":"actions flush action skbedit"}} +{"id":"tcactwrite/ec-019","desc":"positive: opt=plain cmd=v-add:actions_add_action_vlan_pop_index_1","cmd":"tc actions add action vlan pop index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-add","json":"0","words":"actions add action vlan pop index 1"}} +{"id":"tcactwrite/ec-020","desc":"positive: opt=plain cmd=v-change:actions_change_action_vlan_push_id_100_index_1","cmd":"tc actions change action vlan push id 100 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action vlan pop index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-change","json":"0","words":"actions change action vlan push id 100 index 1"}} +{"id":"tcactwrite/ec-021","desc":"positive: opt=plain cmd=v-replace:actions_replace_action_vlan_push_id_100_index_1","cmd":"tc actions replace action vlan push id 100 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action vlan pop index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace","json":"0","words":"actions replace action vlan push id 100 index 1"}} +{"id":"tcactwrite/ec-022","desc":"positive: opt=plain cmd=v-replace-new:actions_replace_action_vlan_push_id_100_index_2","cmd":"tc actions replace action vlan push id 100 index 2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace-new","json":"0","words":"actions replace action vlan push id 100 index 2"}} +{"id":"tcactwrite/ec-023","desc":"positive: opt=plain cmd=v-delete:actions_delete_action_vlan_index_1","cmd":"tc actions delete action vlan index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action vlan pop index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-delete","json":"0","words":"actions delete action vlan index 1"}} +{"id":"tcactwrite/ec-024","desc":"positive: opt=plain cmd=v-flush:actions_flush_action_vlan","cmd":"tc actions flush action vlan","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action vlan pop index 1","tc actions add action vlan pop index 2"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-flush","json":"0","words":"actions flush action vlan"}} +{"id":"tcactwrite/ec-025","desc":"positive: opt=plain cmd=v-add:actions_add_action_csum_iph_index_1","cmd":"tc actions add action csum iph index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-add","json":"0","words":"actions add action csum iph index 1"}} +{"id":"tcactwrite/ec-026","desc":"positive: opt=plain cmd=v-change:actions_change_action_csum_tcp_index_1","cmd":"tc actions change action csum tcp index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action csum iph index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-change","json":"0","words":"actions change action csum tcp index 1"}} +{"id":"tcactwrite/ec-027","desc":"positive: opt=plain cmd=v-replace:actions_replace_action_csum_tcp_index_1","cmd":"tc actions replace action csum tcp index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action csum iph index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace","json":"0","words":"actions replace action csum tcp index 1"}} +{"id":"tcactwrite/ec-028","desc":"positive: opt=plain cmd=v-replace-new:actions_replace_action_csum_tcp_index_2","cmd":"tc actions replace action csum tcp index 2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace-new","json":"0","words":"actions replace action csum tcp index 2"}} +{"id":"tcactwrite/ec-029","desc":"positive: opt=plain cmd=v-delete:actions_delete_action_csum_index_1","cmd":"tc actions delete action csum index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action csum iph index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-delete","json":"0","words":"actions delete action csum index 1"}} +{"id":"tcactwrite/ec-030","desc":"positive: opt=plain cmd=v-flush:actions_flush_action_csum","cmd":"tc actions flush action csum","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action csum iph index 1","tc actions add action csum iph index 2"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-flush","json":"0","words":"actions flush action csum"}} +{"id":"tcactwrite/ec-031","desc":"positive: opt=plain cmd=v-add:actions_add_action_nat_ingress_10.0.0.0/8_192.168.0.1_index_1","cmd":"tc actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action nat"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-add","json":"0","words":"actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 1"}} +{"id":"tcactwrite/ec-032","desc":"positive: opt=plain cmd=v-change:actions_change_action_nat_egress_10.1.2.3_10.4.5.6_index_1","cmd":"tc actions change action nat egress 10.1.2.3 10.4.5.6 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action nat"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-change","json":"0","words":"actions change action nat egress 10.1.2.3 10.4.5.6 index 1"}} +{"id":"tcactwrite/ec-033","desc":"positive: opt=plain cmd=v-replace:actions_replace_action_nat_egress_10.1.2.3_10.4.5.6_index_1","cmd":"tc actions replace action nat egress 10.1.2.3 10.4.5.6 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action nat"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace","json":"0","words":"actions replace action nat egress 10.1.2.3 10.4.5.6 index 1"}} +{"id":"tcactwrite/ec-034","desc":"positive: opt=plain cmd=v-replace-new:actions_replace_action_nat_egress_10.1.2.3_10.4.5.6_index_2","cmd":"tc actions replace action nat egress 10.1.2.3 10.4.5.6 index 2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action nat"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace-new","json":"0","words":"actions replace action nat egress 10.1.2.3 10.4.5.6 index 2"}} +{"id":"tcactwrite/ec-035","desc":"positive: opt=plain cmd=v-delete:actions_delete_action_nat_index_1","cmd":"tc actions delete action nat index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action nat"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-delete","json":"0","words":"actions delete action nat index 1"}} +{"id":"tcactwrite/ec-036","desc":"positive: opt=plain cmd=v-flush:actions_flush_action_nat","cmd":"tc actions flush action nat","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 1","tc actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 2"],"readback":[{"name":"dump","cmd":"tc actions ls action nat"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-flush","json":"0","words":"actions flush action nat"}} +{"id":"tcactwrite/ec-037","desc":"positive: opt=plain cmd=v-add:actions_add_action_simple_sdata_hello_index_1","cmd":"tc actions add action simple sdata hello index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action simple"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-add","json":"0","words":"actions add action simple sdata hello index 1"}} +{"id":"tcactwrite/ec-038","desc":"positive: opt=plain cmd=v-change:actions_change_action_simple_sdata_world_index_1","cmd":"tc actions change action simple sdata world index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action simple sdata hello index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action simple"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-change","json":"0","words":"actions change action simple sdata world index 1"}} +{"id":"tcactwrite/ec-039","desc":"positive: opt=plain cmd=v-replace:actions_replace_action_simple_sdata_world_index_1","cmd":"tc actions replace action simple sdata world index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action simple sdata hello index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action simple"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace","json":"0","words":"actions replace action simple sdata world index 1"}} +{"id":"tcactwrite/ec-040","desc":"positive: opt=plain cmd=v-replace-new:actions_replace_action_simple_sdata_world_index_2","cmd":"tc actions replace action simple sdata world index 2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action simple"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace-new","json":"0","words":"actions replace action simple sdata world index 2"}} +{"id":"tcactwrite/ec-041","desc":"positive: opt=plain cmd=v-delete:actions_delete_action_simple_index_1","cmd":"tc actions delete action simple index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action simple sdata hello index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action simple"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-delete","json":"0","words":"actions delete action simple index 1"}} +{"id":"tcactwrite/ec-042","desc":"positive: opt=plain cmd=v-flush:actions_flush_action_simple","cmd":"tc actions flush action simple","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action simple sdata hello index 1","tc actions add action simple sdata hello index 2"],"readback":[{"name":"dump","cmd":"tc actions ls action simple"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-flush","json":"0","words":"actions flush action simple"}} +{"id":"tcactwrite/ec-043","desc":"positive: opt=plain cmd=v-add:actions_add_action_connmark_zone_5_index_1","cmd":"tc actions add action connmark zone 5 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action connmark"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-add","json":"0","words":"actions add action connmark zone 5 index 1"}} +{"id":"tcactwrite/ec-044","desc":"positive: opt=plain cmd=v-change:actions_change_action_connmark_zone_6_index_1","cmd":"tc actions change action connmark zone 6 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action connmark zone 5 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action connmark"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-change","json":"0","words":"actions change action connmark zone 6 index 1"}} +{"id":"tcactwrite/ec-045","desc":"positive: opt=plain cmd=v-replace:actions_replace_action_connmark_zone_6_index_1","cmd":"tc actions replace action connmark zone 6 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action connmark zone 5 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action connmark"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace","json":"0","words":"actions replace action connmark zone 6 index 1"}} +{"id":"tcactwrite/ec-046","desc":"positive: opt=plain cmd=v-replace-new:actions_replace_action_connmark_zone_6_index_2","cmd":"tc actions replace action connmark zone 6 index 2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action connmark"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace-new","json":"0","words":"actions replace action connmark zone 6 index 2"}} +{"id":"tcactwrite/ec-047","desc":"positive: opt=plain cmd=v-delete:actions_delete_action_connmark_index_1","cmd":"tc actions delete action connmark index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action connmark zone 5 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action connmark"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-delete","json":"0","words":"actions delete action connmark index 1"}} +{"id":"tcactwrite/ec-048","desc":"positive: opt=plain cmd=v-flush:actions_flush_action_connmark","cmd":"tc actions flush action connmark","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action connmark zone 5 index 1","tc actions add action connmark zone 5 index 2"],"readback":[{"name":"dump","cmd":"tc actions ls action connmark"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-flush","json":"0","words":"actions flush action connmark"}} +{"id":"tcactwrite/ec-049","desc":"positive: opt=plain cmd=v-add:actions_add_action_ctinfo_dscp_0xfc000000_index_1","cmd":"tc actions add action ctinfo dscp 0xfc000000 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action ctinfo"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-add","json":"0","words":"actions add action ctinfo dscp 0xfc000000 index 1"}} +{"id":"tcactwrite/ec-050","desc":"positive: opt=plain cmd=v-change:actions_change_action_ctinfo_cpmark_0xff_index_1","cmd":"tc actions change action ctinfo cpmark 0xff index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action ctinfo dscp 0xfc000000 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action ctinfo"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-change","json":"0","words":"actions change action ctinfo cpmark 0xff index 1"}} +{"id":"tcactwrite/ec-051","desc":"positive: opt=plain cmd=v-replace:actions_replace_action_ctinfo_cpmark_0xff_index_1","cmd":"tc actions replace action ctinfo cpmark 0xff index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action ctinfo dscp 0xfc000000 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action ctinfo"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace","json":"0","words":"actions replace action ctinfo cpmark 0xff index 1"}} +{"id":"tcactwrite/ec-052","desc":"positive: opt=plain cmd=v-replace-new:actions_replace_action_ctinfo_cpmark_0xff_index_2","cmd":"tc actions replace action ctinfo cpmark 0xff index 2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action ctinfo"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace-new","json":"0","words":"actions replace action ctinfo cpmark 0xff index 2"}} +{"id":"tcactwrite/ec-053","desc":"positive: opt=plain cmd=v-delete:actions_delete_action_ctinfo_index_1","cmd":"tc actions delete action ctinfo index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action ctinfo dscp 0xfc000000 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action ctinfo"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-delete","json":"0","words":"actions delete action ctinfo index 1"}} +{"id":"tcactwrite/ec-054","desc":"positive: opt=plain cmd=v-flush:actions_flush_action_ctinfo","cmd":"tc actions flush action ctinfo","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action ctinfo dscp 0xfc000000 index 1","tc actions add action ctinfo dscp 0xfc000000 index 2"],"readback":[{"name":"dump","cmd":"tc actions ls action ctinfo"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-flush","json":"0","words":"actions flush action ctinfo"}} +{"id":"tcactwrite/ec-055","desc":"positive: opt=plain cmd=v-add:actions_add_action_sample_rate_100_group_5_index_1","cmd":"tc actions add action sample rate 100 group 5 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action sample"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-add","json":"0","words":"actions add action sample rate 100 group 5 index 1"}} +{"id":"tcactwrite/ec-056","desc":"positive: opt=plain cmd=v-change:actions_change_action_sample_rate_200_group_6_index_1","cmd":"tc actions change action sample rate 200 group 6 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action sample rate 100 group 5 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action sample"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-change","json":"0","words":"actions change action sample rate 200 group 6 index 1"}} +{"id":"tcactwrite/ec-057","desc":"positive: opt=plain cmd=v-replace:actions_replace_action_sample_rate_200_group_6_index_1","cmd":"tc actions replace action sample rate 200 group 6 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action sample rate 100 group 5 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action sample"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace","json":"0","words":"actions replace action sample rate 200 group 6 index 1"}} +{"id":"tcactwrite/ec-058","desc":"positive: opt=plain cmd=v-replace-new:actions_replace_action_sample_rate_200_group_6_index_2","cmd":"tc actions replace action sample rate 200 group 6 index 2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action sample"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace-new","json":"0","words":"actions replace action sample rate 200 group 6 index 2"}} +{"id":"tcactwrite/ec-059","desc":"positive: opt=plain cmd=v-delete:actions_delete_action_sample_index_1","cmd":"tc actions delete action sample index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action sample rate 100 group 5 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action sample"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-delete","json":"0","words":"actions delete action sample index 1"}} +{"id":"tcactwrite/ec-060","desc":"positive: opt=plain cmd=v-flush:actions_flush_action_sample","cmd":"tc actions flush action sample","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action sample rate 100 group 5 index 1","tc actions add action sample rate 100 group 5 index 2"],"readback":[{"name":"dump","cmd":"tc actions ls action sample"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-flush","json":"0","words":"actions flush action sample"}} +{"id":"tcactwrite/ec-061","desc":"positive: opt=plain cmd=v-add:actions_add_action_skbmod_swap_mac_index_1","cmd":"tc actions add action skbmod swap mac index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbmod"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-add","json":"0","words":"actions add action skbmod swap mac index 1"}} +{"id":"tcactwrite/ec-062","desc":"positive: opt=plain cmd=v-change:actions_change_action_skbmod_set_etype_0xbeef_index_1","cmd":"tc actions change action skbmod set etype 0xbeef index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action skbmod swap mac index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action skbmod"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-change","json":"0","words":"actions change action skbmod set etype 0xbeef index 1"}} +{"id":"tcactwrite/ec-063","desc":"positive: opt=plain cmd=v-replace:actions_replace_action_skbmod_set_etype_0xbeef_index_1","cmd":"tc actions replace action skbmod set etype 0xbeef index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action skbmod swap mac index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action skbmod"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace","json":"0","words":"actions replace action skbmod set etype 0xbeef index 1"}} +{"id":"tcactwrite/ec-064","desc":"positive: opt=plain cmd=v-replace-new:actions_replace_action_skbmod_set_etype_0xbeef_index_2","cmd":"tc actions replace action skbmod set etype 0xbeef index 2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbmod"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace-new","json":"0","words":"actions replace action skbmod set etype 0xbeef index 2"}} +{"id":"tcactwrite/ec-065","desc":"positive: opt=plain cmd=v-delete:actions_delete_action_skbmod_index_1","cmd":"tc actions delete action skbmod index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action skbmod swap mac index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action skbmod"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-delete","json":"0","words":"actions delete action skbmod index 1"}} +{"id":"tcactwrite/ec-066","desc":"positive: opt=plain cmd=v-flush:actions_flush_action_skbmod","cmd":"tc actions flush action skbmod","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action skbmod swap mac index 1","tc actions add action skbmod swap mac index 2"],"readback":[{"name":"dump","cmd":"tc actions ls action skbmod"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-flush","json":"0","words":"actions flush action skbmod"}} +{"id":"tcactwrite/ec-067","desc":"positive: opt=plain cmd=v-add:actions_add_action_mpls_pop_protocol_ipv4_index_1","cmd":"tc actions add action mpls pop protocol ipv4 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mpls"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-add","json":"0","words":"actions add action mpls pop protocol ipv4 index 1"}} +{"id":"tcactwrite/ec-068","desc":"positive: opt=plain cmd=v-change:actions_change_action_mpls_dec_ttl_index_1","cmd":"tc actions change action mpls dec_ttl index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action mpls pop protocol ipv4 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action mpls"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-change","json":"0","words":"actions change action mpls dec_ttl index 1"}} +{"id":"tcactwrite/ec-069","desc":"positive: opt=plain cmd=v-replace:actions_replace_action_mpls_dec_ttl_index_1","cmd":"tc actions replace action mpls dec_ttl index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action mpls pop protocol ipv4 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action mpls"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace","json":"0","words":"actions replace action mpls dec_ttl index 1"}} +{"id":"tcactwrite/ec-070","desc":"positive: opt=plain cmd=v-replace-new:actions_replace_action_mpls_dec_ttl_index_2","cmd":"tc actions replace action mpls dec_ttl index 2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mpls"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-replace-new","json":"0","words":"actions replace action mpls dec_ttl index 2"}} +{"id":"tcactwrite/ec-071","desc":"positive: opt=plain cmd=v-delete:actions_delete_action_mpls_index_1","cmd":"tc actions delete action mpls index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action mpls pop protocol ipv4 index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action mpls"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-delete","json":"0","words":"actions delete action mpls index 1"}} +{"id":"tcactwrite/ec-072","desc":"positive: opt=plain cmd=v-flush:actions_flush_action_mpls","cmd":"tc actions flush action mpls","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action mpls pop protocol ipv4 index 1","tc actions add action mpls pop protocol ipv4 index 2"],"readback":[{"name":"dump","cmd":"tc actions ls action mpls"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"v-flush","json":"0","words":"actions flush action mpls"}} +{"id":"tcactwrite/ec-073","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_mtu_2k_index_1","cmd":"tc actions add action police rate 1mbit burst 10k mtu 2k index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k mtu 2k index 1"}} +{"id":"tcactwrite/ec-074","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_peakrate_2mbit_mtu_2k_index_1","cmd":"tc actions add action police rate 1mbit burst 10k peakrate 2mbit mtu 2k index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k peakrate 2mbit mtu 2k index 1"}} +{"id":"tcactwrite/ec-075","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k/8_mtu_2k/8_index_1","cmd":"tc actions add action police rate 1mbit burst 10k/8 mtu 2k/8 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k/8 mtu 2k/8 index 1"}} +{"id":"tcactwrite/ec-076","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_overhead_20_linklayer_atm_mpu_64_index_1","cmd":"tc actions add action police rate 1mbit burst 10k overhead 20 linklayer atm mpu 64 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k overhead 20 linklayer atm mpu 64 index 1"}} +{"id":"tcactwrite/ec-077","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_linklayer_ethernet_index_1","cmd":"tc actions add action police rate 1mbit burst 10k linklayer ethernet index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k linklayer ethernet index 1"}} +{"id":"tcactwrite/ec-078","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_conform-exceed_drop/pipe_index_1","cmd":"tc actions add action police rate 1mbit burst 10k conform-exceed drop/pipe index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k conform-exceed drop/pipe index 1"}} +{"id":"tcactwrite/ec-079","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_conform-exceed_pipe/reclassify_index_1","cmd":"tc actions add action police rate 1mbit burst 10k conform-exceed pipe/reclassify index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k conform-exceed pipe/reclassify index 1"}} +{"id":"tcactwrite/ec-080","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_conform-exceed_continue_index_1","cmd":"tc actions add action police rate 1mbit burst 10k conform-exceed continue index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k conform-exceed continue index 1"}} +{"id":"tcactwrite/ec-081","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_drop_index_1","cmd":"tc actions add action police rate 1mbit burst 10k drop index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k drop index 1"}} +{"id":"tcactwrite/ec-082","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_pass_index_1","cmd":"tc actions add action police rate 1mbit burst 10k pass index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k pass index 1"}} +{"id":"tcactwrite/ec-083","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_reclassify_index_1","cmd":"tc actions add action police rate 1mbit burst 10k reclassify index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k reclassify index 1"}} +{"id":"tcactwrite/ec-084","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_shot_index_1","cmd":"tc actions add action police rate 1mbit burst 10k shot index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k shot index 1"}} +{"id":"tcactwrite/ec-085","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_ok_index_1","cmd":"tc actions add action police rate 1mbit burst 10k ok index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k ok index 1"}} +{"id":"tcactwrite/ec-086","desc":"positive: opt=plain cmd=pol:actions_add_action_police_pkts_rate_1000_pkts_burst_100_index_1","cmd":"tc actions add action police pkts_rate 1000 pkts_burst 100 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police pkts_rate 1000 pkts_burst 100 index 1"}} +{"id":"tcactwrite/ec-087","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_40gbit_burst_1m_index_1","cmd":"tc actions add action police rate 40gbit burst 1m index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 40gbit burst 1m index 1"}} +{"id":"tcactwrite/ec-088","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_peakrate_40gbit_mtu_2k_index_1","cmd":"tc actions add action police rate 1mbit burst 10k peakrate 40gbit mtu 2k index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k peakrate 40gbit mtu 2k index 1"}} +{"id":"tcactwrite/ec-089","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_100kbit_burst_10k_index_1","cmd":"tc actions add action police rate 100kbit burst 10k index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 100kbit burst 10k index 1"}} +{"id":"tcactwrite/ec-090","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_1Mibit_burst_10Kb_index_1","cmd":"tc actions add action police rate 1Mibit burst 10Kb index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1Mibit burst 10Kb index 1"}} +{"id":"tcactwrite/ec-091","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_125000bps_burst_10k_index_1","cmd":"tc actions add action police rate 125000bps burst 10k index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 125000bps burst 10k index 1"}} +{"id":"tcactwrite/ec-092","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_action_drop_index_1","cmd":"tc actions add action police rate 1mbit burst 10k action drop index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k action drop index 1"}} +{"id":"tcactwrite/ec-093","desc":"positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_index_1_cookie_0102","cmd":"tc actions add action police rate 1mbit burst 10k index 1 cookie 0102","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k index 1 cookie 0102"}} +{"id":"tcactwrite/ec-094","desc":"corner: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k","cmd":"tc actions add action police rate 1mbit burst 10k","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k"}} +{"id":"tcactwrite/ec-095","desc":"corner: opt=plain cmd=pol:actions_add_action_police_index_1_rate_1mbit_burst_10k","cmd":"tc actions add action police index 1 rate 1mbit burst 10k","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police index 1 rate 1mbit burst 10k"}} +{"id":"tcactwrite/ec-096","desc":"boundary: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_mtu_256_index_1","cmd":"tc actions add action police rate 1mbit burst 10k mtu 256 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k mtu 256 index 1"}} +{"id":"tcactwrite/ec-097","desc":"boundary: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_mpu_65535_index_1","cmd":"tc actions add action police rate 1mbit burst 10k mpu 65535 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol","json":"0","words":"actions add action police rate 1mbit burst 10k mpu 65535 index 1"}} +{"id":"tcactwrite/ec-098","desc":"boundary: opt=plain cmd=w163:actions_add_action_police_rate_1mbit_burst_10k_mpu_65536_index_1","cmd":"tc actions add action police rate 1mbit burst 10k mpu 65536 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w163","json":"0","words":"actions add action police rate 1mbit burst 10k mpu 65536 index 1"}} +{"id":"tcactwrite/ec-099","desc":"corner: opt=plain cmd=w163-norate:actions_add_action_police_pkts_rate_1000_pkts_burst_100_mpu_64_overhead_4_index_1","cmd":"tc actions add action police pkts_rate 1000 pkts_burst 100 mpu 64 overhead 4 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w163-norate","json":"0","words":"actions add action police pkts_rate 1000 pkts_burst 100 mpu 64 overhead 4 index 1"}} +{"id":"tcactwrite/ec-100","desc":"corner: opt=plain cmd=w165:actions_add_action_police_rate_1mbit_burst_10k_mtu_4294967295_index_1","cmd":"tc actions add action police rate 1mbit burst 10k mtu 4294967295 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w165","json":"0","words":"actions add action police rate 1mbit burst 10k mtu 4294967295 index 1"}} +{"id":"tcactwrite/ec-101","desc":"corner: opt=plain cmd=w166-0:actions_add_action_police_rate_0_rate_1mbit_burst_10k_index_1","cmd":"tc actions add action police rate 0 rate 1mbit burst 10k index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w166-0","json":"0","words":"actions add action police rate 0 rate 1mbit burst 10k index 1"}} +{"id":"tcactwrite/ec-102","desc":"corner: opt=plain cmd=w167:actions_add_action_police_pkts_rate_1_pkts_burst_1000_index_1","cmd":"tc actions add action police pkts_rate 1 pkts_burst 1000 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w167","json":"0","words":"actions add action police pkts_rate 1 pkts_burst 1000 index 1"}} +{"id":"tcactwrite/ec-103","desc":"corner: opt=plain cmd=w168:actions_add_action_police_rate_1mbit_burst_10k_conform-exceed_drop_pass_index_1","cmd":"tc actions add action police rate 1mbit burst 10k conform-exceed drop pass index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w168","json":"0","words":"actions add action police rate 1mbit burst 10k conform-exceed drop pass index 1"}} +{"id":"tcactwrite/ec-104","desc":"corner: opt=plain cmd=w170-p:actions_add_action_police_rate_1mbit_burst_10k_p_2mbit_mtu_2k_index_1","cmd":"tc actions add action police rate 1mbit burst 10k p 2mbit mtu 2k index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w170-p","json":"0","words":"actions add action police rate 1mbit burst 10k p 2mbit mtu 2k index 1"}} +{"id":"tcactwrite/ec-105","desc":"corner: opt=plain cmd=w170-o:actions_add_action_police_rate_1mbit_burst_10k_o_index_1","cmd":"tc actions add action police rate 1mbit burst 10k o index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w170-o","json":"0","words":"actions add action police rate 1mbit burst 10k o index 1"}} +{"id":"tcactwrite/ec-106","desc":"corner: opt=plain cmd=w157:actions_add_action_police_rate_1mbit_burst_10k_trap_index_1","cmd":"tc actions add action police rate 1mbit burst 10k trap index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w157","json":"0","words":"actions add action police rate 1mbit burst 10k trap index 1"}} +{"id":"tcactwrite/ec-107","desc":"corner: opt=plain cmd=pol-none:actions_add_action_police_index_1","cmd":"tc actions add action police index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"pol-none","json":"0","words":"actions add action police index 1"}} +{"id":"tcactwrite/ec-108","desc":"corner: opt=plain cmd=w166:actions_add_action_police_rate_7bit_burst_10k_mtu_1500_index_1","cmd":"tc actions add action police rate 7bit burst 10k mtu 1500 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w166","json":"0","words":"actions add action police rate 7bit burst 10k mtu 1500 index 1"}} +{"id":"tcactwrite/ec-109","desc":"corner: opt=plain cmd=w166-nan:actions_add_action_police_rate_nan_burst_10k_index_1","cmd":"tc actions add action police rate nan burst 10k index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action police"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w166-nan","json":"0","words":"actions add action police rate nan burst 10k index 1"}} +{"id":"tcactwrite/ec-110","desc":"positive: opt=plain cmd=mir:actions_add_action_mirred_egress_mirror_dev_d1_index_1","cmd":"tc actions add action mirred egress mirror dev d1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mirred"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"mir","json":"0","words":"actions add action mirred egress mirror dev d1 index 1"}} +{"id":"tcactwrite/ec-111","desc":"positive: opt=plain cmd=mir:actions_add_action_mirred_ingress_redirect_dev_d1_index_1","cmd":"tc actions add action mirred ingress redirect dev d1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mirred"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"mir","json":"0","words":"actions add action mirred ingress redirect dev d1 index 1"}} +{"id":"tcactwrite/ec-112","desc":"positive: opt=plain cmd=mir:actions_add_action_mirred_ingress_mirror_dev_d1_index_1","cmd":"tc actions add action mirred ingress mirror dev d1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mirred"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"mir","json":"0","words":"actions add action mirred ingress mirror dev d1 index 1"}} +{"id":"tcactwrite/ec-113","desc":"positive: opt=plain cmd=mir:actions_add_action_mirred_egress_redirect_blockid_10_index_1","cmd":"tc actions add action mirred egress redirect blockid 10 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mirred"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"mir","json":"0","words":"actions add action mirred egress redirect blockid 10 index 1"}} +{"id":"tcactwrite/ec-114","desc":"positive: opt=plain cmd=mir:actions_add_action_mirred_egress_mirror_dev_d1_pipe_index_1","cmd":"tc actions add action mirred egress mirror dev d1 pipe index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mirred"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"mir","json":"0","words":"actions add action mirred egress mirror dev d1 pipe index 1"}} +{"id":"tcactwrite/ec-115","desc":"positive: opt=plain cmd=mir:actions_add_action_mirred_egress_mirror_dev_d1_drop_index_1","cmd":"tc actions add action mirred egress mirror dev d1 drop index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mirred"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"mir","json":"0","words":"actions add action mirred egress mirror dev d1 drop index 1"}} +{"id":"tcactwrite/ec-116","desc":"positive: opt=plain cmd=mir:actions_add_action_mirred_egress_redirect_dev_d1_index_1_cookie_aabb","cmd":"tc actions add action mirred egress redirect dev d1 index 1 cookie aabb","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mirred"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"mir","json":"0","words":"actions add action mirred egress redirect dev d1 index 1 cookie aabb"}} +{"id":"tcactwrite/ec-117","desc":"corner: opt=plain cmd=w158:actions_add_action_mirred_egress_redirect_dev_d1_pipe_index_1","cmd":"tc actions add action mirred egress redirect dev d1 pipe index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mirred"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w158","json":"0","words":"actions add action mirred egress redirect dev d1 pipe index 1"}} +{"id":"tcactwrite/ec-118","desc":"corner: opt=plain cmd=w159:actions_add_action_mirred_egress_bogus_egress_redirect_dev_d1_index_1","cmd":"tc actions add action mirred egress bogus egress redirect dev d1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mirred"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w159","json":"0","words":"actions add action mirred egress bogus egress redirect dev d1 index 1"}} +{"id":"tcactwrite/ec-119","desc":"corner: opt=plain cmd=w162-junk:actions_add_action_mirred_egress_redirect_dev_if3junk_index_1","cmd":"tc actions add action mirred egress redirect dev if3junk index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mirred"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"errno":"ENODEV","refused_by":"kernel-ignored"},"axes":{"fix":"w162-junk","json":"0","words":"actions add action mirred egress redirect dev if3junk index 1"}} +{"id":"tcactwrite/ec-120","desc":"corner: opt=plain cmd=w170-i:actions_add_action_mirred_i_redirect_dev_d1_index_1","cmd":"tc actions add action mirred i redirect dev d1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mirred"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w170-i","json":"0","words":"actions add action mirred i redirect dev d1 index 1"}} +{"id":"tcactwrite/ec-121","desc":"corner: opt=plain cmd=w175-mir:actions_add_action_mirred_egress_mirror_dev_d1_index_1_pipe","cmd":"tc actions add action mirred egress mirror dev d1 index 1 pipe","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mirred"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w175-mir","json":"0","words":"actions add action mirred egress mirror dev d1 index 1 pipe"}} +{"id":"tcactwrite/ec-122","desc":"positive: opt=plain cmd=skb:actions_add_action_skbedit_queue_mapping_3_index_1","cmd":"tc actions add action skbedit queue_mapping 3 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"skb","json":"0","words":"actions add action skbedit queue_mapping 3 index 1"}} +{"id":"tcactwrite/ec-123","desc":"positive: opt=plain cmd=skb:actions_add_action_skbedit_priority_1:2_index_1","cmd":"tc actions add action skbedit priority 1:2 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"skb","json":"0","words":"actions add action skbedit priority 1:2 index 1"}} +{"id":"tcactwrite/ec-124","desc":"positive: opt=plain cmd=skb:actions_add_action_skbedit_mark_0x10/0xff_index_1","cmd":"tc actions add action skbedit mark 0x10/0xff index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"skb","json":"0","words":"actions add action skbedit mark 0x10/0xff index 1"}} +{"id":"tcactwrite/ec-125","desc":"positive: opt=plain cmd=skb:actions_add_action_skbedit_ptype_host_index_1","cmd":"tc actions add action skbedit ptype host index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"skb","json":"0","words":"actions add action skbedit ptype host index 1"}} +{"id":"tcactwrite/ec-126","desc":"positive: opt=plain cmd=skb:actions_add_action_skbedit_ptype_otherhost_index_1","cmd":"tc actions add action skbedit ptype otherhost index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"skb","json":"0","words":"actions add action skbedit ptype otherhost index 1"}} +{"id":"tcactwrite/ec-127","desc":"positive: opt=plain cmd=skb:actions_add_action_skbedit_ptype_broadcast_index_1","cmd":"tc actions add action skbedit ptype broadcast index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"skb","json":"0","words":"actions add action skbedit ptype broadcast index 1"}} +{"id":"tcactwrite/ec-128","desc":"positive: opt=plain cmd=skb:actions_add_action_skbedit_ptype_multicast_index_1","cmd":"tc actions add action skbedit ptype multicast index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"skb","json":"0","words":"actions add action skbedit ptype multicast index 1"}} +{"id":"tcactwrite/ec-129","desc":"positive: opt=plain cmd=skb:actions_add_action_skbedit_inheritdsfield_index_1","cmd":"tc actions add action skbedit inheritdsfield index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"skb","json":"0","words":"actions add action skbedit inheritdsfield index 1"}} +{"id":"tcactwrite/ec-130","desc":"positive: opt=plain cmd=skb:actions_add_action_skbedit_queue_mapping_3_priority_5_mark_7_ptype_host_inheritdsfield_pipe_index_1","cmd":"tc actions add action skbedit queue_mapping 3 priority 5 mark 7 ptype host inheritdsfield pipe index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"skb","json":"0","words":"actions add action skbedit queue_mapping 3 priority 5 mark 7 ptype host inheritdsfield pipe index 1"}} +{"id":"tcactwrite/ec-131","desc":"boundary: opt=plain cmd=skb:actions_add_action_skbedit_queue_mapping_65535_index_1","cmd":"tc actions add action skbedit queue_mapping 65535 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"skb","json":"0","words":"actions add action skbedit queue_mapping 65535 index 1"}} +{"id":"tcactwrite/ec-132","desc":"boundary: opt=plain cmd=w174:actions_add_action_skbedit_priority_10_index_1","cmd":"tc actions add action skbedit priority 10 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w174","json":"0","words":"actions add action skbedit priority 10 index 1"}} +{"id":"tcactwrite/ec-133","desc":"boundary: opt=plain cmd=w174-wrap:actions_add_action_skbedit_priority_100000001_index_1","cmd":"tc actions add action skbedit priority 100000001 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w174-wrap","json":"0","words":"actions add action skbedit priority 100000001 index 1"}} +{"id":"tcactwrite/ec-134","desc":"corner: opt=plain cmd=w174-mark:actions_add_action_skbedit_mark_5/0xff_mark_6_index_1","cmd":"tc actions add action skbedit mark 5/0xff mark 6 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w174-mark","json":"0","words":"actions add action skbedit mark 5/0xff mark 6 index 1"}} +{"id":"tcactwrite/ec-135","desc":"corner: opt=plain cmd=w174-base:actions_add_action_skbedit_mark_010_index_1","cmd":"tc actions add action skbedit mark 010 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w174-base","json":"0","words":"actions add action skbedit mark 010 index 1"}} +{"id":"tcactwrite/ec-136","desc":"corner: opt=plain cmd=w170-skb:actions_add_action_skbedit_p_5_index_1","cmd":"tc actions add action skbedit p 5 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w170-skb","json":"0","words":"actions add action skbedit p 5 index 1"}} +{"id":"tcactwrite/ec-137","desc":"corner: opt=plain cmd=w175:actions_add_action_skbedit_mark_1_index_5_pipe","cmd":"tc actions add action skbedit mark 1 index 5 pipe","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w175","json":"0","words":"actions add action skbedit mark 1 index 5 pipe"}} +{"id":"tcactwrite/ec-138","desc":"positive: opt=plain cmd=vl:actions_add_action_vlan_push_id_100_protocol_802.1ad_priority_3_index_1","cmd":"tc actions add action vlan push id 100 protocol 802.1ad priority 3 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"vl","json":"0","words":"actions add action vlan push id 100 protocol 802.1ad priority 3 index 1"}} +{"id":"tcactwrite/ec-139","desc":"positive: opt=plain cmd=vl:actions_add_action_vlan_push_id_100_protocol_802.1q_index_1","cmd":"tc actions add action vlan push id 100 protocol 802.1q index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"vl","json":"0","words":"actions add action vlan push id 100 protocol 802.1q index 1"}} +{"id":"tcactwrite/ec-140","desc":"positive: opt=plain cmd=vl:actions_add_action_vlan_modify_id_200_priority_7_index_1","cmd":"tc actions add action vlan modify id 200 priority 7 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"vl","json":"0","words":"actions add action vlan modify id 200 priority 7 index 1"}} +{"id":"tcactwrite/ec-141","desc":"positive: opt=plain cmd=vl:actions_add_action_vlan_push_eth_dst_mac_02:00:00:00:00:01_src_mac_02:00:00:00:00:02_index_1","cmd":"tc actions add action vlan push_eth dst_mac 02:00:00:00:00:01 src_mac 02:00:00:00:00:02 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"vl","json":"0","words":"actions add action vlan push_eth dst_mac 02:00:00:00:00:01 src_mac 02:00:00:00:00:02 index 1"}} +{"id":"tcactwrite/ec-142","desc":"positive: opt=plain cmd=vl:actions_add_action_vlan_pop_eth_index_1","cmd":"tc actions add action vlan pop_eth index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"vl","json":"0","words":"actions add action vlan pop_eth index 1"}} +{"id":"tcactwrite/ec-143","desc":"positive: opt=plain cmd=vl:actions_add_action_vlan_pop_pipe_index_1","cmd":"tc actions add action vlan pop pipe index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"vl","json":"0","words":"actions add action vlan pop pipe index 1"}} +{"id":"tcactwrite/ec-144","desc":"boundary: opt=plain cmd=vl:actions_add_action_vlan_push_id_0_index_1","cmd":"tc actions add action vlan push id 0 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"vl","json":"0","words":"actions add action vlan push id 0 index 1"}} +{"id":"tcactwrite/ec-145","desc":"boundary: opt=plain cmd=vl:actions_add_action_vlan_push_id_4094_index_1","cmd":"tc actions add action vlan push id 4094 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"vl","json":"0","words":"actions add action vlan push id 4094 index 1"}} +{"id":"tcactwrite/ec-146","desc":"corner: opt=plain cmd=w171:actions_add_action_vlan_push_id_010_index_1","cmd":"tc actions add action vlan push id 010 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w171","json":"0","words":"actions add action vlan push id 010 index 1"}} +{"id":"tcactwrite/ec-147","desc":"corner: opt=plain cmd=w172:actions_add_action_vlan_push_eth_dst_mac_aa_src_mac_1.2.3.4_index_1","cmd":"tc actions add action vlan push_eth dst_mac aa src_mac 1.2.3.4 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w172","json":"0","words":"actions add action vlan push_eth dst_mac aa src_mac 1.2.3.4 index 1"}} +{"id":"tcactwrite/ec-148","desc":"corner: opt=plain cmd=w172-long:actions_add_action_vlan_push_eth_dst_mac_02:00:00:00:00:01:02:03_src_mac_02:00:00:00:00:02_index_1","cmd":"tc actions add action vlan push_eth dst_mac 02:00:00:00:00:01:02:03 src_mac 02:00:00:00:00:02 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w172-long","json":"0","words":"actions add action vlan push_eth dst_mac 02:00:00:00:00:01:02:03 src_mac 02:00:00:00:00:02 index 1"}} +{"id":"tcactwrite/ec-149","desc":"corner: opt=plain cmd=w170-vl:actions_add_action_vlan_p_index_1","cmd":"tc actions add action vlan p index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w170-vl","json":"0","words":"actions add action vlan p index 1"}} +{"id":"tcactwrite/ec-150","desc":"corner: opt=plain cmd=w175-vl:actions_add_action_vlan_pop_index_3_drop","cmd":"tc actions add action vlan pop index 3 drop","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action vlan"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w175-vl","json":"0","words":"actions add action vlan pop index 3 drop"}} +{"id":"tcactwrite/ec-151","desc":"positive: opt=plain cmd=cs:actions_add_action_csum_iph_index_1","cmd":"tc actions add action csum iph index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cs","json":"0","words":"actions add action csum iph index 1"}} +{"id":"tcactwrite/ec-152","desc":"positive: opt=plain cmd=cs:actions_add_action_csum_icmp_index_1","cmd":"tc actions add action csum icmp index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cs","json":"0","words":"actions add action csum icmp index 1"}} +{"id":"tcactwrite/ec-153","desc":"positive: opt=plain cmd=cs:actions_add_action_csum_igmp_index_1","cmd":"tc actions add action csum igmp index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cs","json":"0","words":"actions add action csum igmp index 1"}} +{"id":"tcactwrite/ec-154","desc":"positive: opt=plain cmd=cs:actions_add_action_csum_tcp_index_1","cmd":"tc actions add action csum tcp index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cs","json":"0","words":"actions add action csum tcp index 1"}} +{"id":"tcactwrite/ec-155","desc":"positive: opt=plain cmd=cs:actions_add_action_csum_udp_index_1","cmd":"tc actions add action csum udp index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cs","json":"0","words":"actions add action csum udp index 1"}} +{"id":"tcactwrite/ec-156","desc":"positive: opt=plain cmd=cs:actions_add_action_csum_udplite_index_1","cmd":"tc actions add action csum udplite index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cs","json":"0","words":"actions add action csum udplite index 1"}} +{"id":"tcactwrite/ec-157","desc":"positive: opt=plain cmd=cs:actions_add_action_csum_sctp_index_1","cmd":"tc actions add action csum sctp index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cs","json":"0","words":"actions add action csum sctp index 1"}} +{"id":"tcactwrite/ec-158","desc":"boundary: opt=plain cmd=cs:actions_add_action_csum_iph_icmp_igmp_tcp_udp_udplite_sctp_index_1","cmd":"tc actions add action csum iph icmp igmp tcp udp udplite sctp index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cs","json":"0","words":"actions add action csum iph icmp igmp tcp udp udplite sctp index 1"}} +{"id":"tcactwrite/ec-159","desc":"positive: opt=plain cmd=cs:actions_add_action_csum_iph_and_tcp_and_udp_drop_index_1","cmd":"tc actions add action csum iph and tcp and udp drop index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cs","json":"0","words":"actions add action csum iph and tcp and udp drop index 1"}} +{"id":"tcactwrite/ec-160","desc":"corner: opt=plain cmd=w173:actions_add_action_csum_index_5","cmd":"tc actions add action csum index 5","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w173","json":"0","words":"actions add action csum index 5"}} +{"id":"tcactwrite/ec-161","desc":"corner: opt=plain cmd=w173-drop:actions_add_action_csum_index_5_drop","cmd":"tc actions add action csum index 5 drop","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w173-drop","json":"0","words":"actions add action csum index 5 drop"}} +{"id":"tcactwrite/ec-162","desc":"corner: opt=plain cmd=w170-cs:actions_add_action_csum_i_u_index_1","cmd":"tc actions add action csum i u index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w170-cs","json":"0","words":"actions add action csum i u index 1"}} +{"id":"tcactwrite/ec-163","desc":"corner: opt=plain cmd=w175-cs:actions_add_action_csum_tcp_index_3_pipe","cmd":"tc actions add action csum tcp index 3 pipe","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action csum"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w175-cs","json":"0","words":"actions add action csum tcp index 3 pipe"}} +{"id":"tcactwrite/ec-164","desc":"positive: opt=plain cmd=nat:actions_add_action_nat_ingress_10.0.0.0/24_192.168.0.1_index_1","cmd":"tc actions add action nat ingress 10.0.0.0/24 192.168.0.1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action nat"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"nat","json":"0","words":"actions add action nat ingress 10.0.0.0/24 192.168.0.1 index 1"}} +{"id":"tcactwrite/ec-165","desc":"positive: opt=plain cmd=nat:actions_add_action_nat_egress_10.1.2.3_10.4.5.6_index_1","cmd":"tc actions add action nat egress 10.1.2.3 10.4.5.6 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action nat"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"nat","json":"0","words":"actions add action nat egress 10.1.2.3 10.4.5.6 index 1"}} +{"id":"tcactwrite/ec-166","desc":"positive: opt=plain cmd=nat:actions_add_action_nat_egress_10.1.2.3/32_10.4.5.6_drop_index_1","cmd":"tc actions add action nat egress 10.1.2.3/32 10.4.5.6 drop index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action nat"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"nat","json":"0","words":"actions add action nat egress 10.1.2.3/32 10.4.5.6 drop index 1"}} +{"id":"tcactwrite/ec-167","desc":"boundary: opt=plain cmd=nat:actions_add_action_nat_egress_0.0.0.0/0_10.4.5.6_index_1","cmd":"tc actions add action nat egress 0.0.0.0/0 10.4.5.6 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action nat"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"nat","json":"0","words":"actions add action nat egress 0.0.0.0/0 10.4.5.6 index 1"}} +{"id":"tcactwrite/ec-168","desc":"boundary: opt=plain cmd=nat:actions_add_action_nat_ingress_default_10.4.5.6_index_1","cmd":"tc actions add action nat ingress default 10.4.5.6 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action nat"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"nat","json":"0","words":"actions add action nat ingress default 10.4.5.6 index 1"}} +{"id":"tcactwrite/ec-169","desc":"corner: opt=plain cmd=w193:actions_add_action_nat_egress_10.0.0.0/8_2.0.0.0_nat_ingress_11.0.0.0/8_3.0.0.0_index_1","cmd":"tc actions add action nat egress 10.0.0.0/8 2.0.0.0 nat ingress 11.0.0.0/8 3.0.0.0 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action nat"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w193","json":"0","words":"actions add action nat egress 10.0.0.0/8 2.0.0.0 nat ingress 11.0.0.0/8 3.0.0.0 index 1"}} +{"id":"tcactwrite/ec-170","desc":"corner: opt=plain cmd=w194:actions_add_action_nat_egress_10.0.0.0/8_1.2.3.4/16_index_1","cmd":"tc actions add action nat egress 10.0.0.0/8 1.2.3.4/16 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action nat"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w194","json":"0","words":"actions add action nat egress 10.0.0.0/8 1.2.3.4/16 index 1"}} +{"id":"tcactwrite/ec-171","desc":"corner: opt=plain cmd=w195:actions_add_action_nat_egress_010.0.0.1_10.1_index_1","cmd":"tc actions add action nat egress 010.0.0.1 10.1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action nat"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w195","json":"0","words":"actions add action nat egress 010.0.0.1 10.1 index 1"}} +{"id":"tcactwrite/ec-172","desc":"corner: opt=plain cmd=w195-mask:actions_add_action_nat_egress_10.0.0.0/0x10_10.1.0.0_index_1","cmd":"tc actions add action nat egress 10.0.0.0/0x10 10.1.0.0 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action nat"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w195-mask","json":"0","words":"actions add action nat egress 10.0.0.0/0x10 10.1.0.0 index 1"}} +{"id":"tcactwrite/ec-173","desc":"corner: opt=plain cmd=w195-dot:actions_add_action_nat_egress_10.0.0.0/255.255.0.0_10.1.0.0_index_1","cmd":"tc actions add action nat egress 10.0.0.0/255.255.0.0 10.1.0.0 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action nat"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w195-dot","json":"0","words":"actions add action nat egress 10.0.0.0/255.255.0.0 10.1.0.0 index 1"}} +{"id":"tcactwrite/ec-174","desc":"positive: opt=plain cmd=sim:actions_add_action_simple_sdata_hello_index_1","cmd":"tc actions add action simple sdata hello index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action simple"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"sim","json":"0","words":"actions add action simple sdata hello index 1"}} +{"id":"tcactwrite/ec-175","desc":"positive: opt=plain cmd=sim:actions_add_action_simple_sdata_hello_drop_index_1","cmd":"tc actions add action simple sdata hello drop index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action simple"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"sim","json":"0","words":"actions add action simple sdata hello drop index 1"}} +{"id":"tcactwrite/ec-176","desc":"boundary: opt=plain cmd=sim:actions_add_action_simple_sdata_sssssssssssssssssssssssssssssss_index_1","cmd":"tc actions add action simple sdata sssssssssssssssssssssssssssssss index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action simple"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"sim","json":"0","words":"actions add action simple sdata sssssssssssssssssssssssssssssss index 1"}} +{"id":"tcactwrite/ec-177","desc":"boundary: opt=plain cmd=sim:actions_add_action_simple_sdata_ssssssssssssssssssssssssssssss_index_1","cmd":"tc actions add action simple sdata ssssssssssssssssssssssssssssss index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action simple"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"sim","json":"0","words":"actions add action simple sdata ssssssssssssssssssssssssssssss index 1"}} +{"id":"tcactwrite/ec-178","desc":"corner: opt=plain cmd=w189:actions_add_action_simple_sdata_hi_index_7","cmd":"tc actions add action simple sdata hi index 7","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action simple"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w189","json":"0","words":"actions add action simple sdata hi index 7"}} +{"id":"tcactwrite/ec-179","desc":"corner: opt=plain cmd=w190:actions_add_action_simple_sdata_x_index_5_drop","cmd":"tc actions add action simple sdata x index 5 drop","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action simple"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w190","json":"0","words":"actions add action simple sdata x index 5 drop"}} +{"id":"tcactwrite/ec-180","desc":"positive: opt=plain cmd=cm:actions_add_action_connmark_index_1","cmd":"tc actions add action connmark index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action connmark"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cm","json":"0","words":"actions add action connmark index 1"}} +{"id":"tcactwrite/ec-181","desc":"positive: opt=plain cmd=cm:actions_add_action_connmark_zone_0_index_1","cmd":"tc actions add action connmark zone 0 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action connmark"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cm","json":"0","words":"actions add action connmark zone 0 index 1"}} +{"id":"tcactwrite/ec-182","desc":"boundary: opt=plain cmd=cm:actions_add_action_connmark_zone_65535_index_1","cmd":"tc actions add action connmark zone 65535 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action connmark"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cm","json":"0","words":"actions add action connmark zone 65535 index 1"}} +{"id":"tcactwrite/ec-183","desc":"positive: opt=plain cmd=cm:actions_add_action_connmark_zone_5_drop_index_1","cmd":"tc actions add action connmark zone 5 drop index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action connmark"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cm","json":"0","words":"actions add action connmark zone 5 drop index 1"}} +{"id":"tcactwrite/ec-184","desc":"positive: opt=plain cmd=cti:actions_add_action_ctinfo_dscp_0xfc000000_0x01000000_index_1","cmd":"tc actions add action ctinfo dscp 0xfc000000 0x01000000 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action ctinfo"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cti","json":"0","words":"actions add action ctinfo dscp 0xfc000000 0x01000000 index 1"}} +{"id":"tcactwrite/ec-185","desc":"positive: opt=plain cmd=cti:actions_add_action_ctinfo_cpmark_0xffffffff_zone_3_index_1","cmd":"tc actions add action ctinfo cpmark 0xffffffff zone 3 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action ctinfo"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cti","json":"0","words":"actions add action ctinfo cpmark 0xffffffff zone 3 index 1"}} +{"id":"tcactwrite/ec-186","desc":"positive: opt=plain cmd=cti:actions_add_action_ctinfo_cpmark_index_1","cmd":"tc actions add action ctinfo cpmark index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action ctinfo"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cti","json":"0","words":"actions add action ctinfo cpmark index 1"}} +{"id":"tcactwrite/ec-187","desc":"positive: opt=plain cmd=cti:actions_add_action_ctinfo_dscp_0x3f_index_1","cmd":"tc actions add action ctinfo dscp 0x3f index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action ctinfo"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cti","json":"0","words":"actions add action ctinfo dscp 0x3f index 1"}} +{"id":"tcactwrite/ec-188","desc":"positive: opt=plain cmd=cti:actions_add_action_ctinfo_dscp_0xfc000000_cpmark_0xff_zone_3_pipe_index_1","cmd":"tc actions add action ctinfo dscp 0xfc000000 cpmark 0xff zone 3 pipe index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action ctinfo"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cti","json":"0","words":"actions add action ctinfo dscp 0xfc000000 cpmark 0xff zone 3 pipe index 1"}} +{"id":"tcactwrite/ec-189","desc":"corner: opt=plain cmd=w209:actions_add_action_ctinfo_cpmark_0_index_1","cmd":"tc actions add action ctinfo cpmark 0 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action ctinfo"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w209","json":"0","words":"actions add action ctinfo cpmark 0 index 1"}} +{"id":"tcactwrite/ec-190","desc":"corner: opt=plain cmd=cti-none:actions_add_action_ctinfo_index_1","cmd":"tc actions add action ctinfo index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action ctinfo"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cti-none","json":"0","words":"actions add action ctinfo index 1"}} +{"id":"tcactwrite/ec-191","desc":"corner: opt=plain cmd=w210:actions_add_action_ctinfo_c_dscp_0xfc000000_index_1","cmd":"tc actions add action ctinfo c dscp 0xfc000000 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action ctinfo"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w210","json":"0","words":"actions add action ctinfo c dscp 0xfc000000 index 1"}} +{"id":"tcactwrite/ec-192","desc":"corner: opt=plain cmd=w210-cm:actions_add_action_connmark_co_zone_5_index_1","cmd":"tc actions add action connmark co zone 5 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action connmark"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w210-cm","json":"0","words":"actions add action connmark co zone 5 index 1"}} +{"id":"tcactwrite/ec-193","desc":"positive: opt=plain cmd=smp:actions_add_action_sample_rate_100_group_5_trunc_64_index_1","cmd":"tc actions add action sample rate 100 group 5 trunc 64 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action sample"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"smp","json":"0","words":"actions add action sample rate 100 group 5 trunc 64 index 1"}} +{"id":"tcactwrite/ec-194","desc":"positive: opt=plain cmd=smp:actions_add_action_sample_rate_1_group_1_index_1","cmd":"tc actions add action sample rate 1 group 1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action sample"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"smp","json":"0","words":"actions add action sample rate 1 group 1 index 1"}} +{"id":"tcactwrite/ec-195","desc":"positive: opt=plain cmd=smp:actions_add_action_sample_rate_100_group_5_drop_index_1","cmd":"tc actions add action sample rate 100 group 5 drop index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action sample"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"smp","json":"0","words":"actions add action sample rate 100 group 5 drop index 1"}} +{"id":"tcactwrite/ec-196","desc":"boundary: opt=plain cmd=smp:actions_add_action_sample_rate_4294967295_group_4294967295_trunc_4294967295_index_1","cmd":"tc actions add action sample rate 4294967295 group 4294967295 trunc 4294967295 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action sample"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"smp","json":"0","words":"actions add action sample rate 4294967295 group 4294967295 trunc 4294967295 index 1"}} +{"id":"tcactwrite/ec-197","desc":"boundary: opt=plain cmd=smp:actions_add_action_sample_rate_1_group_1_trunc_0_index_1","cmd":"tc actions add action sample rate 1 group 1 trunc 0 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action sample"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"smp","json":"0","words":"actions add action sample rate 1 group 1 trunc 0 index 1"}} +{"id":"tcactwrite/ec-198","desc":"positive: opt=plain cmd=smod:actions_add_action_skbmod_set_dmac_02:00:00:00:00:01_set_smac_02:00:00:00:00:02_index_1","cmd":"tc actions add action skbmod set dmac 02:00:00:00:00:01 set smac 02:00:00:00:00:02 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbmod"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"smod","json":"0","words":"actions add action skbmod set dmac 02:00:00:00:00:01 set smac 02:00:00:00:00:02 index 1"}} +{"id":"tcactwrite/ec-199","desc":"positive: opt=plain cmd=smod:actions_add_action_skbmod_set_etype_0x800_index_1","cmd":"tc actions add action skbmod set etype 0x800 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbmod"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"smod","json":"0","words":"actions add action skbmod set etype 0x800 index 1"}} +{"id":"tcactwrite/ec-200","desc":"positive: opt=plain cmd=smod:actions_add_action_skbmod_set_dmac_02:00:00:00:00:01_set_etype_0x86dd_drop_index_1","cmd":"tc actions add action skbmod set dmac 02:00:00:00:00:01 set etype 0x86dd drop index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbmod"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"smod","json":"0","words":"actions add action skbmod set dmac 02:00:00:00:00:01 set etype 0x86dd drop index 1"}} +{"id":"tcactwrite/ec-201","desc":"positive: opt=plain cmd=smod:actions_add_action_skbmod_ecn_index_1","cmd":"tc actions add action skbmod ecn index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbmod"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"smod","json":"0","words":"actions add action skbmod ecn index 1"}} +{"id":"tcactwrite/ec-202","desc":"corner: opt=plain cmd=w196:actions_add_action_skbmod_set_dmac_02:00:00:00:00:01:junk_index_1","cmd":"tc actions add action skbmod set dmac 02:00:00:00:00:01:junk index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbmod"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w196","json":"0","words":"actions add action skbmod set dmac 02:00:00:00:00:01:junk index 1"}} +{"id":"tcactwrite/ec-203","desc":"corner: opt=plain cmd=w196-x:actions_add_action_skbmod_set_dmac_0x02:1aa:00:00:00:01_index_1","cmd":"tc actions add action skbmod set dmac 0x02:1aa:00:00:00:01 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbmod"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w196-x","json":"0","words":"actions add action skbmod set dmac 0x02:1aa:00:00:00:01 index 1"}} +{"id":"tcactwrite/ec-204","desc":"corner: opt=plain cmd=w197:actions_add_action_skbmod_set_dmac_02:00:00:00:00:01_swap_mac_index_1","cmd":"tc actions add action skbmod set dmac 02:00:00:00:00:01 swap mac index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbmod"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w197","json":"0","words":"actions add action skbmod set dmac 02:00:00:00:00:01 swap mac index 1"}} +{"id":"tcactwrite/ec-205","desc":"corner: opt=plain cmd=w197-mac:actions_add_action_skbmod_mac_index_1","cmd":"tc actions add action skbmod mac index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbmod"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w197-mac","json":"0","words":"actions add action skbmod mac index 1"}} +{"id":"tcactwrite/ec-206","desc":"corner: opt=plain cmd=w200:actions_add_action_skbmod_swap_mac_index_010","cmd":"tc actions add action skbmod swap mac index 010","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action skbmod"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w200","json":"0","words":"actions add action skbmod swap mac index 010"}} +{"id":"tcactwrite/ec-207","desc":"positive: opt=plain cmd=mp:actions_add_action_mpls_push_label_100_tc_3_ttl_64_index_1","cmd":"tc actions add action mpls push label 100 tc 3 ttl 64 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mpls"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"mp","json":"0","words":"actions add action mpls push label 100 tc 3 ttl 64 index 1"}} +{"id":"tcactwrite/ec-208","desc":"positive: opt=plain cmd=mp:actions_add_action_mpls_push_protocol_mpls_mc_label_100_bos_0_index_1","cmd":"tc actions add action mpls push protocol mpls_mc label 100 bos 0 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mpls"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"mp","json":"0","words":"actions add action mpls push protocol mpls_mc label 100 bos 0 index 1"}} +{"id":"tcactwrite/ec-209","desc":"positive: opt=plain cmd=mp:actions_add_action_mpls_mac_push_label_300_bos_1_index_1","cmd":"tc actions add action mpls mac_push label 300 bos 1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mpls"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"mp","json":"0","words":"actions add action mpls mac_push label 300 bos 1 index 1"}} +{"id":"tcactwrite/ec-210","desc":"positive: opt=plain cmd=mp:actions_add_action_mpls_modify_label_200_tc_7_ttl_255_index_1","cmd":"tc actions add action mpls modify label 200 tc 7 ttl 255 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mpls"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"mp","json":"0","words":"actions add action mpls modify label 200 tc 7 ttl 255 index 1"}} +{"id":"tcactwrite/ec-211","desc":"positive: opt=plain cmd=mp:actions_add_action_mpls_dec_ttl_pipe_index_1","cmd":"tc actions add action mpls dec_ttl pipe index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mpls"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"mp","json":"0","words":"actions add action mpls dec_ttl pipe index 1"}} +{"id":"tcactwrite/ec-212","desc":"positive: opt=plain cmd=mp:actions_add_action_mpls_pop_protocol_ipv6_index_1","cmd":"tc actions add action mpls pop protocol ipv6 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mpls"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"mp","json":"0","words":"actions add action mpls pop protocol ipv6 index 1"}} +{"id":"tcactwrite/ec-213","desc":"boundary: opt=plain cmd=mp:actions_add_action_mpls_push_label_1048575_index_1","cmd":"tc actions add action mpls push label 1048575 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mpls"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"mp","json":"0","words":"actions add action mpls push label 1048575 index 1"}} +{"id":"tcactwrite/ec-214","desc":"boundary: opt=plain cmd=mp:actions_add_action_mpls_push_label_0_ttl_1_index_1","cmd":"tc actions add action mpls push label 0 ttl 1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mpls"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"mp","json":"0","words":"actions add action mpls push label 0 ttl 1 index 1"}} +{"id":"tcactwrite/ec-215","desc":"corner: opt=plain cmd=w204:actions_add_action_mpls_push_label_5_protocol_0_index_1","cmd":"tc actions add action mpls push label 5 protocol 0 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mpls"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w204","json":"0","words":"actions add action mpls push label 5 protocol 0 index 1"}} +{"id":"tcactwrite/ec-216","desc":"corner: opt=plain cmd=w206:actions_add_action_mpls_p_protocol_ipv4_index_1","cmd":"tc actions add action mpls p protocol ipv4 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action mpls"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w206","json":"0","words":"actions add action mpls p protocol ipv4 index 1"}} +{"id":"tcactwrite/ec-217","desc":"positive: opt=plain cmd=out-pedit:actions_add_action_pedit_ex_munge_ip_ttl_set_10_index_1","cmd":"tc actions add action pedit ex munge ip ttl set 10 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action pedit"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"out-pedit","json":"0","words":"actions add action pedit ex munge ip ttl set 10 index 1"}} +{"id":"tcactwrite/ec-218","desc":"positive: opt=plain cmd=out-tunnel_key:actions_add_action_tunnel_key_unset_index_1","cmd":"tc actions add action tunnel_key unset index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action tunnel_key"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"out-tunnel_key","json":"0","words":"actions add action tunnel_key unset index 1"}} +{"id":"tcactwrite/ec-219","desc":"positive: opt=plain cmd=out-ife:actions_add_action_ife_encode_allow_mark_index_1","cmd":"tc actions add action ife encode allow mark index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action ife"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"out-ife","json":"0","words":"actions add action ife encode allow mark index 1"}} +{"id":"tcactwrite/ec-220","desc":"positive: opt=plain cmd=out-ct:actions_add_action_ct_commit_index_1","cmd":"tc actions add action ct commit index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action ct"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"out-ct","json":"0","words":"actions add action ct commit index 1"}} +{"id":"tcactwrite/ec-221","desc":"positive: opt=plain cmd=out-gate:actions_add_action_gate_base-time_0_sched-entry_open_1000000_-1_-1_index_1","cmd":"tc actions add action gate base-time 0 sched-entry open 1000000 -1 -1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action gate"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"out-gate","json":"0","words":"actions add action gate base-time 0 sched-entry open 1000000 -1 -1 index 1"}} +{"id":"tcactwrite/ec-222","desc":"positive: opt=plain cmd=out-bpf:actions_add_action_bpf_bytecode_'1,6_0_0_0'_index_1","cmd":"tc actions add action bpf bytecode '1,6 0 0 0' index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action bpf"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"out-bpf","json":"0","words":"actions add action bpf bytecode '1,6 0 0 0' index 1"}} +{"id":"tcactwrite/ec-223","desc":"positive: opt=plain cmd=fr:actions_add_action_gact_pass_index_1_cookie_0102030405060708090a0b0c0d0e0f10","cmd":"tc actions add action gact pass index 1 cookie 0102030405060708090a0b0c0d0e0f10","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fr","json":"0","words":"actions add action gact pass index 1 cookie 0102030405060708090a0b0c0d0e0f10"}} +{"id":"tcactwrite/ec-224","desc":"positive: opt=plain cmd=fr:actions_add_action_gact_pass_index_1_hw_stats_immediate","cmd":"tc actions add action gact pass index 1 hw_stats immediate","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fr","json":"0","words":"actions add action gact pass index 1 hw_stats immediate"}} +{"id":"tcactwrite/ec-225","desc":"positive: opt=plain cmd=fr:actions_add_action_gact_pass_index_1_hw_stats_delayed","cmd":"tc actions add action gact pass index 1 hw_stats delayed","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fr","json":"0","words":"actions add action gact pass index 1 hw_stats delayed"}} +{"id":"tcactwrite/ec-226","desc":"positive: opt=plain cmd=fr:actions_add_action_gact_pass_index_1_hw_stats_disabled","cmd":"tc actions add action gact pass index 1 hw_stats disabled","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fr","json":"0","words":"actions add action gact pass index 1 hw_stats disabled"}} +{"id":"tcactwrite/ec-227","desc":"positive: opt=plain cmd=fr:actions_add_action_gact_pass_index_1_no_percpu","cmd":"tc actions add action gact pass index 1 no_percpu","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fr","json":"0","words":"actions add action gact pass index 1 no_percpu"}} +{"id":"tcactwrite/ec-228","desc":"corner: opt=plain cmd=w170-hw:actions_add_action_gact_pass_index_1_hw_stats_d","cmd":"tc actions add action gact pass index 1 hw_stats d","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w170-hw","json":"0","words":"actions add action gact pass index 1 hw_stats d"}} +{"id":"tcactwrite/ec-229","desc":"positive: opt=plain cmd=fr:actions_add_action_police_rate_1mbit_burst_10k_index_1_action_mirred_egress_redirect_dev_d1_index_1_action_skbedit_mark_1_index_1_action_gact_drop_index_2","cmd":"tc actions add action police rate 1mbit burst 10k index 1 action mirred egress redirect dev d1 index 1 action skbedit mark 1 index 1 action gact drop index 2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fr","json":"0","words":"actions add action police rate 1mbit burst 10k index 1 action mirred egress redirect dev d1 index 1 action skbedit mark 1 index 1 action gact drop index 2"}} +{"id":"tcactwrite/ec-230","desc":"boundary: opt=plain cmd=fr32:actions_add_action_gact_pass_index_1_action_gact_pass_index_2_action_gact_pass_index_3_action_gact_pass_index_4_action_gact_pass_index_5_action_gact_pass_index_6_action_gact_pass_index_7_action_gact_pass_index_8_action_gact_pass_index_9_action_gact_pass_index_10_action_gact_pass_index_11_action_gact_pass_index_12_action_gact_pass_index_13_action_gact_pass_index_14_action_gact_pass_index_15_action_gact_pass_index_16_action_gact_pass_index_17_action_gact_pass_index_18_action_gact_pass_index_19_action_gact_pass_index_20_action_gact_pass_index_21_action_gact_pass_index_22_action_gact_pass_index_23_action_gact_pass_index_24_action_gact_pass_index_25_action_gact_pass_index_26_action_gact_pass_index_27_action_gact_pass_index_28_action_gact_pass_index_29_action_gact_pass_index_30_action_gact_pass_index_31_action_gact_pass_index_32","cmd":"tc actions add action gact pass index 1 action gact pass index 2 action gact pass index 3 action gact pass index 4 action gact pass index 5 action gact pass index 6 action gact pass index 7 action gact pass index 8 action gact pass index 9 action gact pass index 10 action gact pass index 11 action gact pass index 12 action gact pass index 13 action gact pass index 14 action gact pass index 15 action gact pass index 16 action gact pass index 17 action gact pass index 18 action gact pass index 19 action gact pass index 20 action gact pass index 21 action gact pass index 22 action gact pass index 23 action gact pass index 24 action gact pass index 25 action gact pass index 26 action gact pass index 27 action gact pass index 28 action gact pass index 29 action gact pass index 30 action gact pass index 31 action gact pass index 32","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fr32","json":"0","words":"actions add action gact pass index 1 action gact pass index 2 action gact pass index 3 action gact pass index 4 action gact pass index 5 action gact pass index 6 action gact pass index 7 action gact pass index 8 action gact pass index 9 action gact pass index 10 action gact pass index 11 action gact pass index 12 action gact pass index 13 action gact pass index 14 action gact pass index 15 action gact pass index 16 action gact pass index 17 action gact pass index 18 action gact pass index 19 action gact pass index 20 action gact pass index 21 action gact pass index 22 action gact pass index 23 action gact pass index 24 action gact pass index 25 action gact pass index 26 action gact pass index 27 action gact pass index 28 action gact pass index 29 action gact pass index 30 action gact pass index 31 action gact pass index 32"}} +{"id":"tcactwrite/ec-231","desc":"boundary: opt=plain cmd=w179:actions_delete_action_gact_index_1_action_gact_index_2_action_gact_index_3_action_gact_index_4_action_gact_index_5_action_gact_index_6_action_gact_index_7_action_gact_index_8_action_gact_index_9_action_gact_index_10_action_gact_index_11_action_gact_index_12_action_gact_index_13_action_gact_index_14_action_gact_index_15_action_gact_index_16_action_gact_index_17_action_gact_index_18_action_gact_index_19_action_gact_index_20_action_gact_index_21_action_gact_index_22_action_gact_index_23_action_gact_index_24_action_gact_index_25_action_gact_index_26_action_gact_index_27_action_gact_index_28_action_gact_index_29_action_gact_index_30_action_gact_index_31_action_gact_index_32_action_gact_index_33","cmd":"tc actions delete action gact index 1 action gact index 2 action gact index 3 action gact index 4 action gact index 5 action gact index 6 action gact index 7 action gact index 8 action gact index 9 action gact index 10 action gact index 11 action gact index 12 action gact index 13 action gact index 14 action gact index 15 action gact index 16 action gact index 17 action gact index 18 action gact index 19 action gact index 20 action gact index 21 action gact index 22 action gact index 23 action gact index 24 action gact index 25 action gact index 26 action gact index 27 action gact index 28 action gact index 29 action gact index 30 action gact index 31 action gact index 32 action gact index 33","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action gact pass index 1 action gact pass index 2 action gact pass index 3 action gact pass index 4 action gact pass index 5 action gact pass index 6 action gact pass index 7 action gact pass index 8 action gact pass index 9 action gact pass index 10 action gact pass index 11 action gact pass index 12 action gact pass index 13 action gact pass index 14 action gact pass index 15 action gact pass index 16 action gact pass index 17 action gact pass index 18 action gact pass index 19 action gact pass index 20 action gact pass index 21 action gact pass index 22 action gact pass index 23 action gact pass index 24 action gact pass index 25 action gact pass index 26 action gact pass index 27 action gact pass index 28 action gact pass index 29 action gact pass index 30 action gact pass index 31 action gact pass index 32","tc actions add action gact pass index 33"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w179","json":"0","words":"actions delete action gact index 1 action gact index 2 action gact index 3 action gact index 4 action gact index 5 action gact index 6 action gact index 7 action gact index 8 action gact index 9 action gact index 10 action gact index 11 action gact index 12 action gact index 13 action gact index 14 action gact index 15 action gact index 16 action gact index 17 action gact index 18 action gact index 19 action gact index 20 action gact index 21 action gact index 22 action gact index 23 action gact index 24 action gact index 25 action gact index 26 action gact index 27 action gact index 28 action gact index 29 action gact index 30 action gact index 31 action gact index 32 action gact index 33"}} +{"id":"tcactwrite/ec-232","desc":"positive: opt=plain cmd=fr:actions_add_action_simple_sdata_a_index_1_action_simple_sdata_b_index_2","cmd":"tc actions add action simple sdata a index 1 action simple sdata b index 2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action simple"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fr","json":"0","words":"actions add action simple sdata a index 1 action simple sdata b index 2"}} +{"id":"tcactwrite/ec-233","desc":"positive: opt=plain cmd=fr-del2:actions_delete_action_gact_index_1_action_gact_index_2","cmd":"tc actions delete action gact index 1 action gact index 2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action gact pass index 1 action gact drop index 2"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fr-del2","json":"0","words":"actions delete action gact index 1 action gact index 2"}} +{"id":"tcactwrite/ec-234","desc":"positive: opt=plain cmd=fr-del-mixed:actions_delete_action_gact_index_1_action_police_index_1","cmd":"tc actions delete action gact index 1 action police index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action gact pass index 1 action police rate 1mbit burst 10k index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fr-del-mixed","json":"0","words":"actions delete action gact index 1 action police index 1"}} +{"id":"tcactwrite/ec-235","desc":"positive: opt=plain cmd=fr-del-abbrev:actions_del_action_gact_index_1","cmd":"tc actions del action gact index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action gact pass index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fr-del-abbrev","json":"0","words":"actions del action gact index 1"}} +{"id":"tcactwrite/ec-236","desc":"corner: opt=plain cmd=w177:actions_add_action_get_action_gact_index_1","cmd":"tc actions add action get action gact index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action gact pass index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w177","json":"0","words":"actions add action get action gact index 1"}} +{"id":"tcactwrite/ec-237","desc":"corner: opt=plain cmd=w180:actions_flush_action_gact_since_1000","cmd":"tc actions flush action gact since 1000","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action gact pass index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w180","json":"0","words":"actions flush action gact since 1000"}} +{"id":"tcactwrite/ec-238","desc":"corner: opt=plain cmd=w181:actions_flush_foo_gact","cmd":"tc actions flush foo gact","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action gact pass index 1"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w181","json":"0","words":"actions flush foo gact"}} +{"id":"tcactwrite/ec-239","desc":"corner: opt=plain cmd=w182:actions_flush_action_nosuch","cmd":"tc actions flush action nosuch","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w182","json":"0","words":"actions flush action nosuch"}} +{"id":"tcactwrite/ec-240","desc":"corner: opt=plain cmd=flush-empty:actions_flush_action_gact","cmd":"tc actions flush action gact","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"flush-empty","json":"0","words":"actions flush action gact"}} +{"id":"tcactwrite/ec-241","desc":"corner: opt=plain cmd=w186:actions","cmd":"tc actions","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w186","json":"0","words":"actions"}} +{"id":"tcactwrite/ec-242","desc":"corner: opt=plain cmd=two-cmds:actions_add_action_gact_drop_index_1_delete_action_gact_index_1","cmd":"tc actions add action gact drop index 1 delete action gact index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"two-cmds","json":"0","words":"actions add action gact drop index 1 delete action gact index 1"}} +{"id":"tcactwrite/ec-243","desc":"corner: opt=plain cmd=two-adds:actions_add_action_gact_drop_index_1_add_action_gact_pass_index_2","cmd":"tc actions add action gact drop index 1 add action gact pass index 2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"two-adds","json":"0","words":"actions add action gact drop index 1 add action gact pass index 2"}} +{"id":"tcactwrite/ec-244","desc":"positive: opt=plain cmd=f-police:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_police_rate_1mbit_burst_10k","cmd":"tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action police rate 1mbit burst 10k","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 egress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"f-police","json":"0","words":"filter add dev d0 egress pref 1 protocol all handle 1 matchall action police rate 1mbit burst 10k"}} +{"id":"tcactwrite/ec-245","desc":"positive: opt=plain cmd=f-mirred:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_mirred_egress_redirect_dev_d1","cmd":"tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action mirred egress redirect dev d1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 egress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"f-mirred","json":"0","words":"filter add dev d0 egress pref 1 protocol all handle 1 matchall action mirred egress redirect dev d1"}} +{"id":"tcactwrite/ec-246","desc":"positive: opt=plain cmd=f-skbedit:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_skbedit_mark_5","cmd":"tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action skbedit mark 5","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 egress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"f-skbedit","json":"0","words":"filter add dev d0 egress pref 1 protocol all handle 1 matchall action skbedit mark 5"}} +{"id":"tcactwrite/ec-247","desc":"positive: opt=plain cmd=f-vlan:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_vlan_pop","cmd":"tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action vlan pop","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 egress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"f-vlan","json":"0","words":"filter add dev d0 egress pref 1 protocol all handle 1 matchall action vlan pop"}} +{"id":"tcactwrite/ec-248","desc":"positive: opt=plain cmd=f-csum:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_csum_iph","cmd":"tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action csum iph","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 egress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"f-csum","json":"0","words":"filter add dev d0 egress pref 1 protocol all handle 1 matchall action csum iph"}} +{"id":"tcactwrite/ec-249","desc":"positive: opt=plain cmd=f-nat:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_nat_ingress_10.0.0.0/8_192.168.0.1","cmd":"tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action nat ingress 10.0.0.0/8 192.168.0.1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 egress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"f-nat","json":"0","words":"filter add dev d0 egress pref 1 protocol all handle 1 matchall action nat ingress 10.0.0.0/8 192.168.0.1"}} +{"id":"tcactwrite/ec-250","desc":"positive: opt=plain cmd=f-simple:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_simple_sdata_hello","cmd":"tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action simple sdata hello","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 egress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"f-simple","json":"0","words":"filter add dev d0 egress pref 1 protocol all handle 1 matchall action simple sdata hello"}} +{"id":"tcactwrite/ec-251","desc":"positive: opt=plain cmd=f-connmark:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_connmark_zone_5","cmd":"tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action connmark zone 5","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 egress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"f-connmark","json":"0","words":"filter add dev d0 egress pref 1 protocol all handle 1 matchall action connmark zone 5"}} +{"id":"tcactwrite/ec-252","desc":"positive: opt=plain cmd=f-ctinfo:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_ctinfo_dscp_0xfc000000","cmd":"tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action ctinfo dscp 0xfc000000","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 egress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"f-ctinfo","json":"0","words":"filter add dev d0 egress pref 1 protocol all handle 1 matchall action ctinfo dscp 0xfc000000"}} +{"id":"tcactwrite/ec-253","desc":"positive: opt=plain cmd=f-sample:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_sample_rate_100_group_5","cmd":"tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action sample rate 100 group 5","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 egress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"f-sample","json":"0","words":"filter add dev d0 egress pref 1 protocol all handle 1 matchall action sample rate 100 group 5"}} +{"id":"tcactwrite/ec-254","desc":"positive: opt=plain cmd=f-skbmod:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_skbmod_swap_mac","cmd":"tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action skbmod swap mac","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 egress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"f-skbmod","json":"0","words":"filter add dev d0 egress pref 1 protocol all handle 1 matchall action skbmod swap mac"}} +{"id":"tcactwrite/ec-255","desc":"positive: opt=plain cmd=f-mpls:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_mpls_pop_protocol_ipv4","cmd":"tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action mpls pop protocol ipv4","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 egress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"f-mpls","json":"0","words":"filter add dev d0 egress pref 1 protocol all handle 1 matchall action mpls pop protocol ipv4"}} +{"id":"tcactwrite/ec-256","desc":"positive: opt=plain cmd=f-u32:filter_add_dev_d0_ingress_pref_12_protocol_ip_handle_800::1_u32_match_ip_src_10.0.0.0/8_action_skbedit_mark_1_action_mirred_egress_mirror_dev_d1","cmd":"tc filter add dev d0 ingress pref 12 protocol ip handle 800::1 u32 match ip src 10.0.0.0/8 action skbedit mark 1 action mirred egress mirror dev d1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 ingress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"f-u32","json":"0","words":"filter add dev d0 ingress pref 12 protocol ip handle 800::1 u32 match ip src 10.0.0.0/8 action skbedit mark 1 action mirred egress mirror dev d1"}} +{"id":"tcactwrite/ec-257","desc":"positive: opt=plain cmd=f-list:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_police_rate_1mbit_burst_10k_action_vlan_push_id_5_action_csum_iph_action_nat_egress_10.0.0.1_10.0.0.2","cmd":"tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action police rate 1mbit burst 10k action vlan push id 5 action csum iph action nat egress 10.0.0.1 10.0.0.2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 egress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"f-list","json":"0","words":"filter add dev d0 egress pref 1 protocol all handle 1 matchall action police rate 1mbit burst 10k action vlan push id 5 action csum iph action nat egress 10.0.0.1 10.0.0.2"}} +{"id":"tcactwrite/ec-258","desc":"positive: opt=plain cmd=f-bind:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_police_index_1","cmd":"tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action police index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action police rate 1mbit burst 10k index 1"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 egress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"f-bind","json":"0","words":"filter add dev d0 egress pref 1 protocol all handle 1 matchall action police index 1"}} +{"id":"tcactwrite/ec-259","desc":"positive: opt=plain cmd=fp-basic:filter_add_dev_d0_ingress_pref_1_protocol_all_handle_1_basic_police_rate_1mbit_burst_10k_drop","cmd":"tc filter add dev d0 ingress pref 1 protocol all handle 1 basic police rate 1mbit burst 10k drop","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 ingress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fp-basic","json":"0","words":"filter add dev d0 ingress pref 1 protocol all handle 1 basic police rate 1mbit burst 10k drop"}} +{"id":"tcactwrite/ec-260","desc":"positive: opt=plain cmd=fp-cgroup:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_cgroup_police_rate_1mbit_burst_10k_drop","cmd":"tc filter add dev d0 egress pref 1 protocol all handle 1 cgroup police rate 1mbit burst 10k drop","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 egress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fp-cgroup","json":"0","words":"filter add dev d0 egress pref 1 protocol all handle 1 cgroup police rate 1mbit burst 10k drop"}} +{"id":"tcactwrite/ec-261","desc":"positive: opt=plain cmd=fp-fw:filter_add_dev_d1_parent_1:_pref_40_protocol_ip_handle_5_fw_police_rate_1mbit_burst_10k_drop","cmd":"tc filter add dev d1 parent 1: pref 40 protocol ip handle 5 fw police rate 1mbit burst 10k drop","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d1 parent 1:"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fp-fw","json":"0","words":"filter add dev d1 parent 1: pref 40 protocol ip handle 5 fw police rate 1mbit burst 10k drop"}} +{"id":"tcactwrite/ec-262","desc":"positive: opt=plain cmd=fp-route:filter_add_dev_d1_parent_1:_pref_41_protocol_ip_route_to_5_police_rate_1mbit_burst_10k_drop","cmd":"tc filter add dev d1 parent 1: pref 41 protocol ip route to 5 police rate 1mbit burst 10k drop","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d1 parent 1:"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fp-route","json":"0","words":"filter add dev d1 parent 1: pref 41 protocol ip route to 5 police rate 1mbit burst 10k drop"}} +{"id":"tcactwrite/ec-263","desc":"positive: opt=plain cmd=fp-u32:filter_add_dev_d0_ingress_pref_12_protocol_ip_u32_match_ip_src_10.0.0.0/8_police_rate_1mbit_burst_10k_drop","cmd":"tc filter add dev d0 ingress pref 12 protocol ip u32 match ip src 10.0.0.0/8 police rate 1mbit burst 10k drop","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 ingress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fp-u32","json":"0","words":"filter add dev d0 ingress pref 12 protocol ip u32 match ip src 10.0.0.0/8 police rate 1mbit burst 10k drop"}} +{"id":"tcactwrite/ec-264","desc":"positive: opt=plain cmd=fp-flow:filter_add_dev_d1_parent_1:_pref_30_protocol_ip_handle_1_flow_hash_keys_dst_divisor_8_police_rate_1mbit_burst_10k_drop","cmd":"tc filter add dev d1 parent 1: pref 30 protocol ip handle 1 flow hash keys dst divisor 8 police rate 1mbit burst 10k drop","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d1 parent 1:"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fp-flow","json":"0","words":"filter add dev d1 parent 1: pref 30 protocol ip handle 1 flow hash keys dst divisor 8 police rate 1mbit burst 10k drop"}} +{"id":"tcactwrite/ec-265","desc":"positive: opt=plain cmd=fp-act:filter_add_dev_d0_ingress_pref_1_protocol_all_handle_1_basic_police_rate_1mbit_burst_10k_drop_action_pass","cmd":"tc filter add dev d0 ingress pref 1 protocol all handle 1 basic police rate 1mbit burst 10k drop action pass","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 ingress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fp-act","json":"0","words":"filter add dev d0 ingress pref 1 protocol all handle 1 basic police rate 1mbit burst 10k drop action pass"}} +{"id":"tcactwrite/ec-266","desc":"positive: opt=plain cmd=fp-index:filter_add_dev_d0_ingress_pref_1_protocol_all_handle_1_basic_police_index_1","cmd":"tc filter add dev d0 ingress pref 1 protocol all handle 1 basic police index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action police rate 1mbit burst 10k index 1"],"readback":[{"name":"dump","cmd":"tc -d filter show dev d0 ingress"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fp-index","json":"0","words":"filter add dev d0 ingress pref 1 protocol all handle 1 basic police index 1"}} +{"id":"tcactwrite/ec-267","desc":"positive: opt=plain cmd=batch:batch:two","cmd":"tc -batch b.txt","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","printf '%s\\n' 'actions add action gact drop index 1' 'actions add action police rate 1mbit burst 10k index 1' > b.txt"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"batch":"two","fix":"batch","json":"0","words":"-batch b.txt"}} +{"id":"tcactwrite/ec-268","desc":"positive: opt=plain cmd=batch:batch:flush-add","cmd":"tc -batch b.txt","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","printf '%s\\n' 'actions flush action gact' 'actions add action gact pass index 1' > b.txt"],"readback":[{"name":"dump","cmd":"tc actions ls action gact"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"batch":"flush-add","fix":"batch","json":"0","words":"-batch b.txt"}} +{"id":"tcactwrite/ec-269","desc":"corner: opt=plain cmd=w189-batch:batch:leftover","cmd":"tc -batch b.txt","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","printf '%s\\n' 'actions add action simple sdata LLLLLLLLLLLLLLLLLLLL index 1 cookie abababababababababababababababab' 'actions add action simple sdata hi index 2' > b.txt"],"readback":[{"name":"dump","cmd":"tc actions ls action simple"}],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"batch":"leftover","fix":"w189-batch","json":"0","words":"-batch b.txt"}} +{"id":"tcactwrite/ng-001","desc":"negative: opt=plain cmd=ng:w156:actions_add_action_police_rate_1mbit_index_1: rate with no burst: 'burst' requires 'rate'. (W156)","cmd":"tc actions add action police rate 1mbit index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w156","json":"0","words":"actions add action police rate 1mbit index 1"}} +{"id":"tcactwrite/ng-002","desc":"negative: opt=plain cmd=ng:w156-pps:actions_add_action_police_pkts_rate_10_index_1: 'pkts_burst' requires 'pkts_rate'. (W156)","cmd":"tc actions add action police pkts_rate 10 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w156-pps","json":"0","words":"actions add action police pkts_rate 10 index 1"}} +{"id":"tcactwrite/ng-003","desc":"negative: opt=plain cmd=ng:pol-dup:actions_add_action_police_rate_1mbit_rate_2mbit_burst_10k_index_1: duplicate rate","cmd":"tc actions add action police rate 1mbit rate 2mbit burst 10k index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"pol-dup","json":"0","words":"actions add action police rate 1mbit rate 2mbit burst 10k index 1"}} +{"id":"tcactwrite/ng-004","desc":"negative: opt=plain cmd=ng:w188:actions_add_action_police_rate_1mbit_burst_10k_avrate_1mbit_index_1: rate with avrate: -1 with no message of its own, bad action parsing (W188)","cmd":"tc actions add action police rate 1mbit burst 10k avrate 1mbit index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w188","json":"0","words":"actions add action police rate 1mbit burst 10k avrate 1mbit index 1"}} +{"id":"tcactwrite/ng-005","desc":"negative: opt=plain cmd=ng:pol-avrate:actions_add_action_police_avrate_1mbit_index_1: avrate needs an estimator, which tc actions add never sends: EINVAL with no extack (K)","cmd":"tc actions add action police avrate 1mbit index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"pol-avrate","json":"0","words":"actions add action police avrate 1mbit index 1"}} +{"id":"tcactwrite/ng-006","desc":"negative: opt=plain cmd=ng:w169:actions_add_action_police_rate_1mbit_burst_10k_conform-exceed_goto/pass_index_1: conform goto with no chain is goto chain 0: can't goto NULL proto/chain (W169)","cmd":"tc actions add action police rate 1mbit burst 10k conform-exceed goto/pass index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"w169","json":"0","words":"actions add action police rate 1mbit burst 10k conform-exceed goto/pass index 1"}} +{"id":"tcactwrite/ng-007","desc":"negative: opt=plain cmd=ng:w164:actions_add_action_police_rate_1mbit_burst_10k_mtu_255_index_1: mtu 255 gives cell_log 0; the kernel's rtab refusal is ENOMEM (W164)","cmd":"tc actions add action police rate 1mbit burst 10k mtu 255 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"ENOMEM","refused_by":"kernel"},"axes":{"fix":"w164","json":"0","words":"actions add action police rate 1mbit burst 10k mtu 255 index 1"}} +{"id":"tcactwrite/ng-008","desc":"negative: opt=plain cmd=ng:w164-cell:actions_add_action_police_rate_1mbit_burst_10k/1_mtu_2k_index_1: burst 10k/1: cell_log 0 (W164)","cmd":"tc actions add action police rate 1mbit burst 10k/1 mtu 2k index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"ENOMEM","refused_by":"kernel"},"axes":{"fix":"w164-cell","json":"0","words":"actions add action police rate 1mbit burst 10k/1 mtu 2k index 1"}} +{"id":"tcactwrite/ng-009","desc":"negative: opt=plain cmd=ng:w184:actions_add_action_police_rate_1mbit_burst_10x_index_1: argument \"10x\" is wrong: buffer (W184)","cmd":"tc actions add action police rate 1mbit burst 10x index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w184","json":"0","words":"actions add action police rate 1mbit burst 10x index 1"}} +{"id":"tcactwrite/ng-010","desc":"negative: opt=plain cmd=ng:w184-cell:actions_add_action_police_rate_1mbit_burst_10k/x_index_1: the / is cut to NUL: \"10k\" (W184)","cmd":"tc actions add action police rate 1mbit burst 10k/x index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w184-cell","json":"0","words":"actions add action police rate 1mbit burst 10k/x index 1"}} +{"id":"tcactwrite/ng-011","desc":"negative: opt=plain cmd=ng:w169-bad:actions_add_action_police_rate_1mbit_burst_10k_conform-exceed_foo/pass_index_1: a bad conform side: -1 with no message (W169)","cmd":"tc actions add action police rate 1mbit burst 10k conform-exceed foo/pass index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w169-bad","json":"0","words":"actions add action police rate 1mbit burst 10k conform-exceed foo/pass index 1"}} +{"id":"tcactwrite/ng-012","desc":"negative: opt=plain cmd=ng:w169-goto:actions_add_action_police_rate_1mbit_burst_10k_conform-exceed_pass/goto_index_1: exceed goto with no chain is goto chain 0 (W169)","cmd":"tc actions add action police rate 1mbit burst 10k conform-exceed pass/goto index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"w169-goto","json":"0","words":"actions add action police rate 1mbit burst 10k conform-exceed pass/goto index 1"}} +{"id":"tcactwrite/ng-013","desc":"negative: opt=plain cmd=ng:pol-rate-bad:actions_add_action_police_rate_zz_burst_10k_index_1: an unparsable rate","cmd":"tc actions add action police rate zz burst 10k index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"pol-rate-bad","json":"0","words":"actions add action police rate zz burst 10k index 1"}} +{"id":"tcactwrite/ng-014","desc":"negative: opt=plain cmd=ng:pol-mtu-bad:actions_add_action_police_rate_1mbit_burst_10k_mtu_zz_index_1: an unparsable mtu","cmd":"tc actions add action police rate 1mbit burst 10k mtu zz index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"pol-mtu-bad","json":"0","words":"actions add action police rate 1mbit burst 10k mtu zz index 1"}} +{"id":"tcactwrite/ng-015","desc":"negative: opt=plain cmd=ng:pol-ll:actions_add_action_police_rate_1mbit_burst_10k_linklayer_foo_index_1: an unknown linklayer","cmd":"tc actions add action police rate 1mbit burst 10k linklayer foo index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"pol-ll","json":"0","words":"actions add action police rate 1mbit burst 10k linklayer foo index 1"}} +{"id":"tcactwrite/ng-016","desc":"negative: opt=plain cmd=ng:pol-tail:actions_add_action_police_rate_1mbit_burst: burst with no value: NEXT_ARG, rc 255","cmd":"tc actions add action police rate 1mbit burst","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"pol-tail","json":"0","words":"actions add action police rate 1mbit burst"}} +{"id":"tcactwrite/ng-017","desc":"negative: opt=plain cmd=ng:pol-help:actions_add_action_police_help: police's usage, rc 255","cmd":"tc actions add action police help","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"pol-help","json":"0","words":"actions add action police help"}} +{"id":"tcactwrite/ng-018","desc":"negative: opt=plain cmd=ng:pol-maxburst:actions_add_action_police_rate_1mbit_buffer_10k_maxburst_2k_index_1: maxburst is burst's third name: duplicate \"buffer/burst\"","cmd":"tc actions add action police rate 1mbit buffer 10k maxburst 2k index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"pol-maxburst","json":"0","words":"actions add action police rate 1mbit buffer 10k maxburst 2k index 1"}} +{"id":"tcactwrite/ng-019","desc":"negative: opt=plain cmd=ng:pol-pps-rate:actions_add_action_police_rate_1mbit_burst_10k_pkts_rate_1000_pkts_burst_100_index_1: rate and pkts_rate are not allowed in one action","cmd":"tc actions add action police rate 1mbit burst 10k pkts_rate 1000 pkts_burst 100 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"pol-pps-rate","json":"0","words":"actions add action police rate 1mbit burst 10k pkts_rate 1000 pkts_burst 100 index 1"}} +{"id":"tcactwrite/ng-020","desc":"negative: opt=plain cmd=ng:w169-jump:actions_add_action_police_rate_1mbit_burst_10k_conform-exceed_jump_1/pass_index_1: the slash form takes no jump: Invalid \"jump count\" (1/pass) (W169)","cmd":"tc actions add action police rate 1mbit burst 10k conform-exceed jump 1/pass index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w169-jump","json":"0","words":"actions add action police rate 1mbit burst 10k conform-exceed jump 1/pass index 1"}} +{"id":"tcactwrite/ng-021","desc":"negative: opt=plain cmd=ng:w162:actions_add_action_mirred_egress_redirect_dev_nosuch_index_1: Cannot find device, bad action parsing, parse_action: bad value, Illegal \"action\" (W162)","cmd":"tc actions add action mirred egress redirect dev nosuch index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"ENODEV","refused_by":"kernel"},"axes":{"fix":"w162","json":"0","words":"actions add action mirred egress redirect dev nosuch index 1"}} +{"id":"tcactwrite/ng-022","desc":"negative: opt=plain cmd=ng:w160:actions_add_action_mirred_egress_redirect_blockid_0_index_1: invalid block IDbad action parsing (W160)","cmd":"tc actions add action mirred egress redirect blockid 0 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w160","json":"0","words":"actions add action mirred egress redirect blockid 0 index 1"}} +{"id":"tcactwrite/ng-023","desc":"negative: opt=plain cmd=ng:mir-nodev:actions_add_action_mirred_egress_redirect_index_1: neither dev nor blockid","cmd":"tc actions add action mirred egress redirect index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"mir-nodev","json":"0","words":"actions add action mirred egress redirect index 1"}} +{"id":"tcactwrite/ng-024","desc":"negative: opt=plain cmd=ng:mir-dir:actions_add_action_mirred_redirect_dev_d1_index_1: no direction","cmd":"tc actions add action mirred redirect dev d1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"mir-dir","json":"0","words":"actions add action mirred redirect dev d1 index 1"}} +{"id":"tcactwrite/ng-025","desc":"negative: opt=plain cmd=ng:mir-act:actions_add_action_mirred_egress_dev_d1_index_1: no mirror or redirect","cmd":"tc actions add action mirred egress dev d1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"mir-act","json":"0","words":"actions add action mirred egress dev d1 index 1"}} +{"id":"tcactwrite/ng-026","desc":"negative: opt=plain cmd=ng:mir-tail:actions_add_action_mirred_egress_redirect_dev: dev with no value: NEXT_ARG","cmd":"tc actions add action mirred egress redirect dev","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"mir-tail","json":"0","words":"actions add action mirred egress redirect dev"}} +{"id":"tcactwrite/ng-027","desc":"negative: opt=plain cmd=ng:mir-help:actions_add_action_mirred_help: mirred's usage","cmd":"tc actions add action mirred help","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"mir-help","json":"0","words":"actions add action mirred help"}} +{"id":"tcactwrite/ng-028","desc":"negative: opt=plain cmd=ng:w161:actions_add_action_mirred_egress_redirect_dev_d1_blockid_5: blockid after dev is the next kind: Bad action type blockid (W161)","cmd":"tc actions add action mirred egress redirect dev d1 blockid 5","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"ack-then-fail"},"axes":{"fix":"w161","json":"0","words":"actions add action mirred egress redirect dev d1 blockid 5"}} +{"id":"tcactwrite/ng-029","desc":"negative: opt=plain cmd=ng:skb-ptype:actions_add_action_skbedit_ptype_nosuch_index_1: an unknown ptype","cmd":"tc actions add action skbedit ptype nosuch index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"skb-ptype","json":"0","words":"actions add action skbedit ptype nosuch index 1"}} +{"id":"tcactwrite/ng-030","desc":"negative: opt=plain cmd=ng:skb-none:actions_add_action_skbedit_index_5: no flags: the kernel refuses a create (K)","cmd":"tc actions add action skbedit index 5","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"skb-none","json":"0","words":"actions add action skbedit index 5"}} +{"id":"tcactwrite/ng-031","desc":"negative: opt=plain cmd=ng:skb-qm:actions_add_action_skbedit_queue_mapping_zz_index_1: an unparsable queue_mapping","cmd":"tc actions add action skbedit queue_mapping zz index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"skb-qm","json":"0","words":"actions add action skbedit queue_mapping zz index 1"}} +{"id":"tcactwrite/ng-032","desc":"negative: opt=plain cmd=ng:skb-mark:actions_add_action_skbedit_mark_zz_index_1: an unparsable mark","cmd":"tc actions add action skbedit mark zz index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"skb-mark","json":"0","words":"actions add action skbedit mark zz index 1"}} +{"id":"tcactwrite/ng-033","desc":"negative: opt=plain cmd=ng:skb-help:actions_add_action_skbedit_help: skbedit's usage","cmd":"tc actions add action skbedit help","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"skb-help","json":"0","words":"actions add action skbedit help"}} +{"id":"tcactwrite/ng-034","desc":"negative: opt=plain cmd=ng:w171-4095:actions_add_action_vlan_push_id_4095_index_1: id 4095: ERANGE with no extack (W171)","cmd":"tc actions add action vlan push id 4095 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"ERANGE","refused_by":"kernel"},"axes":{"fix":"w171-4095","json":"0","words":"actions add action vlan push id 4095 index 1"}} +{"id":"tcactwrite/ng-035","desc":"negative: opt=plain cmd=ng:vl-noid:actions_add_action_vlan_push_index_1: push with no id","cmd":"tc actions add action vlan push index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"vl-noid","json":"0","words":"actions add action vlan push index 1"}} +{"id":"tcactwrite/ng-036","desc":"negative: opt=plain cmd=ng:vl-prio:actions_add_action_vlan_push_id_5_priority_8_index_1: priority past 7","cmd":"tc actions add action vlan push id 5 priority 8 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"vl-prio","json":"0","words":"actions add action vlan push id 5 priority 8 index 1"}} +{"id":"tcactwrite/ng-037","desc":"negative: opt=plain cmd=ng:vl-proto:actions_add_action_vlan_push_id_5_protocol_foo_index_1: an unknown protocol","cmd":"tc actions add action vlan push id 5 protocol foo index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"vl-proto","json":"0","words":"actions add action vlan push id 5 protocol foo index 1"}} +{"id":"tcactwrite/ng-038","desc":"negative: opt=plain cmd=ng:w172-bad:actions_add_action_vlan_push_eth_dst_mac_zz:00:00:00:00:01_src_mac_02:00:00:00:00:02_index_1: a bad MAC: the invarg is cut at the first colon (W172)","cmd":"tc actions add action vlan push_eth dst_mac zz:00:00:00:00:01 src_mac 02:00:00:00:00:02 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w172-bad","json":"0","words":"actions add action vlan push_eth dst_mac zz:00:00:00:00:01 src_mac 02:00:00:00:00:02 index 1"}} +{"id":"tcactwrite/ng-039","desc":"negative: opt=plain cmd=ng:vl-none:actions_add_action_vlan_index_1: no vlan action","cmd":"tc actions add action vlan index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"vl-none","json":"0","words":"actions add action vlan index 1"}} +{"id":"tcactwrite/ng-040","desc":"negative: opt=plain cmd=ng:vl-help:actions_add_action_vlan_help: vlan's usage","cmd":"tc actions add action vlan help","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"vl-help","json":"0","words":"actions add action vlan help"}} +{"id":"tcactwrite/ng-041","desc":"negative: opt=plain cmd=ng:w173-foo:actions_add_action_csum_foo_index_1: empty list (W173)","cmd":"tc actions add action csum foo index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w173-foo","json":"0","words":"actions add action csum foo index 1"}} +{"id":"tcactwrite/ng-042","desc":"negative: opt=plain cmd=ng:cs-help:actions_add_action_csum_help: csum's usage","cmd":"tc actions add action csum help","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"cs-help","json":"0","words":"actions add action csum help"}} +{"id":"tcactwrite/ng-043","desc":"negative: opt=plain cmd=ng:cs-and:actions_add_action_csum_and_index_1: and alone: Illegal csum construct, empty list","cmd":"tc actions add action csum and index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"cs-and","json":"0","words":"actions add action csum and index 1"}} +{"id":"tcactwrite/ng-044","desc":"negative: opt=plain cmd=ng:w192:actions_add_action_nat_ingress_10.0.0.0/33_1.1.1.1_index_1: Illegal nat construct (ingress) (W192)","cmd":"tc actions add action nat ingress 10.0.0.0/33 1.1.1.1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w192","json":"0","words":"actions add action nat ingress 10.0.0.0/33 1.1.1.1 index 1"}} +{"id":"tcactwrite/ng-045","desc":"negative: opt=plain cmd=ng:nat-dir:actions_add_action_nat_sideways_10.0.0.0/8_1.1.1.1_index_1: neither ingress nor egress","cmd":"tc actions add action nat sideways 10.0.0.0/8 1.1.1.1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"nat-dir","json":"0","words":"actions add action nat sideways 10.0.0.0/8 1.1.1.1 index 1"}} +{"id":"tcactwrite/ng-046","desc":"negative: opt=plain cmd=ng:nat-new:actions_add_action_nat_egress_10.0.0.0/8_zz_index_1: a bad new address","cmd":"tc actions add action nat egress 10.0.0.0/8 zz index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"nat-new","json":"0","words":"actions add action nat egress 10.0.0.0/8 zz index 1"}} +{"id":"tcactwrite/ng-047","desc":"negative: opt=plain cmd=ng:w191-nat:actions_add_action_nat: a bare nat: NEXT_ARG, Command line is not complete (W191)","cmd":"tc actions add action nat","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w191-nat","json":"0","words":"actions add action nat"}} +{"id":"tcactwrite/ng-048","desc":"negative: opt=plain cmd=ng:w191-sim:actions_add_action_simple: a bare simple: NEXT_ARG (W191)","cmd":"tc actions add action simple","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w191-sim","json":"0","words":"actions add action simple"}} +{"id":"tcactwrite/ng-049","desc":"negative: opt=plain cmd=ng:w213:actions_add_action_simple_index_5: no sdata: the kernel refuses a create (W213)","cmd":"tc actions add action simple index 5","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"w213","json":"0","words":"actions add action simple index 5"}} +{"id":"tcactwrite/ng-050","desc":"negative: opt=plain cmd=ng:sim-tail:actions_add_action_simple_sdata: sdata with no value: NEXT_ARG","cmd":"tc actions add action simple sdata","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"sim-tail","json":"0","words":"actions add action simple sdata"}} +{"id":"tcactwrite/ng-051","desc":"negative: opt=plain cmd=ng:sim-32:actions_add_action_simple_sdata_ssssssssssssssssssssssssssssssss_index_1: simple: Illegal string len 32","cmd":"tc actions add action simple sdata ssssssssssssssssssssssssssssssss index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"sim-32","json":"0","words":"actions add action simple sdata ssssssssssssssssssssssssssssssss index 1"}} +{"id":"tcactwrite/ng-052","desc":"negative: opt=plain cmd=ng:sim-33:actions_add_action_simple_sdata_sssssssssssssssssssssssssssssssss_index_1: simple: Illegal string len 33","cmd":"tc actions add action simple sdata sssssssssssssssssssssssssssssssss index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"sim-33","json":"0","words":"actions add action simple sdata sssssssssssssssssssssssssssssssss index 1"}} +{"id":"tcactwrite/ng-053","desc":"negative: opt=plain cmd=ng:cm-zone:actions_add_action_connmark_zone_zz_index_1: an unparsable zone","cmd":"tc actions add action connmark zone zz index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"cm-zone","json":"0","words":"actions add action connmark zone zz index 1"}} +{"id":"tcactwrite/ng-054","desc":"negative: opt=plain cmd=ng:w215:actions_add_action_connmark_goto_chain_x_index_1: Illegal \"chain index\" (W215)","cmd":"tc actions add action connmark goto chain x index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w215","json":"0","words":"actions add action connmark goto chain x index 1"}} +{"id":"tcactwrite/ng-055","desc":"negative: opt=plain cmd=ng:cti-mask:actions_add_action_ctinfo_dscp_0xf0f00000_index_1: a dscp mask that isn't contiguous","cmd":"tc actions add action ctinfo dscp 0xf0f00000 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"cti-mask","json":"0","words":"actions add action ctinfo dscp 0xf0f00000 index 1"}} +{"id":"tcactwrite/ng-056","desc":"negative: opt=plain cmd=ng:w208:actions_add_action_ctinfo_dscp_0xfc000000_0x1junk_index_1: a junk statemask is the next kind: Bad action type 0x1junk (W208)","cmd":"tc actions add action ctinfo dscp 0xfc000000 0x1junk index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w208","json":"0","words":"actions add action ctinfo dscp 0xfc000000 0x1junk index 1"}} +{"id":"tcactwrite/ng-057","desc":"negative: opt=plain cmd=ng:w211:actions_add_action_sample: argument \"sample count\" is required (W211)","cmd":"tc actions add action sample","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w211","json":"0","words":"actions add action sample"}} +{"id":"tcactwrite/ng-058","desc":"negative: opt=plain cmd=ng:w212:actions_add_action_sample_rate_5_index_3: index skips the rate and group checks (W212)","cmd":"tc actions add action sample rate 5 index 3","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"w212","json":"0","words":"actions add action sample rate 5 index 3"}} +{"id":"tcactwrite/ng-059","desc":"negative: opt=plain cmd=ng:smp-group:actions_add_action_sample_rate_5_index: index with no value","cmd":"tc actions add action sample rate 5 index","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"smp-group","json":"0","words":"actions add action sample rate 5 index"}} +{"id":"tcactwrite/ng-060","desc":"negative: opt=plain cmd=ng:smp-rate0:actions_add_action_sample_rate_0_group_1_index_1: rate 0","cmd":"tc actions add action sample rate 0 group 1 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"smp-rate0","json":"0","words":"actions add action sample rate 0 group 1 index 1"}} +{"id":"tcactwrite/ng-061","desc":"negative: opt=plain cmd=ng:w191-smod:actions_add_action_skbmod_set: set with no value: NEXT_ARG (W191)","cmd":"tc actions add action skbmod set","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w191-smod","json":"0","words":"actions add action skbmod set"}} +{"id":"tcactwrite/ng-062","desc":"negative: opt=plain cmd=ng:w198:actions_add_action_skbmod_set_etype_0_index_1: etype 0: the flag with no ETYPE attribute (W198)","cmd":"tc actions add action skbmod set etype 0 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"w198","json":"0","words":"actions add action skbmod set etype 0 index 1"}} +{"id":"tcactwrite/ng-063","desc":"negative: opt=plain cmd=ng:smod-mac:actions_add_action_skbmod_set_dmac_zz_index_1: an unparsable MAC","cmd":"tc actions add action skbmod set dmac zz index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"smod-mac","json":"0","words":"actions add action skbmod set dmac zz index 1"}} +{"id":"tcactwrite/ng-064","desc":"negative: opt=plain cmd=ng:smod-none:actions_add_action_skbmod_index_1: no skbmod action","cmd":"tc actions add action skbmod index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"smod-none","json":"0","words":"actions add action skbmod index 1"}} +{"id":"tcactwrite/ng-065","desc":"negative: opt=plain cmd=ng:mp-nolabel:actions_add_action_mpls_push_index_1: push with no label","cmd":"tc actions add action mpls push index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"mp-nolabel","json":"0","words":"actions add action mpls push index 1"}} +{"id":"tcactwrite/ng-066","desc":"negative: opt=plain cmd=ng:w205:actions_add_action_mpls_pipe: no action word (W205)","cmd":"tc actions add action mpls pipe","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w205","json":"0","words":"actions add action mpls pipe"}} +{"id":"tcactwrite/ng-067","desc":"negative: opt=plain cmd=ng:w205-ind:actions_add_action_mpls_ind_5: ind is strcmp'd: no action word (W205)","cmd":"tc actions add action mpls ind 5","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w205-ind","json":"0","words":"actions add action mpls ind 5"}} +{"id":"tcactwrite/ng-068","desc":"negative: opt=plain cmd=ng:w206-t:actions_add_action_mpls_push_label_5_t_64_index_1: t is tc: tc field is 3 bits max (W206)","cmd":"tc actions add action mpls push label 5 t 64 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w206-t","json":"0","words":"actions add action mpls push label 5 t 64 index 1"}} +{"id":"tcactwrite/ng-069","desc":"negative: opt=plain cmd=ng:w204:actions_add_action_mpls_pop_protocol_0_index_1: protocol 0 is unset: argument \"protocol\" is required (W204)","cmd":"tc actions add action mpls pop protocol 0 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w204","json":"0","words":"actions add action mpls pop protocol 0 index 1"}} +{"id":"tcactwrite/ng-070","desc":"negative: opt=plain cmd=ng:w207-3:actions_add_action_mpls_push_label_3_index_1: label 3: act_mpls: MPLS label out of range (W207)","cmd":"tc actions add action mpls push label 3 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"w207-3","json":"0","words":"actions add action mpls push label 3 index 1"}} +{"id":"tcactwrite/ng-071","desc":"negative: opt=plain cmd=ng:w203:actions_add_action_mpls_mac_push_index_1: mac_push with no label: act_mpls: Label is required for MPLS push (W203)","cmd":"tc actions add action mpls mac_push index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"w203","json":"0","words":"actions add action mpls mac_push index 1"}} +{"id":"tcactwrite/ng-072","desc":"negative: opt=plain cmd=ng:mp-label:actions_add_action_mpls_push_label_1048576_index_1: a label past 20 bits","cmd":"tc actions add action mpls push label 1048576 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"mp-label","json":"0","words":"actions add action mpls push label 1048576 index 1"}} +{"id":"tcactwrite/ng-073","desc":"negative: opt=plain cmd=ng:mp-tc:actions_add_action_mpls_push_label_5_tc_8_index_1: tc past 3 bits","cmd":"tc actions add action mpls push label 5 tc 8 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"mp-tc","json":"0","words":"actions add action mpls push label 5 tc 8 index 1"}} +{"id":"tcactwrite/ng-074","desc":"negative: opt=plain cmd=ng:mp-ttl:actions_add_action_mpls_push_label_5_ttl_0_index_1: ttl 0","cmd":"tc actions add action mpls push label 5 ttl 0 index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"mp-ttl","json":"0","words":"actions add action mpls push label 5 ttl 0 index 1"}} +{"id":"tcactwrite/ng-075","desc":"negative: opt=plain cmd=ng:mp-pop:actions_add_action_mpls_pop_index_1: pop with no protocol","cmd":"tc actions add action mpls pop index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"mp-pop","json":"0","words":"actions add action mpls pop index 1"}} +{"id":"tcactwrite/ng-076","desc":"negative: opt=plain cmd=ng:mp-help:actions_add_action_mpls_help: mpls's usage","cmd":"tc actions add action mpls help","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"mp-help","json":"0","words":"actions add action mpls help"}} +{"id":"tcactwrite/ng-077","desc":"negative: opt=plain cmd=ng:w183:actions_add_action_gact_pass_index_1_skip_sw_skip_hw: skip_sw with skip_hw: EINVAL with no extack (W183)","cmd":"tc actions add action gact pass index 1 skip_sw skip_hw","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"w183","json":"0","words":"actions add action gact pass index 1 skip_sw skip_hw"}} +{"id":"tcactwrite/ng-078","desc":"negative: opt=plain cmd=ng:fr-skipsw:actions_add_action_gact_pass_index_1_skip_sw: skip_sw with no device to offload to: EINVAL with no extack (K)","cmd":"tc actions add action gact pass index 1 skip_sw","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"fr-skipsw","json":"0","words":"actions add action gact pass index 1 skip_sw"}} +{"id":"tcactwrite/ng-079","desc":"negative: opt=plain cmd=ng:fr-cookie:actions_add_action_gact_pass_index_1_cookie_zz: a cookie that isn't hex","cmd":"tc actions add action gact pass index 1 cookie zz","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"fr-cookie","json":"0","words":"actions add action gact pass index 1 cookie zz"}} +{"id":"tcactwrite/ng-080","desc":"negative: opt=plain cmd=ng:fr-cookie-long:actions_add_action_gact_pass_index_1_cookie_ababababababababababababababababababababababababababababababababab: a cookie past 32 bytes","cmd":"tc actions add action gact pass index 1 cookie ababababababababababababababababababababababababababababababababab","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"fr-cookie-long","json":"0","words":"actions add action gact pass index 1 cookie ababababababababababababababababababababababababababababababababab"}} +{"id":"tcactwrite/ng-081","desc":"negative: opt=plain cmd=ng:fr-hw:actions_add_action_gact_pass_index_1_hw_stats_foo: an unknown hw_stats","cmd":"tc actions add action gact pass index 1 hw_stats foo","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"fr-hw","json":"0","words":"actions add action gact pass index 1 hw_stats foo"}} +{"id":"tcactwrite/ng-082","desc":"negative: opt=plain cmd=ng:fr-hw-any:actions_add_action_gact_pass_index_1_hw_stats_any: any is no hw_stats word","cmd":"tc actions add action gact pass index 1 hw_stats any","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"fr-hw-any","json":"0","words":"actions add action gact pass index 1 hw_stats any"}} +{"id":"tcactwrite/ng-083","desc":"negative: opt=plain cmd=ng:w113:actions_add_action_gact_pass_index_1_action_gact_pass_index_2_action_gact_pass_index_3_action_gact_pass_index_4_action_gact_pass_index_5_action_gact_pass_index_6_action_gact_pass_index_7_action_gact_pass_index_8_action_gact_pass_index_9_action_gact_pass_index_10_action_gact_pass_index_11_action_gact_pass_index_12_action_gact_pass_index_13_action_gact_pass_index_14_action_gact_pass_index_15_action_gact_pass_index_16_action_gact_pass_index_17_action_gact_pass_index_18_action_gact_pass_index_19_action_gact_pass_index_20_action_gact_pass_index_21_action_gact_pass_index_22_action_gact_pass_index_23_action_gact_pass_index_24_action_gact_pass_index_25_action_gact_pass_index_26_action_gact_pass_index_27_action_gact_pass_index_28_action_gact_pass_index_29_action_gact_pass_index_30_action_gact_pass_index_31_action_gact_pass_index_32_action_gact_pass_index_33: 33 actions: tc sends all 33 (W113)","cmd":"tc actions add action gact pass index 1 action gact pass index 2 action gact pass index 3 action gact pass index 4 action gact pass index 5 action gact pass index 6 action gact pass index 7 action gact pass index 8 action gact pass index 9 action gact pass index 10 action gact pass index 11 action gact pass index 12 action gact pass index 13 action gact pass index 14 action gact pass index 15 action gact pass index 16 action gact pass index 17 action gact pass index 18 action gact pass index 19 action gact pass index 20 action gact pass index 21 action gact pass index 22 action gact pass index 23 action gact pass index 24 action gact pass index 25 action gact pass index 26 action gact pass index 27 action gact pass index 28 action gact pass index 29 action gact pass index 30 action gact pass index 31 action gact pass index 32 action gact pass index 33","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"w113","json":"0","words":"actions add action gact pass index 1 action gact pass index 2 action gact pass index 3 action gact pass index 4 action gact pass index 5 action gact pass index 6 action gact pass index 7 action gact pass index 8 action gact pass index 9 action gact pass index 10 action gact pass index 11 action gact pass index 12 action gact pass index 13 action gact pass index 14 action gact pass index 15 action gact pass index 16 action gact pass index 17 action gact pass index 18 action gact pass index 19 action gact pass index 20 action gact pass index 21 action gact pass index 22 action gact pass index 23 action gact pass index 24 action gact pass index 25 action gact pass index 26 action gact pass index 27 action gact pass index 28 action gact pass index 29 action gact pass index 30 action gact pass index 31 action gact pass index 32 action gact pass index 33"}} +{"id":"tcactwrite/ng-084","desc":"negative: opt=plain cmd=ng:w176:actions_add_action_drop_flowid_1:1: the add is committed, then Command \"flowid\" is unknown (W176)","cmd":"tc actions add action drop flowid 1:1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"ack-then-fail"},"axes":{"fix":"w176","json":"0","words":"actions add action drop flowid 1:1"}} +{"id":"tcactwrite/ng-085","desc":"negative: opt=plain cmd=ng:w178:actions_delete_action_gact_index_0: index 0 sends no INDEX: Invalid TC action index value, then Command \"action\" is unknown (W178, W187)","cmd":"tc actions delete action gact index 0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action gact pass index 1"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"w178","json":"0","words":"actions delete action gact index 0"}} +{"id":"tcactwrite/ng-086","desc":"negative: opt=plain cmd=ng:w187:actions_delete_action_gact_index_7: no such index: the failed delete returns 1, so do_action reads action as a command (W187)","cmd":"tc actions delete action gact index 7","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"ENOENT","refused_by":"kernel"},"axes":{"fix":"w187","json":"0","words":"actions delete action gact index 7"}} +{"id":"tcactwrite/ng-087","desc":"negative: opt=plain cmd=ng:del-noidx:actions_delete_action_gact: delete with no index","cmd":"tc actions delete action gact","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"del-noidx","json":"0","words":"actions delete action gact"}} +{"id":"tcactwrite/ng-088","desc":"negative: opt=plain cmd=ng:add-dup:actions_add_action_gact_pass_index_1: add of an index that exists: EXCL","cmd":"tc actions add action gact pass index 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","tc actions add action gact pass index 1"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"errno":"EEXIST","refused_by":"kernel"},"axes":{"fix":"add-dup","json":"0","words":"actions add action gact pass index 1"}} +{"id":"tcactwrite/ng-089","desc":"negative: opt=plain cmd=ng:act-help:actions_add_help: add help: Illegal \"action\" (W186)","cmd":"tc actions add help","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"act-help","json":"0","words":"actions add help"}} +{"id":"tcactwrite/ng-090","desc":"negative: opt=plain cmd=ng:act-unknown:actions_bogus: Command \"bogus\" is unknown","cmd":"tc actions bogus","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"act-unknown","json":"0","words":"actions bogus"}} +{"id":"tcactwrite/ng-091","desc":"negative: opt=plain cmd=ng:flush-none:actions_flush: flush with no kind: the usage","cmd":"tc actions flush","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"flush-none","json":"0","words":"actions flush"}} +{"id":"tcactwrite/ng-092","desc":"negative: opt=plain cmd=ng:w185:batch:usage-exit: police's invarg exits, so line 2 never runs (W185)","cmd":"tc -force -batch b.txt","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","printf '%s\\n' 'actions add action police rate 1mbit burst 10x index 1' 'actions add action gact pass index 2' > b.txt"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"ack-then-fail"},"axes":{"batch":"usage-exit","fix":"w185","json":"0","words":"-force -batch b.txt"}} +{"id":"tcactwrite/ng-093","desc":"negative: opt=plain cmd=ng:w201:batch:mpls-exit: mpls's missarg exits (W201)","cmd":"tc -force -batch b.txt","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","printf '%s\\n' 'actions add action mpls push index 1' 'actions add action gact pass index 2' > b.txt"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":255,"refused_by":"ack-then-fail"},"axes":{"batch":"mpls-exit","fix":"w201","json":"0","words":"-force -batch b.txt"}} +{"id":"tcactwrite/ng-094","desc":"negative: opt=plain cmd=ng:w185-ret:batch:return: nat returns -1, so -force carries on to line 2","cmd":"tc -force -batch b.txt","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 clsact","tc qdisc add dev d1 root handle 1: htb","tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit","tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit","tc qdisc add dev d1 ingress_block 10 clsact","printf '%s\\n' 'actions add action nat sideways 10.0.0.0/8 1.1.1.1 index 1' 'actions add action gact pass index 2' > b.txt"],"modules":["sch_htb","sch_ingress","cls_basic","cls_cgroup","cls_flow","cls_fw","cls_matchall","cls_route","cls_u32","act_gact","act_police","act_mirred","act_skbedit","act_vlan","act_csum","act_nat","act_simple","act_connmark","act_ctinfo","act_sample","act_skbmod","act_mpls","act_pedit","act_tunnel_key","act_ife","act_ct","act_gate","act_bpf"],"proto":"route","expect":{"rc":1,"refused_by":"ack-then-fail"},"axes":{"batch":"return","fix":"w185-ret","json":"0","words":"-force -batch b.txt"}} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/cmd.json new file mode 100644 index 000000000..f7f7f6ca4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-add", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k index 1", + "desc": "positive: opt=plain cmd=v-add:actions_add_action_police_rate_1mbit_burst_10k_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-001", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/dump.out new file mode 100644 index 000000000..9da991e5a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/ip.pcap new file mode 100644 index 000000000..096d8354b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/netlink_route_dump.pcap new file mode 100644 index 000000000..72ec02fe3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-001/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/cmd.json new file mode 100644 index 000000000..236ca5e9e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-change", + "json": "0", + "words": "actions change action police rate 2mbit burst 20k index 1" + }, + "cmd": "tc actions change action police rate 2mbit burst 20k index 1", + "desc": "positive: opt=plain cmd=v-change:actions_change_action_police_rate_2mbit_burst_20k_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-002", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action police rate 1mbit burst 10k index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action police rate 1mbit burst 10k index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/dump.out new file mode 100644 index 000000000..8108fbc41 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 2Mbit burst 20Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/ip.pcap new file mode 100644 index 000000000..1e1d30b68 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/netlink_route_dump.pcap new file mode 100644 index 000000000..785223b97 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-002/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/cmd.json new file mode 100644 index 000000000..3889b3fa5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-replace", + "json": "0", + "words": "actions replace action police rate 2mbit burst 20k index 1" + }, + "cmd": "tc actions replace action police rate 2mbit burst 20k index 1", + "desc": "positive: opt=plain cmd=v-replace:actions_replace_action_police_rate_2mbit_burst_20k_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-003", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action police rate 1mbit burst 10k index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action police rate 1mbit burst 10k index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/dump.out new file mode 100644 index 000000000..8108fbc41 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 2Mbit burst 20Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/ip.pcap new file mode 100644 index 000000000..2baff1482 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/netlink_route_dump.pcap new file mode 100644 index 000000000..b3687d3fa Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-003/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/cmd.json new file mode 100644 index 000000000..c908a94bc --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-replace-new", + "json": "0", + "words": "actions replace action police rate 2mbit burst 20k index 2" + }, + "cmd": "tc actions replace action police rate 2mbit burst 20k index 2", + "desc": "positive: opt=plain cmd=v-replace-new:actions_replace_action_police_rate_2mbit_burst_20k_index_2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-004", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/dump.out new file mode 100644 index 000000000..9621a5207 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x2 rate 2Mbit burst 20Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/ip.pcap new file mode 100644 index 000000000..dbc3a3c5b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/netlink_route_dump.pcap new file mode 100644 index 000000000..1e3f2d255 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-004/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-005/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-005/cmd.json new file mode 100644 index 000000000..3b0ed0653 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-005/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-delete", + "json": "0", + "words": "actions delete action police index 1" + }, + "cmd": "tc actions delete action police index 1", + "desc": "positive: opt=plain cmd=v-delete:actions_delete_action_police_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-005", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action police rate 1mbit burst 10k index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action police rate 1mbit burst 10k index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-005/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-005/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-005/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-005/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-005/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-005/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-005/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-005/ip.pcap new file mode 100644 index 000000000..6ab715a1e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-005/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-005/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-005/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-005/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-005/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-005/netlink_route_dump.pcap new file mode 100644 index 000000000..cb4fb7563 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-005/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-006/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-006/cmd.json new file mode 100644 index 000000000..087951189 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-006/cmd.json @@ -0,0 +1,110 @@ +{ + "axes": { + "fix": "v-flush", + "json": "0", + "words": "actions flush action police" + }, + "cmd": "tc actions flush action police", + "desc": "positive: opt=plain cmd=v-flush:actions_flush_action_police", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-006", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action police rate 1mbit burst 10k index 1", + "tc actions add action police rate 1mbit burst 10k index 2" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action police rate 1mbit burst 10k index 1", + "rc": 0 + }, + { + "cmd": "tc actions add action police rate 1mbit burst 10k index 2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-006/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-006/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-006/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-006/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-006/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-006/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-006/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-006/ip.pcap new file mode 100644 index 000000000..1040eb6b3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-006/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-006/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-006/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-006/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-006/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-006/netlink_route_dump.pcap new file mode 100644 index 000000000..3f2195872 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-006/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/cmd.json new file mode 100644 index 000000000..481d3b3ad --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-add", + "json": "0", + "words": "actions add action mirred egress redirect dev d1 index 1" + }, + "cmd": "tc actions add action mirred egress redirect dev d1 index 1", + "desc": "positive: opt=plain cmd=v-add:actions_add_action_mirred_egress_redirect_dev_d1_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-007", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mirred", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/dump.out new file mode 100644 index 000000000..5c682b610 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mirred (Egress Redirect to device d1) stolen + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/ip.pcap new file mode 100644 index 000000000..a15778b6e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/netlink_route_dump.pcap new file mode 100644 index 000000000..cfd3c8244 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-007/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/cmd.json new file mode 100644 index 000000000..df56fac95 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-change", + "json": "0", + "words": "actions change action mirred egress mirror dev d1 index 1" + }, + "cmd": "tc actions change action mirred egress mirror dev d1 index 1", + "desc": "positive: opt=plain cmd=v-change:actions_change_action_mirred_egress_mirror_dev_d1_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-008", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action mirred egress redirect dev d1 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mirred", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action mirred egress redirect dev d1 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/dump.out new file mode 100644 index 000000000..0575456e9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mirred (Egress Mirror to device d1) pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/ip.pcap new file mode 100644 index 000000000..d2e09859f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/netlink_route_dump.pcap new file mode 100644 index 000000000..f1f795944 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-008/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/cmd.json new file mode 100644 index 000000000..0e297bcad --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-replace", + "json": "0", + "words": "actions replace action mirred egress mirror dev d1 index 1" + }, + "cmd": "tc actions replace action mirred egress mirror dev d1 index 1", + "desc": "positive: opt=plain cmd=v-replace:actions_replace_action_mirred_egress_mirror_dev_d1_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-009", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action mirred egress redirect dev d1 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mirred", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action mirred egress redirect dev d1 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/dump.out new file mode 100644 index 000000000..0575456e9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mirred (Egress Mirror to device d1) pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/ip.pcap new file mode 100644 index 000000000..a752365f2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/netlink_route_dump.pcap new file mode 100644 index 000000000..b80677cd1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-009/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/cmd.json new file mode 100644 index 000000000..0fade4176 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-replace-new", + "json": "0", + "words": "actions replace action mirred egress mirror dev d1 index 2" + }, + "cmd": "tc actions replace action mirred egress mirror dev d1 index 2", + "desc": "positive: opt=plain cmd=v-replace-new:actions_replace_action_mirred_egress_mirror_dev_d1_index_2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-010", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mirred", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/dump.out new file mode 100644 index 000000000..77ecb6420 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mirred (Egress Mirror to device d1) pipe + index 2 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/ip.pcap new file mode 100644 index 000000000..5ee036def Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/netlink_route_dump.pcap new file mode 100644 index 000000000..f504e637c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-010/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-011/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-011/cmd.json new file mode 100644 index 000000000..c8ea089f7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-011/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-delete", + "json": "0", + "words": "actions delete action mirred index 1" + }, + "cmd": "tc actions delete action mirred index 1", + "desc": "positive: opt=plain cmd=v-delete:actions_delete_action_mirred_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-011", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action mirred egress redirect dev d1 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mirred", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action mirred egress redirect dev d1 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-011/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-011/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-011/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-011/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-011/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-011/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-011/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-011/ip.pcap new file mode 100644 index 000000000..b073d8584 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-011/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-011/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-011/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-011/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-011/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-011/netlink_route_dump.pcap new file mode 100644 index 000000000..2ca74b128 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-011/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-012/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-012/cmd.json new file mode 100644 index 000000000..f5abe3f34 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-012/cmd.json @@ -0,0 +1,110 @@ +{ + "axes": { + "fix": "v-flush", + "json": "0", + "words": "actions flush action mirred" + }, + "cmd": "tc actions flush action mirred", + "desc": "positive: opt=plain cmd=v-flush:actions_flush_action_mirred", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-012", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action mirred egress redirect dev d1 index 1", + "tc actions add action mirred egress redirect dev d1 index 2" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mirred", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action mirred egress redirect dev d1 index 1", + "rc": 0 + }, + { + "cmd": "tc actions add action mirred egress redirect dev d1 index 2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-012/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-012/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-012/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-012/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-012/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-012/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-012/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-012/ip.pcap new file mode 100644 index 000000000..2f60a81a1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-012/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-012/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-012/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-012/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-012/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-012/netlink_route_dump.pcap new file mode 100644 index 000000000..a5ffa853e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-012/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/cmd.json new file mode 100644 index 000000000..079874ba0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-add", + "json": "0", + "words": "actions add action skbedit mark 5 index 1" + }, + "cmd": "tc actions add action skbedit mark 5 index 1", + "desc": "positive: opt=plain cmd=v-add:actions_add_action_skbedit_mark_5_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-013", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/dump.out new file mode 100644 index 000000000..356f99232 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbedit mark 5 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/ip.pcap new file mode 100644 index 000000000..3da19c936 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/netlink_route_dump.pcap new file mode 100644 index 000000000..e9900ab34 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-013/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/cmd.json new file mode 100644 index 000000000..bb9bbd00b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-change", + "json": "0", + "words": "actions change action skbedit priority 5 index 1" + }, + "cmd": "tc actions change action skbedit priority 5 index 1", + "desc": "positive: opt=plain cmd=v-change:actions_change_action_skbedit_priority_5_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-014", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action skbedit mark 5 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action skbedit mark 5 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/dump.out new file mode 100644 index 000000000..a6de758d1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbedit priority :5 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/ip.pcap new file mode 100644 index 000000000..eaf951ebb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/netlink_route_dump.pcap new file mode 100644 index 000000000..4c258134f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-014/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/cmd.json new file mode 100644 index 000000000..a2da92ffd --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-replace", + "json": "0", + "words": "actions replace action skbedit priority 5 index 1" + }, + "cmd": "tc actions replace action skbedit priority 5 index 1", + "desc": "positive: opt=plain cmd=v-replace:actions_replace_action_skbedit_priority_5_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-015", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action skbedit mark 5 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action skbedit mark 5 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/dump.out new file mode 100644 index 000000000..a6de758d1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbedit priority :5 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/ip.pcap new file mode 100644 index 000000000..8599e19e7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/netlink_route_dump.pcap new file mode 100644 index 000000000..d49ef8667 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-015/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/cmd.json new file mode 100644 index 000000000..20425c3d6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-replace-new", + "json": "0", + "words": "actions replace action skbedit priority 5 index 2" + }, + "cmd": "tc actions replace action skbedit priority 5 index 2", + "desc": "positive: opt=plain cmd=v-replace-new:actions_replace_action_skbedit_priority_5_index_2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-016", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/dump.out new file mode 100644 index 000000000..a901ab929 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbedit priority :5 pipe + index 2 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/ip.pcap new file mode 100644 index 000000000..3fcdae4e3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/netlink_route_dump.pcap new file mode 100644 index 000000000..b85e50af8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-016/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-017/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-017/cmd.json new file mode 100644 index 000000000..9299645c5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-017/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-delete", + "json": "0", + "words": "actions delete action skbedit index 1" + }, + "cmd": "tc actions delete action skbedit index 1", + "desc": "positive: opt=plain cmd=v-delete:actions_delete_action_skbedit_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-017", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action skbedit mark 5 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action skbedit mark 5 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-017/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-017/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-017/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-017/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-017/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-017/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-017/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-017/ip.pcap new file mode 100644 index 000000000..07e95e384 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-017/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-017/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-017/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-017/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-017/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-017/netlink_route_dump.pcap new file mode 100644 index 000000000..1313a780f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-017/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-018/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-018/cmd.json new file mode 100644 index 000000000..558851ed1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-018/cmd.json @@ -0,0 +1,110 @@ +{ + "axes": { + "fix": "v-flush", + "json": "0", + "words": "actions flush action skbedit" + }, + "cmd": "tc actions flush action skbedit", + "desc": "positive: opt=plain cmd=v-flush:actions_flush_action_skbedit", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-018", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action skbedit mark 5 index 1", + "tc actions add action skbedit mark 5 index 2" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action skbedit mark 5 index 1", + "rc": 0 + }, + { + "cmd": "tc actions add action skbedit mark 5 index 2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-018/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-018/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-018/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-018/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-018/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-018/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-018/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-018/ip.pcap new file mode 100644 index 000000000..4ac9afaac Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-018/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-018/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-018/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-018/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-018/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-018/netlink_route_dump.pcap new file mode 100644 index 000000000..2e9821c6e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-018/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/cmd.json new file mode 100644 index 000000000..619721303 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-add", + "json": "0", + "words": "actions add action vlan pop index 1" + }, + "cmd": "tc actions add action vlan pop index 1", + "desc": "positive: opt=plain cmd=v-add:actions_add_action_vlan_pop_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-019", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/dump.out new file mode 100644 index 000000000..04177dab9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: vlan pop pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/ip.pcap new file mode 100644 index 000000000..7a4cd1b41 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/netlink_route_dump.pcap new file mode 100644 index 000000000..12e8ae838 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-019/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/cmd.json new file mode 100644 index 000000000..4051586c1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-change", + "json": "0", + "words": "actions change action vlan push id 100 index 1" + }, + "cmd": "tc actions change action vlan push id 100 index 1", + "desc": "positive: opt=plain cmd=v-change:actions_change_action_vlan_push_id_100_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-020", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action vlan pop index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action vlan pop index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/dump.out new file mode 100644 index 000000000..6e8bbed37 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: vlan push id 100 protocol 802.1Q priority 0 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/ip.pcap new file mode 100644 index 000000000..b370e0645 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/netlink_route_dump.pcap new file mode 100644 index 000000000..884802204 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-020/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/cmd.json new file mode 100644 index 000000000..228804441 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-replace", + "json": "0", + "words": "actions replace action vlan push id 100 index 1" + }, + "cmd": "tc actions replace action vlan push id 100 index 1", + "desc": "positive: opt=plain cmd=v-replace:actions_replace_action_vlan_push_id_100_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-021", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action vlan pop index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action vlan pop index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/dump.out new file mode 100644 index 000000000..6e8bbed37 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: vlan push id 100 protocol 802.1Q priority 0 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/ip.pcap new file mode 100644 index 000000000..1c36208b5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/netlink_route_dump.pcap new file mode 100644 index 000000000..60a685d3b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-021/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/cmd.json new file mode 100644 index 000000000..5828a57e5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-replace-new", + "json": "0", + "words": "actions replace action vlan push id 100 index 2" + }, + "cmd": "tc actions replace action vlan push id 100 index 2", + "desc": "positive: opt=plain cmd=v-replace-new:actions_replace_action_vlan_push_id_100_index_2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-022", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/dump.out new file mode 100644 index 000000000..a45e805a5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: vlan push id 100 protocol 802.1Q priority 0 pipe + index 2 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/ip.pcap new file mode 100644 index 000000000..543b4c4bf Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/netlink_route_dump.pcap new file mode 100644 index 000000000..1e7a11389 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-022/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-023/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-023/cmd.json new file mode 100644 index 000000000..928199ffd --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-023/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-delete", + "json": "0", + "words": "actions delete action vlan index 1" + }, + "cmd": "tc actions delete action vlan index 1", + "desc": "positive: opt=plain cmd=v-delete:actions_delete_action_vlan_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-023", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action vlan pop index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action vlan pop index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-023/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-023/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-023/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-023/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-023/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-023/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-023/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-023/ip.pcap new file mode 100644 index 000000000..b2040566d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-023/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-023/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-023/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-023/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-023/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-023/netlink_route_dump.pcap new file mode 100644 index 000000000..df9284ffe Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-023/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-024/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-024/cmd.json new file mode 100644 index 000000000..02fdb59cf --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-024/cmd.json @@ -0,0 +1,110 @@ +{ + "axes": { + "fix": "v-flush", + "json": "0", + "words": "actions flush action vlan" + }, + "cmd": "tc actions flush action vlan", + "desc": "positive: opt=plain cmd=v-flush:actions_flush_action_vlan", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-024", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action vlan pop index 1", + "tc actions add action vlan pop index 2" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action vlan pop index 1", + "rc": 0 + }, + { + "cmd": "tc actions add action vlan pop index 2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-024/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-024/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-024/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-024/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-024/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-024/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-024/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-024/ip.pcap new file mode 100644 index 000000000..bad3dce83 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-024/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-024/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-024/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-024/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-024/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-024/netlink_route_dump.pcap new file mode 100644 index 000000000..fe8ccdb1c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-024/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/cmd.json new file mode 100644 index 000000000..6ac6758ba --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-add", + "json": "0", + "words": "actions add action csum iph index 1" + }, + "cmd": "tc actions add action csum iph index 1", + "desc": "positive: opt=plain cmd=v-add:actions_add_action_csum_iph_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-025", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/dump.out new file mode 100644 index 000000000..3683dadeb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: csum (iph) action pass + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/ip.pcap new file mode 100644 index 000000000..553162cc8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/netlink_route_dump.pcap new file mode 100644 index 000000000..859e40491 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-025/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/cmd.json new file mode 100644 index 000000000..11a7762b1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-change", + "json": "0", + "words": "actions change action csum tcp index 1" + }, + "cmd": "tc actions change action csum tcp index 1", + "desc": "positive: opt=plain cmd=v-change:actions_change_action_csum_tcp_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-026", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action csum iph index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action csum iph index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/dump.out new file mode 100644 index 000000000..08d783102 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: csum (tcp) action pass + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/ip.pcap new file mode 100644 index 000000000..9c321afca Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/netlink_route_dump.pcap new file mode 100644 index 000000000..6d97a32e5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-026/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/cmd.json new file mode 100644 index 000000000..b8cbdadf8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-replace", + "json": "0", + "words": "actions replace action csum tcp index 1" + }, + "cmd": "tc actions replace action csum tcp index 1", + "desc": "positive: opt=plain cmd=v-replace:actions_replace_action_csum_tcp_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-027", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action csum iph index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action csum iph index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/dump.out new file mode 100644 index 000000000..08d783102 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: csum (tcp) action pass + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/ip.pcap new file mode 100644 index 000000000..3a2609b8c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/netlink_route_dump.pcap new file mode 100644 index 000000000..e6fdd0393 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-027/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/cmd.json new file mode 100644 index 000000000..bc33b0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-replace-new", + "json": "0", + "words": "actions replace action csum tcp index 2" + }, + "cmd": "tc actions replace action csum tcp index 2", + "desc": "positive: opt=plain cmd=v-replace-new:actions_replace_action_csum_tcp_index_2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-028", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/dump.out new file mode 100644 index 000000000..6adf4d245 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: csum (tcp) action pass + index 2 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/ip.pcap new file mode 100644 index 000000000..3eca5e8db Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/netlink_route_dump.pcap new file mode 100644 index 000000000..2ccc1740c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-028/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-029/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-029/cmd.json new file mode 100644 index 000000000..c67de0447 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-029/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-delete", + "json": "0", + "words": "actions delete action csum index 1" + }, + "cmd": "tc actions delete action csum index 1", + "desc": "positive: opt=plain cmd=v-delete:actions_delete_action_csum_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-029", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action csum iph index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action csum iph index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-029/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-029/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-029/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-029/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-029/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-029/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-029/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-029/ip.pcap new file mode 100644 index 000000000..246328ce8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-029/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-029/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-029/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-029/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-029/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-029/netlink_route_dump.pcap new file mode 100644 index 000000000..1b04f0449 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-029/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-030/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-030/cmd.json new file mode 100644 index 000000000..9f7f7c933 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-030/cmd.json @@ -0,0 +1,110 @@ +{ + "axes": { + "fix": "v-flush", + "json": "0", + "words": "actions flush action csum" + }, + "cmd": "tc actions flush action csum", + "desc": "positive: opt=plain cmd=v-flush:actions_flush_action_csum", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-030", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action csum iph index 1", + "tc actions add action csum iph index 2" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action csum iph index 1", + "rc": 0 + }, + { + "cmd": "tc actions add action csum iph index 2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-030/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-030/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-030/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-030/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-030/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-030/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-030/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-030/ip.pcap new file mode 100644 index 000000000..339d1a1b3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-030/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-030/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-030/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-030/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-030/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-030/netlink_route_dump.pcap new file mode 100644 index 000000000..9176489e1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-030/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/cmd.json new file mode 100644 index 000000000..1ae503f34 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-add", + "json": "0", + "words": "actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 1" + }, + "cmd": "tc actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 1", + "desc": "positive: opt=plain cmd=v-add:actions_add_action_nat_ingress_10.0.0.0/8_192.168.0.1_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-031", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action nat", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/dump.out new file mode 100644 index 000000000..5e18ee2d4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: nat ingress 10.0.0.0/8 192.168.0.1 pass + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/ip.pcap new file mode 100644 index 000000000..0940893f9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/netlink_route_dump.pcap new file mode 100644 index 000000000..a6d5c6902 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-031/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/cmd.json new file mode 100644 index 000000000..37b7080d1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-change", + "json": "0", + "words": "actions change action nat egress 10.1.2.3 10.4.5.6 index 1" + }, + "cmd": "tc actions change action nat egress 10.1.2.3 10.4.5.6 index 1", + "desc": "positive: opt=plain cmd=v-change:actions_change_action_nat_egress_10.1.2.3_10.4.5.6_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-032", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action nat", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/dump.out new file mode 100644 index 000000000..2285b10af --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: nat egress 10.1.2.3/32 10.4.5.6 pass + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/ip.pcap new file mode 100644 index 000000000..d15b0afd9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/netlink_route_dump.pcap new file mode 100644 index 000000000..1902f9232 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-032/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/cmd.json new file mode 100644 index 000000000..56f040291 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-replace", + "json": "0", + "words": "actions replace action nat egress 10.1.2.3 10.4.5.6 index 1" + }, + "cmd": "tc actions replace action nat egress 10.1.2.3 10.4.5.6 index 1", + "desc": "positive: opt=plain cmd=v-replace:actions_replace_action_nat_egress_10.1.2.3_10.4.5.6_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-033", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action nat", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/dump.out new file mode 100644 index 000000000..2285b10af --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: nat egress 10.1.2.3/32 10.4.5.6 pass + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/ip.pcap new file mode 100644 index 000000000..9ffea5fe3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/netlink_route_dump.pcap new file mode 100644 index 000000000..1f4131e3c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-033/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/cmd.json new file mode 100644 index 000000000..6c4dfd837 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-replace-new", + "json": "0", + "words": "actions replace action nat egress 10.1.2.3 10.4.5.6 index 2" + }, + "cmd": "tc actions replace action nat egress 10.1.2.3 10.4.5.6 index 2", + "desc": "positive: opt=plain cmd=v-replace-new:actions_replace_action_nat_egress_10.1.2.3_10.4.5.6_index_2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-034", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action nat", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/dump.out new file mode 100644 index 000000000..713974625 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: nat egress 10.1.2.3/32 10.4.5.6 pass + index 2 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/ip.pcap new file mode 100644 index 000000000..e9688e510 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/netlink_route_dump.pcap new file mode 100644 index 000000000..b87fe6f7a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-034/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-035/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-035/cmd.json new file mode 100644 index 000000000..05b5e2d5b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-035/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-delete", + "json": "0", + "words": "actions delete action nat index 1" + }, + "cmd": "tc actions delete action nat index 1", + "desc": "positive: opt=plain cmd=v-delete:actions_delete_action_nat_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-035", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action nat", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-035/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-035/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-035/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-035/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-035/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-035/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-035/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-035/ip.pcap new file mode 100644 index 000000000..c4a783437 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-035/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-035/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-035/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-035/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-035/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-035/netlink_route_dump.pcap new file mode 100644 index 000000000..77688cadf Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-035/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-036/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-036/cmd.json new file mode 100644 index 000000000..60469cf51 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-036/cmd.json @@ -0,0 +1,110 @@ +{ + "axes": { + "fix": "v-flush", + "json": "0", + "words": "actions flush action nat" + }, + "cmd": "tc actions flush action nat", + "desc": "positive: opt=plain cmd=v-flush:actions_flush_action_nat", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-036", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 1", + "tc actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 2" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action nat", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 1", + "rc": 0 + }, + { + "cmd": "tc actions add action nat ingress 10.0.0.0/8 192.168.0.1 index 2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-036/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-036/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-036/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-036/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-036/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-036/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-036/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-036/ip.pcap new file mode 100644 index 000000000..17478e1cc Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-036/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-036/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-036/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-036/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-036/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-036/netlink_route_dump.pcap new file mode 100644 index 000000000..d795f92ef Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-036/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/cmd.json new file mode 100644 index 000000000..2cf605207 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-add", + "json": "0", + "words": "actions add action simple sdata hello index 1" + }, + "cmd": "tc actions add action simple sdata hello index 1", + "desc": "positive: opt=plain cmd=v-add:actions_add_action_simple_sdata_hello_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-037", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action simple", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/dump.out new file mode 100644 index 000000000..84e0e2ee5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: Simple + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/ip.pcap new file mode 100644 index 000000000..fdaaa7c19 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/netlink_route_dump.pcap new file mode 100644 index 000000000..0de9f001b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-037/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/cmd.json new file mode 100644 index 000000000..be2142dad --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-change", + "json": "0", + "words": "actions change action simple sdata world index 1" + }, + "cmd": "tc actions change action simple sdata world index 1", + "desc": "positive: opt=plain cmd=v-change:actions_change_action_simple_sdata_world_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-038", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action simple sdata hello index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action simple", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action simple sdata hello index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/dump.out new file mode 100644 index 000000000..e64bb4d45 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: Simple + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/ip.pcap new file mode 100644 index 000000000..5b6f86f17 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/netlink_route_dump.pcap new file mode 100644 index 000000000..496b29be9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-038/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/cmd.json new file mode 100644 index 000000000..77ef2a494 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-replace", + "json": "0", + "words": "actions replace action simple sdata world index 1" + }, + "cmd": "tc actions replace action simple sdata world index 1", + "desc": "positive: opt=plain cmd=v-replace:actions_replace_action_simple_sdata_world_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-039", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action simple sdata hello index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action simple", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action simple sdata hello index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/dump.out new file mode 100644 index 000000000..e64bb4d45 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: Simple + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/ip.pcap new file mode 100644 index 000000000..73dce3e0b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/netlink_route_dump.pcap new file mode 100644 index 000000000..c58558521 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-039/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/cmd.json new file mode 100644 index 000000000..dc1be5525 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-replace-new", + "json": "0", + "words": "actions replace action simple sdata world index 2" + }, + "cmd": "tc actions replace action simple sdata world index 2", + "desc": "positive: opt=plain cmd=v-replace-new:actions_replace_action_simple_sdata_world_index_2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-040", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action simple", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/dump.out new file mode 100644 index 000000000..5d007b18d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: Simple + index 2 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/ip.pcap new file mode 100644 index 000000000..a43d48121 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/netlink_route_dump.pcap new file mode 100644 index 000000000..0bc3545d4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-040/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-041/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-041/cmd.json new file mode 100644 index 000000000..ca4118240 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-041/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-delete", + "json": "0", + "words": "actions delete action simple index 1" + }, + "cmd": "tc actions delete action simple index 1", + "desc": "positive: opt=plain cmd=v-delete:actions_delete_action_simple_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-041", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action simple sdata hello index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action simple", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action simple sdata hello index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-041/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-041/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-041/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-041/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-041/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-041/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-041/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-041/ip.pcap new file mode 100644 index 000000000..1e42a91fd Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-041/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-041/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-041/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-041/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-041/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-041/netlink_route_dump.pcap new file mode 100644 index 000000000..6ce038b1a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-041/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-042/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-042/cmd.json new file mode 100644 index 000000000..28bb4c950 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-042/cmd.json @@ -0,0 +1,110 @@ +{ + "axes": { + "fix": "v-flush", + "json": "0", + "words": "actions flush action simple" + }, + "cmd": "tc actions flush action simple", + "desc": "positive: opt=plain cmd=v-flush:actions_flush_action_simple", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-042", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action simple sdata hello index 1", + "tc actions add action simple sdata hello index 2" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action simple", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action simple sdata hello index 1", + "rc": 0 + }, + { + "cmd": "tc actions add action simple sdata hello index 2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-042/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-042/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-042/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-042/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-042/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-042/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-042/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-042/ip.pcap new file mode 100644 index 000000000..de2aa5b35 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-042/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-042/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-042/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-042/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-042/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-042/netlink_route_dump.pcap new file mode 100644 index 000000000..aed02f8b3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-042/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/cmd.json new file mode 100644 index 000000000..d84ec867c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-add", + "json": "0", + "words": "actions add action connmark zone 5 index 1" + }, + "cmd": "tc actions add action connmark zone 5 index 1", + "desc": "positive: opt=plain cmd=v-add:actions_add_action_connmark_zone_5_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-043", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action connmark", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/dump.out new file mode 100644 index 000000000..5a631a014 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: connmark zone 5 pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/ip.pcap new file mode 100644 index 000000000..f592475cc Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/netlink_route_dump.pcap new file mode 100644 index 000000000..3abac0c05 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-043/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/cmd.json new file mode 100644 index 000000000..72cca20d3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-change", + "json": "0", + "words": "actions change action connmark zone 6 index 1" + }, + "cmd": "tc actions change action connmark zone 6 index 1", + "desc": "positive: opt=plain cmd=v-change:actions_change_action_connmark_zone_6_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-044", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action connmark zone 5 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action connmark", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action connmark zone 5 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/dump.out new file mode 100644 index 000000000..6cc8bbda8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: connmark zone 6 pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/ip.pcap new file mode 100644 index 000000000..34f6fa411 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/netlink_route_dump.pcap new file mode 100644 index 000000000..0bef49c06 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-044/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/cmd.json new file mode 100644 index 000000000..6683b42e0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-replace", + "json": "0", + "words": "actions replace action connmark zone 6 index 1" + }, + "cmd": "tc actions replace action connmark zone 6 index 1", + "desc": "positive: opt=plain cmd=v-replace:actions_replace_action_connmark_zone_6_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-045", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action connmark zone 5 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action connmark", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action connmark zone 5 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/dump.out new file mode 100644 index 000000000..6cc8bbda8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: connmark zone 6 pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/ip.pcap new file mode 100644 index 000000000..6c8270d67 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/netlink_route_dump.pcap new file mode 100644 index 000000000..3104d79c2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-045/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/cmd.json new file mode 100644 index 000000000..0ff6254fc --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-replace-new", + "json": "0", + "words": "actions replace action connmark zone 6 index 2" + }, + "cmd": "tc actions replace action connmark zone 6 index 2", + "desc": "positive: opt=plain cmd=v-replace-new:actions_replace_action_connmark_zone_6_index_2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-046", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action connmark", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/dump.out new file mode 100644 index 000000000..6b8465b95 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: connmark zone 6 pipe + index 2 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/ip.pcap new file mode 100644 index 000000000..66254e937 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/netlink_route_dump.pcap new file mode 100644 index 000000000..ed80d96e5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-046/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-047/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-047/cmd.json new file mode 100644 index 000000000..37f0b18f4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-047/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-delete", + "json": "0", + "words": "actions delete action connmark index 1" + }, + "cmd": "tc actions delete action connmark index 1", + "desc": "positive: opt=plain cmd=v-delete:actions_delete_action_connmark_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-047", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action connmark zone 5 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action connmark", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action connmark zone 5 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-047/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-047/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-047/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-047/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-047/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-047/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-047/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-047/ip.pcap new file mode 100644 index 000000000..37ec46576 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-047/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-047/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-047/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-047/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-047/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-047/netlink_route_dump.pcap new file mode 100644 index 000000000..af4d0af8c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-047/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-048/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-048/cmd.json new file mode 100644 index 000000000..0bdc9bb49 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-048/cmd.json @@ -0,0 +1,110 @@ +{ + "axes": { + "fix": "v-flush", + "json": "0", + "words": "actions flush action connmark" + }, + "cmd": "tc actions flush action connmark", + "desc": "positive: opt=plain cmd=v-flush:actions_flush_action_connmark", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-048", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action connmark zone 5 index 1", + "tc actions add action connmark zone 5 index 2" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action connmark", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action connmark zone 5 index 1", + "rc": 0 + }, + { + "cmd": "tc actions add action connmark zone 5 index 2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-048/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-048/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-048/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-048/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-048/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-048/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-048/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-048/ip.pcap new file mode 100644 index 000000000..f78d8362f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-048/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-048/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-048/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-048/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-048/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-048/netlink_route_dump.pcap new file mode 100644 index 000000000..2fcfe04c8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-048/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/cmd.json new file mode 100644 index 000000000..436566135 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-add", + "json": "0", + "words": "actions add action ctinfo dscp 0xfc000000 index 1" + }, + "cmd": "tc actions add action ctinfo dscp 0xfc000000 index 1", + "desc": "positive: opt=plain cmd=v-add:actions_add_action_ctinfo_dscp_0xfc000000_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-049", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action ctinfo", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/dump.out new file mode 100644 index 000000000..bbda38ec4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: ctinfo zone 0 pipe + index 1 ref 1 bind 0 dscp 0xfc000000 0000000000 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/ip.pcap new file mode 100644 index 000000000..545db5806 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/netlink_route_dump.pcap new file mode 100644 index 000000000..fac688784 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-049/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/cmd.json new file mode 100644 index 000000000..baaa4d35e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-change", + "json": "0", + "words": "actions change action ctinfo cpmark 0xff index 1" + }, + "cmd": "tc actions change action ctinfo cpmark 0xff index 1", + "desc": "positive: opt=plain cmd=v-change:actions_change_action_ctinfo_cpmark_0xff_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-050", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action ctinfo dscp 0xfc000000 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action ctinfo", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action ctinfo dscp 0xfc000000 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/dump.out new file mode 100644 index 000000000..69944e720 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: ctinfo zone 0 pipe + index 1 ref 1 bind 0 cpmark 0x000000ff + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/ip.pcap new file mode 100644 index 000000000..0be88be80 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/netlink_route_dump.pcap new file mode 100644 index 000000000..4830865c1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-050/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/cmd.json new file mode 100644 index 000000000..d8ab82ff8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-replace", + "json": "0", + "words": "actions replace action ctinfo cpmark 0xff index 1" + }, + "cmd": "tc actions replace action ctinfo cpmark 0xff index 1", + "desc": "positive: opt=plain cmd=v-replace:actions_replace_action_ctinfo_cpmark_0xff_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-051", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action ctinfo dscp 0xfc000000 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action ctinfo", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action ctinfo dscp 0xfc000000 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/dump.out new file mode 100644 index 000000000..69944e720 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: ctinfo zone 0 pipe + index 1 ref 1 bind 0 cpmark 0x000000ff + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/ip.pcap new file mode 100644 index 000000000..21f35865e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/netlink_route_dump.pcap new file mode 100644 index 000000000..d9a2203c9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-051/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/cmd.json new file mode 100644 index 000000000..d7f528b16 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-replace-new", + "json": "0", + "words": "actions replace action ctinfo cpmark 0xff index 2" + }, + "cmd": "tc actions replace action ctinfo cpmark 0xff index 2", + "desc": "positive: opt=plain cmd=v-replace-new:actions_replace_action_ctinfo_cpmark_0xff_index_2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-052", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action ctinfo", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/dump.out new file mode 100644 index 000000000..9987bfb57 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: ctinfo zone 0 pipe + index 2 ref 1 bind 0 cpmark 0x000000ff + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/ip.pcap new file mode 100644 index 000000000..1b4c23995 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/netlink_route_dump.pcap new file mode 100644 index 000000000..0e06ad395 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-052/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-053/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-053/cmd.json new file mode 100644 index 000000000..988428ad9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-053/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-delete", + "json": "0", + "words": "actions delete action ctinfo index 1" + }, + "cmd": "tc actions delete action ctinfo index 1", + "desc": "positive: opt=plain cmd=v-delete:actions_delete_action_ctinfo_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-053", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action ctinfo dscp 0xfc000000 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action ctinfo", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action ctinfo dscp 0xfc000000 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-053/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-053/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-053/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-053/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-053/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-053/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-053/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-053/ip.pcap new file mode 100644 index 000000000..e46e45bf8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-053/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-053/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-053/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-053/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-053/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-053/netlink_route_dump.pcap new file mode 100644 index 000000000..54555c740 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-053/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-054/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-054/cmd.json new file mode 100644 index 000000000..64daf6958 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-054/cmd.json @@ -0,0 +1,110 @@ +{ + "axes": { + "fix": "v-flush", + "json": "0", + "words": "actions flush action ctinfo" + }, + "cmd": "tc actions flush action ctinfo", + "desc": "positive: opt=plain cmd=v-flush:actions_flush_action_ctinfo", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-054", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action ctinfo dscp 0xfc000000 index 1", + "tc actions add action ctinfo dscp 0xfc000000 index 2" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action ctinfo", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action ctinfo dscp 0xfc000000 index 1", + "rc": 0 + }, + { + "cmd": "tc actions add action ctinfo dscp 0xfc000000 index 2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-054/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-054/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-054/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-054/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-054/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-054/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-054/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-054/ip.pcap new file mode 100644 index 000000000..58c704f86 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-054/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-054/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-054/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-054/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-054/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-054/netlink_route_dump.pcap new file mode 100644 index 000000000..5b767f672 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-054/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/cmd.json new file mode 100644 index 000000000..5ac5d2005 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-add", + "json": "0", + "words": "actions add action sample rate 100 group 5 index 1" + }, + "cmd": "tc actions add action sample rate 100 group 5 index 1", + "desc": "positive: opt=plain cmd=v-add:actions_add_action_sample_rate_100_group_5_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-055", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action sample", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/dump.out new file mode 100644 index 000000000..9cc3669c7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: sample rate 1/100 group 5 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/ip.pcap new file mode 100644 index 000000000..4f3518c60 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/netlink_route_dump.pcap new file mode 100644 index 000000000..f15db3241 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-055/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/cmd.json new file mode 100644 index 000000000..9fdfe312a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-change", + "json": "0", + "words": "actions change action sample rate 200 group 6 index 1" + }, + "cmd": "tc actions change action sample rate 200 group 6 index 1", + "desc": "positive: opt=plain cmd=v-change:actions_change_action_sample_rate_200_group_6_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-056", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action sample rate 100 group 5 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action sample", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action sample rate 100 group 5 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/dump.out new file mode 100644 index 000000000..d875e10d9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: sample rate 1/200 group 6 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/ip.pcap new file mode 100644 index 000000000..ed7c60f21 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/netlink_route_dump.pcap new file mode 100644 index 000000000..0d48d16e6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-056/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/cmd.json new file mode 100644 index 000000000..b80a8bc2f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-replace", + "json": "0", + "words": "actions replace action sample rate 200 group 6 index 1" + }, + "cmd": "tc actions replace action sample rate 200 group 6 index 1", + "desc": "positive: opt=plain cmd=v-replace:actions_replace_action_sample_rate_200_group_6_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-057", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action sample rate 100 group 5 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action sample", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action sample rate 100 group 5 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/dump.out new file mode 100644 index 000000000..d875e10d9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: sample rate 1/200 group 6 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/ip.pcap new file mode 100644 index 000000000..37524c262 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/netlink_route_dump.pcap new file mode 100644 index 000000000..713d7a0df Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-057/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/cmd.json new file mode 100644 index 000000000..8342cad88 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-replace-new", + "json": "0", + "words": "actions replace action sample rate 200 group 6 index 2" + }, + "cmd": "tc actions replace action sample rate 200 group 6 index 2", + "desc": "positive: opt=plain cmd=v-replace-new:actions_replace_action_sample_rate_200_group_6_index_2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-058", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action sample", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/dump.out new file mode 100644 index 000000000..ec18a46a0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: sample rate 1/200 group 6 pipe + index 2 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/ip.pcap new file mode 100644 index 000000000..6265b9d63 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/netlink_route_dump.pcap new file mode 100644 index 000000000..351bdb09b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-058/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-059/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-059/cmd.json new file mode 100644 index 000000000..f2293b6f4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-059/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-delete", + "json": "0", + "words": "actions delete action sample index 1" + }, + "cmd": "tc actions delete action sample index 1", + "desc": "positive: opt=plain cmd=v-delete:actions_delete_action_sample_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-059", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action sample rate 100 group 5 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action sample", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action sample rate 100 group 5 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-059/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-059/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-059/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-059/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-059/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-059/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-059/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-059/ip.pcap new file mode 100644 index 000000000..62ec52574 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-059/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-059/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-059/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-059/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-059/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-059/netlink_route_dump.pcap new file mode 100644 index 000000000..b6740a112 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-059/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-060/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-060/cmd.json new file mode 100644 index 000000000..7416a2824 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-060/cmd.json @@ -0,0 +1,110 @@ +{ + "axes": { + "fix": "v-flush", + "json": "0", + "words": "actions flush action sample" + }, + "cmd": "tc actions flush action sample", + "desc": "positive: opt=plain cmd=v-flush:actions_flush_action_sample", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-060", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action sample rate 100 group 5 index 1", + "tc actions add action sample rate 100 group 5 index 2" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action sample", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action sample rate 100 group 5 index 1", + "rc": 0 + }, + { + "cmd": "tc actions add action sample rate 100 group 5 index 2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-060/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-060/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-060/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-060/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-060/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-060/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-060/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-060/ip.pcap new file mode 100644 index 000000000..0965bd963 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-060/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-060/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-060/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-060/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-060/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-060/netlink_route_dump.pcap new file mode 100644 index 000000000..d9b03a2c5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-060/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/cmd.json new file mode 100644 index 000000000..0cd5e11e8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-add", + "json": "0", + "words": "actions add action skbmod swap mac index 1" + }, + "cmd": "tc actions add action skbmod swap mac index 1", + "desc": "positive: opt=plain cmd=v-add:actions_add_action_skbmod_swap_mac_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-061", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbmod", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/dump.out new file mode 100644 index 000000000..38a59455c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: skbmod pipe swap mac + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/ip.pcap new file mode 100644 index 000000000..e51006173 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/netlink_route_dump.pcap new file mode 100644 index 000000000..3fa9bfb20 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-061/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/cmd.json new file mode 100644 index 000000000..1fd8f7433 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-change", + "json": "0", + "words": "actions change action skbmod set etype 0xbeef index 1" + }, + "cmd": "tc actions change action skbmod set etype 0xbeef index 1", + "desc": "positive: opt=plain cmd=v-change:actions_change_action_skbmod_set_etype_0xbeef_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-062", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action skbmod swap mac index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbmod", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action skbmod swap mac index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/dump.out new file mode 100644 index 000000000..238bd0d4b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbmod pipe set etype 0xBEEF + + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/ip.err new file mode 100644 index 000000000..809b993a1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/ip.err @@ -0,0 +1 @@ +skbmod etype 0xbeef diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/ip.pcap new file mode 100644 index 000000000..40077b4f4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/netlink_route_dump.pcap new file mode 100644 index 000000000..e72d056c2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-062/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/cmd.json new file mode 100644 index 000000000..e8bcdc87c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-replace", + "json": "0", + "words": "actions replace action skbmod set etype 0xbeef index 1" + }, + "cmd": "tc actions replace action skbmod set etype 0xbeef index 1", + "desc": "positive: opt=plain cmd=v-replace:actions_replace_action_skbmod_set_etype_0xbeef_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-063", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action skbmod swap mac index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbmod", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action skbmod swap mac index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/dump.out new file mode 100644 index 000000000..238bd0d4b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbmod pipe set etype 0xBEEF + + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/ip.err new file mode 100644 index 000000000..809b993a1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/ip.err @@ -0,0 +1 @@ +skbmod etype 0xbeef diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/ip.pcap new file mode 100644 index 000000000..8c35837fe Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/netlink_route_dump.pcap new file mode 100644 index 000000000..3df70b1cb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-063/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/cmd.json new file mode 100644 index 000000000..73bbade19 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-replace-new", + "json": "0", + "words": "actions replace action skbmod set etype 0xbeef index 2" + }, + "cmd": "tc actions replace action skbmod set etype 0xbeef index 2", + "desc": "positive: opt=plain cmd=v-replace-new:actions_replace_action_skbmod_set_etype_0xbeef_index_2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-064", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbmod", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/dump.out new file mode 100644 index 000000000..35e3e3574 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbmod pipe set etype 0xBEEF + + index 2 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/ip.err new file mode 100644 index 000000000..809b993a1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/ip.err @@ -0,0 +1 @@ +skbmod etype 0xbeef diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/ip.pcap new file mode 100644 index 000000000..4a8c0edd9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/netlink_route_dump.pcap new file mode 100644 index 000000000..61c0319db Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-064/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-065/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-065/cmd.json new file mode 100644 index 000000000..f7f545122 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-065/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-delete", + "json": "0", + "words": "actions delete action skbmod index 1" + }, + "cmd": "tc actions delete action skbmod index 1", + "desc": "positive: opt=plain cmd=v-delete:actions_delete_action_skbmod_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-065", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action skbmod swap mac index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbmod", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action skbmod swap mac index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-065/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-065/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-065/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-065/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-065/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-065/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-065/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-065/ip.pcap new file mode 100644 index 000000000..b946cc670 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-065/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-065/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-065/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-065/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-065/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-065/netlink_route_dump.pcap new file mode 100644 index 000000000..7e9abc93c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-065/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-066/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-066/cmd.json new file mode 100644 index 000000000..beb74b3b1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-066/cmd.json @@ -0,0 +1,110 @@ +{ + "axes": { + "fix": "v-flush", + "json": "0", + "words": "actions flush action skbmod" + }, + "cmd": "tc actions flush action skbmod", + "desc": "positive: opt=plain cmd=v-flush:actions_flush_action_skbmod", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-066", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action skbmod swap mac index 1", + "tc actions add action skbmod swap mac index 2" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbmod", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action skbmod swap mac index 1", + "rc": 0 + }, + { + "cmd": "tc actions add action skbmod swap mac index 2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-066/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-066/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-066/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-066/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-066/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-066/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-066/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-066/ip.pcap new file mode 100644 index 000000000..565add417 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-066/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-066/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-066/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-066/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-066/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-066/netlink_route_dump.pcap new file mode 100644 index 000000000..9bc7d33ec Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-066/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/cmd.json new file mode 100644 index 000000000..1c24e1cac --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-add", + "json": "0", + "words": "actions add action mpls pop protocol ipv4 index 1" + }, + "cmd": "tc actions add action mpls pop protocol ipv4 index 1", + "desc": "positive: opt=plain cmd=v-add:actions_add_action_mpls_pop_protocol_ipv4_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-067", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mpls", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/dump.out new file mode 100644 index 000000000..d637c4c0d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mpls pop protocol ip pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/ip.pcap new file mode 100644 index 000000000..408dff401 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/netlink_route_dump.pcap new file mode 100644 index 000000000..726d61ad5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-067/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/cmd.json new file mode 100644 index 000000000..06d30f288 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-change", + "json": "0", + "words": "actions change action mpls dec_ttl index 1" + }, + "cmd": "tc actions change action mpls dec_ttl index 1", + "desc": "positive: opt=plain cmd=v-change:actions_change_action_mpls_dec_ttl_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-068", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action mpls pop protocol ipv4 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mpls", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action mpls pop protocol ipv4 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/dump.out new file mode 100644 index 000000000..bf1d7be5a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: mpls dec_ttl pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/ip.pcap new file mode 100644 index 000000000..846f3e090 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/netlink_route_dump.pcap new file mode 100644 index 000000000..d861fcde1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-068/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/cmd.json new file mode 100644 index 000000000..93b91eab3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-replace", + "json": "0", + "words": "actions replace action mpls dec_ttl index 1" + }, + "cmd": "tc actions replace action mpls dec_ttl index 1", + "desc": "positive: opt=plain cmd=v-replace:actions_replace_action_mpls_dec_ttl_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-069", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action mpls pop protocol ipv4 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mpls", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action mpls pop protocol ipv4 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/dump.out new file mode 100644 index 000000000..bf1d7be5a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: mpls dec_ttl pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/ip.pcap new file mode 100644 index 000000000..8ecc26ff9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/netlink_route_dump.pcap new file mode 100644 index 000000000..5a9e613a8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-069/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/cmd.json new file mode 100644 index 000000000..5440de04e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "v-replace-new", + "json": "0", + "words": "actions replace action mpls dec_ttl index 2" + }, + "cmd": "tc actions replace action mpls dec_ttl index 2", + "desc": "positive: opt=plain cmd=v-replace-new:actions_replace_action_mpls_dec_ttl_index_2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-070", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mpls", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/dump.out new file mode 100644 index 000000000..5c63cad96 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: mpls dec_ttl pipe + index 2 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/ip.pcap new file mode 100644 index 000000000..ed171b59a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/netlink_route_dump.pcap new file mode 100644 index 000000000..048f91d50 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-070/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-071/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-071/cmd.json new file mode 100644 index 000000000..9d4b12b0e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-071/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "v-delete", + "json": "0", + "words": "actions delete action mpls index 1" + }, + "cmd": "tc actions delete action mpls index 1", + "desc": "positive: opt=plain cmd=v-delete:actions_delete_action_mpls_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-071", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action mpls pop protocol ipv4 index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mpls", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action mpls pop protocol ipv4 index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-071/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-071/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-071/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-071/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-071/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-071/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-071/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-071/ip.pcap new file mode 100644 index 000000000..010f481ad Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-071/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-071/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-071/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-071/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-071/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-071/netlink_route_dump.pcap new file mode 100644 index 000000000..fc9e9a1fc Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-071/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-072/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-072/cmd.json new file mode 100644 index 000000000..c89273033 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-072/cmd.json @@ -0,0 +1,110 @@ +{ + "axes": { + "fix": "v-flush", + "json": "0", + "words": "actions flush action mpls" + }, + "cmd": "tc actions flush action mpls", + "desc": "positive: opt=plain cmd=v-flush:actions_flush_action_mpls", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-072", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action mpls pop protocol ipv4 index 1", + "tc actions add action mpls pop protocol ipv4 index 2" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mpls", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action mpls pop protocol ipv4 index 1", + "rc": 0 + }, + { + "cmd": "tc actions add action mpls pop protocol ipv4 index 2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-072/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-072/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-072/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-072/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-072/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-072/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-072/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-072/ip.pcap new file mode 100644 index 000000000..275adc2b4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-072/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-072/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-072/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-072/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-072/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-072/netlink_route_dump.pcap new file mode 100644 index 000000000..c46db0961 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-072/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/cmd.json new file mode 100644 index 000000000..e084181a8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k mtu 2k index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k mtu 2k index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_mtu_2k_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-073", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/dump.out new file mode 100644 index 000000000..9da991e5a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/ip.pcap new file mode 100644 index 000000000..9defa2080 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/netlink_route_dump.pcap new file mode 100644 index 000000000..be7d65b99 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-073/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/cmd.json new file mode 100644 index 000000000..d33e11fcf --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k peakrate 2mbit mtu 2k index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k peakrate 2mbit mtu 2k index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_peakrate_2mbit_mtu_2k_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-074", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/dump.out new file mode 100644 index 000000000..fe6d1fe15 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb peakrate 2Mbit action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/ip.pcap new file mode 100644 index 000000000..31689dda7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/netlink_route_dump.pcap new file mode 100644 index 000000000..ce32d87cf Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-074/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/cmd.json new file mode 100644 index 000000000..ac8d6b00f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k/8 mtu 2k/8 index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k/8 mtu 2k/8 index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k/8_mtu_2k/8_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-075", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/dump.out new file mode 100644 index 000000000..9da991e5a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/ip.pcap new file mode 100644 index 000000000..e644469c8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/netlink_route_dump.pcap new file mode 100644 index 000000000..bf80a1ded Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-075/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/cmd.json new file mode 100644 index 000000000..3d742881f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k overhead 20 linklayer atm mpu 64 index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k overhead 20 linklayer atm mpu 64 index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_overhead_20_linklayer_atm_mpu_64_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-076", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/dump.out new file mode 100644 index 000000000..a81dca7f0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 20b linklayer atm + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/ip.pcap new file mode 100644 index 000000000..4d793d6a1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/netlink_route_dump.pcap new file mode 100644 index 000000000..7717a09c2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-076/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/cmd.json new file mode 100644 index 000000000..6b32290e7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k linklayer ethernet index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k linklayer ethernet index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_linklayer_ethernet_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-077", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/dump.out new file mode 100644 index 000000000..9da991e5a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/ip.pcap new file mode 100644 index 000000000..4573037e6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/netlink_route_dump.pcap new file mode 100644 index 000000000..59f85fdfb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-077/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/cmd.json new file mode 100644 index 000000000..025bbf851 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k conform-exceed drop/pipe index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k conform-exceed drop/pipe index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_conform-exceed_drop/pipe_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-078", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/dump.out new file mode 100644 index 000000000..6bdb3d7d3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action drop/pipe overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/ip.pcap new file mode 100644 index 000000000..fd2394db6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/netlink_route_dump.pcap new file mode 100644 index 000000000..8bd3116c1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-078/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/cmd.json new file mode 100644 index 000000000..1af68dd46 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k conform-exceed pipe/reclassify index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k conform-exceed pipe/reclassify index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_conform-exceed_pipe/reclassify_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-079", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/dump.out new file mode 100644 index 000000000..0a6aa11de --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action pipe/reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/ip.pcap new file mode 100644 index 000000000..394a20993 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/netlink_route_dump.pcap new file mode 100644 index 000000000..518ed6d38 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-079/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/cmd.json new file mode 100644 index 000000000..d74f6c6db --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k conform-exceed continue index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k conform-exceed continue index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_conform-exceed_continue_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-080", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/dump.out new file mode 100644 index 000000000..7d9d66b6a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action continue overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/ip.pcap new file mode 100644 index 000000000..1000b924b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/netlink_route_dump.pcap new file mode 100644 index 000000000..2ef040393 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-080/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/cmd.json new file mode 100644 index 000000000..281ca48f9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k drop index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k drop index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_drop_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-081", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/dump.out new file mode 100644 index 000000000..7522c881e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action drop overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/ip.pcap new file mode 100644 index 000000000..645f37927 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/netlink_route_dump.pcap new file mode 100644 index 000000000..aa7a8df0c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-081/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/cmd.json new file mode 100644 index 000000000..32e42a139 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k pass index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k pass index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_pass_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-082", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/dump.out new file mode 100644 index 000000000..b24c2f86b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action pass overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/ip.pcap new file mode 100644 index 000000000..2a18848d6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/netlink_route_dump.pcap new file mode 100644 index 000000000..58680b29e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-082/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/cmd.json new file mode 100644 index 000000000..e7bc909cb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k reclassify index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k reclassify index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_reclassify_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-083", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/dump.out new file mode 100644 index 000000000..9da991e5a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/ip.pcap new file mode 100644 index 000000000..0eeb0b333 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/netlink_route_dump.pcap new file mode 100644 index 000000000..fa3fa74a8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-083/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/cmd.json new file mode 100644 index 000000000..25131382b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k shot index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k shot index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_shot_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-084", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/dump.out new file mode 100644 index 000000000..7522c881e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action drop overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/ip.pcap new file mode 100644 index 000000000..aa1b1e7d9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/netlink_route_dump.pcap new file mode 100644 index 000000000..a8157cf93 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-084/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/cmd.json new file mode 100644 index 000000000..f25a29307 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k ok index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k ok index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_ok_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-085", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/dump.out new file mode 100644 index 000000000..b24c2f86b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action pass overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/ip.pcap new file mode 100644 index 000000000..a6c4e1a88 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/netlink_route_dump.pcap new file mode 100644 index 000000000..67eaf50a6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-085/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/cmd.json new file mode 100644 index 000000000..9a16771d2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police pkts_rate 1000 pkts_burst 100 index 1" + }, + "cmd": "tc actions add action police pkts_rate 1000 pkts_burst 100 index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_pkts_rate_1000_pkts_burst_100_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-086", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/dump.out new file mode 100644 index 000000000..de8fda1f9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 0bit burst 0b mtu 4Gb pkts_rate 1000 pkts_burst 100 action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/ip.pcap new file mode 100644 index 000000000..d99bab373 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/netlink_route_dump.pcap new file mode 100644 index 000000000..8153426c8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-086/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/cmd.json new file mode 100644 index 000000000..ee4927006 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 40gbit burst 1m index 1" + }, + "cmd": "tc actions add action police rate 40gbit burst 1m index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_40gbit_burst_1m_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-087", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/dump.out new file mode 100644 index 000000000..ed9bd260e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 40Gbit burst 1Mb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/ip.pcap new file mode 100644 index 000000000..2527951ce Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/netlink_route_dump.pcap new file mode 100644 index 000000000..c02641c38 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-087/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/cmd.json new file mode 100644 index 000000000..f05592e93 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k peakrate 40gbit mtu 2k index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k peakrate 40gbit mtu 2k index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_peakrate_40gbit_mtu_2k_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-088", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/dump.out new file mode 100644 index 000000000..96be0cc78 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb peakrate 40Gbit action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/ip.pcap new file mode 100644 index 000000000..f4ac5fc6c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/netlink_route_dump.pcap new file mode 100644 index 000000000..dd6686e03 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-088/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/cmd.json new file mode 100644 index 000000000..22ff5824e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 100kbit burst 10k index 1" + }, + "cmd": "tc actions add action police rate 100kbit burst 10k index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_100kbit_burst_10k_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-089", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/dump.out new file mode 100644 index 000000000..05bf0da5c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 100Kbit burst 10Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/ip.pcap new file mode 100644 index 000000000..6fe558bd8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/netlink_route_dump.pcap new file mode 100644 index 000000000..e3c5ebe73 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-089/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/cmd.json new file mode 100644 index 000000000..3e73e7da6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1Mibit burst 10Kb index 1" + }, + "cmd": "tc actions add action police rate 1Mibit burst 10Kb index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_1Mibit_burst_10Kb_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-090", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/dump.out new file mode 100644 index 000000000..f3860de37 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1048Kbit burst 10Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/ip.pcap new file mode 100644 index 000000000..ad9bccb5b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/netlink_route_dump.pcap new file mode 100644 index 000000000..bbb854403 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-090/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/cmd.json new file mode 100644 index 000000000..7742f8a0e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 125000bps burst 10k index 1" + }, + "cmd": "tc actions add action police rate 125000bps burst 10k index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_125000bps_burst_10k_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-091", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/dump.out new file mode 100644 index 000000000..9da991e5a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/ip.pcap new file mode 100644 index 000000000..e9821de69 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/netlink_route_dump.pcap new file mode 100644 index 000000000..74ce0d376 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-091/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/cmd.json new file mode 100644 index 000000000..55c2a3616 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k action drop index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k action drop index 1", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_action_drop_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-092", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/dump.out new file mode 100644 index 000000000..9da991e5a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/ip.pcap new file mode 100644 index 000000000..93abe545b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/netlink_route_dump.pcap new file mode 100644 index 000000000..6d8145e9d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-092/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/cmd.json new file mode 100644 index 000000000..f27b16947 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k index 1 cookie 0102" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k index 1 cookie 0102", + "desc": "positive: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_index_1_cookie_0102", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-093", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/dump.out new file mode 100644 index 000000000..e85e58d3d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/dump.out @@ -0,0 +1,7 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + cookie 0102 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/ip.pcap new file mode 100644 index 000000000..0c0fafca1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/netlink_route_dump.pcap new file mode 100644 index 000000000..40241014f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-093/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/cmd.json new file mode 100644 index 000000000..5630cb210 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k", + "desc": "corner: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-094", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/dump.out new file mode 100644 index 000000000..9da991e5a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/ip.pcap new file mode 100644 index 000000000..dbd1bf72f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/netlink_route_dump.pcap new file mode 100644 index 000000000..3980714a6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-094/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/cmd.json new file mode 100644 index 000000000..6a7369e97 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police index 1 rate 1mbit burst 10k" + }, + "cmd": "tc actions add action police index 1 rate 1mbit burst 10k", + "desc": "corner: opt=plain cmd=pol:actions_add_action_police_index_1_rate_1mbit_burst_10k", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-095", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/dump.out new file mode 100644 index 000000000..9da991e5a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/ip.pcap new file mode 100644 index 000000000..55ab6ac49 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/netlink_route_dump.pcap new file mode 100644 index 000000000..c712c4cf7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-095/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/cmd.json new file mode 100644 index 000000000..741987959 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k mtu 256 index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k mtu 256 index 1", + "desc": "boundary: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_mtu_256_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-096", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/dump.out new file mode 100644 index 000000000..6916a434c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 256b action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/ip.pcap new file mode 100644 index 000000000..d6005518e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/netlink_route_dump.pcap new file mode 100644 index 000000000..f8450ba36 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-096/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/cmd.json new file mode 100644 index 000000000..f3a604f16 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k mpu 65535 index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k mpu 65535 index 1", + "desc": "boundary: opt=plain cmd=pol:actions_add_action_police_rate_1mbit_burst_10k_mpu_65535_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-097", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/dump.out new file mode 100644 index 000000000..9da991e5a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/ip.pcap new file mode 100644 index 000000000..323c45bc0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/netlink_route_dump.pcap new file mode 100644 index 000000000..80aac3dbb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-097/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/cmd.json new file mode 100644 index 000000000..b2d2327fc --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w163", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k mpu 65536 index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k mpu 65536 index 1", + "desc": "boundary: opt=plain cmd=w163:actions_add_action_police_rate_1mbit_burst_10k_mpu_65536_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-098", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/dump.out new file mode 100644 index 000000000..9da991e5a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/ip.pcap new file mode 100644 index 000000000..de7af607e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/netlink_route_dump.pcap new file mode 100644 index 000000000..85444db1f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-098/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/cmd.json new file mode 100644 index 000000000..91a7da25c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w163-norate", + "json": "0", + "words": "actions add action police pkts_rate 1000 pkts_burst 100 mpu 64 overhead 4 index 1" + }, + "cmd": "tc actions add action police pkts_rate 1000 pkts_burst 100 mpu 64 overhead 4 index 1", + "desc": "corner: opt=plain cmd=w163-norate:actions_add_action_police_pkts_rate_1000_pkts_burst_100_mpu_64_overhead_4_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-099", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/dump.out new file mode 100644 index 000000000..de8fda1f9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 0bit burst 0b mtu 4Gb pkts_rate 1000 pkts_burst 100 action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/ip.pcap new file mode 100644 index 000000000..0cc4e5d64 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/netlink_route_dump.pcap new file mode 100644 index 000000000..3678e4ccc Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-099/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/cmd.json new file mode 100644 index 000000000..05c273389 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w165", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k mtu 4294967295 index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k mtu 4294967295 index 1", + "desc": "corner: opt=plain cmd=w165:actions_add_action_police_rate_1mbit_burst_10k_mtu_4294967295_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-100", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/dump.out new file mode 100644 index 000000000..126ac86be --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 4Gb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/ip.pcap new file mode 100644 index 000000000..26f21fb10 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/netlink_route_dump.pcap new file mode 100644 index 000000000..fab2df3be Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-100/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/cmd.json new file mode 100644 index 000000000..a2e8fac2b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w166-0", + "json": "0", + "words": "actions add action police rate 0 rate 1mbit burst 10k index 1" + }, + "cmd": "tc actions add action police rate 0 rate 1mbit burst 10k index 1", + "desc": "corner: opt=plain cmd=w166-0:actions_add_action_police_rate_0_rate_1mbit_burst_10k_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-101", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/dump.out new file mode 100644 index 000000000..9da991e5a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/ip.pcap new file mode 100644 index 000000000..cb20a4af6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/netlink_route_dump.pcap new file mode 100644 index 000000000..90652e2f4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-101/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/cmd.json new file mode 100644 index 000000000..6b71a9192 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w167", + "json": "0", + "words": "actions add action police pkts_rate 1 pkts_burst 1000 index 1" + }, + "cmd": "tc actions add action police pkts_rate 1 pkts_burst 1000 index 1", + "desc": "corner: opt=plain cmd=w167:actions_add_action_police_pkts_rate_1_pkts_burst_1000_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-102", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/dump.out new file mode 100644 index 000000000..7c6f2074b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 0bit burst 0b mtu 4Gb pkts_rate 1 pkts_burst 274 action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/ip.pcap new file mode 100644 index 000000000..d73eb6482 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/netlink_route_dump.pcap new file mode 100644 index 000000000..a3a828e9a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-102/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/cmd.json new file mode 100644 index 000000000..9cd600008 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w168", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k conform-exceed drop pass index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k conform-exceed drop pass index 1", + "desc": "corner: opt=plain cmd=w168:actions_add_action_police_rate_1mbit_burst_10k_conform-exceed_drop_pass_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-103", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/dump.out new file mode 100644 index 000000000..b24c2f86b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action pass overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/ip.pcap new file mode 100644 index 000000000..520406a4b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/netlink_route_dump.pcap new file mode 100644 index 000000000..ee6f1da77 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-103/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/cmd.json new file mode 100644 index 000000000..96d9f0062 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w170-p", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k p 2mbit mtu 2k index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k p 2mbit mtu 2k index 1", + "desc": "corner: opt=plain cmd=w170-p:actions_add_action_police_rate_1mbit_burst_10k_p_2mbit_mtu_2k_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-104", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/dump.out new file mode 100644 index 000000000..fe6d1fe15 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb peakrate 2Mbit action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/ip.pcap new file mode 100644 index 000000000..a24f2ba88 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/netlink_route_dump.pcap new file mode 100644 index 000000000..cfacb4225 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-104/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/cmd.json new file mode 100644 index 000000000..8e5bfd102 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w170-o", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k o index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k o index 1", + "desc": "corner: opt=plain cmd=w170-o:actions_add_action_police_rate_1mbit_burst_10k_o_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-105", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/dump.out new file mode 100644 index 000000000..b24c2f86b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action pass overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/ip.pcap new file mode 100644 index 000000000..dd8b4d5e5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/netlink_route_dump.pcap new file mode 100644 index 000000000..33d550034 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-105/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/cmd.json new file mode 100644 index 000000000..677470c00 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w157", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k trap index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k trap index 1", + "desc": "corner: opt=plain cmd=w157:actions_add_action_police_rate_1mbit_burst_10k_trap_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-106", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/dump.out new file mode 100644 index 000000000..9da991e5a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/ip.pcap new file mode 100644 index 000000000..d477a65e8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/netlink_route_dump.pcap new file mode 100644 index 000000000..cde70e0fd Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-106/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/cmd.json new file mode 100644 index 000000000..12916a4f1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "pol-none", + "json": "0", + "words": "actions add action police index 1" + }, + "cmd": "tc actions add action police index 1", + "desc": "corner: opt=plain cmd=pol-none:actions_add_action_police_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-107", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/dump.out new file mode 100644 index 000000000..51c69a027 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 0bit burst 0b mtu 4Gb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/ip.pcap new file mode 100644 index 000000000..91ab5b571 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/netlink_route_dump.pcap new file mode 100644 index 000000000..ae1186524 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-107/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/cmd.json new file mode 100644 index 000000000..daee7219b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w166", + "json": "0", + "words": "actions add action police rate 7bit burst 10k mtu 1500 index 1" + }, + "cmd": "tc actions add action police rate 7bit burst 10k mtu 1500 index 1", + "desc": "corner: opt=plain cmd=w166:actions_add_action_police_rate_7bit_burst_10k_mtu_1500_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-108", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/dump.out new file mode 100644 index 000000000..b3d82f6a8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 0bit burst 0b mtu 1500b action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/ip.pcap new file mode 100644 index 000000000..66422a57f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/netlink_route_dump.pcap new file mode 100644 index 000000000..ee05831e3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-108/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/cmd.json new file mode 100644 index 000000000..25f3dca6d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w166-nan", + "json": "0", + "words": "actions add action police rate nan burst 10k index 1" + }, + "cmd": "tc actions add action police rate nan burst 10k index 1", + "desc": "corner: opt=plain cmd=w166-nan:actions_add_action_police_rate_nan_burst_10k_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-109", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action police", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/dump.out new file mode 100644 index 000000000..b78cac556 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: police 0x1 rate 0bit burst 590295810358b mtu 2Kb action reclassify overhead 0b + ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/ip.pcap new file mode 100644 index 000000000..54e152b6f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/netlink_route_dump.pcap new file mode 100644 index 000000000..b49cbefff Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-109/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/cmd.json new file mode 100644 index 000000000..49fc3d992 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "mir", + "json": "0", + "words": "actions add action mirred egress mirror dev d1 index 1" + }, + "cmd": "tc actions add action mirred egress mirror dev d1 index 1", + "desc": "positive: opt=plain cmd=mir:actions_add_action_mirred_egress_mirror_dev_d1_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-110", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mirred", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/dump.out new file mode 100644 index 000000000..0575456e9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mirred (Egress Mirror to device d1) pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/ip.pcap new file mode 100644 index 000000000..122d6158d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/netlink_route_dump.pcap new file mode 100644 index 000000000..c6f77135b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-110/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/cmd.json new file mode 100644 index 000000000..910de8dda --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "mir", + "json": "0", + "words": "actions add action mirred ingress redirect dev d1 index 1" + }, + "cmd": "tc actions add action mirred ingress redirect dev d1 index 1", + "desc": "positive: opt=plain cmd=mir:actions_add_action_mirred_ingress_redirect_dev_d1_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-111", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mirred", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/dump.out new file mode 100644 index 000000000..874a25ae7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mirred (Ingress Redirect to device d1) stolen + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/ip.pcap new file mode 100644 index 000000000..319314024 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/netlink_route_dump.pcap new file mode 100644 index 000000000..8087ccb05 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-111/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/cmd.json new file mode 100644 index 000000000..6bb7a622e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "mir", + "json": "0", + "words": "actions add action mirred ingress mirror dev d1 index 1" + }, + "cmd": "tc actions add action mirred ingress mirror dev d1 index 1", + "desc": "positive: opt=plain cmd=mir:actions_add_action_mirred_ingress_mirror_dev_d1_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-112", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mirred", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/dump.out new file mode 100644 index 000000000..5ebf8fc9f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mirred (Ingress Mirror to device d1) pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/ip.pcap new file mode 100644 index 000000000..2d09f18c8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/netlink_route_dump.pcap new file mode 100644 index 000000000..443dd5b62 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-112/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/cmd.json new file mode 100644 index 000000000..821782686 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "mir", + "json": "0", + "words": "actions add action mirred egress redirect blockid 10 index 1" + }, + "cmd": "tc actions add action mirred egress redirect blockid 10 index 1", + "desc": "positive: opt=plain cmd=mir:actions_add_action_mirred_egress_redirect_blockid_10_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-113", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mirred", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/dump.out new file mode 100644 index 000000000..c376ed796 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mirred (Egress Redirect to blockid 10) stolen + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/ip.pcap new file mode 100644 index 000000000..b01fb3c7a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/netlink_route_dump.pcap new file mode 100644 index 000000000..16cbdfed4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-113/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/cmd.json new file mode 100644 index 000000000..d0eb582d9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "mir", + "json": "0", + "words": "actions add action mirred egress mirror dev d1 pipe index 1" + }, + "cmd": "tc actions add action mirred egress mirror dev d1 pipe index 1", + "desc": "positive: opt=plain cmd=mir:actions_add_action_mirred_egress_mirror_dev_d1_pipe_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-114", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mirred", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/dump.out new file mode 100644 index 000000000..0575456e9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mirred (Egress Mirror to device d1) pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/ip.pcap new file mode 100644 index 000000000..a10f69ed7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/netlink_route_dump.pcap new file mode 100644 index 000000000..593a2b49b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-114/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/cmd.json new file mode 100644 index 000000000..9ab19ea2d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "mir", + "json": "0", + "words": "actions add action mirred egress mirror dev d1 drop index 1" + }, + "cmd": "tc actions add action mirred egress mirror dev d1 drop index 1", + "desc": "positive: opt=plain cmd=mir:actions_add_action_mirred_egress_mirror_dev_d1_drop_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-115", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mirred", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/dump.out new file mode 100644 index 000000000..cd6ed8bb8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mirred (Egress Mirror to device d1) drop + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/ip.pcap new file mode 100644 index 000000000..6e8678ff7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/netlink_route_dump.pcap new file mode 100644 index 000000000..ead4eedcc Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-115/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/cmd.json new file mode 100644 index 000000000..9aed54efb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "mir", + "json": "0", + "words": "actions add action mirred egress redirect dev d1 index 1 cookie aabb" + }, + "cmd": "tc actions add action mirred egress redirect dev d1 index 1 cookie aabb", + "desc": "positive: opt=plain cmd=mir:actions_add_action_mirred_egress_redirect_dev_d1_index_1_cookie_aabb", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-116", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mirred", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/dump.out new file mode 100644 index 000000000..fd6ac4b85 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/dump.out @@ -0,0 +1,7 @@ +total acts 1 + + action order 0: mirred (Egress Redirect to device d1) stolen + index 1 ref 1 bind 0 + cookie aabb + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/ip.pcap new file mode 100644 index 000000000..d579d56f2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/netlink_route_dump.pcap new file mode 100644 index 000000000..f2163e06f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-116/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/cmd.json new file mode 100644 index 000000000..4796bed25 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w158", + "json": "0", + "words": "actions add action mirred egress redirect dev d1 pipe index 1" + }, + "cmd": "tc actions add action mirred egress redirect dev d1 pipe index 1", + "desc": "corner: opt=plain cmd=w158:actions_add_action_mirred_egress_redirect_dev_d1_pipe_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-117", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mirred", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/dump.out new file mode 100644 index 000000000..5c682b610 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mirred (Egress Redirect to device d1) stolen + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/ip.pcap new file mode 100644 index 000000000..50617eb43 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/netlink_route_dump.pcap new file mode 100644 index 000000000..550e1acf5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-117/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/cmd.json new file mode 100644 index 000000000..fd35fecda --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w159", + "json": "0", + "words": "actions add action mirred egress bogus egress redirect dev d1 index 1" + }, + "cmd": "tc actions add action mirred egress bogus egress redirect dev d1 index 1", + "desc": "corner: opt=plain cmd=w159:actions_add_action_mirred_egress_bogus_egress_redirect_dev_d1_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-118", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mirred", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/dump.out new file mode 100644 index 000000000..5c682b610 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mirred (Egress Redirect to device d1) stolen + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/ip.pcap new file mode 100644 index 000000000..d349a50d1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/netlink_route_dump.pcap new file mode 100644 index 000000000..44230addb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-118/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/cmd.json new file mode 100644 index 000000000..6d3103846 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/cmd.json @@ -0,0 +1,101 @@ +{ + "axes": { + "fix": "w162-junk", + "json": "0", + "words": "actions add action mirred egress redirect dev if3junk index 1" + }, + "cmd": "tc actions add action mirred egress redirect dev if3junk index 1", + "desc": "corner: opt=plain cmd=w162-junk:actions_add_action_mirred_egress_redirect_dev_if3junk_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "ENODEV", + "rc": 0, + "refused_by": "kernel-ignored" + }, + "id": "tcactwrite/ec-119", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mirred", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/dump.out new file mode 100644 index 000000000..3640d74a6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mirred (Egress Redirect to device d0) stolen + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/ip.pcap new file mode 100644 index 000000000..7eafac2b3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/netlink_route_dump.pcap new file mode 100644 index 000000000..88df1b0b4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-119/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/cmd.json new file mode 100644 index 000000000..0f2592170 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w170-i", + "json": "0", + "words": "actions add action mirred i redirect dev d1 index 1" + }, + "cmd": "tc actions add action mirred i redirect dev d1 index 1", + "desc": "corner: opt=plain cmd=w170-i:actions_add_action_mirred_i_redirect_dev_d1_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-120", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mirred", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/dump.out new file mode 100644 index 000000000..874a25ae7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mirred (Ingress Redirect to device d1) stolen + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/ip.pcap new file mode 100644 index 000000000..bf4689d5f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/netlink_route_dump.pcap new file mode 100644 index 000000000..020fd283a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-120/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/cmd.json new file mode 100644 index 000000000..e1f62dfd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w175-mir", + "json": "0", + "words": "actions add action mirred egress mirror dev d1 index 1 pipe" + }, + "cmd": "tc actions add action mirred egress mirror dev d1 index 1 pipe", + "desc": "corner: opt=plain cmd=w175-mir:actions_add_action_mirred_egress_mirror_dev_d1_index_1_pipe", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-121", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mirred", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/dump.out new file mode 100644 index 000000000..0575456e9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mirred (Egress Mirror to device d1) pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/ip.pcap new file mode 100644 index 000000000..db2128d7f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/netlink_route_dump.pcap new file mode 100644 index 000000000..ee620ee7e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-121/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/cmd.json new file mode 100644 index 000000000..9ad9e4cd5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "skb", + "json": "0", + "words": "actions add action skbedit queue_mapping 3 index 1" + }, + "cmd": "tc actions add action skbedit queue_mapping 3 index 1", + "desc": "positive: opt=plain cmd=skb:actions_add_action_skbedit_queue_mapping_3_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-122", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/dump.out new file mode 100644 index 000000000..81c9b84a9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: skbedit queue_mapping 3 pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/ip.pcap new file mode 100644 index 000000000..d08e5ae69 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/netlink_route_dump.pcap new file mode 100644 index 000000000..c34ad443b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-122/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/cmd.json new file mode 100644 index 000000000..594c20c1e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "skb", + "json": "0", + "words": "actions add action skbedit priority 1:2 index 1" + }, + "cmd": "tc actions add action skbedit priority 1:2 index 1", + "desc": "positive: opt=plain cmd=skb:actions_add_action_skbedit_priority_1:2_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-123", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/dump.out new file mode 100644 index 000000000..001f82e11 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbedit priority 1:2 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/ip.pcap new file mode 100644 index 000000000..aa449c97a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/netlink_route_dump.pcap new file mode 100644 index 000000000..9bed652ca Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-123/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/cmd.json new file mode 100644 index 000000000..752ba221c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "skb", + "json": "0", + "words": "actions add action skbedit mark 0x10/0xff index 1" + }, + "cmd": "tc actions add action skbedit mark 0x10/0xff index 1", + "desc": "positive: opt=plain cmd=skb:actions_add_action_skbedit_mark_0x10/0xff_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-124", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/dump.out new file mode 100644 index 000000000..21d95d057 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: skbedit mark 16/0xff pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/ip.pcap new file mode 100644 index 000000000..afd961c3a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/netlink_route_dump.pcap new file mode 100644 index 000000000..ed593114b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-124/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/cmd.json new file mode 100644 index 000000000..0a456579a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "skb", + "json": "0", + "words": "actions add action skbedit ptype host index 1" + }, + "cmd": "tc actions add action skbedit ptype host index 1", + "desc": "positive: opt=plain cmd=skb:actions_add_action_skbedit_ptype_host_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-125", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/dump.out new file mode 100644 index 000000000..ec5181033 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbedit ptype host pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/ip.pcap new file mode 100644 index 000000000..9d34999cb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/netlink_route_dump.pcap new file mode 100644 index 000000000..2892f9afc Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-125/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/cmd.json new file mode 100644 index 000000000..47218ad12 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "skb", + "json": "0", + "words": "actions add action skbedit ptype otherhost index 1" + }, + "cmd": "tc actions add action skbedit ptype otherhost index 1", + "desc": "positive: opt=plain cmd=skb:actions_add_action_skbedit_ptype_otherhost_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-126", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/dump.out new file mode 100644 index 000000000..5c5a4556c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbedit ptype otherhost pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/ip.pcap new file mode 100644 index 000000000..974b9b458 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/netlink_route_dump.pcap new file mode 100644 index 000000000..854cc3c85 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-126/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/cmd.json new file mode 100644 index 000000000..bc18923bc --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "skb", + "json": "0", + "words": "actions add action skbedit ptype broadcast index 1" + }, + "cmd": "tc actions add action skbedit ptype broadcast index 1", + "desc": "positive: opt=plain cmd=skb:actions_add_action_skbedit_ptype_broadcast_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-127", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/dump.out new file mode 100644 index 000000000..f40d42c20 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbedit ptype broadcast pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/ip.pcap new file mode 100644 index 000000000..df9648256 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/netlink_route_dump.pcap new file mode 100644 index 000000000..e19c30fe5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-127/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/cmd.json new file mode 100644 index 000000000..f33afe59f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "skb", + "json": "0", + "words": "actions add action skbedit ptype multicast index 1" + }, + "cmd": "tc actions add action skbedit ptype multicast index 1", + "desc": "positive: opt=plain cmd=skb:actions_add_action_skbedit_ptype_multicast_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-128", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/dump.out new file mode 100644 index 000000000..e5146c386 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbedit ptype multicast pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/ip.pcap new file mode 100644 index 000000000..6453016e0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/netlink_route_dump.pcap new file mode 100644 index 000000000..5e6ffced2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-128/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/cmd.json new file mode 100644 index 000000000..045c6784d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "skb", + "json": "0", + "words": "actions add action skbedit inheritdsfield index 1" + }, + "cmd": "tc actions add action skbedit inheritdsfield index 1", + "desc": "positive: opt=plain cmd=skb:actions_add_action_skbedit_inheritdsfield_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-129", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/dump.out new file mode 100644 index 000000000..2f7677c1c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: skbedit inheritdsfield pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/ip.pcap new file mode 100644 index 000000000..6ece51f5b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/netlink_route_dump.pcap new file mode 100644 index 000000000..ce323acca Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-129/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/cmd.json new file mode 100644 index 000000000..a14b640a1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "skb", + "json": "0", + "words": "actions add action skbedit queue_mapping 3 priority 5 mark 7 ptype host inheritdsfield pipe index 1" + }, + "cmd": "tc actions add action skbedit queue_mapping 3 priority 5 mark 7 ptype host inheritdsfield pipe index 1", + "desc": "positive: opt=plain cmd=skb:actions_add_action_skbedit_queue_mapping_3_priority_5_mark_7_ptype_host_inheritdsfield_pipe_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-130", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/dump.out new file mode 100644 index 000000000..977c48caa --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: skbedit queue_mapping 3 priority :5 mark 7 ptype host inheritdsfield pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/ip.pcap new file mode 100644 index 000000000..9d5588ca4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/netlink_route_dump.pcap new file mode 100644 index 000000000..342a79580 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-130/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/cmd.json new file mode 100644 index 000000000..a28febc9d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "skb", + "json": "0", + "words": "actions add action skbedit queue_mapping 65535 index 1" + }, + "cmd": "tc actions add action skbedit queue_mapping 65535 index 1", + "desc": "boundary: opt=plain cmd=skb:actions_add_action_skbedit_queue_mapping_65535_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-131", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/dump.out new file mode 100644 index 000000000..6c72dcbde --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: skbedit queue_mapping 65535 pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/ip.pcap new file mode 100644 index 000000000..cad7fd71a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/netlink_route_dump.pcap new file mode 100644 index 000000000..b02fe2600 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-131/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/cmd.json new file mode 100644 index 000000000..ee6686fb6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w174", + "json": "0", + "words": "actions add action skbedit priority 10 index 1" + }, + "cmd": "tc actions add action skbedit priority 10 index 1", + "desc": "boundary: opt=plain cmd=w174:actions_add_action_skbedit_priority_10_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-132", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/dump.out new file mode 100644 index 000000000..9f5f1df51 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbedit priority :10 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/ip.pcap new file mode 100644 index 000000000..753cbfbb0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/netlink_route_dump.pcap new file mode 100644 index 000000000..03fcd6a9a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-132/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/cmd.json new file mode 100644 index 000000000..75aaf53bb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w174-wrap", + "json": "0", + "words": "actions add action skbedit priority 100000001 index 1" + }, + "cmd": "tc actions add action skbedit priority 100000001 index 1", + "desc": "boundary: opt=plain cmd=w174-wrap:actions_add_action_skbedit_priority_100000001_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-133", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/dump.out new file mode 100644 index 000000000..1f1de30f5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbedit priority :1 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/ip.pcap new file mode 100644 index 000000000..41721ff93 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/netlink_route_dump.pcap new file mode 100644 index 000000000..ebe1f1758 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-133/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/cmd.json new file mode 100644 index 000000000..5c81a5528 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w174-mark", + "json": "0", + "words": "actions add action skbedit mark 5/0xff mark 6 index 1" + }, + "cmd": "tc actions add action skbedit mark 5/0xff mark 6 index 1", + "desc": "corner: opt=plain cmd=w174-mark:actions_add_action_skbedit_mark_5/0xff_mark_6_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-134", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/dump.out new file mode 100644 index 000000000..6bf5c439d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: skbedit mark 6/0xff pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/ip.pcap new file mode 100644 index 000000000..dfafe9b07 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/netlink_route_dump.pcap new file mode 100644 index 000000000..0a122bde2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-134/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/cmd.json new file mode 100644 index 000000000..80516e4f7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w174-base", + "json": "0", + "words": "actions add action skbedit mark 010 index 1" + }, + "cmd": "tc actions add action skbedit mark 010 index 1", + "desc": "corner: opt=plain cmd=w174-base:actions_add_action_skbedit_mark_010_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-135", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/dump.out new file mode 100644 index 000000000..17968f4c7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbedit mark 8 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/ip.pcap new file mode 100644 index 000000000..dc49a288d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/netlink_route_dump.pcap new file mode 100644 index 000000000..9ffd0462f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-135/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/cmd.json new file mode 100644 index 000000000..b0257c5ec --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w170-skb", + "json": "0", + "words": "actions add action skbedit p 5 index 1" + }, + "cmd": "tc actions add action skbedit p 5 index 1", + "desc": "corner: opt=plain cmd=w170-skb:actions_add_action_skbedit_p_5_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-136", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/dump.out new file mode 100644 index 000000000..a6de758d1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbedit priority :5 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/ip.pcap new file mode 100644 index 000000000..d4b447920 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/netlink_route_dump.pcap new file mode 100644 index 000000000..64931f9db Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-136/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/cmd.json new file mode 100644 index 000000000..987d69451 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w175", + "json": "0", + "words": "actions add action skbedit mark 1 index 5 pipe" + }, + "cmd": "tc actions add action skbedit mark 1 index 5 pipe", + "desc": "corner: opt=plain cmd=w175:actions_add_action_skbedit_mark_1_index_5_pipe", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-137", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/dump.out new file mode 100644 index 000000000..91e5c8884 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbedit mark 1 pipe + index 5 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/ip.pcap new file mode 100644 index 000000000..a3cea9865 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/netlink_route_dump.pcap new file mode 100644 index 000000000..053374a25 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-137/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/cmd.json new file mode 100644 index 000000000..10d6bfa6a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "vl", + "json": "0", + "words": "actions add action vlan push id 100 protocol 802.1ad priority 3 index 1" + }, + "cmd": "tc actions add action vlan push id 100 protocol 802.1ad priority 3 index 1", + "desc": "positive: opt=plain cmd=vl:actions_add_action_vlan_push_id_100_protocol_802.1ad_priority_3_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-138", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/dump.out new file mode 100644 index 000000000..60d62a45c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: vlan push id 100 protocol 802.1ad priority 3 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/ip.pcap new file mode 100644 index 000000000..e655d00b1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/netlink_route_dump.pcap new file mode 100644 index 000000000..fab74c982 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-138/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/cmd.json new file mode 100644 index 000000000..9062f8e1d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "vl", + "json": "0", + "words": "actions add action vlan push id 100 protocol 802.1q index 1" + }, + "cmd": "tc actions add action vlan push id 100 protocol 802.1q index 1", + "desc": "positive: opt=plain cmd=vl:actions_add_action_vlan_push_id_100_protocol_802.1q_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-139", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/dump.out new file mode 100644 index 000000000..6e8bbed37 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: vlan push id 100 protocol 802.1Q priority 0 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/ip.pcap new file mode 100644 index 000000000..7b90aa498 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/netlink_route_dump.pcap new file mode 100644 index 000000000..e06fd8cf3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-139/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/cmd.json new file mode 100644 index 000000000..84f44c07e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "vl", + "json": "0", + "words": "actions add action vlan modify id 200 priority 7 index 1" + }, + "cmd": "tc actions add action vlan modify id 200 priority 7 index 1", + "desc": "positive: opt=plain cmd=vl:actions_add_action_vlan_modify_id_200_priority_7_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-140", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/dump.out new file mode 100644 index 000000000..900bfd9b7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: vlan modify id 200 protocol 802.1Q priority 7 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/ip.pcap new file mode 100644 index 000000000..52648bec9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/netlink_route_dump.pcap new file mode 100644 index 000000000..78d2f9946 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-140/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/cmd.json new file mode 100644 index 000000000..898d77787 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "vl", + "json": "0", + "words": "actions add action vlan push_eth dst_mac 02:00:00:00:00:01 src_mac 02:00:00:00:00:02 index 1" + }, + "cmd": "tc actions add action vlan push_eth dst_mac 02:00:00:00:00:01 src_mac 02:00:00:00:00:02 index 1", + "desc": "positive: opt=plain cmd=vl:actions_add_action_vlan_push_eth_dst_mac_02:00:00:00:00:01_src_mac_02:00:00:00:00:02_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-141", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/dump.out new file mode 100644 index 000000000..2eea22056 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: vlan push_eth dst_mac 02:00:00:00:00:01 src_mac 02:00:00:00:00:02 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/ip.pcap new file mode 100644 index 000000000..835fc13a6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/netlink_route_dump.pcap new file mode 100644 index 000000000..a41f6520d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-141/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/cmd.json new file mode 100644 index 000000000..7cd1ce94b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "vl", + "json": "0", + "words": "actions add action vlan pop_eth index 1" + }, + "cmd": "tc actions add action vlan pop_eth index 1", + "desc": "positive: opt=plain cmd=vl:actions_add_action_vlan_pop_eth_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-142", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/dump.out new file mode 100644 index 000000000..d363cb783 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: vlan pop_eth pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/ip.pcap new file mode 100644 index 000000000..26a4c9687 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/netlink_route_dump.pcap new file mode 100644 index 000000000..2136ccb08 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-142/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/cmd.json new file mode 100644 index 000000000..a26740cab --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "vl", + "json": "0", + "words": "actions add action vlan pop pipe index 1" + }, + "cmd": "tc actions add action vlan pop pipe index 1", + "desc": "positive: opt=plain cmd=vl:actions_add_action_vlan_pop_pipe_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-143", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/dump.out new file mode 100644 index 000000000..04177dab9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: vlan pop pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/ip.pcap new file mode 100644 index 000000000..7d4bf6b62 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/netlink_route_dump.pcap new file mode 100644 index 000000000..1d76acf2a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-143/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/cmd.json new file mode 100644 index 000000000..e684f0d9a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "vl", + "json": "0", + "words": "actions add action vlan push id 0 index 1" + }, + "cmd": "tc actions add action vlan push id 0 index 1", + "desc": "boundary: opt=plain cmd=vl:actions_add_action_vlan_push_id_0_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-144", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/dump.out new file mode 100644 index 000000000..a41de8625 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: vlan push id 0 protocol 802.1Q priority 0 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/ip.pcap new file mode 100644 index 000000000..6e9e15493 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/netlink_route_dump.pcap new file mode 100644 index 000000000..f62fceced Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-144/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/cmd.json new file mode 100644 index 000000000..2c3e8f430 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "vl", + "json": "0", + "words": "actions add action vlan push id 4094 index 1" + }, + "cmd": "tc actions add action vlan push id 4094 index 1", + "desc": "boundary: opt=plain cmd=vl:actions_add_action_vlan_push_id_4094_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-145", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/dump.out new file mode 100644 index 000000000..d4b5956a0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: vlan push id 4094 protocol 802.1Q priority 0 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/ip.pcap new file mode 100644 index 000000000..627dc9263 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/netlink_route_dump.pcap new file mode 100644 index 000000000..26a691bad Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-145/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/cmd.json new file mode 100644 index 000000000..7f10b3528 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w171", + "json": "0", + "words": "actions add action vlan push id 010 index 1" + }, + "cmd": "tc actions add action vlan push id 010 index 1", + "desc": "corner: opt=plain cmd=w171:actions_add_action_vlan_push_id_010_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-146", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/dump.out new file mode 100644 index 000000000..dd54545ae --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: vlan push id 8 protocol 802.1Q priority 0 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/ip.pcap new file mode 100644 index 000000000..641150415 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/netlink_route_dump.pcap new file mode 100644 index 000000000..41871fb61 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-146/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/cmd.json new file mode 100644 index 000000000..d3511d0ef --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w172", + "json": "0", + "words": "actions add action vlan push_eth dst_mac aa src_mac 1.2.3.4 index 1" + }, + "cmd": "tc actions add action vlan push_eth dst_mac aa src_mac 1.2.3.4 index 1", + "desc": "corner: opt=plain cmd=w172:actions_add_action_vlan_push_eth_dst_mac_aa_src_mac_1.2.3.4_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-147", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/dump.out new file mode 100644 index 000000000..0058d2ba8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: vlan push_eth dst_mac aa:00:00:00:00:00 src_mac 01:02:03:04:00:00 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/ip.pcap new file mode 100644 index 000000000..fde557f80 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/netlink_route_dump.pcap new file mode 100644 index 000000000..4f356e2a5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-147/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/cmd.json new file mode 100644 index 000000000..f292dfd4e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w172-long", + "json": "0", + "words": "actions add action vlan push_eth dst_mac 02:00:00:00:00:01:02:03 src_mac 02:00:00:00:00:02 index 1" + }, + "cmd": "tc actions add action vlan push_eth dst_mac 02:00:00:00:00:01:02:03 src_mac 02:00:00:00:00:02 index 1", + "desc": "corner: opt=plain cmd=w172-long:actions_add_action_vlan_push_eth_dst_mac_02:00:00:00:00:01:02:03_src_mac_02:00:00:00:00:02_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-148", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/dump.out new file mode 100644 index 000000000..2eea22056 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: vlan push_eth dst_mac 02:00:00:00:00:01 src_mac 02:00:00:00:00:02 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/ip.pcap new file mode 100644 index 000000000..54649d25f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/netlink_route_dump.pcap new file mode 100644 index 000000000..70ecd242b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-148/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/cmd.json new file mode 100644 index 000000000..1fb760d2c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w170-vl", + "json": "0", + "words": "actions add action vlan p index 1" + }, + "cmd": "tc actions add action vlan p index 1", + "desc": "corner: opt=plain cmd=w170-vl:actions_add_action_vlan_p_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-149", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/dump.out new file mode 100644 index 000000000..04177dab9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: vlan pop pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/ip.pcap new file mode 100644 index 000000000..76f1801c3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/netlink_route_dump.pcap new file mode 100644 index 000000000..1374a39e0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-149/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/cmd.json new file mode 100644 index 000000000..34bb229ff --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w175-vl", + "json": "0", + "words": "actions add action vlan pop index 3 drop" + }, + "cmd": "tc actions add action vlan pop index 3 drop", + "desc": "corner: opt=plain cmd=w175-vl:actions_add_action_vlan_pop_index_3_drop", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-150", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action vlan", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/dump.out new file mode 100644 index 000000000..9df05f115 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: vlan pop pipe + index 3 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/ip.pcap new file mode 100644 index 000000000..b2f91ef9e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/netlink_route_dump.pcap new file mode 100644 index 000000000..b7b53ff92 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-150/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/cmd.json new file mode 100644 index 000000000..e50d66459 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cs", + "json": "0", + "words": "actions add action csum iph index 1" + }, + "cmd": "tc actions add action csum iph index 1", + "desc": "positive: opt=plain cmd=cs:actions_add_action_csum_iph_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-151", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/dump.out new file mode 100644 index 000000000..3683dadeb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: csum (iph) action pass + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/ip.pcap new file mode 100644 index 000000000..f3d156227 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/netlink_route_dump.pcap new file mode 100644 index 000000000..10ede452f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-151/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/cmd.json new file mode 100644 index 000000000..d760f7af1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cs", + "json": "0", + "words": "actions add action csum icmp index 1" + }, + "cmd": "tc actions add action csum icmp index 1", + "desc": "positive: opt=plain cmd=cs:actions_add_action_csum_icmp_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-152", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/dump.out new file mode 100644 index 000000000..9901fc870 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: csum (icmp) action pass + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/ip.pcap new file mode 100644 index 000000000..56850aea8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/netlink_route_dump.pcap new file mode 100644 index 000000000..acba72a6d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-152/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/cmd.json new file mode 100644 index 000000000..a2836e014 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cs", + "json": "0", + "words": "actions add action csum igmp index 1" + }, + "cmd": "tc actions add action csum igmp index 1", + "desc": "positive: opt=plain cmd=cs:actions_add_action_csum_igmp_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-153", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/dump.out new file mode 100644 index 000000000..e8c00aebf --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: csum (igmp) action pass + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/ip.pcap new file mode 100644 index 000000000..3ef4d944b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/netlink_route_dump.pcap new file mode 100644 index 000000000..dfbfeab89 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-153/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/cmd.json new file mode 100644 index 000000000..ad50808e6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cs", + "json": "0", + "words": "actions add action csum tcp index 1" + }, + "cmd": "tc actions add action csum tcp index 1", + "desc": "positive: opt=plain cmd=cs:actions_add_action_csum_tcp_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-154", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/dump.out new file mode 100644 index 000000000..08d783102 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: csum (tcp) action pass + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/ip.pcap new file mode 100644 index 000000000..9876b1b7a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/netlink_route_dump.pcap new file mode 100644 index 000000000..2d5088e86 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-154/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/cmd.json new file mode 100644 index 000000000..2041e03e5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cs", + "json": "0", + "words": "actions add action csum udp index 1" + }, + "cmd": "tc actions add action csum udp index 1", + "desc": "positive: opt=plain cmd=cs:actions_add_action_csum_udp_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-155", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/dump.out new file mode 100644 index 000000000..aa525602f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: csum (udp) action pass + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/ip.pcap new file mode 100644 index 000000000..e53eb5514 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/netlink_route_dump.pcap new file mode 100644 index 000000000..f33c07ba6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-155/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/cmd.json new file mode 100644 index 000000000..e2b978c3f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cs", + "json": "0", + "words": "actions add action csum udplite index 1" + }, + "cmd": "tc actions add action csum udplite index 1", + "desc": "positive: opt=plain cmd=cs:actions_add_action_csum_udplite_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-156", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/dump.out new file mode 100644 index 000000000..3e2400d33 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: csum (udplite) action pass + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/ip.pcap new file mode 100644 index 000000000..6f112e16d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/netlink_route_dump.pcap new file mode 100644 index 000000000..98e76817e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-156/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/cmd.json new file mode 100644 index 000000000..e12642964 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cs", + "json": "0", + "words": "actions add action csum sctp index 1" + }, + "cmd": "tc actions add action csum sctp index 1", + "desc": "positive: opt=plain cmd=cs:actions_add_action_csum_sctp_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-157", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/dump.out new file mode 100644 index 000000000..1456dc9d1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: csum (sctp) action pass + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/ip.pcap new file mode 100644 index 000000000..6d5546190 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/netlink_route_dump.pcap new file mode 100644 index 000000000..dc03a261a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-157/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/cmd.json new file mode 100644 index 000000000..97fe7ee0b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cs", + "json": "0", + "words": "actions add action csum iph icmp igmp tcp udp udplite sctp index 1" + }, + "cmd": "tc actions add action csum iph icmp igmp tcp udp udplite sctp index 1", + "desc": "boundary: opt=plain cmd=cs:actions_add_action_csum_iph_icmp_igmp_tcp_udp_udplite_sctp_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-158", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/dump.out new file mode 100644 index 000000000..e638ac5ae --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: csum (iph, icmp, igmp, tcp, udp, udplite, sctp) action pass + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/ip.pcap new file mode 100644 index 000000000..357894b14 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/netlink_route_dump.pcap new file mode 100644 index 000000000..a0ea15ba6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-158/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/cmd.json new file mode 100644 index 000000000..36eaadb41 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cs", + "json": "0", + "words": "actions add action csum iph and tcp and udp drop index 1" + }, + "cmd": "tc actions add action csum iph and tcp and udp drop index 1", + "desc": "positive: opt=plain cmd=cs:actions_add_action_csum_iph_and_tcp_and_udp_drop_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-159", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/dump.out new file mode 100644 index 000000000..d95e0821b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: csum (iph, tcp, udp) action drop + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/ip.pcap new file mode 100644 index 000000000..f7549321c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/netlink_route_dump.pcap new file mode 100644 index 000000000..f7fcfe3d3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-159/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/cmd.json new file mode 100644 index 000000000..61165ffa4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w173", + "json": "0", + "words": "actions add action csum index 5" + }, + "cmd": "tc actions add action csum index 5", + "desc": "corner: opt=plain cmd=w173:actions_add_action_csum_index_5", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-160", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/dump.out new file mode 100644 index 000000000..4b48048c1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: csum (?empty) action pass + index 5 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/ip.pcap new file mode 100644 index 000000000..f1b7549df Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/netlink_route_dump.pcap new file mode 100644 index 000000000..1d37bf099 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-160/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/cmd.json new file mode 100644 index 000000000..ad16307c7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w173-drop", + "json": "0", + "words": "actions add action csum index 5 drop" + }, + "cmd": "tc actions add action csum index 5 drop", + "desc": "corner: opt=plain cmd=w173-drop:actions_add_action_csum_index_5_drop", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-161", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/dump.out new file mode 100644 index 000000000..4b48048c1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: csum (?empty) action pass + index 5 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/ip.pcap new file mode 100644 index 000000000..22667fdf3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/netlink_route_dump.pcap new file mode 100644 index 000000000..1cebffab0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-161/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/cmd.json new file mode 100644 index 000000000..22f6ba337 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w170-cs", + "json": "0", + "words": "actions add action csum i u index 1" + }, + "cmd": "tc actions add action csum i u index 1", + "desc": "corner: opt=plain cmd=w170-cs:actions_add_action_csum_i_u_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-162", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/dump.out new file mode 100644 index 000000000..dcc2bb775 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: csum (iph, udp) action pass + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/ip.pcap new file mode 100644 index 000000000..9e3f43b7d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/netlink_route_dump.pcap new file mode 100644 index 000000000..faa304f13 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-162/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/cmd.json new file mode 100644 index 000000000..3c7abe4e5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w175-cs", + "json": "0", + "words": "actions add action csum tcp index 3 pipe" + }, + "cmd": "tc actions add action csum tcp index 3 pipe", + "desc": "corner: opt=plain cmd=w175-cs:actions_add_action_csum_tcp_index_3_pipe", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-163", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action csum", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/dump.out new file mode 100644 index 000000000..ecc4b49b0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: csum (tcp) action pass + index 3 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/ip.pcap new file mode 100644 index 000000000..1e4b0cbdb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/netlink_route_dump.pcap new file mode 100644 index 000000000..adebc018f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-163/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/cmd.json new file mode 100644 index 000000000..d0b00138f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "nat", + "json": "0", + "words": "actions add action nat ingress 10.0.0.0/24 192.168.0.1 index 1" + }, + "cmd": "tc actions add action nat ingress 10.0.0.0/24 192.168.0.1 index 1", + "desc": "positive: opt=plain cmd=nat:actions_add_action_nat_ingress_10.0.0.0/24_192.168.0.1_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-164", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action nat", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/dump.out new file mode 100644 index 000000000..f423d2096 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: nat ingress 10.0.0.0/24 192.168.0.1 pass + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/ip.pcap new file mode 100644 index 000000000..c94979494 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/netlink_route_dump.pcap new file mode 100644 index 000000000..a9bc5e129 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-164/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/cmd.json new file mode 100644 index 000000000..1203f9277 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "nat", + "json": "0", + "words": "actions add action nat egress 10.1.2.3 10.4.5.6 index 1" + }, + "cmd": "tc actions add action nat egress 10.1.2.3 10.4.5.6 index 1", + "desc": "positive: opt=plain cmd=nat:actions_add_action_nat_egress_10.1.2.3_10.4.5.6_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-165", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action nat", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/dump.out new file mode 100644 index 000000000..2285b10af --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: nat egress 10.1.2.3/32 10.4.5.6 pass + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/ip.pcap new file mode 100644 index 000000000..0fff70ec8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/netlink_route_dump.pcap new file mode 100644 index 000000000..862483c43 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-165/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/cmd.json new file mode 100644 index 000000000..e50e4c79f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "nat", + "json": "0", + "words": "actions add action nat egress 10.1.2.3/32 10.4.5.6 drop index 1" + }, + "cmd": "tc actions add action nat egress 10.1.2.3/32 10.4.5.6 drop index 1", + "desc": "positive: opt=plain cmd=nat:actions_add_action_nat_egress_10.1.2.3/32_10.4.5.6_drop_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-166", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action nat", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/dump.out new file mode 100644 index 000000000..dbdddc52e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: nat egress 10.1.2.3/32 10.4.5.6 drop + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/ip.pcap new file mode 100644 index 000000000..19fcc5a4b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/netlink_route_dump.pcap new file mode 100644 index 000000000..271ae5ff9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-166/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/cmd.json new file mode 100644 index 000000000..e290c7cb2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "nat", + "json": "0", + "words": "actions add action nat egress 0.0.0.0/0 10.4.5.6 index 1" + }, + "cmd": "tc actions add action nat egress 0.0.0.0/0 10.4.5.6 index 1", + "desc": "boundary: opt=plain cmd=nat:actions_add_action_nat_egress_0.0.0.0/0_10.4.5.6_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-167", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action nat", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/dump.out new file mode 100644 index 000000000..dfa5a522c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: nat egress 0.0.0.0/0 10.4.5.6 pass + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/ip.pcap new file mode 100644 index 000000000..0daeb3436 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/netlink_route_dump.pcap new file mode 100644 index 000000000..d15b1157a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-167/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/cmd.json new file mode 100644 index 000000000..75babf90e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "nat", + "json": "0", + "words": "actions add action nat ingress default 10.4.5.6 index 1" + }, + "cmd": "tc actions add action nat ingress default 10.4.5.6 index 1", + "desc": "boundary: opt=plain cmd=nat:actions_add_action_nat_ingress_default_10.4.5.6_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-168", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action nat", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/dump.out new file mode 100644 index 000000000..6f4f2d0cc --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: nat ingress 0.0.0.0/0 10.4.5.6 pass + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/ip.pcap new file mode 100644 index 000000000..0b779f6da Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/netlink_route_dump.pcap new file mode 100644 index 000000000..5f63a25c8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-168/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/cmd.json new file mode 100644 index 000000000..0c9d4ba6d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w193", + "json": "0", + "words": "actions add action nat egress 10.0.0.0/8 2.0.0.0 nat ingress 11.0.0.0/8 3.0.0.0 index 1" + }, + "cmd": "tc actions add action nat egress 10.0.0.0/8 2.0.0.0 nat ingress 11.0.0.0/8 3.0.0.0 index 1", + "desc": "corner: opt=plain cmd=w193:actions_add_action_nat_egress_10.0.0.0/8_2.0.0.0_nat_ingress_11.0.0.0/8_3.0.0.0_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-169", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action nat", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/dump.out new file mode 100644 index 000000000..6d716d661 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: nat egress 11.0.0.0/8 3.0.0.0 pass + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/ip.pcap new file mode 100644 index 000000000..b9d602503 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/netlink_route_dump.pcap new file mode 100644 index 000000000..50807fea8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-169/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/cmd.json new file mode 100644 index 000000000..3690ffdb5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w194", + "json": "0", + "words": "actions add action nat egress 10.0.0.0/8 1.2.3.4/16 index 1" + }, + "cmd": "tc actions add action nat egress 10.0.0.0/8 1.2.3.4/16 index 1", + "desc": "corner: opt=plain cmd=w194:actions_add_action_nat_egress_10.0.0.0/8_1.2.3.4/16_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-170", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action nat", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/dump.out new file mode 100644 index 000000000..09faec215 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: nat egress 10.0.0.0/8 1.2.3.4 pass + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/ip.pcap new file mode 100644 index 000000000..a3626ec31 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/netlink_route_dump.pcap new file mode 100644 index 000000000..9d69fb720 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-170/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/cmd.json new file mode 100644 index 000000000..67edc2793 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w195", + "json": "0", + "words": "actions add action nat egress 010.0.0.1 10.1 index 1" + }, + "cmd": "tc actions add action nat egress 010.0.0.1 10.1 index 1", + "desc": "corner: opt=plain cmd=w195:actions_add_action_nat_egress_010.0.0.1_10.1_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-171", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action nat", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/dump.out new file mode 100644 index 000000000..c56b12f18 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: nat egress 8.0.0.1/32 10.1.0.0 pass + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/ip.pcap new file mode 100644 index 000000000..6a41b7987 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/netlink_route_dump.pcap new file mode 100644 index 000000000..d8b8ce675 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-171/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/cmd.json new file mode 100644 index 000000000..1c484519f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w195-mask", + "json": "0", + "words": "actions add action nat egress 10.0.0.0/0x10 10.1.0.0 index 1" + }, + "cmd": "tc actions add action nat egress 10.0.0.0/0x10 10.1.0.0 index 1", + "desc": "corner: opt=plain cmd=w195-mask:actions_add_action_nat_egress_10.0.0.0/0x10_10.1.0.0_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-172", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action nat", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/dump.out new file mode 100644 index 000000000..358cc7568 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: nat egress 10.0.0.0/16 10.1.0.0 pass + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/ip.pcap new file mode 100644 index 000000000..c548ea6a8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/netlink_route_dump.pcap new file mode 100644 index 000000000..1fedcccd6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-172/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/cmd.json new file mode 100644 index 000000000..d733b5f3f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w195-dot", + "json": "0", + "words": "actions add action nat egress 10.0.0.0/255.255.0.0 10.1.0.0 index 1" + }, + "cmd": "tc actions add action nat egress 10.0.0.0/255.255.0.0 10.1.0.0 index 1", + "desc": "corner: opt=plain cmd=w195-dot:actions_add_action_nat_egress_10.0.0.0/255.255.0.0_10.1.0.0_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-173", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action nat", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/dump.out new file mode 100644 index 000000000..358cc7568 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: nat egress 10.0.0.0/16 10.1.0.0 pass + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/ip.pcap new file mode 100644 index 000000000..377d23627 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/netlink_route_dump.pcap new file mode 100644 index 000000000..06537fdc9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-173/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/cmd.json new file mode 100644 index 000000000..b4b4a9ede --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "sim", + "json": "0", + "words": "actions add action simple sdata hello index 1" + }, + "cmd": "tc actions add action simple sdata hello index 1", + "desc": "positive: opt=plain cmd=sim:actions_add_action_simple_sdata_hello_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-174", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action simple", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/dump.out new file mode 100644 index 000000000..84e0e2ee5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: Simple + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/ip.pcap new file mode 100644 index 000000000..d2a545483 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/netlink_route_dump.pcap new file mode 100644 index 000000000..bbbb73980 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-174/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/cmd.json new file mode 100644 index 000000000..d43ba76a9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "sim", + "json": "0", + "words": "actions add action simple sdata hello drop index 1" + }, + "cmd": "tc actions add action simple sdata hello drop index 1", + "desc": "positive: opt=plain cmd=sim:actions_add_action_simple_sdata_hello_drop_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-175", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action simple", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/dump.out new file mode 100644 index 000000000..84e0e2ee5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: Simple + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/ip.pcap new file mode 100644 index 000000000..779424b69 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/netlink_route_dump.pcap new file mode 100644 index 000000000..6a413d5fb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-175/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/cmd.json new file mode 100644 index 000000000..41542ef33 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "sim", + "json": "0", + "words": "actions add action simple sdata sssssssssssssssssssssssssssssss index 1" + }, + "cmd": "tc actions add action simple sdata sssssssssssssssssssssssssssssss index 1", + "desc": "boundary: opt=plain cmd=sim:actions_add_action_simple_sdata_sssssssssssssssssssssssssssssss_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-176", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action simple", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/dump.out new file mode 100644 index 000000000..d05dc51bb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: Simple + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/ip.pcap new file mode 100644 index 000000000..0370ef7e5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/netlink_route_dump.pcap new file mode 100644 index 000000000..188a6addc Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-176/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/cmd.json new file mode 100644 index 000000000..7c1f255af --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "sim", + "json": "0", + "words": "actions add action simple sdata ssssssssssssssssssssssssssssss index 1" + }, + "cmd": "tc actions add action simple sdata ssssssssssssssssssssssssssssss index 1", + "desc": "boundary: opt=plain cmd=sim:actions_add_action_simple_sdata_ssssssssssssssssssssssssssssss_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-177", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action simple", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/dump.out new file mode 100644 index 000000000..d20345545 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: Simple + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/ip.pcap new file mode 100644 index 000000000..f457f19c6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/netlink_route_dump.pcap new file mode 100644 index 000000000..2dd322a41 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-177/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/cmd.json new file mode 100644 index 000000000..248c91b89 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w189", + "json": "0", + "words": "actions add action simple sdata hi index 7" + }, + "cmd": "tc actions add action simple sdata hi index 7", + "desc": "corner: opt=plain cmd=w189:actions_add_action_simple_sdata_hi_index_7", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-178", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action simple", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/dump.out new file mode 100644 index 000000000..a889d785e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: Simple + index 7 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/ip.pcap new file mode 100644 index 000000000..c684ee5ec Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/netlink_route_dump.pcap new file mode 100644 index 000000000..bb1987487 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-178/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/cmd.json new file mode 100644 index 000000000..09fa1c100 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w190", + "json": "0", + "words": "actions add action simple sdata x index 5 drop" + }, + "cmd": "tc actions add action simple sdata x index 5 drop", + "desc": "corner: opt=plain cmd=w190:actions_add_action_simple_sdata_x_index_5_drop", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-179", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action simple", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/dump.out new file mode 100644 index 000000000..5de9c8365 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: Simple + index 5 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/ip.pcap new file mode 100644 index 000000000..38447176e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/netlink_route_dump.pcap new file mode 100644 index 000000000..b09ab4334 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-179/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/cmd.json new file mode 100644 index 000000000..39d8cf0c1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cm", + "json": "0", + "words": "actions add action connmark index 1" + }, + "cmd": "tc actions add action connmark index 1", + "desc": "positive: opt=plain cmd=cm:actions_add_action_connmark_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-180", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action connmark", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/dump.out new file mode 100644 index 000000000..d3b8ac390 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: connmark zone 0 pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/ip.pcap new file mode 100644 index 000000000..fcb650589 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/netlink_route_dump.pcap new file mode 100644 index 000000000..64cce3cce Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-180/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/cmd.json new file mode 100644 index 000000000..f464d7bd9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cm", + "json": "0", + "words": "actions add action connmark zone 0 index 1" + }, + "cmd": "tc actions add action connmark zone 0 index 1", + "desc": "positive: opt=plain cmd=cm:actions_add_action_connmark_zone_0_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-181", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action connmark", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/dump.out new file mode 100644 index 000000000..d3b8ac390 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: connmark zone 0 pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/ip.pcap new file mode 100644 index 000000000..a2caed614 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/netlink_route_dump.pcap new file mode 100644 index 000000000..b6fc2c979 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-181/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/cmd.json new file mode 100644 index 000000000..b9c0fffb8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cm", + "json": "0", + "words": "actions add action connmark zone 65535 index 1" + }, + "cmd": "tc actions add action connmark zone 65535 index 1", + "desc": "boundary: opt=plain cmd=cm:actions_add_action_connmark_zone_65535_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-182", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action connmark", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/dump.out new file mode 100644 index 000000000..b45aed815 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: connmark zone 65535 pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/ip.pcap new file mode 100644 index 000000000..ca8ca82f1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/netlink_route_dump.pcap new file mode 100644 index 000000000..67f246117 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-182/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/cmd.json new file mode 100644 index 000000000..9a6e2612a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cm", + "json": "0", + "words": "actions add action connmark zone 5 drop index 1" + }, + "cmd": "tc actions add action connmark zone 5 drop index 1", + "desc": "positive: opt=plain cmd=cm:actions_add_action_connmark_zone_5_drop_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-183", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action connmark", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/dump.out new file mode 100644 index 000000000..642257d5f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: connmark zone 5 drop + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/ip.pcap new file mode 100644 index 000000000..61d9223b7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/netlink_route_dump.pcap new file mode 100644 index 000000000..9037e2a10 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-183/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/cmd.json new file mode 100644 index 000000000..4cf0b0c6a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cti", + "json": "0", + "words": "actions add action ctinfo dscp 0xfc000000 0x01000000 index 1" + }, + "cmd": "tc actions add action ctinfo dscp 0xfc000000 0x01000000 index 1", + "desc": "positive: opt=plain cmd=cti:actions_add_action_ctinfo_dscp_0xfc000000_0x01000000_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-184", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action ctinfo", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/dump.out new file mode 100644 index 000000000..a0ebde5c5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: ctinfo zone 0 pipe + index 1 ref 1 bind 0 dscp 0xfc000000 0x01000000 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/ip.pcap new file mode 100644 index 000000000..98f3364a6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/netlink_route_dump.pcap new file mode 100644 index 000000000..f3669bf7d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-184/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/cmd.json new file mode 100644 index 000000000..f22bd1978 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cti", + "json": "0", + "words": "actions add action ctinfo cpmark 0xffffffff zone 3 index 1" + }, + "cmd": "tc actions add action ctinfo cpmark 0xffffffff zone 3 index 1", + "desc": "positive: opt=plain cmd=cti:actions_add_action_ctinfo_cpmark_0xffffffff_zone_3_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-185", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action ctinfo", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/dump.out new file mode 100644 index 000000000..f505e751a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: ctinfo zone 3 pipe + index 1 ref 1 bind 0 cpmark 0xffffffff + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/ip.pcap new file mode 100644 index 000000000..ed233c173 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/netlink_route_dump.pcap new file mode 100644 index 000000000..406d3db95 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-185/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/cmd.json new file mode 100644 index 000000000..c467a4e56 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cti", + "json": "0", + "words": "actions add action ctinfo cpmark index 1" + }, + "cmd": "tc actions add action ctinfo cpmark index 1", + "desc": "positive: opt=plain cmd=cti:actions_add_action_ctinfo_cpmark_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-186", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action ctinfo", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/dump.out new file mode 100644 index 000000000..5339ce4fa --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: ctinfo zone 0 pipe + index 1 ref 1 bind 0 cpmark 0xffffffff + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/ip.pcap new file mode 100644 index 000000000..4f924cb7e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/netlink_route_dump.pcap new file mode 100644 index 000000000..1f5099321 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-186/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/cmd.json new file mode 100644 index 000000000..b3d213de7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cti", + "json": "0", + "words": "actions add action ctinfo dscp 0x3f index 1" + }, + "cmd": "tc actions add action ctinfo dscp 0x3f index 1", + "desc": "positive: opt=plain cmd=cti:actions_add_action_ctinfo_dscp_0x3f_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-187", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action ctinfo", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/dump.out new file mode 100644 index 000000000..e221d12eb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: ctinfo zone 0 pipe + index 1 ref 1 bind 0 dscp 0x0000003f 0000000000 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/ip.pcap new file mode 100644 index 000000000..9dab6d776 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/netlink_route_dump.pcap new file mode 100644 index 000000000..5ce9be5e5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-187/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/cmd.json new file mode 100644 index 000000000..91399108c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cti", + "json": "0", + "words": "actions add action ctinfo dscp 0xfc000000 cpmark 0xff zone 3 pipe index 1" + }, + "cmd": "tc actions add action ctinfo dscp 0xfc000000 cpmark 0xff zone 3 pipe index 1", + "desc": "positive: opt=plain cmd=cti:actions_add_action_ctinfo_dscp_0xfc000000_cpmark_0xff_zone_3_pipe_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-188", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action ctinfo", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/dump.out new file mode 100644 index 000000000..5dfd64352 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: ctinfo zone 3 pipe + index 1 ref 1 bind 0 dscp 0xfc000000 0000000000 cpmark 0x000000ff + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/ip.pcap new file mode 100644 index 000000000..d55f7618c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/netlink_route_dump.pcap new file mode 100644 index 000000000..b97d8bd3e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-188/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/cmd.json new file mode 100644 index 000000000..8301a3419 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w209", + "json": "0", + "words": "actions add action ctinfo cpmark 0 index 1" + }, + "cmd": "tc actions add action ctinfo cpmark 0 index 1", + "desc": "corner: opt=plain cmd=w209:actions_add_action_ctinfo_cpmark_0_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-189", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action ctinfo", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/dump.out new file mode 100644 index 000000000..8e1081aba --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: ctinfo zone 0 pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/ip.pcap new file mode 100644 index 000000000..137d1bad4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/netlink_route_dump.pcap new file mode 100644 index 000000000..bc51e0285 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-189/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/cmd.json new file mode 100644 index 000000000..c90ada45f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "cti-none", + "json": "0", + "words": "actions add action ctinfo index 1" + }, + "cmd": "tc actions add action ctinfo index 1", + "desc": "corner: opt=plain cmd=cti-none:actions_add_action_ctinfo_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-190", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action ctinfo", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/dump.out new file mode 100644 index 000000000..8e1081aba --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: ctinfo zone 0 pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/ip.pcap new file mode 100644 index 000000000..0ee5a6adc Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/netlink_route_dump.pcap new file mode 100644 index 000000000..d20a86f0a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-190/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/cmd.json new file mode 100644 index 000000000..393975e1d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w210", + "json": "0", + "words": "actions add action ctinfo c dscp 0xfc000000 index 1" + }, + "cmd": "tc actions add action ctinfo c dscp 0xfc000000 index 1", + "desc": "corner: opt=plain cmd=w210:actions_add_action_ctinfo_c_dscp_0xfc000000_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-191", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action ctinfo", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/dump.out new file mode 100644 index 000000000..bbda38ec4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: ctinfo zone 0 pipe + index 1 ref 1 bind 0 dscp 0xfc000000 0000000000 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/ip.pcap new file mode 100644 index 000000000..12bd56c08 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/netlink_route_dump.pcap new file mode 100644 index 000000000..fb14ffc54 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-191/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/cmd.json new file mode 100644 index 000000000..265b82a0f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w210-cm", + "json": "0", + "words": "actions add action connmark co zone 5 index 1" + }, + "cmd": "tc actions add action connmark co zone 5 index 1", + "desc": "corner: opt=plain cmd=w210-cm:actions_add_action_connmark_co_zone_5_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-192", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action connmark", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/dump.out new file mode 100644 index 000000000..5a631a014 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: connmark zone 5 pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/ip.pcap new file mode 100644 index 000000000..2f4b443e2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/netlink_route_dump.pcap new file mode 100644 index 000000000..f16a49744 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-192/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/cmd.json new file mode 100644 index 000000000..ae8f90f2d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "smp", + "json": "0", + "words": "actions add action sample rate 100 group 5 trunc 64 index 1" + }, + "cmd": "tc actions add action sample rate 100 group 5 trunc 64 index 1", + "desc": "positive: opt=plain cmd=smp:actions_add_action_sample_rate_100_group_5_trunc_64_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-193", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action sample", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/dump.out new file mode 100644 index 000000000..c6daf4bc4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: sample rate 1/100 group 5 trunc_size 64 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/ip.pcap new file mode 100644 index 000000000..54e67272e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/netlink_route_dump.pcap new file mode 100644 index 000000000..5e90c66d2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-193/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/cmd.json new file mode 100644 index 000000000..4cf048b8a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "smp", + "json": "0", + "words": "actions add action sample rate 1 group 1 index 1" + }, + "cmd": "tc actions add action sample rate 1 group 1 index 1", + "desc": "positive: opt=plain cmd=smp:actions_add_action_sample_rate_1_group_1_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-194", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action sample", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/dump.out new file mode 100644 index 000000000..1c0f5c139 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: sample rate 1/1 group 1 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/ip.pcap new file mode 100644 index 000000000..640da697a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/netlink_route_dump.pcap new file mode 100644 index 000000000..798ba7be4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-194/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/cmd.json new file mode 100644 index 000000000..8ed72951a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "smp", + "json": "0", + "words": "actions add action sample rate 100 group 5 drop index 1" + }, + "cmd": "tc actions add action sample rate 100 group 5 drop index 1", + "desc": "positive: opt=plain cmd=smp:actions_add_action_sample_rate_100_group_5_drop_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-195", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action sample", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/dump.out new file mode 100644 index 000000000..55f0d53a2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: sample rate 1/100 group 5 drop + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/ip.pcap new file mode 100644 index 000000000..dc1c531f7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/netlink_route_dump.pcap new file mode 100644 index 000000000..368bd3e4e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-195/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/cmd.json new file mode 100644 index 000000000..474a4c411 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "smp", + "json": "0", + "words": "actions add action sample rate 4294967295 group 4294967295 trunc 4294967295 index 1" + }, + "cmd": "tc actions add action sample rate 4294967295 group 4294967295 trunc 4294967295 index 1", + "desc": "boundary: opt=plain cmd=smp:actions_add_action_sample_rate_4294967295_group_4294967295_trunc_4294967295_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-196", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action sample", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/dump.out new file mode 100644 index 000000000..cd112d977 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: sample rate 1/4294967295 group 4294967295 trunc_size 4294967295 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/ip.pcap new file mode 100644 index 000000000..d652d65d1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/netlink_route_dump.pcap new file mode 100644 index 000000000..7c07214e2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-196/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/cmd.json new file mode 100644 index 000000000..35a6c4c27 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "smp", + "json": "0", + "words": "actions add action sample rate 1 group 1 trunc 0 index 1" + }, + "cmd": "tc actions add action sample rate 1 group 1 trunc 0 index 1", + "desc": "boundary: opt=plain cmd=smp:actions_add_action_sample_rate_1_group_1_trunc_0_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-197", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action sample", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/dump.out new file mode 100644 index 000000000..fa47fa8bc --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: sample rate 1/1 group 1 trunc_size 0 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/ip.pcap new file mode 100644 index 000000000..11820ba90 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/netlink_route_dump.pcap new file mode 100644 index 000000000..8bcec9a09 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-197/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/cmd.json new file mode 100644 index 000000000..a3855f3ba --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "smod", + "json": "0", + "words": "actions add action skbmod set dmac 02:00:00:00:00:01 set smac 02:00:00:00:00:02 index 1" + }, + "cmd": "tc actions add action skbmod set dmac 02:00:00:00:00:01 set smac 02:00:00:00:00:02 index 1", + "desc": "positive: opt=plain cmd=smod:actions_add_action_skbmod_set_dmac_02:00:00:00:00:01_set_smac_02:00:00:00:00:02_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-198", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbmod", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/dump.out new file mode 100644 index 000000000..e26b435fb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: skbmod pipe set dmac 02:00:00:00:00:01 set smac 02:00:00:00:00:02 + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/ip.err new file mode 100644 index 000000000..d5cb2b5c0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/ip.err @@ -0,0 +1,2 @@ +dst MAC address <02:00:00:00:00:01> +src MAC address <02:00:00:00:00:02> diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/ip.pcap new file mode 100644 index 000000000..04bbf7191 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/netlink_route_dump.pcap new file mode 100644 index 000000000..cb0b1223b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-198/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/cmd.json new file mode 100644 index 000000000..62f027bc5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "smod", + "json": "0", + "words": "actions add action skbmod set etype 0x800 index 1" + }, + "cmd": "tc actions add action skbmod set etype 0x800 index 1", + "desc": "positive: opt=plain cmd=smod:actions_add_action_skbmod_set_etype_0x800_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-199", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbmod", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/dump.out new file mode 100644 index 000000000..328e78c7b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbmod pipe set etype 0x800 + + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/ip.err new file mode 100644 index 000000000..4afbe85b3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/ip.err @@ -0,0 +1 @@ +skbmod etype 0x800 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/ip.pcap new file mode 100644 index 000000000..9a08f5614 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/netlink_route_dump.pcap new file mode 100644 index 000000000..e38073f69 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-199/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/cmd.json new file mode 100644 index 000000000..7e00bb703 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "smod", + "json": "0", + "words": "actions add action skbmod set dmac 02:00:00:00:00:01 set etype 0x86dd drop index 1" + }, + "cmd": "tc actions add action skbmod set dmac 02:00:00:00:00:01 set etype 0x86dd drop index 1", + "desc": "positive: opt=plain cmd=smod:actions_add_action_skbmod_set_dmac_02:00:00:00:00:01_set_etype_0x86dd_drop_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-200", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbmod", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/dump.out new file mode 100644 index 000000000..ad49563ef --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: skbmod drop set etype 0x86DD + set dmac 02:00:00:00:00:01 + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/ip.err new file mode 100644 index 000000000..967fa4a48 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/ip.err @@ -0,0 +1,2 @@ +dst MAC address <02:00:00:00:00:01> +skbmod etype 0x86dd diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/ip.pcap new file mode 100644 index 000000000..e25bcf4cb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/netlink_route_dump.pcap new file mode 100644 index 000000000..7d848fc2c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-200/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/cmd.json new file mode 100644 index 000000000..90e07234e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "smod", + "json": "0", + "words": "actions add action skbmod ecn index 1" + }, + "cmd": "tc actions add action skbmod ecn index 1", + "desc": "positive: opt=plain cmd=smod:actions_add_action_skbmod_ecn_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-201", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbmod", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/dump.out new file mode 100644 index 000000000..132f44345 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: skbmod pipe ecn + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/ip.pcap new file mode 100644 index 000000000..dbb5dc581 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/netlink_route_dump.pcap new file mode 100644 index 000000000..06f38b5d1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-201/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/cmd.json new file mode 100644 index 000000000..74fec5fe2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w196", + "json": "0", + "words": "actions add action skbmod set dmac 02:00:00:00:00:01:junk index 1" + }, + "cmd": "tc actions add action skbmod set dmac 02:00:00:00:00:01:junk index 1", + "desc": "corner: opt=plain cmd=w196:actions_add_action_skbmod_set_dmac_02:00:00:00:00:01:junk_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-202", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbmod", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/dump.out new file mode 100644 index 000000000..2be427483 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: skbmod pipe set dmac 02:00:00:00:00:01 + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/ip.err new file mode 100644 index 000000000..0b1d1976f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/ip.err @@ -0,0 +1 @@ +dst MAC address <02:00:00:00:00:01:junk> diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/ip.pcap new file mode 100644 index 000000000..6e5ca5a93 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/netlink_route_dump.pcap new file mode 100644 index 000000000..b80d7b04f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-202/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/cmd.json new file mode 100644 index 000000000..2d778dd0d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w196-x", + "json": "0", + "words": "actions add action skbmod set dmac 0x02:1aa:00:00:00:01 index 1" + }, + "cmd": "tc actions add action skbmod set dmac 0x02:1aa:00:00:00:01 index 1", + "desc": "corner: opt=plain cmd=w196-x:actions_add_action_skbmod_set_dmac_0x02:1aa:00:00:00:01_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-203", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbmod", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/dump.out new file mode 100644 index 000000000..7c612e9fa --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: skbmod pipe set dmac 02:aa:00:00:00:01 + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/ip.err new file mode 100644 index 000000000..b4b0168b5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/ip.err @@ -0,0 +1 @@ +dst MAC address <0x02:1aa:00:00:00:01> diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/ip.pcap new file mode 100644 index 000000000..e276806c2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/netlink_route_dump.pcap new file mode 100644 index 000000000..28476d63f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-203/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/cmd.json new file mode 100644 index 000000000..4d21d4b13 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w197", + "json": "0", + "words": "actions add action skbmod set dmac 02:00:00:00:00:01 swap mac index 1" + }, + "cmd": "tc actions add action skbmod set dmac 02:00:00:00:00:01 swap mac index 1", + "desc": "corner: opt=plain cmd=w197:actions_add_action_skbmod_set_dmac_02:00:00:00:00:01_swap_mac_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-204", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbmod", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/dump.out new file mode 100644 index 000000000..38a59455c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: skbmod pipe swap mac + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/ip.err new file mode 100644 index 000000000..ead767a0b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/ip.err @@ -0,0 +1 @@ +dst MAC address <02:00:00:00:00:01> diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/ip.pcap new file mode 100644 index 000000000..4cf37f13a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/netlink_route_dump.pcap new file mode 100644 index 000000000..4149d53ba Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-204/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/cmd.json new file mode 100644 index 000000000..ea1ddea62 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w197-mac", + "json": "0", + "words": "actions add action skbmod mac index 1" + }, + "cmd": "tc actions add action skbmod mac index 1", + "desc": "corner: opt=plain cmd=w197-mac:actions_add_action_skbmod_mac_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-205", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbmod", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/dump.out new file mode 100644 index 000000000..38a59455c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: skbmod pipe swap mac + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/ip.pcap new file mode 100644 index 000000000..f3594b27d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/netlink_route_dump.pcap new file mode 100644 index 000000000..29b3e63e1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-205/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/cmd.json new file mode 100644 index 000000000..fe3da9f56 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w200", + "json": "0", + "words": "actions add action skbmod swap mac index 010" + }, + "cmd": "tc actions add action skbmod swap mac index 010", + "desc": "corner: opt=plain cmd=w200:actions_add_action_skbmod_swap_mac_index_010", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-206", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action skbmod", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/dump.out new file mode 100644 index 000000000..40cddece5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: skbmod pipe swap mac + index 8 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/ip.pcap new file mode 100644 index 000000000..74258c372 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/netlink_route_dump.pcap new file mode 100644 index 000000000..9ea0f79ad Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-206/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/cmd.json new file mode 100644 index 000000000..7f6baafdf --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "mp", + "json": "0", + "words": "actions add action mpls push label 100 tc 3 ttl 64 index 1" + }, + "cmd": "tc actions add action mpls push label 100 tc 3 ttl 64 index 1", + "desc": "positive: opt=plain cmd=mp:actions_add_action_mpls_push_label_100_tc_3_ttl_64_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-207", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mpls", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/dump.out new file mode 100644 index 000000000..bc1f84707 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mpls push protocol mpls_uc label 100 tc 3 ttl 64 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/ip.pcap new file mode 100644 index 000000000..746c9931d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/netlink_route_dump.pcap new file mode 100644 index 000000000..c0a3c7916 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-207/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/cmd.json new file mode 100644 index 000000000..34edb4296 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "mp", + "json": "0", + "words": "actions add action mpls push protocol mpls_mc label 100 bos 0 index 1" + }, + "cmd": "tc actions add action mpls push protocol mpls_mc label 100 bos 0 index 1", + "desc": "positive: opt=plain cmd=mp:actions_add_action_mpls_push_protocol_mpls_mc_label_100_bos_0_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-208", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mpls", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/dump.out new file mode 100644 index 000000000..86fa4ac7f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mpls push protocol mpls_mc label 100 bos 0 ttl 255 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/ip.pcap new file mode 100644 index 000000000..a4b463a91 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/netlink_route_dump.pcap new file mode 100644 index 000000000..4a796f887 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-208/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/cmd.json new file mode 100644 index 000000000..e35717c2f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "mp", + "json": "0", + "words": "actions add action mpls mac_push label 300 bos 1 index 1" + }, + "cmd": "tc actions add action mpls mac_push label 300 bos 1 index 1", + "desc": "positive: opt=plain cmd=mp:actions_add_action_mpls_mac_push_label_300_bos_1_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-209", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mpls", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/dump.out new file mode 100644 index 000000000..46692ea68 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: mpls mac_push protocol mpls_uc label 300 bos 1 ttl 255 pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/ip.pcap new file mode 100644 index 000000000..543c8c07c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/netlink_route_dump.pcap new file mode 100644 index 000000000..1780873aa Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-209/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/cmd.json new file mode 100644 index 000000000..4f1dfcbdb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "mp", + "json": "0", + "words": "actions add action mpls modify label 200 tc 7 ttl 255 index 1" + }, + "cmd": "tc actions add action mpls modify label 200 tc 7 ttl 255 index 1", + "desc": "positive: opt=plain cmd=mp:actions_add_action_mpls_modify_label_200_tc_7_ttl_255_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-210", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mpls", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/dump.out new file mode 100644 index 000000000..d2390d0ae --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mpls modify label 200 tc 7 ttl 255 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/ip.pcap new file mode 100644 index 000000000..9454f6a2b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/netlink_route_dump.pcap new file mode 100644 index 000000000..e4128b443 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-210/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/cmd.json new file mode 100644 index 000000000..75ee97881 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "mp", + "json": "0", + "words": "actions add action mpls dec_ttl pipe index 1" + }, + "cmd": "tc actions add action mpls dec_ttl pipe index 1", + "desc": "positive: opt=plain cmd=mp:actions_add_action_mpls_dec_ttl_pipe_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-211", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mpls", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/dump.out new file mode 100644 index 000000000..bf1d7be5a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: mpls dec_ttl pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/ip.pcap new file mode 100644 index 000000000..847533fb8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/netlink_route_dump.pcap new file mode 100644 index 000000000..32f151afe Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-211/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/cmd.json new file mode 100644 index 000000000..beb4247ae --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "mp", + "json": "0", + "words": "actions add action mpls pop protocol ipv6 index 1" + }, + "cmd": "tc actions add action mpls pop protocol ipv6 index 1", + "desc": "positive: opt=plain cmd=mp:actions_add_action_mpls_pop_protocol_ipv6_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-212", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mpls", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/dump.out new file mode 100644 index 000000000..e95a4cad1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mpls pop protocol ipv6 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/ip.pcap new file mode 100644 index 000000000..b03cc01d0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/netlink_route_dump.pcap new file mode 100644 index 000000000..86e86bcf0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-212/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/cmd.json new file mode 100644 index 000000000..89dbd42cc --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "mp", + "json": "0", + "words": "actions add action mpls push label 1048575 index 1" + }, + "cmd": "tc actions add action mpls push label 1048575 index 1", + "desc": "boundary: opt=plain cmd=mp:actions_add_action_mpls_push_label_1048575_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-213", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mpls", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/dump.out new file mode 100644 index 000000000..17f4ebc53 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mpls push protocol mpls_uc label 1048575 ttl 255 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/ip.pcap new file mode 100644 index 000000000..a806008a4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/netlink_route_dump.pcap new file mode 100644 index 000000000..99cebb515 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-213/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/cmd.json new file mode 100644 index 000000000..a6c138b6c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "mp", + "json": "0", + "words": "actions add action mpls push label 0 ttl 1 index 1" + }, + "cmd": "tc actions add action mpls push label 0 ttl 1 index 1", + "desc": "boundary: opt=plain cmd=mp:actions_add_action_mpls_push_label_0_ttl_1_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-214", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mpls", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/dump.out new file mode 100644 index 000000000..91f005614 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mpls push protocol mpls_uc label 0 ttl 1 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/ip.pcap new file mode 100644 index 000000000..2cd6bb05e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/netlink_route_dump.pcap new file mode 100644 index 000000000..58890c6b1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-214/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/cmd.json new file mode 100644 index 000000000..51769dc7d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w204", + "json": "0", + "words": "actions add action mpls push label 5 protocol 0 index 1" + }, + "cmd": "tc actions add action mpls push label 5 protocol 0 index 1", + "desc": "corner: opt=plain cmd=w204:actions_add_action_mpls_push_label_5_protocol_0_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-215", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mpls", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/dump.out new file mode 100644 index 000000000..77e8d5d0b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mpls push protocol mpls_uc label 5 ttl 255 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/ip.pcap new file mode 100644 index 000000000..cd21b0590 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/netlink_route_dump.pcap new file mode 100644 index 000000000..2048538da Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-215/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/cmd.json new file mode 100644 index 000000000..3fd0ed000 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w206", + "json": "0", + "words": "actions add action mpls p protocol ipv4 index 1" + }, + "cmd": "tc actions add action mpls p protocol ipv4 index 1", + "desc": "corner: opt=plain cmd=w206:actions_add_action_mpls_p_protocol_ipv4_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-216", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action mpls", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/dump.out new file mode 100644 index 000000000..d637c4c0d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: mpls pop protocol ip pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/ip.pcap new file mode 100644 index 000000000..dd4ee6bdf Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/netlink_route_dump.pcap new file mode 100644 index 000000000..dd4d62560 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-216/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/cmd.json new file mode 100644 index 000000000..585a03a71 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "out-pedit", + "json": "0", + "words": "actions add action pedit ex munge ip ttl set 10 index 1" + }, + "cmd": "tc actions add action pedit ex munge ip ttl set 10 index 1", + "desc": "positive: opt=plain cmd=out-pedit:actions_add_action_pedit_ex_munge_ip_ttl_set_10_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-217", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action pedit", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/dump.out new file mode 100644 index 000000000..b23084bf6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/dump.out @@ -0,0 +1,7 @@ +total acts 1 + + action order 0: pedit action pass keys 1 + index 1 ref 1 bind 0 + key #0 at ipv4+8: val 0a000000 mask 00ffffff + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/ip.pcap new file mode 100644 index 000000000..8ff83d7e2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/netlink_route_dump.pcap new file mode 100644 index 000000000..cf578aac1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-217/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/cmd.json new file mode 100644 index 000000000..126c8eac8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "out-tunnel_key", + "json": "0", + "words": "actions add action tunnel_key unset index 1" + }, + "cmd": "tc actions add action tunnel_key unset index 1", + "desc": "positive: opt=plain cmd=out-tunnel_key:actions_add_action_tunnel_key_unset_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-218", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action tunnel_key", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/dump.out new file mode 100644 index 000000000..2cd305829 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: tunnel_key unset pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/ip.pcap new file mode 100644 index 000000000..c2ba699d0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/netlink_route_dump.pcap new file mode 100644 index 000000000..7cb1326f8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-218/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/cmd.json new file mode 100644 index 000000000..839d23284 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "out-ife", + "json": "0", + "words": "actions add action ife encode allow mark index 1" + }, + "cmd": "tc actions add action ife encode allow mark index 1", + "desc": "positive: opt=plain cmd=out-ife:actions_add_action_ife_encode_allow_mark_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-219", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action ife", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/dump.out new file mode 100644 index 000000000..88186865c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: ife encode action pipe type 0XED3E + allow mark + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/ip.err new file mode 100644 index 000000000..301050e59 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/ip.err @@ -0,0 +1 @@ +IFE type 0xED3E diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/ip.pcap new file mode 100644 index 000000000..18138d1c8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/netlink_route_dump.pcap new file mode 100644 index 000000000..eddcc430d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-219/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/cmd.json new file mode 100644 index 000000000..69da86211 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "out-ct", + "json": "0", + "words": "actions add action ct commit index 1" + }, + "cmd": "tc actions add action ct commit index 1", + "desc": "positive: opt=plain cmd=out-ct:actions_add_action_ct_commit_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-220", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action ct", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/dump.out new file mode 100644 index 000000000..810b55ab7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/dump.out @@ -0,0 +1,6 @@ +total acts 1 + + action order 0: ct commit zone 0 pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/ip.pcap new file mode 100644 index 000000000..47c942f3d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/netlink_route_dump.pcap new file mode 100644 index 000000000..0f4ebfad8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-220/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/cmd.json new file mode 100644 index 000000000..7cf32f500 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "out-gate", + "json": "0", + "words": "actions add action gate base-time 0 sched-entry open 1000000 -1 -1 index 1" + }, + "cmd": "tc actions add action gate base-time 0 sched-entry open 1000000 -1 -1 index 1", + "desc": "positive: opt=plain cmd=out-gate:actions_add_action_gate_base-time_0_sched-entry_open_1000000_-1_-1_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-221", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gate", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/dump.out new file mode 100644 index 000000000..d1ef0a62e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/dump.out @@ -0,0 +1,11 @@ +total acts 1 + + action order 0: + priority wildcard clockid TAI flags 0 + base-time 0ns cycle-time 1ms cycle-time-ext 0ns + schedule: + number 0 gate-state open interval 1ms ipv wildcard max-octets wildcard + pipe + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/ip.pcap new file mode 100644 index 000000000..036255e0d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/netlink_route_dump.pcap new file mode 100644 index 000000000..8ebe77ac3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-221/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/cmd.json new file mode 100644 index 000000000..a5727d941 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "out-bpf", + "json": "0", + "words": "actions add action bpf bytecode '1,6 0 0 0' index 1" + }, + "cmd": "tc actions add action bpf bytecode '1,6 0 0 0' index 1", + "desc": "positive: opt=plain cmd=out-bpf:actions_add_action_bpf_bytecode_'1,6_0_0_0'_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-222", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action bpf", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/dump.out new file mode 100644 index 000000000..b31ef392d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/dump.out @@ -0,0 +1,5 @@ +total acts 1 + + action order 0: bpf bytecode '1,6 0 0 0' default-action pipe + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/ip.pcap new file mode 100644 index 000000000..3431ab39f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/netlink_route_dump.pcap new file mode 100644 index 000000000..0bacc7821 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-222/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/cmd.json new file mode 100644 index 000000000..5c096f066 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "fr", + "json": "0", + "words": "actions add action gact pass index 1 cookie 0102030405060708090a0b0c0d0e0f10" + }, + "cmd": "tc actions add action gact pass index 1 cookie 0102030405060708090a0b0c0d0e0f10", + "desc": "positive: opt=plain cmd=fr:actions_add_action_gact_pass_index_1_cookie_0102030405060708090a0b0c0d0e0f10", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-223", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/dump.out new file mode 100644 index 000000000..4bcec1964 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/dump.out @@ -0,0 +1,8 @@ +total acts 1 + + action order 0: gact action pass + random type none pass val 0 + index 1 ref 1 bind 0 + cookie 0102030405060708090a0b0c0d0e0f10 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/ip.pcap new file mode 100644 index 000000000..5b7f840e3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/netlink_route_dump.pcap new file mode 100644 index 000000000..befb39bf7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-223/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/cmd.json new file mode 100644 index 000000000..7b7ad532e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "fr", + "json": "0", + "words": "actions add action gact pass index 1 hw_stats immediate" + }, + "cmd": "tc actions add action gact pass index 1 hw_stats immediate", + "desc": "positive: opt=plain cmd=fr:actions_add_action_gact_pass_index_1_hw_stats_immediate", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-224", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/dump.out new file mode 100644 index 000000000..afaf309fe --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/dump.out @@ -0,0 +1,8 @@ +total acts 1 + + action order 0: gact action pass + random type none pass val 0 + index 1 ref 1 bind 0 + not_in_hw + hw_stats immediate + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/ip.pcap new file mode 100644 index 000000000..bb4e44f7c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/netlink_route_dump.pcap new file mode 100644 index 000000000..0c2c214d8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-224/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/cmd.json new file mode 100644 index 000000000..8cfc166be --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "fr", + "json": "0", + "words": "actions add action gact pass index 1 hw_stats delayed" + }, + "cmd": "tc actions add action gact pass index 1 hw_stats delayed", + "desc": "positive: opt=plain cmd=fr:actions_add_action_gact_pass_index_1_hw_stats_delayed", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-225", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/dump.out new file mode 100644 index 000000000..2fed63f23 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/dump.out @@ -0,0 +1,8 @@ +total acts 1 + + action order 0: gact action pass + random type none pass val 0 + index 1 ref 1 bind 0 + not_in_hw + hw_stats delayed + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/ip.pcap new file mode 100644 index 000000000..56ffbd4f0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/netlink_route_dump.pcap new file mode 100644 index 000000000..31ff641ef Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-225/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/cmd.json new file mode 100644 index 000000000..53a43e5c1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "fr", + "json": "0", + "words": "actions add action gact pass index 1 hw_stats disabled" + }, + "cmd": "tc actions add action gact pass index 1 hw_stats disabled", + "desc": "positive: opt=plain cmd=fr:actions_add_action_gact_pass_index_1_hw_stats_disabled", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-226", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/dump.out new file mode 100644 index 000000000..3e8aa1cf2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/dump.out @@ -0,0 +1,8 @@ +total acts 1 + + action order 0: gact action pass + random type none pass val 0 + index 1 ref 1 bind 0 + not_in_hw + hw_stats disabled + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/ip.pcap new file mode 100644 index 000000000..dc8cec0e6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/netlink_route_dump.pcap new file mode 100644 index 000000000..a1774c4db Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-226/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/cmd.json new file mode 100644 index 000000000..8d88b5e17 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "fr", + "json": "0", + "words": "actions add action gact pass index 1 no_percpu" + }, + "cmd": "tc actions add action gact pass index 1 no_percpu", + "desc": "positive: opt=plain cmd=fr:actions_add_action_gact_pass_index_1_no_percpu", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-227", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/dump.out new file mode 100644 index 000000000..447b31e51 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/dump.out @@ -0,0 +1,7 @@ +total acts 1 + + action order 0: gact action pass + random type none pass val 0 + index 1 ref 1 bind 0 + no_percpu not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/ip.pcap new file mode 100644 index 000000000..0a0661df1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/netlink_route_dump.pcap new file mode 100644 index 000000000..fa47118c9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-227/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/cmd.json new file mode 100644 index 000000000..b3ca0e712 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w170-hw", + "json": "0", + "words": "actions add action gact pass index 1 hw_stats d" + }, + "cmd": "tc actions add action gact pass index 1 hw_stats d", + "desc": "corner: opt=plain cmd=w170-hw:actions_add_action_gact_pass_index_1_hw_stats_d", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-228", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/dump.out new file mode 100644 index 000000000..2fed63f23 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/dump.out @@ -0,0 +1,8 @@ +total acts 1 + + action order 0: gact action pass + random type none pass val 0 + index 1 ref 1 bind 0 + not_in_hw + hw_stats delayed + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/ip.pcap new file mode 100644 index 000000000..efff56829 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/netlink_route_dump.pcap new file mode 100644 index 000000000..c6236ba3a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-228/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/cmd.json new file mode 100644 index 000000000..b9e3b77d2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "fr", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k index 1 action mirred egress redirect dev d1 index 1 action skbedit mark 1 index 1 action gact drop index 2" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k index 1 action mirred egress redirect dev d1 index 1 action skbedit mark 1 index 1 action gact drop index 2", + "desc": "positive: opt=plain cmd=fr:actions_add_action_police_rate_1mbit_burst_10k_index_1_action_mirred_egress_redirect_dev_d1_index_1_action_skbedit_mark_1_index_1_action_gact_drop_index_2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-229", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/dump.out new file mode 100644 index 000000000..3f2ac05e9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/dump.out @@ -0,0 +1,7 @@ +total acts 1 + + action order 0: gact action drop + random type none pass val 0 + index 2 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/ip.pcap new file mode 100644 index 000000000..31dd81835 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/netlink_route_dump.pcap new file mode 100644 index 000000000..06b9ee92b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-229/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/cmd.json new file mode 100644 index 000000000..042c97c4a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "fr32", + "json": "0", + "words": "actions add action gact pass index 1 action gact pass index 2 action gact pass index 3 action gact pass index 4 action gact pass index 5 action gact pass index 6 action gact pass index 7 action gact pass index 8 action gact pass index 9 action gact pass index 10 action gact pass index 11 action gact pass index 12 action gact pass index 13 action gact pass index 14 action gact pass index 15 action gact pass index 16 action gact pass index 17 action gact pass index 18 action gact pass index 19 action gact pass index 20 action gact pass index 21 action gact pass index 22 action gact pass index 23 action gact pass index 24 action gact pass index 25 action gact pass index 26 action gact pass index 27 action gact pass index 28 action gact pass index 29 action gact pass index 30 action gact pass index 31 action gact pass index 32" + }, + "cmd": "tc actions add action gact pass index 1 action gact pass index 2 action gact pass index 3 action gact pass index 4 action gact pass index 5 action gact pass index 6 action gact pass index 7 action gact pass index 8 action gact pass index 9 action gact pass index 10 action gact pass index 11 action gact pass index 12 action gact pass index 13 action gact pass index 14 action gact pass index 15 action gact pass index 16 action gact pass index 17 action gact pass index 18 action gact pass index 19 action gact pass index 20 action gact pass index 21 action gact pass index 22 action gact pass index 23 action gact pass index 24 action gact pass index 25 action gact pass index 26 action gact pass index 27 action gact pass index 28 action gact pass index 29 action gact pass index 30 action gact pass index 31 action gact pass index 32", + "desc": "boundary: opt=plain cmd=fr32:actions_add_action_gact_pass_index_1_action_gact_pass_index_2_action_gact_pass_index_3_action_gact_pass_index_4_action_gact_pass_index_5_action_gact_pass_index_6_action_gact_pass_index_7_action_gact_pass_index_8_action_gact_pass_index_9_action_gact_pass_index_10_action_gact_pass_index_11_action_gact_pass_index_12_action_gact_pass_index_13_action_gact_pass_index_14_action_gact_pass_index_15_action_gact_pass_index_16_action_gact_pass_index_17_action_gact_pass_index_18_action_gact_pass_index_19_action_gact_pass_index_20_action_gact_pass_index_21_action_gact_pass_index_22_action_gact_pass_index_23_action_gact_pass_index_24_action_gact_pass_index_25_action_gact_pass_index_26_action_gact_pass_index_27_action_gact_pass_index_28_action_gact_pass_index_29_action_gact_pass_index_30_action_gact_pass_index_31_action_gact_pass_index_32", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-230", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/dump.out new file mode 100644 index 000000000..df76045b7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/dump.out @@ -0,0 +1,194 @@ +total acts 22 + + action order 0: gact action pass + random type none pass val 0 + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 1: gact action pass + random type none pass val 0 + index 2 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 2: gact action pass + random type none pass val 0 + index 3 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 3: gact action pass + random type none pass val 0 + index 4 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 4: gact action pass + random type none pass val 0 + index 5 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 5: gact action pass + random type none pass val 0 + index 6 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 6: gact action pass + random type none pass val 0 + index 7 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 7: gact action pass + random type none pass val 0 + index 8 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 8: gact action pass + random type none pass val 0 + index 9 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 9: gact action pass + random type none pass val 0 + index 10 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 10: gact action pass + random type none pass val 0 + index 11 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 11: gact action pass + random type none pass val 0 + index 12 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 12: gact action pass + random type none pass val 0 + index 13 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 13: gact action pass + random type none pass val 0 + index 14 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 14: gact action pass + random type none pass val 0 + index 15 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 15: gact action pass + random type none pass val 0 + index 16 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 16: gact action pass + random type none pass val 0 + index 17 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 17: gact action pass + random type none pass val 0 + index 18 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 18: gact action pass + random type none pass val 0 + index 19 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 19: gact action pass + random type none pass val 0 + index 20 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 20: gact action pass + random type none pass val 0 + index 21 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 21: gact action pass + random type none pass val 0 + index 22 ref 1 bind 0 + not_in_hw + used_hw_stats disabled +total acts 10 + + action order 0: gact action pass + random type none pass val 0 + index 23 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 1: gact action pass + random type none pass val 0 + index 24 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 2: gact action pass + random type none pass val 0 + index 25 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 3: gact action pass + random type none pass val 0 + index 26 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 4: gact action pass + random type none pass val 0 + index 27 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 5: gact action pass + random type none pass val 0 + index 28 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 6: gact action pass + random type none pass val 0 + index 29 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 7: gact action pass + random type none pass val 0 + index 30 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 8: gact action pass + random type none pass val 0 + index 31 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 9: gact action pass + random type none pass val 0 + index 32 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/ip.pcap new file mode 100644 index 000000000..51c7148fd Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/netlink_route_dump.pcap new file mode 100644 index 000000000..91ff5fd58 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-230/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/cmd.json new file mode 100644 index 000000000..64eacffc8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/cmd.json @@ -0,0 +1,110 @@ +{ + "axes": { + "fix": "w179", + "json": "0", + "words": "actions delete action gact index 1 action gact index 2 action gact index 3 action gact index 4 action gact index 5 action gact index 6 action gact index 7 action gact index 8 action gact index 9 action gact index 10 action gact index 11 action gact index 12 action gact index 13 action gact index 14 action gact index 15 action gact index 16 action gact index 17 action gact index 18 action gact index 19 action gact index 20 action gact index 21 action gact index 22 action gact index 23 action gact index 24 action gact index 25 action gact index 26 action gact index 27 action gact index 28 action gact index 29 action gact index 30 action gact index 31 action gact index 32 action gact index 33" + }, + "cmd": "tc actions delete action gact index 1 action gact index 2 action gact index 3 action gact index 4 action gact index 5 action gact index 6 action gact index 7 action gact index 8 action gact index 9 action gact index 10 action gact index 11 action gact index 12 action gact index 13 action gact index 14 action gact index 15 action gact index 16 action gact index 17 action gact index 18 action gact index 19 action gact index 20 action gact index 21 action gact index 22 action gact index 23 action gact index 24 action gact index 25 action gact index 26 action gact index 27 action gact index 28 action gact index 29 action gact index 30 action gact index 31 action gact index 32 action gact index 33", + "desc": "boundary: opt=plain cmd=w179:actions_delete_action_gact_index_1_action_gact_index_2_action_gact_index_3_action_gact_index_4_action_gact_index_5_action_gact_index_6_action_gact_index_7_action_gact_index_8_action_gact_index_9_action_gact_index_10_action_gact_index_11_action_gact_index_12_action_gact_index_13_action_gact_index_14_action_gact_index_15_action_gact_index_16_action_gact_index_17_action_gact_index_18_action_gact_index_19_action_gact_index_20_action_gact_index_21_action_gact_index_22_action_gact_index_23_action_gact_index_24_action_gact_index_25_action_gact_index_26_action_gact_index_27_action_gact_index_28_action_gact_index_29_action_gact_index_30_action_gact_index_31_action_gact_index_32_action_gact_index_33", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-231", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action gact pass index 1 action gact pass index 2 action gact pass index 3 action gact pass index 4 action gact pass index 5 action gact pass index 6 action gact pass index 7 action gact pass index 8 action gact pass index 9 action gact pass index 10 action gact pass index 11 action gact pass index 12 action gact pass index 13 action gact pass index 14 action gact pass index 15 action gact pass index 16 action gact pass index 17 action gact pass index 18 action gact pass index 19 action gact pass index 20 action gact pass index 21 action gact pass index 22 action gact pass index 23 action gact pass index 24 action gact pass index 25 action gact pass index 26 action gact pass index 27 action gact pass index 28 action gact pass index 29 action gact pass index 30 action gact pass index 31 action gact pass index 32", + "tc actions add action gact pass index 33" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action gact pass index 1 action gact pass index 2 action gact pass index 3 action gact pass index 4 action gact pass index 5 action gact pass index 6 action gact pass index 7 action gact pass index 8 action gact pass index 9 action gact pass index 10 action gact pass index 11 action gact pass index 12 action gact pass index 13 action gact pass index 14 action gact pass index 15 action gact pass index 16 action gact pass index 17 action gact pass index 18 action gact pass index 19 action gact pass index 20 action gact pass index 21 action gact pass index 22 action gact pass index 23 action gact pass index 24 action gact pass index 25 action gact pass index 26 action gact pass index 27 action gact pass index 28 action gact pass index 29 action gact pass index 30 action gact pass index 31 action gact pass index 32", + "rc": 0 + }, + { + "cmd": "tc actions add action gact pass index 33", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/dump.out new file mode 100644 index 000000000..55ee9b6d0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/dump.out @@ -0,0 +1,7 @@ +total acts 1 + + action order 0: gact action pass + random type none pass val 0 + index 33 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/ip.pcap new file mode 100644 index 000000000..54f7f553c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/netlink_route_dump.pcap new file mode 100644 index 000000000..ecbf19b16 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-231/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/cmd.json new file mode 100644 index 000000000..f146bb54b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "fr", + "json": "0", + "words": "actions add action simple sdata a index 1 action simple sdata b index 2" + }, + "cmd": "tc actions add action simple sdata a index 1 action simple sdata b index 2", + "desc": "positive: opt=plain cmd=fr:actions_add_action_simple_sdata_a_index_1_action_simple_sdata_b_index_2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-232", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action simple", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/dump.out new file mode 100644 index 000000000..6745ffac2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/dump.out @@ -0,0 +1,9 @@ +total acts 2 + + action order 0: Simple + index 1 ref 1 bind 0 + not_in_hw + + action order 1: Simple + index 2 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/ip.pcap new file mode 100644 index 000000000..6a73b9929 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/netlink_route_dump.pcap new file mode 100644 index 000000000..071076685 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-232/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-233/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-233/cmd.json new file mode 100644 index 000000000..44cebd9a8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-233/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "fr-del2", + "json": "0", + "words": "actions delete action gact index 1 action gact index 2" + }, + "cmd": "tc actions delete action gact index 1 action gact index 2", + "desc": "positive: opt=plain cmd=fr-del2:actions_delete_action_gact_index_1_action_gact_index_2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-233", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action gact pass index 1 action gact drop index 2" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action gact pass index 1 action gact drop index 2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-233/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-233/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-233/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-233/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-233/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-233/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-233/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-233/ip.pcap new file mode 100644 index 000000000..09accd89a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-233/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-233/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-233/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-233/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-233/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-233/netlink_route_dump.pcap new file mode 100644 index 000000000..c02560b1e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-233/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-234/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-234/cmd.json new file mode 100644 index 000000000..14e4f50cc --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-234/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "fr-del-mixed", + "json": "0", + "words": "actions delete action gact index 1 action police index 1" + }, + "cmd": "tc actions delete action gact index 1 action police index 1", + "desc": "positive: opt=plain cmd=fr-del-mixed:actions_delete_action_gact_index_1_action_police_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-234", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action gact pass index 1 action police rate 1mbit burst 10k index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action gact pass index 1 action police rate 1mbit burst 10k index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-234/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-234/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-234/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-234/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-234/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-234/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-234/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-234/ip.pcap new file mode 100644 index 000000000..0ee006698 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-234/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-234/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-234/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-234/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-234/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-234/netlink_route_dump.pcap new file mode 100644 index 000000000..eb25a4acc Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-234/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-235/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-235/cmd.json new file mode 100644 index 000000000..33e0bd47a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-235/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "fr-del-abbrev", + "json": "0", + "words": "actions del action gact index 1" + }, + "cmd": "tc actions del action gact index 1", + "desc": "positive: opt=plain cmd=fr-del-abbrev:actions_del_action_gact_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-235", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action gact pass index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action gact pass index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-235/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-235/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-235/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-235/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-235/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-235/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-235/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-235/ip.pcap new file mode 100644 index 000000000..c8320cc45 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-235/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-235/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-235/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-235/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-235/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-235/netlink_route_dump.pcap new file mode 100644 index 000000000..0439eefd1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-235/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/cmd.json new file mode 100644 index 000000000..7cb6d37b3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "w177", + "json": "0", + "words": "actions add action get action gact index 1" + }, + "cmd": "tc actions add action get action gact index 1", + "desc": "corner: opt=plain cmd=w177:actions_add_action_get_action_gact_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-236", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action gact pass index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action gact pass index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/dump.out new file mode 100644 index 000000000..440c799e8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/dump.out @@ -0,0 +1,7 @@ +total acts 1 + + action order 0: gact action pass + random type none pass val 0 + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/ip.out new file mode 100644 index 000000000..abe7eb5ed --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/ip.out @@ -0,0 +1,6 @@ +total acts 0 + + action order 1: gact action pass + random type none pass val 0 + index 1 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/ip.pcap new file mode 100644 index 000000000..1809fd4f6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/netlink_route_dump.pcap new file mode 100644 index 000000000..93d62f335 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-236/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-237/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-237/cmd.json new file mode 100644 index 000000000..56a573fe3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-237/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "w180", + "json": "0", + "words": "actions flush action gact since 1000" + }, + "cmd": "tc actions flush action gact since 1000", + "desc": "corner: opt=plain cmd=w180:actions_flush_action_gact_since_1000", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-237", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action gact pass index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action gact pass index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-237/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-237/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-237/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-237/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-237/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-237/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-237/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-237/ip.pcap new file mode 100644 index 000000000..07867ce0e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-237/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-237/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-237/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-237/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-237/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-237/netlink_route_dump.pcap new file mode 100644 index 000000000..0f1fa9a2a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-237/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-238/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-238/cmd.json new file mode 100644 index 000000000..20af6eb34 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-238/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "w181", + "json": "0", + "words": "actions flush foo gact" + }, + "cmd": "tc actions flush foo gact", + "desc": "corner: opt=plain cmd=w181:actions_flush_foo_gact", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-238", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action gact pass index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action gact pass index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-238/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-238/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-238/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-238/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-238/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-238/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-238/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-238/ip.pcap new file mode 100644 index 000000000..6cb5a53c1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-238/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-238/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-238/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-238/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-238/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-238/netlink_route_dump.pcap new file mode 100644 index 000000000..aa7119294 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-238/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/cmd.json new file mode 100644 index 000000000..c57af7918 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w182", + "json": "0", + "words": "actions flush action nosuch" + }, + "cmd": "tc actions flush action nosuch", + "desc": "corner: opt=plain cmd=w182:actions_flush_action_nosuch", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-239", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/ip.err new file mode 100644 index 000000000..1de7c2ef4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/ip.err @@ -0,0 +1 @@ +bad action nosuch diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/netlink_route_dump.pcap new file mode 100644 index 000000000..a464f7118 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-239/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-240/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-240/cmd.json new file mode 100644 index 000000000..1bd4e2146 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-240/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "flush-empty", + "json": "0", + "words": "actions flush action gact" + }, + "cmd": "tc actions flush action gact", + "desc": "corner: opt=plain cmd=flush-empty:actions_flush_action_gact", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-240", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-240/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-240/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-240/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-240/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-240/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-240/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-240/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-240/ip.pcap new file mode 100644 index 000000000..8a0871baf Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-240/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-240/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-240/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-240/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-240/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-240/netlink_route_dump.pcap new file mode 100644 index 000000000..98dc30459 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-240/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-241/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-241/cmd.json new file mode 100644 index 000000000..8e6da648d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-241/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w186", + "json": "0", + "words": "actions" + }, + "cmd": "tc actions", + "desc": "corner: opt=plain cmd=w186:actions", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-241", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-241/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-241/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-241/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-241/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-241/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-241/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-241/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-241/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-241/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-241/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-241/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-241/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-241/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-241/netlink_route_dump.pcap new file mode 100644 index 000000000..fea5b22b8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-241/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-242/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-242/cmd.json new file mode 100644 index 000000000..0eb2b13db --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-242/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "two-cmds", + "json": "0", + "words": "actions add action gact drop index 1 delete action gact index 1" + }, + "cmd": "tc actions add action gact drop index 1 delete action gact index 1", + "desc": "corner: opt=plain cmd=two-cmds:actions_add_action_gact_drop_index_1_delete_action_gact_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-242", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-242/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-242/dump.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-242/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-242/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-242/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-242/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-242/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-242/ip.pcap new file mode 100644 index 000000000..7503d8033 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-242/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-242/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-242/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-242/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-242/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-242/netlink_route_dump.pcap new file mode 100644 index 000000000..28cba0624 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-242/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/cmd.json new file mode 100644 index 000000000..854fc454f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "two-adds", + "json": "0", + "words": "actions add action gact drop index 1 add action gact pass index 2" + }, + "cmd": "tc actions add action gact drop index 1 add action gact pass index 2", + "desc": "corner: opt=plain cmd=two-adds:actions_add_action_gact_drop_index_1_add_action_gact_pass_index_2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-243", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/dump.out new file mode 100644 index 000000000..20bc84c27 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/dump.out @@ -0,0 +1,13 @@ +total acts 2 + + action order 0: gact action drop + random type none pass val 0 + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled + + action order 1: gact action pass + random type none pass val 0 + index 2 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/ip.pcap new file mode 100644 index 000000000..76a74a2db Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/netlink_route_dump.pcap new file mode 100644 index 000000000..6c3e9f555 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-243/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/cmd.json new file mode 100644 index 000000000..b1bb59542 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "f-police", + "json": "0", + "words": "filter add dev d0 egress pref 1 protocol all handle 1 matchall action police rate 1mbit burst 10k" + }, + "cmd": "tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action police rate 1mbit burst 10k", + "desc": "positive: opt=plain cmd=f-police:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_police_rate_1mbit_burst_10k", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-244", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 egress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/dump.out new file mode 100644 index 000000000..721499859 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/dump.out @@ -0,0 +1,6 @@ +filter protocol all pref 1 matchall chain 0 +filter protocol all pref 1 matchall chain 0 handle 0x1 + not_in_hw + action order 1: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 0b linklayer ethernet + ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/ip.pcap new file mode 100644 index 000000000..50c364ac8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/netlink_route_dump.pcap new file mode 100644 index 000000000..bdc50503d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-244/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/cmd.json new file mode 100644 index 000000000..014be071f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "f-mirred", + "json": "0", + "words": "filter add dev d0 egress pref 1 protocol all handle 1 matchall action mirred egress redirect dev d1" + }, + "cmd": "tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action mirred egress redirect dev d1", + "desc": "positive: opt=plain cmd=f-mirred:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_mirred_egress_redirect_dev_d1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-245", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 egress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/dump.out new file mode 100644 index 000000000..57ddfb22f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/dump.out @@ -0,0 +1,6 @@ +filter protocol all pref 1 matchall chain 0 +filter protocol all pref 1 matchall chain 0 handle 0x1 + not_in_hw + action order 1: mirred (Egress Redirect to device d1) stolen + index 1 ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/ip.pcap new file mode 100644 index 000000000..7e76d0c21 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/netlink_route_dump.pcap new file mode 100644 index 000000000..8707710d6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-245/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/cmd.json new file mode 100644 index 000000000..cabff6d91 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "f-skbedit", + "json": "0", + "words": "filter add dev d0 egress pref 1 protocol all handle 1 matchall action skbedit mark 5" + }, + "cmd": "tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action skbedit mark 5", + "desc": "positive: opt=plain cmd=f-skbedit:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_skbedit_mark_5", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-246", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 egress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/dump.out new file mode 100644 index 000000000..ed3d4e178 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/dump.out @@ -0,0 +1,6 @@ +filter protocol all pref 1 matchall chain 0 +filter protocol all pref 1 matchall chain 0 handle 0x1 + not_in_hw + action order 1: skbedit mark 5 pipe + index 1 ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/ip.pcap new file mode 100644 index 000000000..01a61002d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/netlink_route_dump.pcap new file mode 100644 index 000000000..6da30fee6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-246/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/cmd.json new file mode 100644 index 000000000..d871e27f6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "f-vlan", + "json": "0", + "words": "filter add dev d0 egress pref 1 protocol all handle 1 matchall action vlan pop" + }, + "cmd": "tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action vlan pop", + "desc": "positive: opt=plain cmd=f-vlan:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_vlan_pop", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-247", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 egress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/dump.out new file mode 100644 index 000000000..757eafc59 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/dump.out @@ -0,0 +1,6 @@ +filter protocol all pref 1 matchall chain 0 +filter protocol all pref 1 matchall chain 0 handle 0x1 + not_in_hw + action order 1: vlan pop pipe + index 1 ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/ip.pcap new file mode 100644 index 000000000..aa8862665 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/netlink_route_dump.pcap new file mode 100644 index 000000000..3eba33ecf Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-247/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/cmd.json new file mode 100644 index 000000000..0ae577626 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "f-csum", + "json": "0", + "words": "filter add dev d0 egress pref 1 protocol all handle 1 matchall action csum iph" + }, + "cmd": "tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action csum iph", + "desc": "positive: opt=plain cmd=f-csum:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_csum_iph", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-248", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 egress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/dump.out new file mode 100644 index 000000000..465f243e5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/dump.out @@ -0,0 +1,6 @@ +filter protocol all pref 1 matchall chain 0 +filter protocol all pref 1 matchall chain 0 handle 0x1 + not_in_hw + action order 1: csum (iph) action pass + index 1 ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/ip.pcap new file mode 100644 index 000000000..1b3abcded Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/netlink_route_dump.pcap new file mode 100644 index 000000000..52483eb58 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-248/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/cmd.json new file mode 100644 index 000000000..dd419449a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "f-nat", + "json": "0", + "words": "filter add dev d0 egress pref 1 protocol all handle 1 matchall action nat ingress 10.0.0.0/8 192.168.0.1" + }, + "cmd": "tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action nat ingress 10.0.0.0/8 192.168.0.1", + "desc": "positive: opt=plain cmd=f-nat:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_nat_ingress_10.0.0.0/8_192.168.0.1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-249", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 egress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/dump.out new file mode 100644 index 000000000..7b7f9a09d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/dump.out @@ -0,0 +1,6 @@ +filter protocol all pref 1 matchall chain 0 +filter protocol all pref 1 matchall chain 0 handle 0x1 + not_in_hw + action order 1: nat ingress 10.0.0.0/8 192.168.0.1 pass + index 1 ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/ip.pcap new file mode 100644 index 000000000..8fa8aa574 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/netlink_route_dump.pcap new file mode 100644 index 000000000..ae3fc5e7c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-249/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/cmd.json new file mode 100644 index 000000000..2229c1f03 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "f-simple", + "json": "0", + "words": "filter add dev d0 egress pref 1 protocol all handle 1 matchall action simple sdata hello" + }, + "cmd": "tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action simple sdata hello", + "desc": "positive: opt=plain cmd=f-simple:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_simple_sdata_hello", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-250", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 egress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/dump.out new file mode 100644 index 000000000..5971c5ef2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/dump.out @@ -0,0 +1,6 @@ +filter protocol all pref 1 matchall chain 0 +filter protocol all pref 1 matchall chain 0 handle 0x1 + not_in_hw + action order 1: Simple + index 1 ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/ip.pcap new file mode 100644 index 000000000..300280591 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/netlink_route_dump.pcap new file mode 100644 index 000000000..8e0a0dd11 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-250/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/cmd.json new file mode 100644 index 000000000..558015f9b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "f-connmark", + "json": "0", + "words": "filter add dev d0 egress pref 1 protocol all handle 1 matchall action connmark zone 5" + }, + "cmd": "tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action connmark zone 5", + "desc": "positive: opt=plain cmd=f-connmark:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_connmark_zone_5", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-251", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 egress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/dump.out new file mode 100644 index 000000000..3ed73aee4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/dump.out @@ -0,0 +1,6 @@ +filter protocol all pref 1 matchall chain 0 +filter protocol all pref 1 matchall chain 0 handle 0x1 + not_in_hw + action order 1: connmark zone 5 pipe + index 1 ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/ip.pcap new file mode 100644 index 000000000..fa00f3c78 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/netlink_route_dump.pcap new file mode 100644 index 000000000..ebbb78308 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-251/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/cmd.json new file mode 100644 index 000000000..1b9eb85d3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "f-ctinfo", + "json": "0", + "words": "filter add dev d0 egress pref 1 protocol all handle 1 matchall action ctinfo dscp 0xfc000000" + }, + "cmd": "tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action ctinfo dscp 0xfc000000", + "desc": "positive: opt=plain cmd=f-ctinfo:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_ctinfo_dscp_0xfc000000", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-252", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 egress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/dump.out new file mode 100644 index 000000000..89bcd7a1f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/dump.out @@ -0,0 +1,6 @@ +filter protocol all pref 1 matchall chain 0 +filter protocol all pref 1 matchall chain 0 handle 0x1 + not_in_hw + action order 1: ctinfo zone 0 pipe + index 1 ref 1 bind 1 dscp 0xfc000000 0000000000 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/ip.pcap new file mode 100644 index 000000000..3442ab14e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/netlink_route_dump.pcap new file mode 100644 index 000000000..0d830369e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-252/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/cmd.json new file mode 100644 index 000000000..45eb78e4e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "f-sample", + "json": "0", + "words": "filter add dev d0 egress pref 1 protocol all handle 1 matchall action sample rate 100 group 5" + }, + "cmd": "tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action sample rate 100 group 5", + "desc": "positive: opt=plain cmd=f-sample:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_sample_rate_100_group_5", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-253", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 egress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/dump.out new file mode 100644 index 000000000..cf9de2a5a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/dump.out @@ -0,0 +1,6 @@ +filter protocol all pref 1 matchall chain 0 +filter protocol all pref 1 matchall chain 0 handle 0x1 + not_in_hw + action order 1: sample rate 1/100 group 5 pipe + index 1 ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/ip.pcap new file mode 100644 index 000000000..acc445f63 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/netlink_route_dump.pcap new file mode 100644 index 000000000..638dada1f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-253/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/cmd.json new file mode 100644 index 000000000..8acca01bf --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "f-skbmod", + "json": "0", + "words": "filter add dev d0 egress pref 1 protocol all handle 1 matchall action skbmod swap mac" + }, + "cmd": "tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action skbmod swap mac", + "desc": "positive: opt=plain cmd=f-skbmod:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_skbmod_swap_mac", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-254", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 egress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/dump.out new file mode 100644 index 000000000..d7bb105e0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/dump.out @@ -0,0 +1,6 @@ +filter protocol all pref 1 matchall chain 0 +filter protocol all pref 1 matchall chain 0 handle 0x1 + not_in_hw + action order 1: skbmod pipe swap mac + index 1 ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/ip.pcap new file mode 100644 index 000000000..fde5768da Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/netlink_route_dump.pcap new file mode 100644 index 000000000..3ba538e47 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-254/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/cmd.json new file mode 100644 index 000000000..035a347e6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "f-mpls", + "json": "0", + "words": "filter add dev d0 egress pref 1 protocol all handle 1 matchall action mpls pop protocol ipv4" + }, + "cmd": "tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action mpls pop protocol ipv4", + "desc": "positive: opt=plain cmd=f-mpls:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_mpls_pop_protocol_ipv4", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-255", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 egress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/dump.out new file mode 100644 index 000000000..641d36ddb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/dump.out @@ -0,0 +1,6 @@ +filter protocol all pref 1 matchall chain 0 +filter protocol all pref 1 matchall chain 0 handle 0x1 + not_in_hw + action order 1: mpls pop protocol ip pipe + index 1 ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/ip.pcap new file mode 100644 index 000000000..bd76b77bd Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/netlink_route_dump.pcap new file mode 100644 index 000000000..067c575a3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-255/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/cmd.json new file mode 100644 index 000000000..203b49ff9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "f-u32", + "json": "0", + "words": "filter add dev d0 ingress pref 12 protocol ip handle 800::1 u32 match ip src 10.0.0.0/8 action skbedit mark 1 action mirred egress mirror dev d1" + }, + "cmd": "tc filter add dev d0 ingress pref 12 protocol ip handle 800::1 u32 match ip src 10.0.0.0/8 action skbedit mark 1 action mirred egress mirror dev d1", + "desc": "positive: opt=plain cmd=f-u32:filter_add_dev_d0_ingress_pref_12_protocol_ip_handle_800::1_u32_match_ip_src_10.0.0.0/8_action_skbedit_mark_1_action_mirred_egress_mirror_dev_d1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-256", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 ingress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/dump.out new file mode 100644 index 000000000..11e241a18 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/dump.out @@ -0,0 +1,10 @@ +filter protocol ip pref 12 u32 chain 0 +filter protocol ip pref 12 u32 chain 0 fh 800: ht divisor 1 +filter protocol ip pref 12 u32 chain 0 fh 800::1 order 1 key ht 800 bkt 0 terminal flowid not_in_hw + match 0a000000/ff000000 at 12 + action order 1: skbedit mark 1 pipe + index 1 ref 1 bind 1 + + action order 2: mirred (Egress Mirror to device d1) pipe + index 1 ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/ip.pcap new file mode 100644 index 000000000..712116e53 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/netlink_route_dump.pcap new file mode 100644 index 000000000..357dbca6d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-256/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/cmd.json new file mode 100644 index 000000000..be5d819ea --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "f-list", + "json": "0", + "words": "filter add dev d0 egress pref 1 protocol all handle 1 matchall action police rate 1mbit burst 10k action vlan push id 5 action csum iph action nat egress 10.0.0.1 10.0.0.2" + }, + "cmd": "tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action police rate 1mbit burst 10k action vlan push id 5 action csum iph action nat egress 10.0.0.1 10.0.0.2", + "desc": "positive: opt=plain cmd=f-list:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_police_rate_1mbit_burst_10k_action_vlan_push_id_5_action_csum_iph_action_nat_egress_10.0.0.1_10.0.0.2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-257", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 egress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/dump.out new file mode 100644 index 000000000..4c5eb4959 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/dump.out @@ -0,0 +1,15 @@ +filter protocol all pref 1 matchall chain 0 +filter protocol all pref 1 matchall chain 0 handle 0x1 + not_in_hw + action order 1: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 0b linklayer ethernet + ref 1 bind 1 + + action order 2: vlan push id 5 protocol 802.1Q priority 0 pipe + index 1 ref 1 bind 1 + + action order 3: csum (iph) action pass + index 1 ref 1 bind 1 + + action order 4: nat egress 10.0.0.1/32 10.0.0.2 pass + index 1 ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/ip.pcap new file mode 100644 index 000000000..f9b1fa917 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/netlink_route_dump.pcap new file mode 100644 index 000000000..065c7e964 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-257/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/cmd.json new file mode 100644 index 000000000..00606cdac --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "f-bind", + "json": "0", + "words": "filter add dev d0 egress pref 1 protocol all handle 1 matchall action police index 1" + }, + "cmd": "tc filter add dev d0 egress pref 1 protocol all handle 1 matchall action police index 1", + "desc": "positive: opt=plain cmd=f-bind:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_matchall_action_police_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-258", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action police rate 1mbit burst 10k index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 egress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action police rate 1mbit burst 10k index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/dump.out new file mode 100644 index 000000000..e8e0c86ce --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/dump.out @@ -0,0 +1,6 @@ +filter protocol all pref 1 matchall chain 0 +filter protocol all pref 1 matchall chain 0 handle 0x1 + not_in_hw + action order 1: police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 0b linklayer ethernet + ref 2 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/ip.pcap new file mode 100644 index 000000000..6dec604c4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/netlink_route_dump.pcap new file mode 100644 index 000000000..5cff49f70 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-258/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/cmd.json new file mode 100644 index 000000000..2d84320ad --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "fp-basic", + "json": "0", + "words": "filter add dev d0 ingress pref 1 protocol all handle 1 basic police rate 1mbit burst 10k drop" + }, + "cmd": "tc filter add dev d0 ingress pref 1 protocol all handle 1 basic police rate 1mbit burst 10k drop", + "desc": "positive: opt=plain cmd=fp-basic:filter_add_dev_d0_ingress_pref_1_protocol_all_handle_1_basic_police_rate_1mbit_burst_10k_drop", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-259", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 ingress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/dump.out new file mode 100644 index 000000000..fa72256d0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/dump.out @@ -0,0 +1,5 @@ +filter protocol all pref 1 basic chain 0 +filter protocol all pref 1 basic chain 0 handle 0x1 + police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action drop overhead 0b linklayer ethernet + ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/ip.pcap new file mode 100644 index 000000000..7afc6237a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/netlink_route_dump.pcap new file mode 100644 index 000000000..27177fe97 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-259/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/cmd.json new file mode 100644 index 000000000..13bdba1a9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "fp-cgroup", + "json": "0", + "words": "filter add dev d0 egress pref 1 protocol all handle 1 cgroup police rate 1mbit burst 10k drop" + }, + "cmd": "tc filter add dev d0 egress pref 1 protocol all handle 1 cgroup police rate 1mbit burst 10k drop", + "desc": "positive: opt=plain cmd=fp-cgroup:filter_add_dev_d0_egress_pref_1_protocol_all_handle_1_cgroup_police_rate_1mbit_burst_10k_drop", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-260", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 egress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/dump.out new file mode 100644 index 000000000..d095e8ea0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/dump.out @@ -0,0 +1,5 @@ +filter protocol all pref 1 cgroup chain 0 +filter protocol all pref 1 cgroup chain 0 handle 0x1 + police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action drop overhead 0b linklayer ethernet + ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/ip.pcap new file mode 100644 index 000000000..4a55291b5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/netlink_route_dump.pcap new file mode 100644 index 000000000..7a65790a0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-260/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/cmd.json new file mode 100644 index 000000000..472a78ce0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "fp-fw", + "json": "0", + "words": "filter add dev d1 parent 1: pref 40 protocol ip handle 5 fw police rate 1mbit burst 10k drop" + }, + "cmd": "tc filter add dev d1 parent 1: pref 40 protocol ip handle 5 fw police rate 1mbit burst 10k drop", + "desc": "positive: opt=plain cmd=fp-fw:filter_add_dev_d1_parent_1:_pref_40_protocol_ip_handle_5_fw_police_rate_1mbit_burst_10k_drop", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-261", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d1 parent 1:", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/dump.out new file mode 100644 index 000000000..609d8dcb5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/dump.out @@ -0,0 +1,4 @@ +filter protocol ip pref 40 fw chain 0 +filter protocol ip pref 40 fw chain 0 handle 0x5 police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action drop overhead 0b linklayer ethernet + ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/ip.pcap new file mode 100644 index 000000000..08803e259 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/netlink_route_dump.pcap new file mode 100644 index 000000000..8da09882d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-261/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/cmd.json new file mode 100644 index 000000000..07eefb77d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "fp-route", + "json": "0", + "words": "filter add dev d1 parent 1: pref 41 protocol ip route to 5 police rate 1mbit burst 10k drop" + }, + "cmd": "tc filter add dev d1 parent 1: pref 41 protocol ip route to 5 police rate 1mbit burst 10k drop", + "desc": "positive: opt=plain cmd=fp-route:filter_add_dev_d1_parent_1:_pref_41_protocol_ip_route_to_5_police_rate_1mbit_burst_10k_drop", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-262", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d1 parent 1:", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/dump.out new file mode 100644 index 000000000..17b6b16e3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/dump.out @@ -0,0 +1,4 @@ +filter protocol ip pref 41 route chain 0 +filter protocol ip pref 41 route chain 0 fh 0xffff0005 to 5 police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action drop overhead 0b linklayer ethernet + ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/ip.pcap new file mode 100644 index 000000000..0b43957e8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/netlink_route_dump.pcap new file mode 100644 index 000000000..3503b90f8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-262/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/cmd.json new file mode 100644 index 000000000..6180fd0c4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "fp-u32", + "json": "0", + "words": "filter add dev d0 ingress pref 12 protocol ip u32 match ip src 10.0.0.0/8 police rate 1mbit burst 10k drop" + }, + "cmd": "tc filter add dev d0 ingress pref 12 protocol ip u32 match ip src 10.0.0.0/8 police rate 1mbit burst 10k drop", + "desc": "positive: opt=plain cmd=fp-u32:filter_add_dev_d0_ingress_pref_12_protocol_ip_u32_match_ip_src_10.0.0.0/8_police_rate_1mbit_burst_10k_drop", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-263", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 ingress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/dump.out new file mode 100644 index 000000000..00e52fe69 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/dump.out @@ -0,0 +1,7 @@ +filter protocol ip pref 12 u32 chain 0 +filter protocol ip pref 12 u32 chain 0 fh 800: ht divisor 1 +filter protocol ip pref 12 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 terminal flowid not_in_hw + match 0a000000/ff000000 at 12 + police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action drop overhead 0b linklayer ethernet + ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/ip.pcap new file mode 100644 index 000000000..2db75c074 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/netlink_route_dump.pcap new file mode 100644 index 000000000..5253b6e32 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-263/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/cmd.json new file mode 100644 index 000000000..ee7ae69c3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "fp-flow", + "json": "0", + "words": "filter add dev d1 parent 1: pref 30 protocol ip handle 1 flow hash keys dst divisor 8 police rate 1mbit burst 10k drop" + }, + "cmd": "tc filter add dev d1 parent 1: pref 30 protocol ip handle 1 flow hash keys dst divisor 8 police rate 1mbit burst 10k drop", + "desc": "positive: opt=plain cmd=fp-flow:filter_add_dev_d1_parent_1:_pref_30_protocol_ip_handle_1_flow_hash_keys_dst_divisor_8_police_rate_1mbit_burst_10k_drop", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-264", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d1 parent 1:", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/dump.out new file mode 100644 index 000000000..9e95c9374 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/dump.out @@ -0,0 +1,4 @@ +filter protocol ip pref 30 flow chain 0 +filter protocol ip pref 30 flow chain 0 handle 0x1 hash keys dst divisor 8 baseclass 1:1 police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action drop overhead 0b linklayer ethernet + ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/ip.pcap new file mode 100644 index 000000000..93a697306 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/netlink_route_dump.pcap new file mode 100644 index 000000000..509998951 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-264/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/cmd.json new file mode 100644 index 000000000..ac0968750 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "fp-act", + "json": "0", + "words": "filter add dev d0 ingress pref 1 protocol all handle 1 basic police rate 1mbit burst 10k drop action pass" + }, + "cmd": "tc filter add dev d0 ingress pref 1 protocol all handle 1 basic police rate 1mbit burst 10k drop action pass", + "desc": "positive: opt=plain cmd=fp-act:filter_add_dev_d0_ingress_pref_1_protocol_all_handle_1_basic_police_rate_1mbit_burst_10k_drop_action_pass", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-265", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 ingress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/dump.out new file mode 100644 index 000000000..fa72256d0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/dump.out @@ -0,0 +1,5 @@ +filter protocol all pref 1 basic chain 0 +filter protocol all pref 1 basic chain 0 handle 0x1 + police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action drop overhead 0b linklayer ethernet + ref 1 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/ip.pcap new file mode 100644 index 000000000..552bc1a24 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/netlink_route_dump.pcap new file mode 100644 index 000000000..59548e1c8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-265/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/cmd.json new file mode 100644 index 000000000..2eea94ac8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/cmd.json @@ -0,0 +1,105 @@ +{ + "axes": { + "fix": "fp-index", + "json": "0", + "words": "filter add dev d0 ingress pref 1 protocol all handle 1 basic police index 1" + }, + "cmd": "tc filter add dev d0 ingress pref 1 protocol all handle 1 basic police index 1", + "desc": "positive: opt=plain cmd=fp-index:filter_add_dev_d0_ingress_pref_1_protocol_all_handle_1_basic_police_index_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-266", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action police rate 1mbit burst 10k index 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d filter show dev d0 ingress", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action police rate 1mbit burst 10k index 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/dump.out new file mode 100644 index 000000000..68012f2fd --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/dump.out @@ -0,0 +1,5 @@ +filter protocol all pref 1 basic chain 0 +filter protocol all pref 1 basic chain 0 handle 0x1 + police 0x1 rate 1Mbit burst 10Kb mtu 2Kb action reclassify overhead 0b linklayer ethernet + ref 2 bind 1 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/ip.pcap new file mode 100644 index 000000000..495513e78 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/netlink_route_dump.pcap new file mode 100644 index 000000000..d0e328c52 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-266/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/b.txt b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/b.txt new file mode 100644 index 000000000..c7377d7c8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/b.txt @@ -0,0 +1,2 @@ +actions add action gact drop index 1 +actions add action police rate 1mbit burst 10k index 1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/cmd.json new file mode 100644 index 000000000..c4278c7d0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/cmd.json @@ -0,0 +1,106 @@ +{ + "axes": { + "batch": "two", + "fix": "batch", + "json": "0", + "words": "-batch b.txt" + }, + "cmd": "tc -batch b.txt", + "desc": "positive: opt=plain cmd=batch:batch:two", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-267", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "printf '%s\\n' 'actions add action gact drop index 1' 'actions add action police rate 1mbit burst 10k index 1' > b.txt" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "printf '%s\\n' 'actions add action gact drop index 1' 'actions add action police rate 1mbit burst 10k index 1' > b.txt", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/dump.out new file mode 100644 index 000000000..4806ea73a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/dump.out @@ -0,0 +1,7 @@ +total acts 1 + + action order 0: gact action drop + random type none pass val 0 + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/ip.err new file mode 100644 index 000000000..6c5f0e3c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/ip.err @@ -0,0 +1 @@ +Warning: act_api: Failed to setup tc actions for offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/ip.pcap new file mode 100644 index 000000000..e4cc61841 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/netlink_route_dump.pcap new file mode 100644 index 000000000..434baef2c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-267/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/b.txt b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/b.txt new file mode 100644 index 000000000..e576e6b9b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/b.txt @@ -0,0 +1,2 @@ +actions flush action gact +actions add action gact pass index 1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/cmd.json new file mode 100644 index 000000000..6336eb9ca --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/cmd.json @@ -0,0 +1,106 @@ +{ + "axes": { + "batch": "flush-add", + "fix": "batch", + "json": "0", + "words": "-batch b.txt" + }, + "cmd": "tc -batch b.txt", + "desc": "positive: opt=plain cmd=batch:batch:flush-add", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-268", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "printf '%s\\n' 'actions flush action gact' 'actions add action gact pass index 1' > b.txt" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action gact", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "printf '%s\\n' 'actions flush action gact' 'actions add action gact pass index 1' > b.txt", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/dump.out new file mode 100644 index 000000000..440c799e8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/dump.out @@ -0,0 +1,7 @@ +total acts 1 + + action order 0: gact action pass + random type none pass val 0 + index 1 ref 1 bind 0 + not_in_hw + used_hw_stats disabled diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/ip.pcap new file mode 100644 index 000000000..dc4be727a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/netlink_route_dump.pcap new file mode 100644 index 000000000..4c0a66dde Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-268/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/b.txt b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/b.txt new file mode 100644 index 000000000..61c434849 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/b.txt @@ -0,0 +1,2 @@ +actions add action simple sdata LLLLLLLLLLLLLLLLLLLL index 1 cookie abababababababababababababababab +actions add action simple sdata hi index 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/cmd.json new file mode 100644 index 000000000..7157f6e4c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/cmd.json @@ -0,0 +1,106 @@ +{ + "axes": { + "batch": "leftover", + "fix": "w189-batch", + "json": "0", + "words": "-batch b.txt" + }, + "cmd": "tc -batch b.txt", + "desc": "corner: opt=plain cmd=w189-batch:batch:leftover", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcactwrite/ec-269", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "printf '%s\\n' 'actions add action simple sdata LLLLLLLLLLLLLLLLLLLL index 1 cookie abababababababababababababababab' 'actions add action simple sdata hi index 2' > b.txt" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc actions ls action simple", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "printf '%s\\n' 'actions add action simple sdata LLLLLLLLLLLLLLLLLLLL index 1 cookie abababababababababababababababab' 'actions add action simple sdata hi index 2' > b.txt", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/dump.out new file mode 100644 index 000000000..ad9663a88 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/dump.out @@ -0,0 +1,10 @@ +total acts 2 + + action order 0: Simple + index 1 ref 1 bind 0 + cookie abababababababababababababababab + not_in_hw + + action order 1: Simple + index 2 ref 1 bind 0 + not_in_hw diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/ip.pcap new file mode 100644 index 000000000..47caeb81e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/netlink_route_dump.pcap new file mode 100644 index 000000000..cd669e970 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ec-269/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-001/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-001/cmd.json new file mode 100644 index 000000000..9b4194f47 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-001/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w156", + "json": "0", + "words": "actions add action police rate 1mbit index 1" + }, + "cmd": "tc actions add action police rate 1mbit index 1", + "desc": "negative: opt=plain cmd=ng:w156:actions_add_action_police_rate_1mbit_index_1: rate with no burst: 'burst' requires 'rate'. (W156)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-001", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-001/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-001/ip.err new file mode 100644 index 000000000..a62e5400d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-001/ip.err @@ -0,0 +1,4 @@ +'burst' requires 'rate'. +bad action parsing +parse_action: bad value (5:police)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-001/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-001/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-001/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-001/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-001/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-001/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-001/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-001/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-002/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-002/cmd.json new file mode 100644 index 000000000..25af9f026 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-002/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w156-pps", + "json": "0", + "words": "actions add action police pkts_rate 10 index 1" + }, + "cmd": "tc actions add action police pkts_rate 10 index 1", + "desc": "negative: opt=plain cmd=ng:w156-pps:actions_add_action_police_pkts_rate_10_index_1: 'pkts_burst' requires 'pkts_rate'. (W156)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-002", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-002/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-002/ip.err new file mode 100644 index 000000000..0f09ed417 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-002/ip.err @@ -0,0 +1,4 @@ +'pkts_burst' requires 'pkts_rate'. +bad action parsing +parse_action: bad value (5:police)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-002/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-002/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-002/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-002/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-002/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-002/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-002/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-002/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-003/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-003/cmd.json new file mode 100644 index 000000000..44a588005 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-003/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "pol-dup", + "json": "0", + "words": "actions add action police rate 1mbit rate 2mbit burst 10k index 1" + }, + "cmd": "tc actions add action police rate 1mbit rate 2mbit burst 10k index 1", + "desc": "negative: opt=plain cmd=ng:pol-dup:actions_add_action_police_rate_1mbit_rate_2mbit_burst_10k_index_1: duplicate rate", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-003", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-003/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-003/ip.err new file mode 100644 index 000000000..087ed8ed5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-003/ip.err @@ -0,0 +1 @@ +Error: duplicate "rate": "2mbit" is the second value. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-003/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-003/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-003/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-003/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-003/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-003/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-003/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-003/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-004/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-004/cmd.json new file mode 100644 index 000000000..aa8fe1bd5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-004/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w188", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k avrate 1mbit index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k avrate 1mbit index 1", + "desc": "negative: opt=plain cmd=ng:w188:actions_add_action_police_rate_1mbit_burst_10k_avrate_1mbit_index_1: rate with avrate: -1 with no message of its own, bad action parsing (W188)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-004", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-004/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-004/ip.err new file mode 100644 index 000000000..2370ce5fe --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-004/ip.err @@ -0,0 +1,3 @@ +bad action parsing +parse_action: bad value (9:police)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-004/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-004/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-004/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-004/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-004/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-004/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-004/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-004/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-005/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-005/cmd.json new file mode 100644 index 000000000..52c98dc0f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-005/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "pol-avrate", + "json": "0", + "words": "actions add action police avrate 1mbit index 1" + }, + "cmd": "tc actions add action police avrate 1mbit index 1", + "desc": "negative: opt=plain cmd=ng:pol-avrate:actions_add_action_police_avrate_1mbit_index_1: avrate needs an estimator, which tc actions add never sends: EINVAL with no extack (K)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "EINVAL", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-005", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-005/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-005/ip.err new file mode 100644 index 000000000..b699adac0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-005/ip.err @@ -0,0 +1,2 @@ +RTNETLINK answers: Invalid argument +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-005/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-005/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-005/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-005/ip.pcap new file mode 100644 index 000000000..3040df08c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-005/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-005/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-005/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-005/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-006/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-006/cmd.json new file mode 100644 index 000000000..fb160e1dc --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-006/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "w169", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k conform-exceed goto/pass index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k conform-exceed goto/pass index 1", + "desc": "negative: opt=plain cmd=ng:w169:actions_add_action_police_rate_1mbit_burst_10k_conform-exceed_goto/pass_index_1: conform goto with no chain is goto chain 0: can't goto NULL proto/chain (W169)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "EINVAL", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-006", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-006/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-006/ip.err new file mode 100644 index 000000000..66419075c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-006/ip.err @@ -0,0 +1,2 @@ +Error: can't goto NULL proto/chain. +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-006/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-006/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-006/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-006/ip.pcap new file mode 100644 index 000000000..28f135b53 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-006/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-006/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-006/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-006/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-007/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-007/cmd.json new file mode 100644 index 000000000..369e92704 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-007/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "w164", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k mtu 255 index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k mtu 255 index 1", + "desc": "negative: opt=plain cmd=ng:w164:actions_add_action_police_rate_1mbit_burst_10k_mtu_255_index_1: mtu 255 gives cell_log 0; the kernel's rtab refusal is ENOMEM (W164)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "ENOMEM", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-007", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-007/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-007/ip.err new file mode 100644 index 000000000..51d8d0d02 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-007/ip.err @@ -0,0 +1,2 @@ +RTNETLINK answers: Cannot allocate memory +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-007/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-007/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-007/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-007/ip.pcap new file mode 100644 index 000000000..2cac82501 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-007/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-007/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-007/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-007/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-008/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-008/cmd.json new file mode 100644 index 000000000..41f155bd9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-008/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "w164-cell", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k/1 mtu 2k index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k/1 mtu 2k index 1", + "desc": "negative: opt=plain cmd=ng:w164-cell:actions_add_action_police_rate_1mbit_burst_10k/1_mtu_2k_index_1: burst 10k/1: cell_log 0 (W164)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "ENOMEM", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-008", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-008/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-008/ip.err new file mode 100644 index 000000000..51d8d0d02 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-008/ip.err @@ -0,0 +1,2 @@ +RTNETLINK answers: Cannot allocate memory +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-008/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-008/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-008/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-008/ip.pcap new file mode 100644 index 000000000..473f571b2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-008/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-008/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-008/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-008/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-009/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-009/cmd.json new file mode 100644 index 000000000..f55fd3195 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-009/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w184", + "json": "0", + "words": "actions add action police rate 1mbit burst 10x index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10x index 1", + "desc": "negative: opt=plain cmd=ng:w184:actions_add_action_police_rate_1mbit_burst_10x_index_1: argument \"10x\" is wrong: buffer (W184)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-009", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-009/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-009/ip.err new file mode 100644 index 000000000..e5676b776 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-009/ip.err @@ -0,0 +1 @@ +Error: argument "10x" is wrong: buffer diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-009/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-009/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-009/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-009/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-009/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-009/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-009/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-009/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-010/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-010/cmd.json new file mode 100644 index 000000000..0afd00bbb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-010/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w184-cell", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k/x index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k/x index 1", + "desc": "negative: opt=plain cmd=ng:w184-cell:actions_add_action_police_rate_1mbit_burst_10k/x_index_1: the / is cut to NUL: \"10k\" (W184)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-010", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-010/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-010/ip.err new file mode 100644 index 000000000..ba3617e33 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-010/ip.err @@ -0,0 +1 @@ +Error: argument "10k" is wrong: buffer diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-010/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-010/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-010/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-010/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-010/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-010/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-010/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-010/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-011/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-011/cmd.json new file mode 100644 index 000000000..aab5f3c40 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-011/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w169-bad", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k conform-exceed foo/pass index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k conform-exceed foo/pass index 1", + "desc": "negative: opt=plain cmd=ng:w169-bad:actions_add_action_police_rate_1mbit_burst_10k_conform-exceed_foo/pass_index_1: a bad conform side: -1 with no message (W169)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-011", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-011/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-011/ip.err new file mode 100644 index 000000000..2370ce5fe --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-011/ip.err @@ -0,0 +1,3 @@ +bad action parsing +parse_action: bad value (9:police)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-011/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-011/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-011/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-011/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-011/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-011/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-011/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-011/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-012/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-012/cmd.json new file mode 100644 index 000000000..a0449fc35 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-012/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "w169-goto", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k conform-exceed pass/goto index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k conform-exceed pass/goto index 1", + "desc": "negative: opt=plain cmd=ng:w169-goto:actions_add_action_police_rate_1mbit_burst_10k_conform-exceed_pass/goto_index_1: exceed goto with no chain is goto chain 0 (W169)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "EINVAL", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-012", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-012/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-012/ip.err new file mode 100644 index 000000000..5cf58273d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-012/ip.err @@ -0,0 +1,2 @@ +Error: goto chain not allowed on fallback. +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-012/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-012/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-012/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-012/ip.pcap new file mode 100644 index 000000000..45b0229f5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-012/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-012/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-012/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-012/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-013/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-013/cmd.json new file mode 100644 index 000000000..ee323430c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-013/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "pol-rate-bad", + "json": "0", + "words": "actions add action police rate zz burst 10k index 1" + }, + "cmd": "tc actions add action police rate zz burst 10k index 1", + "desc": "negative: opt=plain cmd=ng:pol-rate-bad:actions_add_action_police_rate_zz_burst_10k_index_1: an unparsable rate", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-013", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-013/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-013/ip.err new file mode 100644 index 000000000..df5c29e61 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-013/ip.err @@ -0,0 +1 @@ +Error: argument "zz" is wrong: rate diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-013/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-013/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-013/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-013/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-013/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-013/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-013/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-013/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-014/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-014/cmd.json new file mode 100644 index 000000000..c41d6283a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-014/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "pol-mtu-bad", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k mtu zz index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k mtu zz index 1", + "desc": "negative: opt=plain cmd=ng:pol-mtu-bad:actions_add_action_police_rate_1mbit_burst_10k_mtu_zz_index_1: an unparsable mtu", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-014", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-014/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-014/ip.err new file mode 100644 index 000000000..08ca43bf5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-014/ip.err @@ -0,0 +1 @@ +Error: argument "zz" is wrong: mtu diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-014/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-014/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-014/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-014/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-014/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-014/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-014/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-014/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-015/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-015/cmd.json new file mode 100644 index 000000000..2b0861dbb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-015/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "pol-ll", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k linklayer foo index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k linklayer foo index 1", + "desc": "negative: opt=plain cmd=ng:pol-ll:actions_add_action_police_rate_1mbit_burst_10k_linklayer_foo_index_1: an unknown linklayer", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-015", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-015/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-015/ip.err new file mode 100644 index 000000000..37b1d07fa --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-015/ip.err @@ -0,0 +1 @@ +Error: argument "foo" is wrong: linklayer diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-015/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-015/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-015/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-015/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-015/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-015/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-015/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-015/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-016/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-016/cmd.json new file mode 100644 index 000000000..fb7e45bd2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-016/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "pol-tail", + "json": "0", + "words": "actions add action police rate 1mbit burst" + }, + "cmd": "tc actions add action police rate 1mbit burst", + "desc": "negative: opt=plain cmd=ng:pol-tail:actions_add_action_police_rate_1mbit_burst: burst with no value: NEXT_ARG, rc 255", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-016", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-016/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-016/ip.err new file mode 100644 index 000000000..f7d546177 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-016/ip.err @@ -0,0 +1 @@ +Command line is not complete. Try option "help" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-016/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-016/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-016/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-016/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-016/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-016/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-016/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-016/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-017/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-017/cmd.json new file mode 100644 index 000000000..d630e9af5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-017/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "pol-help", + "json": "0", + "words": "actions add action police help" + }, + "cmd": "tc actions add action police help", + "desc": "negative: opt=plain cmd=ng:pol-help:actions_add_action_police_help: police's usage, rc 255", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-017", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-017/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-017/ip.err new file mode 100644 index 000000000..63fdc1061 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-017/ip.err @@ -0,0 +1,9 @@ +Usage: ... police [ rate BPS burst BYTES[/BYTES] ] + [ pkts_rate RATE pkts_burst PACKETS ] [ mtu BYTES[/BYTES] ] + [ peakrate BPS ] [ avrate BPS ] [ overhead BYTES ] + [ linklayer TYPE ] [ CONTROL ] +Where: CONTROL := conform-exceed [/NOTEXCEEDACT] + Define how to handle packets which exceed () + or conform () the configured bandwidth limit. + EXCEEDACT/NOTEXCEEDACT := { pipe | ok | reclassify | drop | continue | + goto chain } diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-017/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-017/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-017/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-017/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-017/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-017/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-017/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-017/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-018/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-018/cmd.json new file mode 100644 index 000000000..421e318fd --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-018/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "pol-maxburst", + "json": "0", + "words": "actions add action police rate 1mbit buffer 10k maxburst 2k index 1" + }, + "cmd": "tc actions add action police rate 1mbit buffer 10k maxburst 2k index 1", + "desc": "negative: opt=plain cmd=ng:pol-maxburst:actions_add_action_police_rate_1mbit_buffer_10k_maxburst_2k_index_1: maxburst is burst's third name: duplicate \"buffer/burst\"", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-018", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-018/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-018/ip.err new file mode 100644 index 000000000..83ec938c6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-018/ip.err @@ -0,0 +1 @@ +Error: duplicate "buffer/burst": "2k" is the second value. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-018/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-018/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-018/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-018/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-018/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-018/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-018/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-018/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-019/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-019/cmd.json new file mode 100644 index 000000000..dd01ba4f0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-019/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "pol-pps-rate", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k pkts_rate 1000 pkts_burst 100 index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k pkts_rate 1000 pkts_burst 100 index 1", + "desc": "negative: opt=plain cmd=ng:pol-pps-rate:actions_add_action_police_rate_1mbit_burst_10k_pkts_rate_1000_pkts_burst_100_index_1: rate and pkts_rate are not allowed in one action", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-019", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-019/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-019/ip.err new file mode 100644 index 000000000..db8b1331f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-019/ip.err @@ -0,0 +1,4 @@ +'rate' and 'pkts_rate' are not allowed in same action. +bad action parsing +parse_action: bad value (11:police)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-019/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-019/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-019/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-019/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-019/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-019/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-019/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-019/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-020/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-020/cmd.json new file mode 100644 index 000000000..1bcbf22ab --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-020/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w169-jump", + "json": "0", + "words": "actions add action police rate 1mbit burst 10k conform-exceed jump 1/pass index 1" + }, + "cmd": "tc actions add action police rate 1mbit burst 10k conform-exceed jump 1/pass index 1", + "desc": "negative: opt=plain cmd=ng:w169-jump:actions_add_action_police_rate_1mbit_burst_10k_conform-exceed_jump_1/pass_index_1: the slash form takes no jump: Invalid \"jump count\" (1/pass) (W169)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-020", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-020/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-020/ip.err new file mode 100644 index 000000000..934b23c26 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-020/ip.err @@ -0,0 +1,4 @@ +Invalid "jump count" (1/pass) +bad action parsing +parse_action: bad value (10:police)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-020/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-020/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-020/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-020/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-020/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-020/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-020/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-020/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-021/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-021/cmd.json new file mode 100644 index 000000000..ba99db727 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-021/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "w162", + "json": "0", + "words": "actions add action mirred egress redirect dev nosuch index 1" + }, + "cmd": "tc actions add action mirred egress redirect dev nosuch index 1", + "desc": "negative: opt=plain cmd=ng:w162:actions_add_action_mirred_egress_redirect_dev_nosuch_index_1: Cannot find device, bad action parsing, parse_action: bad value, Illegal \"action\" (W162)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "ENODEV", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-021", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-021/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-021/ip.err new file mode 100644 index 000000000..20a00ed8b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-021/ip.err @@ -0,0 +1,4 @@ +Cannot find device "nosuch" +bad action parsing +parse_action: bad value (7:mirred)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-021/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-021/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-021/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-021/ip.pcap new file mode 100644 index 000000000..0b24c1655 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-021/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-021/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-021/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-021/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-022/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-022/cmd.json new file mode 100644 index 000000000..65d7556e2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-022/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w160", + "json": "0", + "words": "actions add action mirred egress redirect blockid 0 index 1" + }, + "cmd": "tc actions add action mirred egress redirect blockid 0 index 1", + "desc": "negative: opt=plain cmd=ng:w160:actions_add_action_mirred_egress_redirect_blockid_0_index_1: invalid block IDbad action parsing (W160)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-022", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-022/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-022/ip.err new file mode 100644 index 000000000..f00ca1262 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-022/ip.err @@ -0,0 +1,3 @@ +invalid block IDbad action parsing +parse_action: bad value (7:mirred)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-022/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-022/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-022/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-022/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-022/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-022/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-022/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-022/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-023/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-023/cmd.json new file mode 100644 index 000000000..07ee48f1f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-023/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "mir-nodev", + "json": "0", + "words": "actions add action mirred egress redirect index 1" + }, + "cmd": "tc actions add action mirred egress redirect index 1", + "desc": "negative: opt=plain cmd=ng:mir-nodev:actions_add_action_mirred_egress_redirect_index_1: neither dev nor blockid", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-023", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-023/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-023/ip.err new file mode 100644 index 000000000..f7d546177 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-023/ip.err @@ -0,0 +1 @@ +Command line is not complete. Try option "help" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-023/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-023/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-023/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-023/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-023/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-023/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-023/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-023/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-024/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-024/cmd.json new file mode 100644 index 000000000..2149482b1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-024/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "mir-dir", + "json": "0", + "words": "actions add action mirred redirect dev d1 index 1" + }, + "cmd": "tc actions add action mirred redirect dev d1 index 1", + "desc": "negative: opt=plain cmd=ng:mir-dir:actions_add_action_mirred_redirect_dev_d1_index_1: no direction", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-024", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-024/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-024/ip.err new file mode 100644 index 000000000..9370ffaaa --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-024/ip.err @@ -0,0 +1,4 @@ +mirred option not supported redirect +bad action parsing +parse_action: bad value (6:mirred)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-024/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-024/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-024/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-024/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-024/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-024/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-024/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-024/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-025/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-025/cmd.json new file mode 100644 index 000000000..ee186cf74 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-025/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "mir-act", + "json": "0", + "words": "actions add action mirred egress dev d1 index 1" + }, + "cmd": "tc actions add action mirred egress dev d1 index 1", + "desc": "negative: opt=plain cmd=ng:mir-act:actions_add_action_mirred_egress_dev_d1_index_1: no mirror or redirect", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-025", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-025/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-025/ip.err new file mode 100644 index 000000000..f7d546177 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-025/ip.err @@ -0,0 +1 @@ +Command line is not complete. Try option "help" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-025/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-025/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-025/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-025/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-025/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-025/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-025/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-025/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-026/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-026/cmd.json new file mode 100644 index 000000000..1505b89a9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-026/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "mir-tail", + "json": "0", + "words": "actions add action mirred egress redirect dev" + }, + "cmd": "tc actions add action mirred egress redirect dev", + "desc": "negative: opt=plain cmd=ng:mir-tail:actions_add_action_mirred_egress_redirect_dev: dev with no value: NEXT_ARG", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-026", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-026/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-026/ip.err new file mode 100644 index 000000000..f7d546177 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-026/ip.err @@ -0,0 +1 @@ +Command line is not complete. Try option "help" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-026/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-026/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-026/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-026/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-026/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-026/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-026/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-026/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-027/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-027/cmd.json new file mode 100644 index 000000000..ed7c8dec6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-027/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "mir-help", + "json": "0", + "words": "actions add action mirred help" + }, + "cmd": "tc actions add action mirred help", + "desc": "negative: opt=plain cmd=ng:mir-help:actions_add_action_mirred_help: mirred's usage", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-027", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-027/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-027/ip.err new file mode 100644 index 000000000..bc399b5f5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-027/ip.err @@ -0,0 +1,10 @@ +Usage: mirred [index INDEX] +where: + DIRECTION := + ACTION := + INDEX is the specific policy instance id + TARGET := + DEVICE := dev DEVICENAME + DEVICENAME is the devicename + BLOCK := blockid BLOCKID + BLOCKID := 32-bit unsigned block ID diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-027/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-027/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-027/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-027/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-027/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-027/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-027/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-027/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-028/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-028/cmd.json new file mode 100644 index 000000000..994fc66ea --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-028/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w161", + "json": "0", + "words": "actions add action mirred egress redirect dev d1 blockid 5" + }, + "cmd": "tc actions add action mirred egress redirect dev d1 blockid 5", + "desc": "negative: opt=plain cmd=ng:w161:actions_add_action_mirred_egress_redirect_dev_d1_blockid_5: blockid after dev is the next kind: Bad action type blockid (W161)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "ack-then-fail" + }, + "id": "tcactwrite/ng-028", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-028/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-028/ip.err new file mode 100644 index 000000000..6740c936f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-028/ip.err @@ -0,0 +1,10 @@ +Bad action type blockid +Usage: ... gact [RAND] [INDEX] +Where: ACTION := reclassify | drop | continue | pass | pipe | + goto chain | jump + RAND := random + RANDTYPE := netrand | determ + VAL : = value not exceeding 10000 + JUMP_COUNT := Absolute jump from start of action list + INDEX := index value used + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-028/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-028/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-028/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-028/ip.pcap new file mode 100644 index 000000000..b42729516 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-028/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-028/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-028/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-028/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-029/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-029/cmd.json new file mode 100644 index 000000000..f8a1d6953 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-029/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "skb-ptype", + "json": "0", + "words": "actions add action skbedit ptype nosuch index 1" + }, + "cmd": "tc actions add action skbedit ptype nosuch index 1", + "desc": "negative: opt=plain cmd=ng:skb-ptype:actions_add_action_skbedit_ptype_nosuch_index_1: an unknown ptype", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-029", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-029/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-029/ip.err new file mode 100644 index 000000000..147e9d818 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-029/ip.err @@ -0,0 +1,4 @@ +Illegal ptype (nosuch) +bad action parsing +parse_action: bad value (5:skbedit)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-029/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-029/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-029/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-029/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-029/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-029/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-029/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-029/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-030/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-030/cmd.json new file mode 100644 index 000000000..bf19bbf41 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-030/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "skb-none", + "json": "0", + "words": "actions add action skbedit index 5" + }, + "cmd": "tc actions add action skbedit index 5", + "desc": "negative: opt=plain cmd=ng:skb-none:actions_add_action_skbedit_index_5: no flags: the kernel refuses a create (K)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "EINVAL", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-030", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-030/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-030/ip.err new file mode 100644 index 000000000..b699adac0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-030/ip.err @@ -0,0 +1,2 @@ +RTNETLINK answers: Invalid argument +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-030/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-030/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-030/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-030/ip.pcap new file mode 100644 index 000000000..9cd778e65 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-030/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-030/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-030/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-030/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-031/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-031/cmd.json new file mode 100644 index 000000000..d9608ad78 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-031/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "skb-qm", + "json": "0", + "words": "actions add action skbedit queue_mapping zz index 1" + }, + "cmd": "tc actions add action skbedit queue_mapping zz index 1", + "desc": "negative: opt=plain cmd=ng:skb-qm:actions_add_action_skbedit_queue_mapping_zz_index_1: an unparsable queue_mapping", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-031", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-031/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-031/ip.err new file mode 100644 index 000000000..9c6a73daa --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-031/ip.err @@ -0,0 +1,4 @@ +Illegal queue_mapping +bad action parsing +parse_action: bad value (5:skbedit)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-031/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-031/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-031/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-031/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-031/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-031/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-031/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-031/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-032/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-032/cmd.json new file mode 100644 index 000000000..2203ba84b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-032/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "skb-mark", + "json": "0", + "words": "actions add action skbedit mark zz index 1" + }, + "cmd": "tc actions add action skbedit mark zz index 1", + "desc": "negative: opt=plain cmd=ng:skb-mark:actions_add_action_skbedit_mark_zz_index_1: an unparsable mark", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-032", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-032/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-032/ip.err new file mode 100644 index 000000000..792eb6f85 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-032/ip.err @@ -0,0 +1,4 @@ +Illegal mark +bad action parsing +parse_action: bad value (5:skbedit)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-032/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-032/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-032/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-032/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-032/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-032/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-032/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-032/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-033/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-033/cmd.json new file mode 100644 index 000000000..b0b703e88 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-033/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "skb-help", + "json": "0", + "words": "actions add action skbedit help" + }, + "cmd": "tc actions add action skbedit help", + "desc": "negative: opt=plain cmd=ng:skb-help:actions_add_action_skbedit_help: skbedit's usage", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-033", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-033/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-033/ip.err new file mode 100644 index 000000000..72c0428aa --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-033/ip.err @@ -0,0 +1,13 @@ +Usage: ... skbedit <[QM] [PM] [MM] [PT] [IF]> +QM = queue_mapping QUEUE_MAPPING +PM = priority PRIORITY +MM = mark MARK[/MASK] +PT = ptype PACKETYPE +IF = inheritdsfield +PACKETYPE = is one of: + host, otherhost, broadcast, multicast +QUEUE_MAPPING = device transmit queue to use +PRIORITY = classID to assign to priority field +MARK = firewall mark to set +MASK = mask applied to firewall mark (0xffffffff by default) +note: inheritdsfield maps DS field to skb->priority diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-033/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-033/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-033/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-033/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-033/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-033/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-033/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-033/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-034/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-034/cmd.json new file mode 100644 index 000000000..3d962752b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-034/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "w171-4095", + "json": "0", + "words": "actions add action vlan push id 4095 index 1" + }, + "cmd": "tc actions add action vlan push id 4095 index 1", + "desc": "negative: opt=plain cmd=ng:w171-4095:actions_add_action_vlan_push_id_4095_index_1: id 4095: ERANGE with no extack (W171)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "ERANGE", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-034", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-034/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-034/ip.err new file mode 100644 index 000000000..2b1581903 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-034/ip.err @@ -0,0 +1,2 @@ +RTNETLINK answers: Numerical result out of range +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-034/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-034/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-034/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-034/ip.pcap new file mode 100644 index 000000000..3b36e7c10 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-034/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-034/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-034/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-034/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-035/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-035/cmd.json new file mode 100644 index 000000000..f5cc4884f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-035/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "vl-noid", + "json": "0", + "words": "actions add action vlan push index 1" + }, + "cmd": "tc actions add action vlan push index 1", + "desc": "negative: opt=plain cmd=ng:vl-noid:actions_add_action_vlan_push_index_1: push with no id", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-035", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-035/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-035/ip.err new file mode 100644 index 000000000..b0dbe78c7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-035/ip.err @@ -0,0 +1,13 @@ +id needs to be set for push +Usage: vlan pop [CONTROL] + vlan push [ protocol VLANPROTO ] id VLANID [ priority VLANPRIO ] [CONTROL] + vlan modify [ protocol VLANPROTO ] id VLANID [ priority VLANPRIO ] [CONTROL] + vlan pop_eth [CONTROL] + vlan push_eth dst_mac LLADDR src_mac LLADDR [CONTROL] + VLANPROTO is one of 802.1Q or 802.1AD + with default: 802.1Q + CONTROL := reclassify | pipe | drop | continue | pass | + goto chain +bad action parsing +parse_action: bad value (4:vlan)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-035/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-035/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-035/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-035/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-035/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-035/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-035/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-035/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-036/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-036/cmd.json new file mode 100644 index 000000000..b2a30286c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-036/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "vl-prio", + "json": "0", + "words": "actions add action vlan push id 5 priority 8 index 1" + }, + "cmd": "tc actions add action vlan push id 5 priority 8 index 1", + "desc": "negative: opt=plain cmd=ng:vl-prio:actions_add_action_vlan_push_id_5_priority_8_index_1: priority past 7", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-036", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-036/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-036/ip.err new file mode 100644 index 000000000..a27dbb81d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-036/ip.err @@ -0,0 +1 @@ +Error: argument "8" is wrong: prio is invalid diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-036/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-036/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-036/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-036/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-036/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-036/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-036/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-036/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-037/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-037/cmd.json new file mode 100644 index 000000000..de6e96400 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-037/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "vl-proto", + "json": "0", + "words": "actions add action vlan push id 5 protocol foo index 1" + }, + "cmd": "tc actions add action vlan push id 5 protocol foo index 1", + "desc": "negative: opt=plain cmd=ng:vl-proto:actions_add_action_vlan_push_id_5_protocol_foo_index_1: an unknown protocol", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-037", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-037/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-037/ip.err new file mode 100644 index 000000000..fc9a6b0b7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-037/ip.err @@ -0,0 +1 @@ +Error: argument "foo" is wrong: protocol is invalid diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-037/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-037/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-037/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-037/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-037/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-037/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-037/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-037/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-038/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-038/cmd.json new file mode 100644 index 000000000..f565e2292 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-038/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w172-bad", + "json": "0", + "words": "actions add action vlan push_eth dst_mac zz:00:00:00:00:01 src_mac 02:00:00:00:00:02 index 1" + }, + "cmd": "tc actions add action vlan push_eth dst_mac zz:00:00:00:00:01 src_mac 02:00:00:00:00:02 index 1", + "desc": "negative: opt=plain cmd=ng:w172-bad:actions_add_action_vlan_push_eth_dst_mac_zz:00:00:00:00:01_src_mac_02:00:00:00:00:02_index_1: a bad MAC: the invarg is cut at the first colon (W172)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-038", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-038/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-038/ip.err new file mode 100644 index 000000000..2e7182499 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-038/ip.err @@ -0,0 +1,2 @@ +"zz" is invalid lladdr. +Error: argument "zz" is wrong: dst_mac is invalid diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-038/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-038/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-038/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-038/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-038/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-038/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-038/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-038/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-039/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-039/cmd.json new file mode 100644 index 000000000..bcd872fa1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-039/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "vl-none", + "json": "0", + "words": "actions add action vlan index 1" + }, + "cmd": "tc actions add action vlan index 1", + "desc": "negative: opt=plain cmd=ng:vl-none:actions_add_action_vlan_index_1: no vlan action", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "EINVAL", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-039", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-039/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-039/ip.err new file mode 100644 index 000000000..b699adac0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-039/ip.err @@ -0,0 +1,2 @@ +RTNETLINK answers: Invalid argument +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-039/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-039/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-039/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-039/ip.pcap new file mode 100644 index 000000000..1499f139d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-039/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-039/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-039/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-039/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-040/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-040/cmd.json new file mode 100644 index 000000000..15141d835 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-040/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "vl-help", + "json": "0", + "words": "actions add action vlan help" + }, + "cmd": "tc actions add action vlan help", + "desc": "negative: opt=plain cmd=ng:vl-help:actions_add_action_vlan_help: vlan's usage", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-040", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-040/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-040/ip.err new file mode 100644 index 000000000..d3358e906 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-040/ip.err @@ -0,0 +1,9 @@ +Usage: vlan pop [CONTROL] + vlan push [ protocol VLANPROTO ] id VLANID [ priority VLANPRIO ] [CONTROL] + vlan modify [ protocol VLANPROTO ] id VLANID [ priority VLANPRIO ] [CONTROL] + vlan pop_eth [CONTROL] + vlan push_eth dst_mac LLADDR src_mac LLADDR [CONTROL] + VLANPROTO is one of 802.1Q or 802.1AD + with default: 802.1Q + CONTROL := reclassify | pipe | drop | continue | pass | + goto chain diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-040/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-040/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-040/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-040/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-040/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-040/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-040/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-040/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-041/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-041/cmd.json new file mode 100644 index 000000000..633ef1688 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-041/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w173-foo", + "json": "0", + "words": "actions add action csum foo index 1" + }, + "cmd": "tc actions add action csum foo index 1", + "desc": "negative: opt=plain cmd=ng:w173-foo:actions_add_action_csum_foo_index_1: empty list (W173)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-041", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-041/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-041/ip.err new file mode 100644 index 000000000..005f9c914 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-041/ip.err @@ -0,0 +1,4 @@ +Illegal csum construct, empty list +bad action parsing +parse_action: bad value (4:csum)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-041/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-041/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-041/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-041/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-041/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-041/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-041/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-041/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-042/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-042/cmd.json new file mode 100644 index 000000000..5835f1db9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-042/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "cs-help", + "json": "0", + "words": "actions add action csum help" + }, + "cmd": "tc actions add action csum help", + "desc": "negative: opt=plain cmd=ng:cs-help:actions_add_action_csum_help: csum's usage", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-042", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-042/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-042/ip.err new file mode 100644 index 000000000..47a200765 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-042/ip.err @@ -0,0 +1,4 @@ +Usage: ... csum +Where: UPDATE := [] + TARGET := { ip4h | icmp | igmp | tcp | udp | udplite | sctp | } + SWEETS := { and | or | '+' } diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-042/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-042/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-042/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-042/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-042/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-042/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-042/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-042/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-043/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-043/cmd.json new file mode 100644 index 000000000..b14891923 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-043/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "cs-and", + "json": "0", + "words": "actions add action csum and index 1" + }, + "cmd": "tc actions add action csum and index 1", + "desc": "negative: opt=plain cmd=ng:cs-and:actions_add_action_csum_and_index_1: and alone: Illegal csum construct, empty list", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-043", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-043/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-043/ip.err new file mode 100644 index 000000000..005f9c914 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-043/ip.err @@ -0,0 +1,4 @@ +Illegal csum construct, empty list +bad action parsing +parse_action: bad value (4:csum)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-043/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-043/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-043/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-043/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-043/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-043/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-043/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-043/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-044/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-044/cmd.json new file mode 100644 index 000000000..c0cf29f06 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-044/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w192", + "json": "0", + "words": "actions add action nat ingress 10.0.0.0/33 1.1.1.1 index 1" + }, + "cmd": "tc actions add action nat ingress 10.0.0.0/33 1.1.1.1 index 1", + "desc": "negative: opt=plain cmd=ng:w192:actions_add_action_nat_ingress_10.0.0.0/33_1.1.1.1_index_1: Illegal nat construct (ingress) (W192)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-044", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-044/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-044/ip.err new file mode 100644 index 000000000..773ef47a0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-044/ip.err @@ -0,0 +1,9 @@ +Illegal nat construct (ingress) +Usage: ... nat NAT +NAT := DIRECTION OLD NEW +DIRECTION := { ingress | egress } +OLD := PREFIX +NEW := ADDRESS +bad action parsing +parse_action: bad value (6:nat)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-044/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-044/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-044/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-044/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-044/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-044/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-044/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-044/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-045/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-045/cmd.json new file mode 100644 index 000000000..90cfcc456 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-045/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "nat-dir", + "json": "0", + "words": "actions add action nat sideways 10.0.0.0/8 1.1.1.1 index 1" + }, + "cmd": "tc actions add action nat sideways 10.0.0.0/8 1.1.1.1 index 1", + "desc": "negative: opt=plain cmd=ng:nat-dir:actions_add_action_nat_sideways_10.0.0.0/8_1.1.1.1_index_1: neither ingress nor egress", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-045", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-045/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-045/ip.err new file mode 100644 index 000000000..1d63acc6b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-045/ip.err @@ -0,0 +1,9 @@ +Illegal nat construct (sideways) +Usage: ... nat NAT +NAT := DIRECTION OLD NEW +DIRECTION := { ingress | egress } +OLD := PREFIX +NEW := ADDRESS +bad action parsing +parse_action: bad value (6:nat)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-045/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-045/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-045/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-045/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-045/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-045/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-045/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-045/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-046/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-046/cmd.json new file mode 100644 index 000000000..f4571ec9a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-046/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "nat-new", + "json": "0", + "words": "actions add action nat egress 10.0.0.0/8 zz index 1" + }, + "cmd": "tc actions add action nat egress 10.0.0.0/8 zz index 1", + "desc": "negative: opt=plain cmd=ng:nat-new:actions_add_action_nat_egress_10.0.0.0/8_zz_index_1: a bad new address", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-046", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-046/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-046/ip.err new file mode 100644 index 000000000..8cc00a500 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-046/ip.err @@ -0,0 +1,9 @@ +Illegal nat construct (egress) +Usage: ... nat NAT +NAT := DIRECTION OLD NEW +DIRECTION := { ingress | egress } +OLD := PREFIX +NEW := ADDRESS +bad action parsing +parse_action: bad value (6:nat)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-046/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-046/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-046/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-046/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-046/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-046/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-046/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-046/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-047/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-047/cmd.json new file mode 100644 index 000000000..0bbbf7f4a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-047/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w191-nat", + "json": "0", + "words": "actions add action nat" + }, + "cmd": "tc actions add action nat", + "desc": "negative: opt=plain cmd=ng:w191-nat:actions_add_action_nat: a bare nat: NEXT_ARG, Command line is not complete (W191)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-047", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-047/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-047/ip.err new file mode 100644 index 000000000..f7d546177 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-047/ip.err @@ -0,0 +1 @@ +Command line is not complete. Try option "help" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-047/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-047/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-047/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-047/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-047/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-047/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-047/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-047/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-048/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-048/cmd.json new file mode 100644 index 000000000..c75aa702e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-048/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w191-sim", + "json": "0", + "words": "actions add action simple" + }, + "cmd": "tc actions add action simple", + "desc": "negative: opt=plain cmd=ng:w191-sim:actions_add_action_simple: a bare simple: NEXT_ARG (W191)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-048", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-048/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-048/ip.err new file mode 100644 index 000000000..f7d546177 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-048/ip.err @@ -0,0 +1 @@ +Command line is not complete. Try option "help" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-048/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-048/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-048/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-048/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-048/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-048/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-048/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-048/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-049/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-049/cmd.json new file mode 100644 index 000000000..d9d3fd258 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-049/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "w213", + "json": "0", + "words": "actions add action simple index 5" + }, + "cmd": "tc actions add action simple index 5", + "desc": "negative: opt=plain cmd=ng:w213:actions_add_action_simple_index_5: no sdata: the kernel refuses a create (W213)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "EINVAL", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-049", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-049/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-049/ip.err new file mode 100644 index 000000000..b699adac0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-049/ip.err @@ -0,0 +1,2 @@ +RTNETLINK answers: Invalid argument +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-049/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-049/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-049/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-049/ip.pcap new file mode 100644 index 000000000..283b02ee8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-049/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-049/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-049/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-049/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-050/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-050/cmd.json new file mode 100644 index 000000000..4e48184da --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-050/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "sim-tail", + "json": "0", + "words": "actions add action simple sdata" + }, + "cmd": "tc actions add action simple sdata", + "desc": "negative: opt=plain cmd=ng:sim-tail:actions_add_action_simple_sdata: sdata with no value: NEXT_ARG", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-050", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-050/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-050/ip.err new file mode 100644 index 000000000..f7d546177 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-050/ip.err @@ -0,0 +1 @@ +Command line is not complete. Try option "help" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-050/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-050/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-050/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-050/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-050/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-050/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-050/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-050/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-051/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-051/cmd.json new file mode 100644 index 000000000..014d335b8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-051/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "sim-32", + "json": "0", + "words": "actions add action simple sdata ssssssssssssssssssssssssssssssss index 1" + }, + "cmd": "tc actions add action simple sdata ssssssssssssssssssssssssssssssss index 1", + "desc": "negative: opt=plain cmd=ng:sim-32:actions_add_action_simple_sdata_ssssssssssssssssssssssssssssssss_index_1: simple: Illegal string len 32", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-051", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-051/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-051/ip.err new file mode 100644 index 000000000..1f0da62f3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-051/ip.err @@ -0,0 +1,4 @@ +simple: Illegal string len 32 +bad action parsing +parse_action: bad value (5:simple)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-051/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-051/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-051/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-051/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-051/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-051/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-051/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-051/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-052/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-052/cmd.json new file mode 100644 index 000000000..c5d3cca19 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-052/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "sim-33", + "json": "0", + "words": "actions add action simple sdata sssssssssssssssssssssssssssssssss index 1" + }, + "cmd": "tc actions add action simple sdata sssssssssssssssssssssssssssssssss index 1", + "desc": "negative: opt=plain cmd=ng:sim-33:actions_add_action_simple_sdata_sssssssssssssssssssssssssssssssss_index_1: simple: Illegal string len 33", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-052", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-052/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-052/ip.err new file mode 100644 index 000000000..743e52040 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-052/ip.err @@ -0,0 +1,4 @@ +simple: Illegal string len 33 +bad action parsing +parse_action: bad value (5:simple)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-052/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-052/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-052/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-052/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-052/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-052/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-052/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-052/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-053/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-053/cmd.json new file mode 100644 index 000000000..c982c67c3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-053/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "cm-zone", + "json": "0", + "words": "actions add action connmark zone zz index 1" + }, + "cmd": "tc actions add action connmark zone zz index 1", + "desc": "negative: opt=plain cmd=ng:cm-zone:actions_add_action_connmark_zone_zz_index_1: an unparsable zone", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-053", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-053/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-053/ip.err new file mode 100644 index 000000000..54339ead7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-053/ip.err @@ -0,0 +1,4 @@ +connmark: Illegal "zone" +bad action parsing +parse_action: bad value (5:connmark)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-053/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-053/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-053/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-053/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-053/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-053/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-053/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-053/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-054/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-054/cmd.json new file mode 100644 index 000000000..d34d55159 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-054/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w215", + "json": "0", + "words": "actions add action connmark goto chain x index 1" + }, + "cmd": "tc actions add action connmark goto chain x index 1", + "desc": "negative: opt=plain cmd=ng:w215:actions_add_action_connmark_goto_chain_x_index_1: Illegal \"chain index\" (W215)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-054", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-054/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-054/ip.err new file mode 100644 index 000000000..f77eaea2c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-054/ip.err @@ -0,0 +1,11 @@ +Illegal "chain index" +Illegal "chain index" +Usage: ... gact [RAND] [INDEX] +Where: ACTION := reclassify | drop | continue | pass | pipe | + goto chain | jump + RAND := random + RANDTYPE := netrand | determ + VAL : = value not exceeding 10000 + JUMP_COUNT := Absolute jump from start of action list + INDEX := index value used + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-054/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-054/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-054/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-054/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-054/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-054/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-054/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-054/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-055/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-055/cmd.json new file mode 100644 index 000000000..8479df3d5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-055/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "cti-mask", + "json": "0", + "words": "actions add action ctinfo dscp 0xf0f00000 index 1" + }, + "cmd": "tc actions add action ctinfo dscp 0xf0f00000 index 1", + "desc": "negative: opt=plain cmd=ng:cti-mask:actions_add_action_ctinfo_dscp_0xf0f00000_index_1: a dscp mask that isn't contiguous", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-055", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-055/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-055/ip.err new file mode 100644 index 000000000..0626557ca --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-055/ip.err @@ -0,0 +1,4 @@ +ctinfo: dscp mask must be 6 contiguous bits long +bad action parsing +parse_action: bad value (5:ctinfo)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-055/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-055/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-055/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-055/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-055/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-055/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-055/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-055/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-056/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-056/cmd.json new file mode 100644 index 000000000..07c9a4cee --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-056/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w208", + "json": "0", + "words": "actions add action ctinfo dscp 0xfc000000 0x1junk index 1" + }, + "cmd": "tc actions add action ctinfo dscp 0xfc000000 0x1junk index 1", + "desc": "negative: opt=plain cmd=ng:w208:actions_add_action_ctinfo_dscp_0xfc000000_0x1junk_index_1: a junk statemask is the next kind: Bad action type 0x1junk (W208)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-056", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-056/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-056/ip.err new file mode 100644 index 000000000..a51b26fd5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-056/ip.err @@ -0,0 +1,10 @@ +Bad action type 0x1junk +Usage: ... gact [RAND] [INDEX] +Where: ACTION := reclassify | drop | continue | pass | pipe | + goto chain | jump + RAND := random + RANDTYPE := netrand | determ + VAL : = value not exceeding 10000 + JUMP_COUNT := Absolute jump from start of action list + INDEX := index value used + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-056/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-056/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-056/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-056/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-056/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-056/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-056/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-056/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-057/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-057/cmd.json new file mode 100644 index 000000000..036aa28ce --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-057/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w211", + "json": "0", + "words": "actions add action sample" + }, + "cmd": "tc actions add action sample", + "desc": "negative: opt=plain cmd=ng:w211:actions_add_action_sample: argument \"sample count\" is required (W211)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-057", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-057/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-057/ip.err new file mode 100644 index 000000000..e479bfb23 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-057/ip.err @@ -0,0 +1 @@ +Error: argument "sample count" is required diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-057/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-057/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-057/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-057/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-057/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-057/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-057/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-057/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-058/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-058/cmd.json new file mode 100644 index 000000000..44fbae492 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-058/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "w212", + "json": "0", + "words": "actions add action sample rate 5 index 3" + }, + "cmd": "tc actions add action sample rate 5 index 3", + "desc": "negative: opt=plain cmd=ng:w212:actions_add_action_sample_rate_5_index_3: index skips the rate and group checks (W212)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "EINVAL", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-058", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-058/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-058/ip.err new file mode 100644 index 000000000..83f710f75 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-058/ip.err @@ -0,0 +1,2 @@ +Error: sample rate and group are required. +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-058/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-058/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-058/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-058/ip.pcap new file mode 100644 index 000000000..9a116477a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-058/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-058/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-058/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-058/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-059/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-059/cmd.json new file mode 100644 index 000000000..d908fed44 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-059/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "smp-group", + "json": "0", + "words": "actions add action sample rate 5 index" + }, + "cmd": "tc actions add action sample rate 5 index", + "desc": "negative: opt=plain cmd=ng:smp-group:actions_add_action_sample_rate_5_index: index with no value", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-059", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-059/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-059/ip.err new file mode 100644 index 000000000..f7d546177 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-059/ip.err @@ -0,0 +1 @@ +Command line is not complete. Try option "help" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-059/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-059/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-059/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-059/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-059/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-059/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-059/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-059/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-060/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-060/cmd.json new file mode 100644 index 000000000..c5721b11c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-060/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "smp-rate0", + "json": "0", + "words": "actions add action sample rate 0 group 1 index 1" + }, + "cmd": "tc actions add action sample rate 0 group 1 index 1", + "desc": "negative: opt=plain cmd=ng:smp-rate0:actions_add_action_sample_rate_0_group_1_index_1: rate 0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "EINVAL", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-060", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-060/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-060/ip.err new file mode 100644 index 000000000..08ba5b2e6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-060/ip.err @@ -0,0 +1,2 @@ +Error: invalid sample rate. +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-060/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-060/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-060/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-060/ip.pcap new file mode 100644 index 000000000..a655fb5d9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-060/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-060/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-060/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-060/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-061/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-061/cmd.json new file mode 100644 index 000000000..fb66a0fe5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-061/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w191-smod", + "json": "0", + "words": "actions add action skbmod set" + }, + "cmd": "tc actions add action skbmod set", + "desc": "negative: opt=plain cmd=ng:w191-smod:actions_add_action_skbmod_set: set with no value: NEXT_ARG (W191)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-061", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-061/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-061/ip.err new file mode 100644 index 000000000..f7d546177 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-061/ip.err @@ -0,0 +1 @@ +Command line is not complete. Try option "help" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-061/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-061/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-061/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-061/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-061/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-061/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-061/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-061/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-062/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-062/cmd.json new file mode 100644 index 000000000..5b87b6a3f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-062/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "w198", + "json": "0", + "words": "actions add action skbmod set etype 0 index 1" + }, + "cmd": "tc actions add action skbmod set etype 0 index 1", + "desc": "negative: opt=plain cmd=ng:w198:actions_add_action_skbmod_set_etype_0_index_1: etype 0: the flag with no ETYPE attribute (W198)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "EINVAL", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-062", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-062/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-062/ip.err new file mode 100644 index 000000000..26acff83b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-062/ip.err @@ -0,0 +1,3 @@ +skbmod etype 0x0 +RTNETLINK answers: Invalid argument +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-062/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-062/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-062/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-062/ip.pcap new file mode 100644 index 000000000..003151d51 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-062/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-062/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-062/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-062/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-063/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-063/cmd.json new file mode 100644 index 000000000..a8df4b4dc --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-063/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "smod-mac", + "json": "0", + "words": "actions add action skbmod set dmac zz index 1" + }, + "cmd": "tc actions add action skbmod set dmac zz index 1", + "desc": "negative: opt=plain cmd=ng:smod-mac:actions_add_action_skbmod_set_dmac_zz_index_1: an unparsable MAC", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-063", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-063/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-063/ip.err new file mode 100644 index 000000000..4a4b6c919 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-063/ip.err @@ -0,0 +1,4 @@ +Invalid dst mac address zz +bad action parsing +parse_action: bad value (6:skbmod)! +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-063/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-063/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-063/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-063/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-063/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-063/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-063/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-063/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-064/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-064/cmd.json new file mode 100644 index 000000000..d89e65857 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-064/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "smod-none", + "json": "0", + "words": "actions add action skbmod index 1" + }, + "cmd": "tc actions add action skbmod index 1", + "desc": "negative: opt=plain cmd=ng:smod-none:actions_add_action_skbmod_index_1: no skbmod action", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "EINVAL", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-064", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-064/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-064/ip.err new file mode 100644 index 000000000..b699adac0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-064/ip.err @@ -0,0 +1,2 @@ +RTNETLINK answers: Invalid argument +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-064/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-064/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-064/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-064/ip.pcap new file mode 100644 index 000000000..8485f7f3b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-064/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-064/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-064/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-064/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-065/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-065/cmd.json new file mode 100644 index 000000000..2f2178d77 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-065/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "mp-nolabel", + "json": "0", + "words": "actions add action mpls push index 1" + }, + "cmd": "tc actions add action mpls push index 1", + "desc": "negative: opt=plain cmd=ng:mp-nolabel:actions_add_action_mpls_push_index_1: push with no label", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-065", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-065/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-065/ip.err new file mode 100644 index 000000000..9227fe3eb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-065/ip.err @@ -0,0 +1 @@ +Error: argument "label" is required diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-065/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-065/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-065/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-065/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-065/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-065/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-065/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-065/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-066/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-066/cmd.json new file mode 100644 index 000000000..ffef882c3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-066/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w205", + "json": "0", + "words": "actions add action mpls pipe" + }, + "cmd": "tc actions add action mpls pipe", + "desc": "negative: opt=plain cmd=ng:w205:actions_add_action_mpls_pipe: no action word (W205)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-066", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-066/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-066/ip.err new file mode 100644 index 000000000..f7d546177 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-066/ip.err @@ -0,0 +1 @@ +Command line is not complete. Try option "help" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-066/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-066/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-066/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-066/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-066/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-066/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-066/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-066/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-067/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-067/cmd.json new file mode 100644 index 000000000..137818135 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-067/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w205-ind", + "json": "0", + "words": "actions add action mpls ind 5" + }, + "cmd": "tc actions add action mpls ind 5", + "desc": "negative: opt=plain cmd=ng:w205-ind:actions_add_action_mpls_ind_5: ind is strcmp'd: no action word (W205)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-067", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-067/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-067/ip.err new file mode 100644 index 000000000..f7d546177 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-067/ip.err @@ -0,0 +1 @@ +Command line is not complete. Try option "help" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-067/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-067/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-067/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-067/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-067/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-067/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-067/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-067/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-068/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-068/cmd.json new file mode 100644 index 000000000..2d28921d7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-068/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w206-t", + "json": "0", + "words": "actions add action mpls push label 5 t 64 index 1" + }, + "cmd": "tc actions add action mpls push label 5 t 64 index 1", + "desc": "negative: opt=plain cmd=ng:w206-t:actions_add_action_mpls_push_label_5_t_64_index_1: t is tc: tc field is 3 bits max (W206)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-068", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-068/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-068/ip.err new file mode 100644 index 000000000..a030fbc91 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-068/ip.err @@ -0,0 +1 @@ +Error: argument "64" is wrong: tc field is 3 bits max diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-068/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-068/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-068/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-068/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-068/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-068/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-068/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-068/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-069/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-069/cmd.json new file mode 100644 index 000000000..666a688d7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-069/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w204", + "json": "0", + "words": "actions add action mpls pop protocol 0 index 1" + }, + "cmd": "tc actions add action mpls pop protocol 0 index 1", + "desc": "negative: opt=plain cmd=ng:w204:actions_add_action_mpls_pop_protocol_0_index_1: protocol 0 is unset: argument \"protocol\" is required (W204)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-069", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-069/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-069/ip.err new file mode 100644 index 000000000..8cc9e94f2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-069/ip.err @@ -0,0 +1 @@ +Error: argument "protocol" is required diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-069/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-069/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-069/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-069/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-069/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-069/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-069/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-069/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-070/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-070/cmd.json new file mode 100644 index 000000000..f3a82428e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-070/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "w207-3", + "json": "0", + "words": "actions add action mpls push label 3 index 1" + }, + "cmd": "tc actions add action mpls push label 3 index 1", + "desc": "negative: opt=plain cmd=ng:w207-3:actions_add_action_mpls_push_label_3_index_1: label 3: act_mpls: MPLS label out of range (W207)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "EINVAL", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-070", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-070/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-070/ip.err new file mode 100644 index 000000000..f12d679d4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-070/ip.err @@ -0,0 +1,2 @@ +Error: act_mpls: MPLS label out of range. +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-070/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-070/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-070/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-070/ip.pcap new file mode 100644 index 000000000..587d0dfef Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-070/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-070/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-070/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-070/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-071/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-071/cmd.json new file mode 100644 index 000000000..448ffaab1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-071/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "w203", + "json": "0", + "words": "actions add action mpls mac_push index 1" + }, + "cmd": "tc actions add action mpls mac_push index 1", + "desc": "negative: opt=plain cmd=ng:w203:actions_add_action_mpls_mac_push_index_1: mac_push with no label: act_mpls: Label is required for MPLS push (W203)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "EINVAL", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-071", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-071/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-071/ip.err new file mode 100644 index 000000000..8f7644afd --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-071/ip.err @@ -0,0 +1,2 @@ +Error: act_mpls: Label is required for MPLS push. +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-071/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-071/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-071/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-071/ip.pcap new file mode 100644 index 000000000..39ed66a71 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-071/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-071/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-071/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-071/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-072/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-072/cmd.json new file mode 100644 index 000000000..90fd816f2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-072/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "mp-label", + "json": "0", + "words": "actions add action mpls push label 1048576 index 1" + }, + "cmd": "tc actions add action mpls push label 1048576 index 1", + "desc": "negative: opt=plain cmd=ng:mp-label:actions_add_action_mpls_push_label_1048576_index_1: a label past 20 bits", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-072", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-072/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-072/ip.err new file mode 100644 index 000000000..0ef086be3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-072/ip.err @@ -0,0 +1 @@ +Error: argument "1048576" is wrong: label must be <=0xFFFFF diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-072/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-072/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-072/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-072/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-072/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-072/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-072/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-072/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-073/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-073/cmd.json new file mode 100644 index 000000000..e29e92604 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-073/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "mp-tc", + "json": "0", + "words": "actions add action mpls push label 5 tc 8 index 1" + }, + "cmd": "tc actions add action mpls push label 5 tc 8 index 1", + "desc": "negative: opt=plain cmd=ng:mp-tc:actions_add_action_mpls_push_label_5_tc_8_index_1: tc past 3 bits", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-073", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-073/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-073/ip.err new file mode 100644 index 000000000..86c3941d9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-073/ip.err @@ -0,0 +1 @@ +Error: argument "8" is wrong: tc field is 3 bits max diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-073/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-073/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-073/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-073/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-073/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-073/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-073/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-073/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-074/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-074/cmd.json new file mode 100644 index 000000000..709e93273 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-074/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "mp-ttl", + "json": "0", + "words": "actions add action mpls push label 5 ttl 0 index 1" + }, + "cmd": "tc actions add action mpls push label 5 ttl 0 index 1", + "desc": "negative: opt=plain cmd=ng:mp-ttl:actions_add_action_mpls_push_label_5_ttl_0_index_1: ttl 0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-074", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-074/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-074/ip.err new file mode 100644 index 000000000..3e55bcfbd --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-074/ip.err @@ -0,0 +1 @@ +Error: argument "0" is wrong: ttl must be >0 and <=255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-074/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-074/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-074/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-074/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-074/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-074/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-074/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-074/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-075/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-075/cmd.json new file mode 100644 index 000000000..60ecbbc99 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-075/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "mp-pop", + "json": "0", + "words": "actions add action mpls pop index 1" + }, + "cmd": "tc actions add action mpls pop index 1", + "desc": "negative: opt=plain cmd=ng:mp-pop:actions_add_action_mpls_pop_index_1: pop with no protocol", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-075", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-075/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-075/ip.err new file mode 100644 index 000000000..8cc9e94f2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-075/ip.err @@ -0,0 +1 @@ +Error: argument "protocol" is required diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-075/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-075/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-075/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-075/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-075/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-075/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-075/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-075/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-076/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-076/cmd.json new file mode 100644 index 000000000..d9711ee93 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-076/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "mp-help", + "json": "0", + "words": "actions add action mpls help" + }, + "cmd": "tc actions add action mpls help", + "desc": "negative: opt=plain cmd=ng:mp-help:actions_add_action_mpls_help: mpls's usage", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-076", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-076/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-076/ip.err new file mode 100644 index 000000000..37618504d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-076/ip.err @@ -0,0 +1,12 @@ +Usage: mpls pop [ protocol MPLS_PROTO ] [CONTROL] + mpls push [ protocol MPLS_PROTO ] [ label MPLS_LABEL ] [ tc MPLS_TC ] + [ ttl MPLS_TTL ] [ bos MPLS_BOS ] [CONTROL] + mpls mac_push [ protocol MPLS_PROTO ] [ label MPLS_LABEL ] [ tc MPLS_TC ] + [ ttl MPLS_TTL ] [ bos MPLS_BOS ] [CONTROL] + mpls modify [ label MPLS_LABEL ] [ tc MPLS_TC ] [ ttl MPLS_TTL ] + [ bos MPLS_BOS ] [CONTROL] + for pop, MPLS_PROTO is next header of packet - e.g. ip or mpls_uc + for push and mac_push, MPLS_PROTO is one of mpls_uc or mpls_mc + with default: mpls_uc + CONTROL := reclassify | pipe | drop | continue | pass | + goto chain diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-076/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-076/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-076/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-076/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-076/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-076/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-076/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-076/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-077/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-077/cmd.json new file mode 100644 index 000000000..2f9e20f12 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-077/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "w183", + "json": "0", + "words": "actions add action gact pass index 1 skip_sw skip_hw" + }, + "cmd": "tc actions add action gact pass index 1 skip_sw skip_hw", + "desc": "negative: opt=plain cmd=ng:w183:actions_add_action_gact_pass_index_1_skip_sw_skip_hw: skip_sw with skip_hw: EINVAL with no extack (W183)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "EINVAL", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-077", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-077/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-077/ip.err new file mode 100644 index 000000000..b699adac0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-077/ip.err @@ -0,0 +1,2 @@ +RTNETLINK answers: Invalid argument +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-077/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-077/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-077/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-077/ip.pcap new file mode 100644 index 000000000..8249eadeb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-077/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-077/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-077/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-077/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-078/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-078/cmd.json new file mode 100644 index 000000000..671e3a46b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-078/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "fr-skipsw", + "json": "0", + "words": "actions add action gact pass index 1 skip_sw" + }, + "cmd": "tc actions add action gact pass index 1 skip_sw", + "desc": "negative: opt=plain cmd=ng:fr-skipsw:actions_add_action_gact_pass_index_1_skip_sw: skip_sw with no device to offload to: EINVAL with no extack (K)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "EINVAL", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-078", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-078/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-078/ip.err new file mode 100644 index 000000000..b699adac0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-078/ip.err @@ -0,0 +1,2 @@ +RTNETLINK answers: Invalid argument +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-078/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-078/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-078/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-078/ip.pcap new file mode 100644 index 000000000..762512175 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-078/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-078/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-078/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-078/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-079/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-079/cmd.json new file mode 100644 index 000000000..98b05c69b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-079/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "fr-cookie", + "json": "0", + "words": "actions add action gact pass index 1 cookie zz" + }, + "cmd": "tc actions add action gact pass index 1 cookie zz", + "desc": "negative: opt=plain cmd=ng:fr-cookie:actions_add_action_gact_pass_index_1_cookie_zz: a cookie that isn't hex", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-079", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-079/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-079/ip.err new file mode 100644 index 000000000..a1f913433 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-079/ip.err @@ -0,0 +1,2 @@ +Error: argument "zz" is wrong: cookie must be a hex string + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-079/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-079/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-079/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-079/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-079/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-079/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-079/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-079/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-080/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-080/cmd.json new file mode 100644 index 000000000..17febea91 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-080/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "fr-cookie-long", + "json": "0", + "words": "actions add action gact pass index 1 cookie ababababababababababababababababababababababababababababababababab" + }, + "cmd": "tc actions add action gact pass index 1 cookie ababababababababababababababababababababababababababababababababab", + "desc": "negative: opt=plain cmd=ng:fr-cookie-long:actions_add_action_gact_pass_index_1_cookie_ababababababababababababababababababababababababababababababababab: a cookie past 32 bytes", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-080", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-080/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-080/ip.err new file mode 100644 index 000000000..26944ab48 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-080/ip.err @@ -0,0 +1 @@ +Error: argument "ababababababababababababababababababababababababababababababababab" is wrong: 66 Max allowed size 32 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-080/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-080/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-080/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-080/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-080/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-080/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-080/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-080/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-081/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-081/cmd.json new file mode 100644 index 000000000..815efa32d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-081/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "fr-hw", + "json": "0", + "words": "actions add action gact pass index 1 hw_stats foo" + }, + "cmd": "tc actions add action gact pass index 1 hw_stats foo", + "desc": "negative: opt=plain cmd=ng:fr-hw:actions_add_action_gact_pass_index_1_hw_stats_foo: an unknown hw_stats", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-081", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-081/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-081/ip.err new file mode 100644 index 000000000..effa32ec3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-081/ip.err @@ -0,0 +1,2 @@ +Error: argument "foo" is wrong: value is invalid + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-081/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-081/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-081/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-081/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-081/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-081/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-081/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-081/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-082/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-082/cmd.json new file mode 100644 index 000000000..d04b0b0c0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-082/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "fr-hw-any", + "json": "0", + "words": "actions add action gact pass index 1 hw_stats any" + }, + "cmd": "tc actions add action gact pass index 1 hw_stats any", + "desc": "negative: opt=plain cmd=ng:fr-hw-any:actions_add_action_gact_pass_index_1_hw_stats_any: any is no hw_stats word", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-082", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-082/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-082/ip.err new file mode 100644 index 000000000..bfe2af379 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-082/ip.err @@ -0,0 +1,2 @@ +Error: argument "any" is wrong: value is invalid + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-082/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-082/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-082/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-082/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-082/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-082/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-082/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-082/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-083/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-083/cmd.json new file mode 100644 index 000000000..74d5ff74a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-083/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "w113", + "json": "0", + "words": "actions add action gact pass index 1 action gact pass index 2 action gact pass index 3 action gact pass index 4 action gact pass index 5 action gact pass index 6 action gact pass index 7 action gact pass index 8 action gact pass index 9 action gact pass index 10 action gact pass index 11 action gact pass index 12 action gact pass index 13 action gact pass index 14 action gact pass index 15 action gact pass index 16 action gact pass index 17 action gact pass index 18 action gact pass index 19 action gact pass index 20 action gact pass index 21 action gact pass index 22 action gact pass index 23 action gact pass index 24 action gact pass index 25 action gact pass index 26 action gact pass index 27 action gact pass index 28 action gact pass index 29 action gact pass index 30 action gact pass index 31 action gact pass index 32 action gact pass index 33" + }, + "cmd": "tc actions add action gact pass index 1 action gact pass index 2 action gact pass index 3 action gact pass index 4 action gact pass index 5 action gact pass index 6 action gact pass index 7 action gact pass index 8 action gact pass index 9 action gact pass index 10 action gact pass index 11 action gact pass index 12 action gact pass index 13 action gact pass index 14 action gact pass index 15 action gact pass index 16 action gact pass index 17 action gact pass index 18 action gact pass index 19 action gact pass index 20 action gact pass index 21 action gact pass index 22 action gact pass index 23 action gact pass index 24 action gact pass index 25 action gact pass index 26 action gact pass index 27 action gact pass index 28 action gact pass index 29 action gact pass index 30 action gact pass index 31 action gact pass index 32 action gact pass index 33", + "desc": "negative: opt=plain cmd=ng:w113:actions_add_action_gact_pass_index_1_action_gact_pass_index_2_action_gact_pass_index_3_action_gact_pass_index_4_action_gact_pass_index_5_action_gact_pass_index_6_action_gact_pass_index_7_action_gact_pass_index_8_action_gact_pass_index_9_action_gact_pass_index_10_action_gact_pass_index_11_action_gact_pass_index_12_action_gact_pass_index_13_action_gact_pass_index_14_action_gact_pass_index_15_action_gact_pass_index_16_action_gact_pass_index_17_action_gact_pass_index_18_action_gact_pass_index_19_action_gact_pass_index_20_action_gact_pass_index_21_action_gact_pass_index_22_action_gact_pass_index_23_action_gact_pass_index_24_action_gact_pass_index_25_action_gact_pass_index_26_action_gact_pass_index_27_action_gact_pass_index_28_action_gact_pass_index_29_action_gact_pass_index_30_action_gact_pass_index_31_action_gact_pass_index_32_action_gact_pass_index_33: 33 actions: tc sends all 33 (W113)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "EINVAL", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-083", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-083/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-083/ip.err new file mode 100644 index 000000000..eb5ccf45d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-083/ip.err @@ -0,0 +1,2 @@ +Error: Only 32 actions supported per filter. +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-083/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-083/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-083/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-083/ip.pcap new file mode 100644 index 000000000..da24243aa Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-083/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-083/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-083/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-083/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-084/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-084/cmd.json new file mode 100644 index 000000000..f5fdae62e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-084/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "w176", + "json": "0", + "words": "actions add action drop flowid 1:1" + }, + "cmd": "tc actions add action drop flowid 1:1", + "desc": "negative: opt=plain cmd=ng:w176:actions_add_action_drop_flowid_1:1: the add is committed, then Command \"flowid\" is unknown (W176)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "ack-then-fail" + }, + "id": "tcactwrite/ng-084", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-084/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-084/ip.err new file mode 100644 index 000000000..612257d2f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-084/ip.err @@ -0,0 +1 @@ +Command "flowid" is unknown, try "tc actions help". diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-084/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-084/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-084/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-084/ip.pcap new file mode 100644 index 000000000..f453e3665 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-084/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-084/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-084/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-084/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-085/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-085/cmd.json new file mode 100644 index 000000000..7b38a364d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-085/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "w178", + "json": "0", + "words": "actions delete action gact index 0" + }, + "cmd": "tc actions delete action gact index 0", + "desc": "negative: opt=plain cmd=ng:w178:actions_delete_action_gact_index_0: index 0 sends no INDEX: Invalid TC action index value, then Command \"action\" is unknown (W178, W187)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "EINVAL", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-085", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action gact pass index 1" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action gact pass index 1", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-085/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-085/ip.err new file mode 100644 index 000000000..ab50a3651 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-085/ip.err @@ -0,0 +1,3 @@ +Error: Invalid TC action index value. +We have an error talking to the kernel +Command "action" is unknown, try "tc actions help". diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-085/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-085/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-085/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-085/ip.pcap new file mode 100644 index 000000000..536abd7eb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-085/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-085/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-085/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-085/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-086/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-086/cmd.json new file mode 100644 index 000000000..c8fc3fbac --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-086/cmd.json @@ -0,0 +1,95 @@ +{ + "axes": { + "fix": "w187", + "json": "0", + "words": "actions delete action gact index 7" + }, + "cmd": "tc actions delete action gact index 7", + "desc": "negative: opt=plain cmd=ng:w187:actions_delete_action_gact_index_7: no such index: the failed delete returns 1, so do_action reads action as a command (W187)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "ENOENT", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-086", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-086/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-086/ip.err new file mode 100644 index 000000000..6795cd0c9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-086/ip.err @@ -0,0 +1,3 @@ +Error: TC action with specified index not found. +We have an error talking to the kernel +Command "action" is unknown, try "tc actions help". diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-086/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-086/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-086/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-086/ip.pcap new file mode 100644 index 000000000..a49a35d5c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-086/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-086/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-086/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-086/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-087/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-087/cmd.json new file mode 100644 index 000000000..ca76893a0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-087/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "del-noidx", + "json": "0", + "words": "actions delete action gact" + }, + "cmd": "tc actions delete action gact", + "desc": "negative: opt=plain cmd=ng:del-noidx:actions_delete_action_gact: delete with no index", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-087", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-087/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-087/ip.err new file mode 100644 index 000000000..973f005c9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-087/ip.err @@ -0,0 +1 @@ +Error: no index specified action: gact diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-087/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-087/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-087/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-087/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-087/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-087/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-087/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-087/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-088/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-088/cmd.json new file mode 100644 index 000000000..dee57df3c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-088/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "fix": "add-dup", + "json": "0", + "words": "actions add action gact pass index 1" + }, + "cmd": "tc actions add action gact pass index 1", + "desc": "negative: opt=plain cmd=ng:add-dup:actions_add_action_gact_pass_index_1: add of an index that exists: EXCL", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "EEXIST", + "rc": 255, + "refused_by": "kernel" + }, + "id": "tcactwrite/ng-088", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "tc actions add action gact pass index 1" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "tc actions add action gact pass index 1", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-088/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-088/ip.err new file mode 100644 index 000000000..9ef071736 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-088/ip.err @@ -0,0 +1,2 @@ +RTNETLINK answers: File exists +We have an error talking to the kernel diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-088/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-088/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-088/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-088/ip.pcap new file mode 100644 index 000000000..d5701f379 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-088/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-088/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-088/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-088/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-089/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-089/cmd.json new file mode 100644 index 000000000..3b9a38a91 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-089/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "act-help", + "json": "0", + "words": "actions add help" + }, + "cmd": "tc actions add help", + "desc": "negative: opt=plain cmd=ng:act-help:actions_add_help: add help: Illegal \"action\" (W186)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-089", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-089/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-089/ip.err new file mode 100644 index 000000000..72992d190 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-089/ip.err @@ -0,0 +1 @@ +Illegal "action" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-089/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-089/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-089/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-089/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-089/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-089/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-089/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-089/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-090/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-090/cmd.json new file mode 100644 index 000000000..66d3e69bd --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-090/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "act-unknown", + "json": "0", + "words": "actions bogus" + }, + "cmd": "tc actions bogus", + "desc": "negative: opt=plain cmd=ng:act-unknown:actions_bogus: Command \"bogus\" is unknown", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-090", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-090/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-090/ip.err new file mode 100644 index 000000000..3a96d32bf --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-090/ip.err @@ -0,0 +1 @@ +Command "bogus" is unknown, try "tc actions help". diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-090/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-090/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-090/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-090/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-090/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-090/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-090/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-090/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-091/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-091/cmd.json new file mode 100644 index 000000000..cecf65b15 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-091/cmd.json @@ -0,0 +1,94 @@ +{ + "axes": { + "fix": "flush-none", + "json": "0", + "words": "actions flush" + }, + "cmd": "tc actions flush", + "desc": "negative: opt=plain cmd=ng:flush-none:actions_flush: flush with no kind: the usage", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcactwrite/ng-091", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-091/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-091/ip.err new file mode 100644 index 000000000..9ac4f921a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-091/ip.err @@ -0,0 +1,15 @@ +usage: tc actions * +Where: ACTSPECOP := ACR | GD | FL + ACR := add | change | replace * + GD := get | delete | * + FL := ls | list | flush | + ACTNAMESPEC := action + ACTISPEC := + ACTSPEC := action [INDEXSPEC] [HWSTATSSPEC] [SKIPSPEC] + INDEXSPEC := index <32 bit indexvalue> + HWSTATSSPEC := hw_stats [ immediate | delayed | disabled ] + SKIPSPEC := [ skip_sw | skip_hw ] + ACTDETAIL := + Example ACTNAME is gact, mirred, bpf, etc + Each action has its own parameters (ACTPARAMS) + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-091/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-091/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-091/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-091/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-091/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-091/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-091/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-091/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-092/b.txt b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-092/b.txt new file mode 100644 index 000000000..6de781d4a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-092/b.txt @@ -0,0 +1,2 @@ +actions add action police rate 1mbit burst 10x index 1 +actions add action gact pass index 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-092/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-092/cmd.json new file mode 100644 index 000000000..cdea5091c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-092/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "batch": "usage-exit", + "fix": "w185", + "json": "0", + "words": "-force -batch b.txt" + }, + "cmd": "tc -force -batch b.txt", + "desc": "negative: opt=plain cmd=ng:w185:batch:usage-exit: police's invarg exits, so line 2 never runs (W185)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "ack-then-fail" + }, + "id": "tcactwrite/ng-092", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "printf '%s\\n' 'actions add action police rate 1mbit burst 10x index 1' 'actions add action gact pass index 2' > b.txt" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "printf '%s\\n' 'actions add action police rate 1mbit burst 10x index 1' 'actions add action gact pass index 2' > b.txt", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-092/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-092/ip.err new file mode 100644 index 000000000..e5676b776 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-092/ip.err @@ -0,0 +1 @@ +Error: argument "10x" is wrong: buffer diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-092/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-092/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-092/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-092/ip.pcap new file mode 100644 index 000000000..80e06944c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-092/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-092/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-092/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-092/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-093/b.txt b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-093/b.txt new file mode 100644 index 000000000..8c07ff106 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-093/b.txt @@ -0,0 +1,2 @@ +actions add action mpls push index 1 +actions add action gact pass index 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-093/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-093/cmd.json new file mode 100644 index 000000000..36342d3af --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-093/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "batch": "mpls-exit", + "fix": "w201", + "json": "0", + "words": "-force -batch b.txt" + }, + "cmd": "tc -force -batch b.txt", + "desc": "negative: opt=plain cmd=ng:w201:batch:mpls-exit: mpls's missarg exits (W201)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "ack-then-fail" + }, + "id": "tcactwrite/ng-093", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "printf '%s\\n' 'actions add action mpls push index 1' 'actions add action gact pass index 2' > b.txt" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "printf '%s\\n' 'actions add action mpls push index 1' 'actions add action gact pass index 2' > b.txt", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-093/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-093/ip.err new file mode 100644 index 000000000..9227fe3eb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-093/ip.err @@ -0,0 +1 @@ +Error: argument "label" is required diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-093/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-093/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-093/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-093/ip.pcap new file mode 100644 index 000000000..1098357ad Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-093/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-093/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-093/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-093/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-094/b.txt b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-094/b.txt new file mode 100644 index 000000000..fe1be0b58 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-094/b.txt @@ -0,0 +1,2 @@ +actions add action nat sideways 10.0.0.0/8 1.1.1.1 index 1 +actions add action gact pass index 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-094/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-094/cmd.json new file mode 100644 index 000000000..3f8e6bd5d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-094/cmd.json @@ -0,0 +1,100 @@ +{ + "axes": { + "batch": "return", + "fix": "w185-ret", + "json": "0", + "words": "-force -batch b.txt" + }, + "cmd": "tc -force -batch b.txt", + "desc": "negative: opt=plain cmd=ng:w185-ret:batch:return: nat returns -1, so -force carries on to line 2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 1, + "refused_by": "ack-then-fail" + }, + "id": "tcactwrite/ng-094", + "modules": [ + "sch_htb", + "sch_ingress", + "cls_basic", + "cls_cgroup", + "cls_flow", + "cls_fw", + "cls_matchall", + "cls_route", + "cls_u32", + "act_gact", + "act_police", + "act_mirred", + "act_skbedit", + "act_vlan", + "act_csum", + "act_nat", + "act_simple", + "act_connmark", + "act_ctinfo", + "act_sample", + "act_skbmod", + "act_mpls", + "act_pedit", + "act_tunnel_key", + "act_ife", + "act_ct", + "act_gate", + "act_bpf" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 clsact", + "tc qdisc add dev d1 root handle 1: htb", + "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "tc qdisc add dev d1 ingress_block 10 clsact", + "printf '%s\\n' 'actions add action nat sideways 10.0.0.0/8 1.1.1.1 index 1' 'actions add action gact pass index 2' > b.txt" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 clsact", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: htb", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:1 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc class add dev d1 parent 1: classid 1:2 htb rate 1mbit", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 ingress_block 10 clsact", + "rc": 0 + }, + { + "cmd": "printf '%s\\n' 'actions add action nat sideways 10.0.0.0/8 1.1.1.1 index 1' 'actions add action gact pass index 2' > b.txt", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-094/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-094/ip.err new file mode 100644 index 000000000..2d1228dec --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-094/ip.err @@ -0,0 +1,10 @@ +Illegal nat construct (sideways) +Usage: ... nat NAT +NAT := DIRECTION OLD NEW +DIRECTION := { ingress | egress } +OLD := PREFIX +NEW := ADDRESS +bad action parsing +parse_action: bad value (6:nat)! +Illegal "action" +Command failed b.txt:1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-094/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-094/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-094/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-094/ip.pcap new file mode 100644 index 000000000..265366a7b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-094/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-094/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-094/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcactwrite/ng-094/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/xtcpnl_rtattr_encode.go b/pkg/xtcpnl/xtcpnl_rtattr_encode.go index a21742a28..b499c7625 100644 --- a/pkg/xtcpnl/xtcpnl_rtattr_encode.go +++ b/pkg/xtcpnl/xtcpnl_rtattr_encode.go @@ -380,7 +380,10 @@ func BuildRequest(msgType, flags uint16, seq uint32, familyHdr, attrs []byte) ([ // The filter and chain pairs are tc_filter_modify's: do_filter sends // RTM_NEWTFILTER for add, change and replace and RTM_DELTFILTER for // delete, do_chain RTM_NEWCHAIN for add and RTM_DELCHAIN for delete -// (tc/tc_filter.c:752-803). +// (tc/tc_filter.c:752-803). The action pair is do_action's: RTM_NEWACTION +// for add, change and replace (tc_action_modify), RTM_DELACTION for delete +// (tc_action_gd) and flush (tc_act_list_or_flush with NLM_F_ROOT) +// (tc/m_action.c:869-914). func IsAdmittedWriteType(msgType uint16) bool { switch msgType { case uint16(unix.RTM_NEWROUTE), uint16(unix.RTM_DELROUTE), @@ -396,7 +399,8 @@ func IsAdmittedWriteType(msgType uint16) bool { uint16(unix.RTM_NEWQDISC), uint16(unix.RTM_DELQDISC), uint16(unix.RTM_NEWTCLASS), uint16(unix.RTM_DELTCLASS), uint16(unix.RTM_NEWTFILTER), uint16(unix.RTM_DELTFILTER), - uint16(unix.RTM_NEWCHAIN), uint16(unix.RTM_DELCHAIN): + uint16(unix.RTM_NEWCHAIN), uint16(unix.RTM_DELCHAIN), + uint16(unix.RTM_NEWACTION), uint16(unix.RTM_DELACTION): return true } return false diff --git a/pkg/xtcpnl/xtcpnl_tc_act_kinds.go b/pkg/xtcpnl/xtcpnl_tc_act_kinds.go index c03915e4c..4c293c374 100644 --- a/pkg/xtcpnl/xtcpnl_tc_act_kinds.go +++ b/pkg/xtcpnl/xtcpnl_tc_act_kinds.go @@ -507,22 +507,30 @@ const ( // NLA_F_NESTED. func BuildTcActionDump(kind string, terse bool, since uint32, hasSince bool, seq uint32) ([]byte, error) { ab := NewAttrBuilder(make([]byte, tcActReqAttrsCst)) - if err := putActTab(&ab, kind); err != nil { + if err := putActListAttrs(&ab, kind, terse, since, hasSince); err != nil { return nil, err } + return BuildRequest(uint16(unix.RTM_GETACTION), uint16(unix.NLM_F_DUMP), seq, make([]byte, TcaMsgSizeCst), ab.Bytes()) +} + +// putActListAttrs writes tc_act_list_or_flush's attributes, the same for a +// list and a flush (tc/m_action.c:782-829): TCA_ACT_TAB{1{KIND}}, +// TCA_ROOT_FLAGS and, when hasSince, TCA_ROOT_TIME_DELTA. +func putActListAttrs(ab *AttrBuilder, kind string, terse bool, since uint32, hasSince bool) error { + if err := putActTab(ab, kind); err != nil { + return err + } flags := uint32(TcaActFlagLargeDumpOn) if terse { flags |= TcaActFlagTerseDump } if err := ab.PutBytes(TcaRootFlags, appendBitfield32(nil, flags, flags)); err != nil { - return nil, err + return err } if hasSince { - if err := ab.PutU32(TcaRootTimeDelta, since); err != nil { - return nil, err - } + return ab.PutU32(TcaRootTimeDelta, since) } - return BuildRequest(uint16(unix.RTM_GETACTION), uint16(unix.NLM_F_DUMP), seq, make([]byte, TcaMsgSizeCst), ab.Bytes()) + return nil } // TcActRef is one action a get names: its kind and, unless 0, index. @@ -540,21 +548,28 @@ type TcActRef struct { // The attribute buffer is sized from acts, so any number of actions builds. func BuildTcActionGet(acts []TcActRef, seq uint32) ([]byte, error) { ab := NewAttrBuilder(make([]byte, TcActGetLen(acts)-NlMsgHdrSizeCst-TcaMsgSizeCst)) + if err := putActRefTab(&ab, acts); err != nil { + return nil, err + } + return BuildRequest(uint16(unix.RTM_GETACTION), 0, seq, make([]byte, TcaMsgSizeCst), ab.Bytes()) +} + +// putActRefTab writes tc_action_gd's TCA_ACT_TAB, the same for a get and a +// delete (tc/m_action.c:627-684): at orders 1, 2, ..., each action's KIND +// and, unless its index is 0, INDEX. +func putActRefTab(ab *AttrBuilder, acts []TcActRef) error { tab, err := ab.BeginNest(TcaRootTab) if err != nil { - return nil, err + return err } var order uint16 for _, a := range acts { order++ - if err := putActOrder(&ab, order, a.Kind, a.Index); err != nil { - return nil, err + if err := putActOrder(ab, order, a.Kind, a.Index); err != nil { + return err } } - if err := ab.EndNest(tab); err != nil { - return nil, err - } - return BuildRequest(uint16(unix.RTM_GETACTION), 0, seq, make([]byte, TcaMsgSizeCst), ab.Bytes()) + return ab.EndNest(tab) } // putActTab writes TCA_ACT_TAB{1{KIND}}, a list's tab. diff --git a/pkg/xtcpnl/xtcpnl_tc_actencode.go b/pkg/xtcpnl/xtcpnl_tc_actencode.go new file mode 100644 index 000000000..dd08226e0 --- /dev/null +++ b/pkg/xtcpnl/xtcpnl_tc_actencode.go @@ -0,0 +1,65 @@ +package xtcpnl + +// This file is the encode half of the parms structs increment 12's action +// kinds carry (gotc 22P): an Append per struct, laid out field for field +// as include/uapi/linux/pkt_cls.h and include/uapi/linux/tc_act/*.h have +// them at v7.4-rc4, so the read side's ParseTc gets x back. Which +// attribute each goes in, and the order, are the parser's business +// (tc/m_police.c, m_mirred.c, ... at iproute2 v7.2.0). +// +// Like xtcpnl_tc_fencode.go they are not behind a write tag: laying out a +// struct sends nothing, and the round-trip tests want every build. + +// Append lays out g, tc_gen (pkt_cls.h:179): index, capab, action, refcnt, +// bindcnt. It is the whole parms struct of skbedit (tc_skbedit.h:21), +// simple (tc_defact.h:7), ctinfo (tc_ctinfo.h:8) and sample +// (tc_sample.h:9). +func (g TcGen) Append(b []byte) []byte { + b = appendU32(appendU32(b, g.Index), g.Capab) + return appendS32(appendS32(appendS32(b, g.Action), g.Refcnt), g.Bindcnt) +} + +// Append lays out p, struct tc_police (pkt_cls.h:148): index, action, +// limit, burst, mtu, rate and peakrate (tc_ratespec each), refcnt, +// bindcnt, capab. It has no tc_gen: its fields are in their own order. +func (p TcPolice) Append(b []byte) []byte { + b = appendS32(appendU32(b, p.Index), p.Action) + b = appendU32(appendU32(appendU32(b, p.Limit), p.Burst), p.Mtu) + b = p.PeakRate.Append(p.Rate.Append(b)) + return appendU32(appendS32(appendS32(b, p.Refcnt), p.Bindcnt), p.Capab) +} + +// Append lays out m, struct tc_mirred (tc_mirred.h:13): tc_gen, eaction, +// ifindex. +func (m TcMirred) Append(b []byte) []byte { + return appendU32(appendS32(m.TcGen.Append(b), m.Eaction), m.Ifindex) +} + +// Append lays out a, the tc_gen-and-one-word structs: tc_vlan's v_action +// (tc_vlan.h:17), tc_mpls's m_action (tc_mpls.h:15), tc_csum's +// update_flags (tc_csum.h:27). The int fields are laid out as their bits. +func (a TcActInt) Append(b []byte) []byte { return appendU32(a.TcGen.Append(b), a.V) } + +// Append lays out n, struct tc_nat (tc_nat.h:19): tc_gen, old_addr, +// new_addr and mask as sent (network order), flags. +func (n TcNat) Append(b []byte) []byte { + b = n.TcGen.Append(b) + b = append(append(append(b, n.OldAddr[:]...), n.NewAddr[:]...), n.Mask[:]...) + return appendU32(b, n.Flags) +} + +// Append lays out c, struct tc_connmark (tc_connmark.h:8): tc_gen, zone, +// and the two bytes of tail padding the struct's 4-byte alignment adds. +// m_connmark.c:38 zeroes the struct with `= {}`, so tc sends zeros there +// (W214). +func (c TcConnmark) Append(b []byte) []byte { + return append(appendU16(c.TcGen.Append(b), c.Zone), 0, 0) +} + +// Append lays out s, struct tc_skbmod (tc_skbmod.h:17): tc_gen, four bytes +// of padding that align the u64, then flags. m_skbmod.c:57 memsets the +// struct, so the padding is zero. +func (s TcSkbmod) Append(b []byte) []byte { + b = append(s.TcGen.Append(b), 0, 0, 0, 0) + return appendU64(b, s.Flags) +} diff --git a/pkg/xtcpnl/xtcpnl_tc_actencode_test.go b/pkg/xtcpnl/xtcpnl_tc_actencode_test.go new file mode 100644 index 000000000..017d30c98 --- /dev/null +++ b/pkg/xtcpnl/xtcpnl_tc_actencode_test.go @@ -0,0 +1,288 @@ +package xtcpnl + +import ( + "bytes" + "encoding/binary" + "math" + "reflect" + "testing" + + "golang.org/x/sys/unix" +) + +const tdTcactwrite = "testdata/7_3_1/ws/tcactwrite/" + +// tcActCapturedReq is the first action write (RTM_NEWACTION or +// RTM_DELACTION) in a tcactwrite row's capture, as tc 7.2.0 sent it, with +// the nlmsghdr rebuilt so seq and pid read 0. +func tcActCapturedReq(t testing.TB, id string) []byte { + t.Helper() + for _, m := range pcapNlMsgs(t, tdTcactwrite+id+"/ip.pcap") { + if m.h.Flags&unix.NLM_F_REQUEST == 0 || + (m.h.Type != unix.RTM_NEWACTION && m.h.Type != unix.RTM_DELACTION) { + continue + } + b := make([]byte, NlMsgHdrSizeCst, NlMsgHdrSizeCst+len(m.body)) + binary.LittleEndian.PutUint32(b[0:], uint32(NlMsgHdrSizeCst+len(m.body))) + binary.LittleEndian.PutUint16(b[4:], m.h.Type) + binary.LittleEndian.PutUint16(b[6:], m.h.Flags) + return append(b, m.body...) + } + t.Fatalf("%s: no action write in the capture", id) + return nil +} + +// tcAttr is the first attribute of type typ (NLA_F_NESTED masked) in +// attrs, or nil. +func tcAttr(t testing.TB, attrs []byte, typ uint16) []byte { + t.Helper() + var out []byte + if err := WalkRTAttrsRaw(attrs, func(atype uint16, val []byte) { + if out == nil && atype&^tcNestedFlags == typ { + out = val + } + }); err != nil { + t.Fatal(err) + } + return out +} + +// tcActCapturedOptions is the TCA_ACT_OPTIONS of the first action of a +// row's first action write: TAB, order 1, OPTIONS. +func tcActCapturedOptions(t testing.TB, id string) []byte { + t.Helper() + req := tcActCapturedReq(t, id) + tab := tcAttr(t, req[NlMsgHdrSizeCst+TcaMsgSizeCst:], TcaRootTab) + opts := tcAttr(t, tcAttr(t, tab, 1), TcaActOptions) + if opts == nil { + t.Fatalf("%s: no TCA_ACT_OPTIONS in order 1", id) + } + return opts +} + +type tcActEnc interface{ Append([]byte) []byte } + +// tcActKind decodes a kind's options to its parms struct, with the parms +// attribute's type and the struct's size. +type tcActKind struct { + name string + parms uint16 + size int + decode func(t testing.TB, opts []byte) tcActEnc +} + +func tcActKinds() map[string]tcActKind { + must := func(t testing.TB, err error) { + t.Helper() + if err != nil { + t.Fatal(err) + } + } + gen := func(name string, parms uint16, parse func([]byte) (TcGenOpt, error)) tcActKind { + return tcActKind{name, parms, TcGactSizeCst, func(t testing.TB, o []byte) tcActEnc { + p, err := parse(o) + must(t, err) + return p.P + }} + } + intKind := func(name string, parms uint16, size int, parse func([]byte) (TcActIntOpt, error)) tcActKind { + return tcActKind{name, parms, size, func(t testing.TB, o []byte) tcActEnc { + p, err := parse(o) + must(t, err) + return p.P + }} + } + return map[string]tcActKind{ + "police": {"police", TcaPoliceTbf, TcPoliceSizeCst, func(t testing.TB, o []byte) tcActEnc { + p, err := ParseTcPolice(o) + must(t, err) + return p.P + }}, + "mirred": {"mirred", TcaMirredParms, TcMirredSizeCst, func(t testing.TB, o []byte) tcActEnc { + p, err := ParseTcMirred(o) + must(t, err) + return p.P + }}, + "skbedit": gen("skbedit", TcaSkbeditParms, ParseTcSkbedit), + "simple": gen("simple", TcaDefParms, ParseTcSimple), + "ctinfo": gen("ctinfo", TcaCtinfoAct, ParseTcCtinfo), + "sample": gen("sample", TcaSampleParms, ParseTcSample), + "vlan": intKind("vlan", TcaVlanParms, TcVlanSizeCst, ParseTcVlan), + "csum": intKind("csum", TcaCsumParms, TcCsumSizeCst, ParseTcCsum), + "mpls": intKind("mpls", TcaMplsParms, TcMplsSizeCst, ParseTcMpls), + "nat": {"nat", TcaNatParms, TcNatSizeCst, func(t testing.TB, o []byte) tcActEnc { + p, err := ParseTcNat(o) + must(t, err) + return p.P + }}, + "connmark": {"connmark", TcaConnmarkParms, TcConnmarkSizeCst, func(t testing.TB, o []byte) tcActEnc { + p, err := ParseTcConnmark(o) + must(t, err) + return p.P + }}, + "skbmod": {"skbmod", TcaSkbmodParms, TcSkbmodSizeCst, func(t testing.TB, o []byte) tcActEnc { + p, err := ParseTcSkbmod(o) + must(t, err) + return p.P + }}, + } +} + +// TestAppendTcActStructs is the parms structs of increment 12's kinds +// against tc: each captured PARMS payload decoded by the read side and laid +// out again by Append is the bytes tc 7.2.0 sent, padding included (gotc +// 22P). The hand-built rows are decode(Append(x)) == x. +// +// go test ./pkg/xtcpnl/ -run TestAppendTcActStructs +func TestAppendTcActStructs(t *testing.T) { + kinds := tcActKinds() + captured := []struct { + description string + id string // the tcactwrite row + kind string + expected int // the PARMS payload's length + }{ + {"positive: police rate and burst", "ec-001", "police", TcPoliceSizeCst}, + {"positive: police with mtu and peakrate (both rate specs)", "ec-074", "police", TcPoliceSizeCst}, + {"positive: mirred egress redirect", "ec-007", "mirred", TcMirredSizeCst}, + {"positive: mirred ingress mirror", "ec-112", "mirred", TcMirredSizeCst}, + {"positive: skbedit mark", "ec-013", "skbedit", TcGactSizeCst}, + {"positive: vlan pop", "ec-019", "vlan", TcVlanSizeCst}, + {"positive: vlan push id 4094", "ec-145", "vlan", TcVlanSizeCst}, + {"positive: csum iph", "ec-025", "csum", TcCsumSizeCst}, + {"positive: csum with all seven flags", "ec-158", "csum", TcCsumSizeCst}, + {"positive: nat ingress 10.0.0.0/8", "ec-031", "nat", TcNatSizeCst}, + {"positive: simple sdata", "ec-037", "simple", TcGactSizeCst}, + {"positive: ctinfo dscp", "ec-049", "ctinfo", TcGactSizeCst}, + {"positive: sample rate and group", "ec-055", "sample", TcGactSizeCst}, + {"positive: skbmod swap mac", "ec-061", "skbmod", TcSkbmodSizeCst}, + {"positive: skbmod set dmac and smac", "ec-198", "skbmod", TcSkbmodSizeCst}, + {"positive: mpls pop", "ec-067", "mpls", TcMplsSizeCst}, + {"positive: mpls push label, tc and ttl", "ec-207", "mpls", TcMplsSizeCst}, + {"boundary: nat egress 0.0.0.0/0 (mask 0)", "ec-167", "nat", TcNatSizeCst}, + {"boundary: connmark zone 65535", "ec-182", "connmark", TcConnmarkSizeCst}, + {"corner: connmark zone 5, tail padding as tc zeroes it (W214)", "ec-043", "connmark", TcConnmarkSizeCst}, + {"corner: skbmod ecn, the u64 after four bytes of padding", "ec-201", "skbmod", TcSkbmodSizeCst}, + } + for _, tc := range captured { + t.Run(tc.description, func(t *testing.T) { + k := kinds[tc.kind] + opts := tcActCapturedOptions(t, tc.id) + want := tcAttr(t, opts, k.parms) + if len(want) != tc.expected { + t.Fatalf("tc's PARMS is %d bytes, want %d", len(want), tc.expected) + } + if got := k.decode(t, opts).Append(nil); !bytes.Equal(got, want) { + t.Errorf("Append(decode(PARMS)) = % x\ntc sent % x", got, want) + } + }) + } + + gen := TcGen{Index: 7, Capab: 1, Action: 3 /* TC_ACT_PIPE */, Refcnt: 2, Bindcnt: 3} + maxGen := TcGen{Index: math.MaxUint32, Capab: math.MaxUint32, Action: math.MinInt32, + Refcnt: math.MaxInt32, Bindcnt: -1} + rate := TcRateSpec{CellLog: 3, Linklayer: 1, Overhead: 4, CellAlign: -1, Mpu: 64, Rate: 125000} + roundTrip := []struct { + description string + kind string + x tcActEnc + expected int // the bytes Append writes + }{ + {"positive: tc_police with both rate specs", "police", TcPolice{Index: 1, Action: 1, /* TC_ACT_RECLASSIFY */ + Limit: 2, Burst: 3, Mtu: 2048, Rate: rate, PeakRate: rate, Refcnt: 4, Bindcnt: 5, Capab: 6}, TcPoliceSizeCst}, + {"positive: tc_mirred", "mirred", TcMirred{TcGen: gen, Eaction: 3, Ifindex: 9}, TcMirredSizeCst}, + {"positive: tc_skbedit (tc_gen)", "skbedit", gen, TcGactSizeCst}, + {"positive: tc_vlan", "vlan", TcActInt{TcGen: gen, V: 2}, TcVlanSizeCst}, + {"positive: tc_nat", "nat", TcNat{TcGen: gen, OldAddr: [4]byte{10, 0, 0, 0}, NewAddr: [4]byte{1, 2, 3, 4}, + Mask: [4]byte{255, 0, 0, 0}, Flags: 1}, TcNatSizeCst}, + {"positive: tc_connmark", "connmark", TcConnmark{TcGen: gen, Zone: 5}, TcConnmarkSizeCst}, + {"positive: tc_skbmod", "skbmod", TcSkbmod{TcGen: gen, Flags: 0xf}, TcSkbmodSizeCst}, + {"boundary: police rates of 2^32-1 (tc caps rate at ~0U and sends RATE64 beside it)", "police", + TcPolice{Rate: TcRateSpec{Rate: math.MaxUint32}, PeakRate: TcRateSpec{Rate: math.MaxUint32}}, TcPoliceSizeCst}, + {"boundary: every field at its extreme", "mirred", TcMirred{TcGen: maxGen, Eaction: math.MinInt32, + Ifindex: math.MaxUint32}, TcMirredSizeCst}, + {"boundary: csum's update_flags, all 32 bits", "csum", TcActInt{TcGen: maxGen, V: math.MaxUint32}, TcCsumSizeCst}, + {"boundary: skbmod's flags, all 64 bits", "skbmod", TcSkbmod{TcGen: maxGen, Flags: math.MaxUint64}, TcSkbmodSizeCst}, + {"corner: zero tc_police", "police", TcPolice{}, TcPoliceSizeCst}, + {"corner: zero tc_gen (sample)", "sample", TcGen{}, TcGactSizeCst}, + {"corner: zero tc_mpls", "mpls", TcActInt{}, TcMplsSizeCst}, + {"corner: zero tc_nat", "nat", TcNat{}, TcNatSizeCst}, + {"corner: zero tc_connmark", "connmark", TcConnmark{}, TcConnmarkSizeCst}, + {"corner: zero tc_skbmod", "skbmod", TcSkbmod{}, TcSkbmodSizeCst}, + } + for _, tc := range roundTrip { + t.Run(tc.description, func(t *testing.T) { + k := kinds[tc.kind] + b := tc.x.Append([]byte{0xaa}) + if len(b)-1 != tc.expected { + t.Fatalf("Append wrote %d bytes, want %d", len(b)-1, tc.expected) + } + if b[0] != 0xaa { + t.Fatal("Append changed what was already in the slice") + } + if reflect.ValueOf(tc.x).IsZero() && !bytes.Equal(b[1:], make([]byte, tc.expected)) { + t.Errorf("zero struct laid out as % x, want all zero", b[1:]) + } + ab := NewAttrBuilder(make([]byte, 128)) + if err := ab.PutBytes(k.parms, b[1:]); err != nil { + t.Fatal(err) + } + if got := k.decode(t, ab.Bytes()); !reflect.DeepEqual(got, tc.x) { + t.Errorf("decode(Append(x)) = %+v, want %+v", got, tc.x) + } + }) + } +} + +// TestAppendTcActStructsEdges is what the struct table does not show: +// Append into a full slice, connmark's padding, and police's 32-bit rate +// as tc caps it beside RATE64. +// +// go test ./pkg/xtcpnl/ -run TestAppendTcActStructsEdges +func TestAppendTcActStructsEdges(t *testing.T) { + t.Run("negative: a full destination grows and keeps its bytes", func(t *testing.T) { + dst := make([]byte, 3) + copy(dst, "abc") + got := TcMirred{Ifindex: 1}.Append(dst) + if len(got) != 3+TcMirredSizeCst || string(got[:3]) != "abc" { + t.Errorf("Append(full) = % x", got) + } + }) + t.Run("corner: TcConnmark{Zone: 1} is 24 bytes, the last two zero (W214)", func(t *testing.T) { + got := TcConnmark{Zone: 1}.Append(nil) + want := append(make([]byte, TcGactSizeCst), 1, 0, 0, 0) + if !bytes.Equal(got, want) { + t.Errorf("got % x, want % x", got, want) + } + }) + t.Run("corner: TcSkbmod's flags start at offset 24", func(t *testing.T) { + got := TcSkbmod{Flags: 1}.Append(nil) + if got[tcSkbmodFlagsOffCst] != 1 || !bytes.Equal(got[TcGactSizeCst:tcSkbmodFlagsOffCst], []byte{0, 0, 0, 0}) { + t.Errorf("got % x", got) + } + }) + t.Run("boundary: police rate 40gbit is ~0U in tc_police and the full rate in RATE64", func(t *testing.T) { + opts := tcActCapturedOptions(t, "ec-087") + p, err := ParseTcPolice(opts) + if err != nil { + t.Fatal(err) + } + if p.P.Rate.Rate != math.MaxUint32 { + t.Errorf("tc_police rate = %#x, want 0xffffffff", p.P.Rate.Rate) + } + r64 := tcAttr(t, opts, TcaPoliceRate64) + if len(r64) != 8 || binary.LittleEndian.Uint64(r64) != 5_000_000_000 { + t.Errorf("RATE64 = % x, want 5e9 bytes/s", r64) + } + }) +} + +// BenchmarkAppendTcPolice lays out the largest of the parms structs. +func BenchmarkAppendTcPolice(b *testing.B) { + p := TcPolice{Index: 1, Burst: 3, Mtu: 2048, Rate: TcRateSpec{Rate: 125000}} + buf := make([]byte, 0, TcPoliceSizeCst) + b.ReportAllocs() + for b.Loop() { + buf = p.Append(buf[:0]) + } +} diff --git a/pkg/xtcpnl/xtcpnl_tc_action_write.go b/pkg/xtcpnl/xtcpnl_tc_action_write.go new file mode 100644 index 000000000..0301e8f50 --- /dev/null +++ b/pkg/xtcpnl/xtcpnl_tc_action_write.go @@ -0,0 +1,85 @@ +//go:build gotc_write + +// gotc_write builds this for gotc's action writes (gotc 22P). Like +// xtcpnl_tc_write.go it is compiled only behind its tag, so the default +// build of this package cannot lay out an action write. + +package xtcpnl + +import ( + "errors" + + "golang.org/x/sys/unix" +) + +const ( + // tcaReqHdrCst is sizeof(struct nlmsghdr) + sizeof(struct tcamsg), + // what addattr_l's maxlen counts before an action request's + // attributes. + tcaReqHdrCst = NlMsgHdrSizeCst + TcaMsgSizeCst + // TcActWriteRoomCst is the attribute room of an action write. + // tc_action_modify, tc_action_gd and tc_act_list_or_flush each build + // into buf[MAX_MSG] after the tcamsg, and every addattr_l is called + // with maxlen MAX_MSG, which counts the nlmsghdr and tcamsg too + // (tc/m_action.c:612-621, 727-736, 773-780): MAX_MSG less 20. + TcActWriteRoomCst = TcActMaxMsgCst - tcaReqHdrCst +) + +// ErrTcActionWriteType is an action write whose type is not RTM_NEWACTION +// or RTM_DELACTION. +var ErrTcActionWriteType = errors.New("xtcpnl: a tc action write is RTM_NEWACTION or RTM_DELACTION") + +// BuildTcActionWriteRequest lays out one action write: a struct tcamsg +// (tca_family AF_UNSPEC, three pad bytes) and the attributes attrs writes, +// with at most TcActWriteRoomCst bytes of them. do_action's flags +// (tc/m_action.c:869-914) are the caller's to pass, with the NLM_F_ACK +// rtnl_talk adds: +// +// - add: RTM_NEWACTION, NLM_F_EXCL|NLM_F_CREATE; attrs is parse_action's +// TCA_ACT_TAB. +// - change and replace: RTM_NEWACTION, NLM_F_CREATE|NLM_F_REPLACE. +// - delete: RTM_DELACTION, 0; attrs is PutTcActDeleteTab. +// - flush: RTM_DELACTION, NLM_F_ROOT; attrs is PutTcActFlushAttrs. +// +// An attribute that does not fit is ErrAttrNoSpace, where tc's addattr_l +// prints "addattr_l ERROR" and sends what it has: gotc refuses a request +// tc would truncate rather than send it, as BuildTcWriteRequest does. +func BuildTcActionWriteRequest(msgType, flags uint16, seq uint32, attrs func(ab *AttrBuilder) error) ([]byte, error) { + if msgType != uint16(unix.RTM_NEWACTION) && msgType != uint16(unix.RTM_DELACTION) { + return nil, ErrTcActionWriteType + } + // One allocation holds the builder and its buffer: attrs is a call the + // compiler cannot see into, so the builder it is handed escapes. + r := new(tcActWriteBuf) + r.ab = NewAttrBuilder(r.raw[:]) + if attrs != nil { + if err := attrs(&r.ab); err != nil { + return nil, err + } + } + var hdr [TcaMsgSizeCst]byte // tca_family AF_UNSPEC (0), tca__pad1, tca__pad2 + return BuildWriteRequest(msgType, flags, seq, hdr[:], r.ab.Bytes()) +} + +// tcActWriteBuf is an action write's attribute builder and the buffer it +// writes. +type tcActWriteBuf struct { + ab AttrBuilder + raw [TcActWriteRoomCst]byte +} + +// PutTcActDeleteTab writes a delete's TCA_ACT_TAB, as tc_action_gd builds +// it for RTM_DELACTION: at orders 1, 2, ..., each action's KIND (cut to 15 +// bytes) and, unless its index is 0, INDEX. `index 0` sends no INDEX, and +// the kernel refuses the delete (W178). There is no 32-action bound: tc +// sends every action named, and the kernel reads the first 32 (W179). +func PutTcActDeleteTab(ab *AttrBuilder, acts []TcActRef) error { return putActRefTab(ab, acts) } + +// PutTcActFlushAttrs writes a flush's attributes, as tc_act_list_or_flush +// builds them for RTM_DELACTION: the list's TCA_ACT_TAB{1{KIND}} and +// TCA_ROOT_FLAGS (LARGE_DUMP_ON, and TERSE_DUMP for -br, each in value +// and selector) and, when since is not 0 (`if (msec_since)`), a +// TCA_ROOT_TIME_DELTA the kernel's flush never reads (W180). +func PutTcActFlushAttrs(ab *AttrBuilder, kind string, terse bool, since uint32) error { + return putActListAttrs(ab, kind, terse, since, since != 0) +} diff --git a/pkg/xtcpnl/xtcpnl_tc_action_write_test.go b/pkg/xtcpnl/xtcpnl_tc_action_write_test.go new file mode 100644 index 000000000..c27a69810 --- /dev/null +++ b/pkg/xtcpnl/xtcpnl_tc_action_write_test.go @@ -0,0 +1,175 @@ +//go:build gotc_write + +package xtcpnl + +import ( + "errors" + "strings" + "testing" + + "golang.org/x/sys/unix" +) + +// tcActPutRaw writes TCA_ACT_TAB with a payload as captured: an add's tab +// is parse_action's (gotc 22W), so here it is tc's own bytes, and the case +// checks the header, the tcamsg and the flags around it. +func tcActPutRaw(tab []byte) func(ab *AttrBuilder) error { + return func(ab *AttrBuilder) error { return ab.PutBytes(TcaRootTab, tab) } +} + +func tcActRefs(kind string, n int) []TcActRef { + acts := make([]TcActRef, n) + for i := range acts { + acts[i] = TcActRef{Kind: kind, Index: uint32(i + 1)} + } + return acts +} + +// TestBuildTcActionWriteRequest is each do_action write verb against the +// request tc 7.2.0 sent in a tcactwrite row (gotc 22P): add, change and +// replace around tc's own TAB, delete and flush built in full. +// +// go test -tags gotc_write ./pkg/xtcpnl/ -run TestBuildTcActionWriteRequest +func TestBuildTcActionWriteRequest(t *testing.T) { + const ack = unix.NLM_F_ACK + tab := func(id string) []byte { + req := tcActCapturedReq(t, id) + return tcAttr(t, req[NlMsgHdrSizeCst+TcaMsgSizeCst:], TcaRootTab) + } + tests := []struct { + description string + id string // the tcactwrite row whose request is expected + msgType uint16 + flags uint16 + attrs func(ab *AttrBuilder) error + }{ + {"positive: add (EXCL|CREATE)", "ec-001", unix.RTM_NEWACTION, + unix.NLM_F_EXCL | unix.NLM_F_CREATE | ack, tcActPutRaw(tab("ec-001"))}, + {"positive: change (CREATE|REPLACE)", "ec-002", unix.RTM_NEWACTION, + unix.NLM_F_CREATE | unix.NLM_F_REPLACE | ack, tcActPutRaw(tab("ec-002"))}, + {"positive: replace (CREATE|REPLACE, as change)", "ec-003", unix.RTM_NEWACTION, + unix.NLM_F_CREATE | unix.NLM_F_REPLACE | ack, tcActPutRaw(tab("ec-003"))}, + {"positive: delete police index 1", "ec-005", unix.RTM_DELACTION, ack, + func(ab *AttrBuilder) error { return PutTcActDeleteTab(ab, []TcActRef{{"police", 1}}) }}, + {"positive: flush police (NLM_F_ROOT, TAB holding KIND only)", "ec-006", unix.RTM_DELACTION, + unix.NLM_F_ROOT | ack, func(ab *AttrBuilder) error { return PutTcActFlushAttrs(ab, "police", false, 0) }}, + {"positive: delete gact and police in one request", "ec-234", unix.RTM_DELACTION, ack, + func(ab *AttrBuilder) error { + return PutTcActDeleteTab(ab, []TcActRef{{"gact", 1}, {"police", 1}}) + }}, + {"boundary: a delete of 33 actions, every one sent (W179)", "ec-231", unix.RTM_DELACTION, ack, + func(ab *AttrBuilder) error { return PutTcActDeleteTab(ab, tcActRefs("gact", 33)) }}, + {"corner: delete with index 0 sends no INDEX (W178)", "ng-085", unix.RTM_DELACTION, ack, + func(ab *AttrBuilder) error { return PutTcActDeleteTab(ab, []TcActRef{{"gact", 0}}) }}, + {"corner: an empty TAB add (`actions add action get`, W177)", "ec-236", unix.RTM_NEWACTION, + unix.NLM_F_EXCL | unix.NLM_F_CREATE | ack, func(ab *AttrBuilder) error { + n, err := ab.BeginNest(TcaRootTab) + if err != nil { + return err + } + return ab.EndNest(n) + }}, + {"corner: flush since 1000 sends TIME_DELTA (W180)", "ec-237", unix.RTM_DELACTION, + unix.NLM_F_ROOT | ack, func(ab *AttrBuilder) error { return PutTcActFlushAttrs(ab, "gact", false, 1000) }}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + want := tcActCapturedReq(t, tc.id) + got, err := BuildTcActionWriteRequest(tc.msgType, tc.flags, 0, tc.attrs) + if err != nil { + t.Fatal(err) + } + if !tcSameRequest(got, want) { + t.Errorf("request\n got % x\nwant % x", got, want) + } + }) + } +} + +// TestBuildTcActionWriteRequestRefusals is the builder's refusals and its +// bound: the type check, the MAX_MSG room to the byte, and the header. +// +// go test -tags gotc_write ./pkg/xtcpnl/ -run TestBuildTcActionWriteRequestRefusals +func TestBuildTcActionWriteRequestRefusals(t *testing.T) { + fill := func(n int) func(ab *AttrBuilder) error { + return func(ab *AttrBuilder) error { return ab.PutBytes(TcaRootTab, make([]byte, n)) } + } + tests := []struct { + description string + msgType uint16 + attrs func(ab *AttrBuilder) error + expected error + expectedLen int // nlmsg_len when built + }{ + {"negative: RTM_GETACTION belongs on BuildTcActionGet", unix.RTM_GETACTION, nil, ErrTcActionWriteType, 0}, + {"negative: RTM_NEWTFILTER belongs on BuildTcWriteRequest", unix.RTM_NEWTFILTER, nil, ErrTcActionWriteType, 0}, + {"negative: an error from attrs is returned", unix.RTM_NEWACTION, + func(*AttrBuilder) error { return ErrAttrTooLong }, ErrAttrTooLong, 0}, + {"boundary: a TAB filling MAX_MSG to the byte", unix.RTM_NEWACTION, + fill(TcActWriteRoomCst - RTAttrSizeCst), nil, TcActMaxMsgCst}, + {"boundary: one byte over MAX_MSG (addattr_l ERROR in tc)", unix.RTM_NEWACTION, + fill(TcActWriteRoomCst - RTAttrSizeCst + 1), ErrAttrNoSpace, 0}, + {"corner: no attributes is the 20-byte header and tcamsg", unix.RTM_DELACTION, nil, nil, tcaReqHdrCst}, + {"corner: the header is tcamsg (4), not tcmsg (20)", unix.RTM_NEWACTION, fill(0), nil, + tcaReqHdrCst + RTAttrSizeCst}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + got, err := BuildTcActionWriteRequest(tc.msgType, 0, 1, tc.attrs) + if tc.expected != nil { + if !errors.Is(err, tc.expected) || got != nil { + t.Fatalf("got (%d bytes, %v), want (nil, %v)", len(got), err, tc.expected) + } + return + } + if err != nil { + t.Fatal(err) + } + if len(got) != tc.expectedLen || FamilyHdrLen(tc.msgType) != TcaMsgSizeCst { + t.Errorf("len %d (FamilyHdrLen %d), want %d (4)", len(got), FamilyHdrLen(tc.msgType), tc.expectedLen) + } + if got[NlMsgHdrSizeCst] != unix.AF_UNSPEC { + t.Errorf("tca_family = %d, want AF_UNSPEC", got[NlMsgHdrSizeCst]) + } + }) + } + // PutTcActDeleteTab cuts a kind to 15 bytes, as tc's strncpy does. + t.Run("corner: a 16-byte kind is sent as its first 15", func(t *testing.T) { + got, err := BuildTcActionWriteRequest(unix.RTM_DELACTION, 0, 1, func(ab *AttrBuilder) error { + return PutTcActDeleteTab(ab, []TcActRef{{strings.Repeat("k", 16), 1}}) + }) + if err != nil { + t.Fatal(err) + } + if strings.Contains(string(got), strings.Repeat("k", 16)) || !strings.Contains(string(got), strings.Repeat("k", 15)) { + t.Errorf("request % x", got) + } + }) +} + +// TestBuildTcActionWriteAllocs pins the allocations per request: the +// attribute buffer and the laid-out message. +func TestBuildTcActionWriteAllocs(t *testing.T) { + acts := []TcActRef{{"gact", 1}} + attrs := func(ab *AttrBuilder) error { return PutTcActDeleteTab(ab, acts) } + n := testing.AllocsPerRun(100, func() { + if _, err := BuildTcActionWriteRequest(unix.RTM_DELACTION, unix.NLM_F_ACK, 1, attrs); err != nil { + t.Fatal(err) + } + }) + if n > 2 { + t.Errorf("%v allocations per request, want at most 2", n) + } +} + +// BenchmarkBuildTcActionWriteRequest builds a one-action delete. +func BenchmarkBuildTcActionWriteRequest(b *testing.B) { + acts := []TcActRef{{"gact", 1}} + attrs := func(ab *AttrBuilder) error { return PutTcActDeleteTab(ab, acts) } + b.ReportAllocs() + for b.Loop() { + if _, err := BuildTcActionWriteRequest(unix.RTM_DELACTION, unix.NLM_F_ACK, 1, attrs); err != nil { + b.Fatal(err) + } + } +} diff --git a/pkg/xtcpnl/xtcpnl_tc_write_test.go b/pkg/xtcpnl/xtcpnl_tc_write_test.go index 785ecba69..1329220f2 100644 --- a/pkg/xtcpnl/xtcpnl_tc_write_test.go +++ b/pkg/xtcpnl/xtcpnl_tc_write_test.go @@ -193,8 +193,8 @@ func TestBuildTcWriteRefusals(t *testing.T) { } } -// TestTcWriteAdmitted is the eight tc write types through the write gate: -// qdisc, class, filter and chain, each NEW and DEL. +// TestTcWriteAdmitted is the ten tc write types through the write gate: +// qdisc, class, filter, chain and action, each NEW and DEL. func TestTcWriteAdmitted(t *testing.T) { tests := []struct { description string @@ -212,7 +212,10 @@ func TestTcWriteAdmitted(t *testing.T) { {"negative: RTM_GETQDISC", unix.RTM_GETQDISC, false}, {"negative: RTM_GETTFILTER", unix.RTM_GETTFILTER, false}, {"boundary: RTM_GETCHAIN, the type after DELCHAIN", unix.RTM_GETCHAIN, false}, - {"corner: RTM_NEWACTION is not yet", unix.RTM_NEWACTION, false}, + {"positive: RTM_NEWACTION (gotc 22P)", unix.RTM_NEWACTION, true}, + {"positive: RTM_DELACTION (gotc 22P)", unix.RTM_DELACTION, true}, + {"negative: RTM_GETACTION", unix.RTM_GETACTION, false}, + {"boundary: type 0x33, the one after RTM_GETACTION, names nothing", unix.RTM_GETACTION + 1, false}, } for _, tc := range tests { t.Run(tc.description, func(t *testing.T) { diff --git a/pkg/xtcpnl/xtcpnl_write_gate_test.go b/pkg/xtcpnl/xtcpnl_write_gate_test.go index d91ee399c..938b0777f 100644 --- a/pkg/xtcpnl/xtcpnl_write_gate_test.go +++ b/pkg/xtcpnl/xtcpnl_write_gate_test.go @@ -28,7 +28,9 @@ import ( // RTM_SETLINK with token set and del (G4-T03), and RTM_NEWNSID with netns // set (G4-T04); `link set` still sends RTM_NEWLINK. The qdisc and class // pairs joined with gotc's tc write builder (gotc 17P), whose parity target -// is the captured ws/tcqwrite corpus. +// is the captured ws/tcqwrite corpus; the filter and chain pairs with its +// filter writes (gotc 20W, ws/tcfwrite), and the action pair with its +// action writes (gotc 22P, ws/tcactwrite). var admittedWriteTypes = map[uint16]bool{ uint16(unix.RTM_NEWROUTE): true, uint16(unix.RTM_DELROUTE): true, @@ -54,6 +56,12 @@ var admittedWriteTypes = map[uint16]bool{ uint16(unix.RTM_DELQDISC): true, uint16(unix.RTM_NEWTCLASS): true, uint16(unix.RTM_DELTCLASS): true, + uint16(unix.RTM_NEWTFILTER): true, + uint16(unix.RTM_DELTFILTER): true, + uint16(unix.RTM_NEWCHAIN): true, + uint16(unix.RTM_DELCHAIN): true, + uint16(unix.RTM_NEWACTION): true, + uint16(unix.RTM_DELACTION): true, } // TestBuildWriteRequestAdmitsOnlyListedWrites walks every named rtnetlink type diff --git a/tools/nlcapgen/main.go b/tools/nlcapgen/main.go index 74850dc7e..d0ae9653d 100644 --- a/tools/nlcapgen/main.go +++ b/tools/nlcapgen/main.go @@ -145,31 +145,32 @@ var families = map[string]func() []*space{ "ethtool": func() []*space { return []*space{ethRingSpace(), ethChanSpace(), ethPauseSpace(), ethFecSpace(), ethCoalSpace(), ethShowSpace()} }, - "devlink": func() []*space { return []*space{devlinkSpace()} }, - "vdpa": func() []*space { return []*space{vdpaSpace()} }, - "fou": func() []*space { return []*space{fouSpace()} }, - "mptcp": func() []*space { return []*space{mptcpSpace()} }, - "tipc": func() []*space { return []*space{tipcSpace()} }, - "bridge": func() []*space { return []*space{bridgeSpace()} }, - "bridgex": func() []*space { return []*space{bridgexSpace()} }, - "bridgefdb": func() []*space { return []*space{bridgefdbSpace()} }, - "bridgemdb": func() []*space { return []*space{bridgemdbSpace()} }, - "tunnel": func() []*space { return []*space{tunnelSpace()} }, - "tuntap": func() []*space { return []*space{tuntapSpace()} }, - "tcqdisc": func() []*space { return []*space{tcqdiscSpace()} }, - "tcclass": func() []*space { return []*space{tcclassSpace()} }, - "tcfilter": func() []*space { return []*space{tcfilterSpace()} }, - "tcflower": func() []*space { return []*space{tcflowerSpace()} }, - "tcaction": func() []*space { return []*space{tcactionSpace()} }, - "tcaction2": func() []*space { return []*space{tcaction2Space()} }, - "tcmonitor": func() []*space { return []*space{tcmonitorSpace()} }, - "tcsched": func() []*space { return []*space{tcschedSpace()} }, - "tcaqm": func() []*space { return []*space{tcaqmSpace()} }, - "tcqwrite": func() []*space { return []*space{tcqwriteSpace()} }, - "tcswrite": func() []*space { return []*space{tcswriteSpace()} }, - "tcawrite": func() []*space { return []*space{tcawriteSpace()} }, - "tcfwrite": func() []*space { return []*space{tcfwriteSpace()} }, - "tcematch": func() []*space { return []*space{tcematchSpace()} }, + "devlink": func() []*space { return []*space{devlinkSpace()} }, + "vdpa": func() []*space { return []*space{vdpaSpace()} }, + "fou": func() []*space { return []*space{fouSpace()} }, + "mptcp": func() []*space { return []*space{mptcpSpace()} }, + "tipc": func() []*space { return []*space{tipcSpace()} }, + "bridge": func() []*space { return []*space{bridgeSpace()} }, + "bridgex": func() []*space { return []*space{bridgexSpace()} }, + "bridgefdb": func() []*space { return []*space{bridgefdbSpace()} }, + "bridgemdb": func() []*space { return []*space{bridgemdbSpace()} }, + "tunnel": func() []*space { return []*space{tunnelSpace()} }, + "tuntap": func() []*space { return []*space{tuntapSpace()} }, + "tcqdisc": func() []*space { return []*space{tcqdiscSpace()} }, + "tcclass": func() []*space { return []*space{tcclassSpace()} }, + "tcfilter": func() []*space { return []*space{tcfilterSpace()} }, + "tcflower": func() []*space { return []*space{tcflowerSpace()} }, + "tcaction": func() []*space { return []*space{tcactionSpace()} }, + "tcaction2": func() []*space { return []*space{tcaction2Space()} }, + "tcmonitor": func() []*space { return []*space{tcmonitorSpace()} }, + "tcsched": func() []*space { return []*space{tcschedSpace()} }, + "tcaqm": func() []*space { return []*space{tcaqmSpace()} }, + "tcqwrite": func() []*space { return []*space{tcqwriteSpace()} }, + "tcswrite": func() []*space { return []*space{tcswriteSpace()} }, + "tcawrite": func() []*space { return []*space{tcawriteSpace()} }, + "tcfwrite": func() []*space { return []*space{tcfwriteSpace()} }, + "tcematch": func() []*space { return []*space{tcematchSpace()} }, + "tcactwrite": func() []*space { return []*space{tcactwriteSpace()} }, } // namedFamilies are families of named rows, written out as they are diff --git a/tools/nlcapgen/matrix_tcactwrite.go b/tools/nlcapgen/matrix_tcactwrite.go new file mode 100644 index 000000000..6eafce214 --- /dev/null +++ b/tools/nlcapgen/matrix_tcactwrite.go @@ -0,0 +1,551 @@ +package main + +import ( + "slices" + "strconv" + "strings" +) + +// The action write space (gotc 22C): `tc actions add|change|replace| +// delete|flush` and the parse side of the increment-12 kinds (police, +// mirred, skbedit, vlan, csum, nat, simple, connmark, ctinfo, sample, +// skbmod and mpls), standalone and inside filters, in one corpus +// directory, ws/tcactwrite. +// +// tc's side is tc/m_action.c (do_action, tc_action_modify, tc_action_gd +// and tc_act_list_or_flush, parse_action), tc_util.c's +// parse_action_control family and each kind's parse in tc/m_.c, at +// v7.2.0. The kernel's side is net/sched/act_api.c and each act_.c. +// +// Each standalone write is the captured command, its setup in Pre, and a +// readback (`tc actions ls action `) of what the kernel kept; a +// filter write reads the filter back. The rows pin the plan's leads +// (docs/netlink/upstream/iproute2-tc-action-write.md, W156-W215): police's +// inverted message (W156), its control words (W157), mirred's control +// (W158), skipped words (W159), blockid 0 (W160), dev and blockid +// (W161), the device (W162), mpu (W163), cell_log 0 (W164) and its UB +// shift (W165), rates that round to 0 (W166), the pps burst (W167), +// conform-exceed (W168, W169), prefix collisions (W170), vlan's id (W171) +// and MACs (W172), csum's index (W173), skbedit's mark and priority +// (W174), control after index (W175), a command after an add (W176), an +// empty add (W177), delete's index 0 (W178) and 33 actions (W179), +// flush's since (W180), its skipped word (W181) and failures (W182), +// skip_sw with skip_hw (W183), police's messages (W184), exit(-1) in a +// -force batch (W185), bare tc actions (W186); simple's 32-byte copy +// (W189) and order (W190), bare kinds (W191), nat's message (W192), +// repeat (W193), prefix (W194) and IPv4 forms (W195), skbmod's MACs +// (W196), modes (W197), etype 0 (W198), stderr (W199), index base (W200), +// exit paths (W201), mpls's usage (W202), label (W203), protocol 0 +// (W204), action word (W205), prefixes (W206) and label 3 (W207), +// ctinfo's statemask (W208, W209), the kind-word loop (W210), sample's +// messages (W211) and index (W212), simple with no sdata (W213), and goto +// with a bad chain (W215). Capturing found two more: a failed delete's +// return of 1 that do_action doesn't stop on (W187), and police's rate +// with avrate refused with no message (W188). +// +// gotc refuses by name what waits for increment 23: pedit, tunnel_key, +// ife, ct, gate and the bpf action. tc and the kernel accept them, so +// their "out-" rows are positive. +// +// Writes are plain only. Determinism: explicit indexes, fixed MACs, no +// packets. + +// tcActWriteModules are the qdisc, classifier and action modules the +// rows use; act_connmark and act_ctinfo pull in nf_conntrack and +// act_sample psample. +var tcActWriteModules = []string{ + "sch_htb", "sch_ingress", + "cls_basic", "cls_cgroup", "cls_flow", "cls_fw", "cls_matchall", "cls_route", "cls_u32", + "act_gact", "act_police", "act_mirred", "act_skbedit", "act_vlan", "act_csum", "act_nat", + "act_simple", "act_connmark", "act_ctinfo", "act_sample", "act_skbmod", "act_mpls", + "act_pedit", "act_tunnel_key", "act_ife", "act_ct", "act_gate", "act_bpf", +} + +// tcAwKinds are the twelve kinds, in the plan's order. +var tcAwKinds = []string{ + "police", "mirred", "skbedit", "vlan", "csum", "nat", "simple", "connmark", "ctinfo", "sample", "skbmod", "mpls", +} + +// tcAwOne is one valid action of each kind, without its index: the add, +// change, replace, delete and flush grid builds on it. +var tcAwOne = map[string]string{ + "police": "police rate 1mbit burst 10k", + "mirred": "mirred egress redirect dev d1", + "skbedit": "skbedit mark 5", + "vlan": "vlan pop", + "csum": "csum iph", + "nat": "nat ingress 10.0.0.0/8 192.168.0.1", + "simple": "simple sdata hello", + "connmark": "connmark zone 5", + "ctinfo": "ctinfo dscp 0xfc000000", + "sample": "sample rate 100 group 5", + "skbmod": "skbmod swap mac", + "mpls": "mpls pop protocol ipv4", +} + +// tcAwTwo is a second form of each kind, for change and replace. +var tcAwTwo = map[string]string{ + "police": "police rate 2mbit burst 20k", + "mirred": "mirred egress mirror dev d1", + "skbedit": "skbedit priority 5", + "vlan": "vlan push id 100", + "csum": "csum tcp", + "nat": "nat egress 10.1.2.3 10.4.5.6", + "simple": "simple sdata world", + "connmark": "connmark zone 6", + "ctinfo": "ctinfo cpmark 0xff", + "sample": "sample rate 200 group 6", + "skbmod": "skbmod set etype 0xbeef", + "mpls": "mpls dec_ttl", +} + +// tcAwPre is the base (20C's: d0 with clsact, d1 with an htb root, two +// classes and ingress block 10) plus setup lines. +func tcAwPre(lines ...string) []string { + return append(clonePre(tcFwriteBase), lines...) +} + +// tcAwRb is the readback of one kind's actions. +func tcAwRb(kind string) readback { + return readback{Name: "dump", Cmd: "tc actions ls action " + kind} +} + +// tcAwRange is n actions of form, indexes lo upward. +func tcAwRange(form string, lo, n int) string { + var b strings.Builder + for i := lo; i < lo+n; i++ { + b.WriteString(" action " + form + " index " + strconv.Itoa(i)) + } + return b.String() +} + +// tcAwSdata is an n-byte sdata word. +func tcAwSdata(n int) string { return strings.Repeat("s", n) } + +// tcactwriteSpace: the action writes of the twelve kinds. +func tcactwriteSpace() *space { + var cmds []value + rb := map[string][]readback{} + add := func(kind brKind, fix string, r readback, words string, pre []string) { + val := bc(kind, fix, words, pre) + cmds = append(cmds, val) + rb[val.Name] = []readback{r} + } + base := tcFwriteBase + // a is a standalone add of one kind: "actions add action ". + a := func(kind brKind, fix, k, words string) { + add(kind, fix, tcAwRb(k), "actions add action "+words, base) + } + + // The verb grid: each kind's add, change, replace, delete and flush, + // the last four on an action made first. + for _, k := range tcAwKinds { + one, two := tcAwOne[k], tcAwTwo[k] + made := tcAwPre("tc actions add action " + one + " index 1") + a(brPos, "v-add", k, one+" index 1") + add(brPos, "v-change", tcAwRb(k), "actions change action "+two+" index 1", made) + add(brPos, "v-replace", tcAwRb(k), "actions replace action "+two+" index 1", made) + add(brPos, "v-replace-new", tcAwRb(k), "actions replace action "+two+" index 2", base) + add(brPos, "v-delete", tcAwRb(k), "actions delete action "+k+" index 1", made) + add(brPos, "v-flush", tcAwRb(k), "actions flush action "+k, + tcAwPre("tc actions add action "+one+" index 1", "tc actions add action "+one+" index 2")) + } + + // police: every keyword. + a(brPos, "pol", "police", "police rate 1mbit burst 10k mtu 2k index 1") + a(brPos, "pol", "police", "police rate 1mbit burst 10k peakrate 2mbit mtu 2k index 1") + a(brPos, "pol", "police", "police rate 1mbit burst 10k/8 mtu 2k/8 index 1") + a(brPos, "pol", "police", "police rate 1mbit burst 10k overhead 20 linklayer atm mpu 64 index 1") + a(brPos, "pol", "police", "police rate 1mbit burst 10k linklayer ethernet index 1") + a(brPos, "pol", "police", "police rate 1mbit burst 10k conform-exceed drop/pipe index 1") + a(brPos, "pol", "police", "police rate 1mbit burst 10k conform-exceed pipe/reclassify index 1") + a(brPos, "pol", "police", "police rate 1mbit burst 10k conform-exceed continue index 1") + a(brPos, "pol", "police", "police rate 1mbit burst 10k drop index 1") + a(brPos, "pol", "police", "police rate 1mbit burst 10k pass index 1") + a(brPos, "pol", "police", "police rate 1mbit burst 10k reclassify index 1") + a(brPos, "pol", "police", "police rate 1mbit burst 10k shot index 1") + a(brPos, "pol", "police", "police rate 1mbit burst 10k ok index 1") + a(brPos, "pol", "police", "police pkts_rate 1000 pkts_burst 100 index 1") + a(brPos, "pol", "police", "police rate 40gbit burst 1m index 1") + a(brPos, "pol", "police", "police rate 1mbit burst 10k peakrate 40gbit mtu 2k index 1") + a(brPos, "pol", "police", "police rate 100kbit burst 10k index 1") + a(brPos, "pol", "police", "police rate 1Mibit burst 10Kb index 1") + a(brPos, "pol", "police", "police rate 125000bps burst 10k index 1") + a(brPos, "pol", "police", "police rate 1mbit burst 10k action drop index 1") + a(brPos, "pol", "police", "police rate 1mbit burst 10k index 1 cookie 0102") + a(brCorner, "pol", "police", "police rate 1mbit burst 10k") + a(brCorner, "pol", "police", "police index 1 rate 1mbit burst 10k") + a(brBoundary, "pol", "police", "police rate 1mbit burst 10k mtu 256 index 1") + a(brBoundary, "pol", "police", "police rate 1mbit burst 10k mpu 65535 index 1") + a(brBoundary, "w163", "police", "police rate 1mbit burst 10k mpu 65536 index 1") + a(brCorner, "w163-norate", "police", "police pkts_rate 1000 pkts_burst 100 mpu 64 overhead 4 index 1") + a(brCorner, "w165", "police", "police rate 1mbit burst 10k mtu 4294967295 index 1") + a(brCorner, "w166-0", "police", "police rate 0 rate 1mbit burst 10k index 1") + a(brCorner, "w167", "police", "police pkts_rate 1 pkts_burst 1000 index 1") + a(brCorner, "w168", "police", "police rate 1mbit burst 10k conform-exceed drop pass index 1") + a(brCorner, "w170-p", "police", "police rate 1mbit burst 10k p 2mbit mtu 2k index 1") + a(brCorner, "w170-o", "police", "police rate 1mbit burst 10k o index 1") + a(brCorner, "w157", "police", "police rate 1mbit burst 10k trap index 1") + a(brCorner, "pol-none", "police", "police index 1") + a(brCorner, "w166", "police", "police rate 7bit burst 10k mtu 1500 index 1") + a(brCorner, "w166-nan", "police", "police rate nan burst 10k index 1") + + // mirred. + a(brPos, "mir", "mirred", "mirred egress mirror dev d1 index 1") + a(brPos, "mir", "mirred", "mirred ingress redirect dev d1 index 1") + a(brPos, "mir", "mirred", "mirred ingress mirror dev d1 index 1") + a(brPos, "mir", "mirred", "mirred egress redirect blockid 10 index 1") + a(brPos, "mir", "mirred", "mirred egress mirror dev d1 pipe index 1") + a(brPos, "mir", "mirred", "mirred egress mirror dev d1 drop index 1") + a(brPos, "mir", "mirred", "mirred egress redirect dev d1 index 1 cookie aabb") + a(brCorner, "w158", "mirred", "mirred egress redirect dev d1 pipe index 1") + a(brCorner, "w159", "mirred", "mirred egress bogus egress redirect dev d1 index 1") + a(brCorner, "w162-junk", "mirred", "mirred egress redirect dev if3junk index 1") + a(brCorner, "w170-i", "mirred", "mirred i redirect dev d1 index 1") + a(brCorner, "w175-mir", "mirred", "mirred egress mirror dev d1 index 1 pipe") + + // skbedit. + a(brPos, "skb", "skbedit", "skbedit queue_mapping 3 index 1") + a(brPos, "skb", "skbedit", "skbedit priority 1:2 index 1") + a(brPos, "skb", "skbedit", "skbedit mark 0x10/0xff index 1") + a(brPos, "skb", "skbedit", "skbedit ptype host index 1") + a(brPos, "skb", "skbedit", "skbedit ptype otherhost index 1") + a(brPos, "skb", "skbedit", "skbedit ptype broadcast index 1") + a(brPos, "skb", "skbedit", "skbedit ptype multicast index 1") + a(brPos, "skb", "skbedit", "skbedit inheritdsfield index 1") + a(brPos, "skb", "skbedit", "skbedit queue_mapping 3 priority 5 mark 7 ptype host inheritdsfield pipe index 1") + a(brBoundary, "skb", "skbedit", "skbedit queue_mapping 65535 index 1") + a(brBoundary, "w174", "skbedit", "skbedit priority 10 index 1") + a(brBoundary, "w174-wrap", "skbedit", "skbedit priority 100000001 index 1") + a(brCorner, "w174-mark", "skbedit", "skbedit mark 5/0xff mark 6 index 1") + a(brCorner, "w174-base", "skbedit", "skbedit mark 010 index 1") + a(brCorner, "w170-skb", "skbedit", "skbedit p 5 index 1") + a(brCorner, "w175", "skbedit", "skbedit mark 1 index 5 pipe") + + // vlan. + a(brPos, "vl", "vlan", "vlan push id 100 protocol 802.1ad priority 3 index 1") + a(brPos, "vl", "vlan", "vlan push id 100 protocol 802.1q index 1") + a(brPos, "vl", "vlan", "vlan modify id 200 priority 7 index 1") + a(brPos, "vl", "vlan", "vlan push_eth dst_mac 02:00:00:00:00:01 src_mac 02:00:00:00:00:02 index 1") + a(brPos, "vl", "vlan", "vlan pop_eth index 1") + a(brPos, "vl", "vlan", "vlan pop pipe index 1") + a(brBoundary, "vl", "vlan", "vlan push id 0 index 1") + a(brBoundary, "vl", "vlan", "vlan push id 4094 index 1") + a(brCorner, "w171", "vlan", "vlan push id 010 index 1") + a(brCorner, "w172", "vlan", "vlan push_eth dst_mac aa src_mac 1.2.3.4 index 1") + a(brCorner, "w172-long", "vlan", "vlan push_eth dst_mac 02:00:00:00:00:01:02:03 src_mac 02:00:00:00:00:02 index 1") + a(brCorner, "w170-vl", "vlan", "vlan p index 1") + a(brCorner, "w175-vl", "vlan", "vlan pop index 3 drop") + + // csum. + for _, fl := range []string{"iph", "icmp", "igmp", "tcp", "udp", "udplite", "sctp"} { + a(brPos, "cs", "csum", "csum "+fl+" index 1") + } + a(brBoundary, "cs", "csum", "csum iph icmp igmp tcp udp udplite sctp index 1") + a(brPos, "cs", "csum", "csum iph and tcp and udp drop index 1") + a(brCorner, "w173", "csum", "csum index 5") + a(brCorner, "w173-drop", "csum", "csum index 5 drop") + a(brCorner, "w170-cs", "csum", "csum i u index 1") + a(brCorner, "w175-cs", "csum", "csum tcp index 3 pipe") + + // nat. + a(brPos, "nat", "nat", "nat ingress 10.0.0.0/24 192.168.0.1 index 1") + a(brPos, "nat", "nat", "nat egress 10.1.2.3 10.4.5.6 index 1") + a(brPos, "nat", "nat", "nat egress 10.1.2.3/32 10.4.5.6 drop index 1") + a(brBoundary, "nat", "nat", "nat egress 0.0.0.0/0 10.4.5.6 index 1") + a(brBoundary, "nat", "nat", "nat ingress default 10.4.5.6 index 1") + a(brCorner, "w193", "nat", "nat egress 10.0.0.0/8 2.0.0.0 nat ingress 11.0.0.0/8 3.0.0.0 index 1") + a(brCorner, "w194", "nat", "nat egress 10.0.0.0/8 1.2.3.4/16 index 1") + a(brCorner, "w195", "nat", "nat egress 010.0.0.1 10.1 index 1") + a(brCorner, "w195-mask", "nat", "nat egress 10.0.0.0/0x10 10.1.0.0 index 1") + a(brCorner, "w195-dot", "nat", "nat egress 10.0.0.0/255.255.0.0 10.1.0.0 index 1") + + // simple: sdata of 0 (none), 5, 31, 32 and 33 bytes. + a(brPos, "sim", "simple", "simple sdata hello index 1") + a(brPos, "sim", "simple", "simple sdata hello drop index 1") + a(brBoundary, "sim", "simple", "simple sdata "+tcAwSdata(31)+" index 1") + a(brBoundary, "sim", "simple", "simple sdata "+tcAwSdata(30)+" index 1") + a(brCorner, "w189", "simple", "simple sdata hi index 7") + a(brCorner, "w190", "simple", "simple sdata x index 5 drop") + + // connmark and ctinfo. + a(brPos, "cm", "connmark", "connmark index 1") + a(brPos, "cm", "connmark", "connmark zone 0 index 1") + a(brBoundary, "cm", "connmark", "connmark zone 65535 index 1") + a(brPos, "cm", "connmark", "connmark zone 5 drop index 1") + a(brPos, "cti", "ctinfo", "ctinfo dscp 0xfc000000 0x01000000 index 1") + a(brPos, "cti", "ctinfo", "ctinfo cpmark 0xffffffff zone 3 index 1") + a(brPos, "cti", "ctinfo", "ctinfo cpmark index 1") + a(brPos, "cti", "ctinfo", "ctinfo dscp 0x3f index 1") + a(brPos, "cti", "ctinfo", "ctinfo dscp 0xfc000000 cpmark 0xff zone 3 pipe index 1") + a(brCorner, "w209", "ctinfo", "ctinfo cpmark 0 index 1") + a(brCorner, "cti-none", "ctinfo", "ctinfo index 1") + a(brCorner, "w210", "ctinfo", "ctinfo c dscp 0xfc000000 index 1") + a(brCorner, "w210-cm", "connmark", "connmark co zone 5 index 1") + + // sample. + a(brPos, "smp", "sample", "sample rate 100 group 5 trunc 64 index 1") + a(brPos, "smp", "sample", "sample rate 1 group 1 index 1") + a(brPos, "smp", "sample", "sample rate 100 group 5 drop index 1") + a(brBoundary, "smp", "sample", "sample rate 4294967295 group 4294967295 trunc 4294967295 index 1") + a(brBoundary, "smp", "sample", "sample rate 1 group 1 trunc 0 index 1") + + // skbmod. + a(brPos, "smod", "skbmod", "skbmod set dmac 02:00:00:00:00:01 set smac 02:00:00:00:00:02 index 1") + a(brPos, "smod", "skbmod", "skbmod set etype 0x800 index 1") + a(brPos, "smod", "skbmod", "skbmod set dmac 02:00:00:00:00:01 set etype 0x86dd drop index 1") + a(brPos, "smod", "skbmod", "skbmod ecn index 1") + a(brCorner, "w196", "skbmod", "skbmod set dmac 02:00:00:00:00:01:junk index 1") + a(brCorner, "w196-x", "skbmod", "skbmod set dmac 0x02:1aa:00:00:00:01 index 1") + a(brCorner, "w197", "skbmod", "skbmod set dmac 02:00:00:00:00:01 swap mac index 1") + a(brCorner, "w197-mac", "skbmod", "skbmod mac index 1") + a(brCorner, "w200", "skbmod", "skbmod swap mac index 010") + + // mpls. + a(brPos, "mp", "mpls", "mpls push label 100 tc 3 ttl 64 index 1") + a(brPos, "mp", "mpls", "mpls push protocol mpls_mc label 100 bos 0 index 1") + a(brPos, "mp", "mpls", "mpls mac_push label 300 bos 1 index 1") + a(brPos, "mp", "mpls", "mpls modify label 200 tc 7 ttl 255 index 1") + a(brPos, "mp", "mpls", "mpls dec_ttl pipe index 1") + a(brPos, "mp", "mpls", "mpls pop protocol ipv6 index 1") + a(brBoundary, "mp", "mpls", "mpls push label 1048575 index 1") + a(brBoundary, "mp", "mpls", "mpls push label 0 ttl 1 index 1") + a(brCorner, "w204", "mpls", "mpls push label 5 protocol 0 index 1") + a(brCorner, "w206", "mpls", "mpls p protocol ipv4 index 1") + + // Increment 23's kinds: tc and the kernel accept them, and gotc + // refuses them by name until then. + a(brPos, "out-pedit", "pedit", "pedit ex munge ip ttl set 10 index 1") + a(brPos, "out-tunnel_key", "tunnel_key", "tunnel_key unset index 1") + a(brPos, "out-ife", "ife", "ife encode allow mark index 1") + a(brPos, "out-ct", "ct", "ct commit index 1") + a(brPos, "out-gate", "gate", "gate base-time 0 sched-entry open 1000000 -1 -1 index 1") + a(brPos, "out-bpf", "bpf", "bpf bytecode '1,6 0 0 0' index 1") + + // The frame: cookie, hw_stats, no_percpu, skip_sw, the 32-action + // bound and several kinds in one add. + a(brPos, "fr", "gact", "gact pass index 1 cookie 0102030405060708090a0b0c0d0e0f10") + a(brPos, "fr", "gact", "gact pass index 1 hw_stats immediate") + a(brPos, "fr", "gact", "gact pass index 1 hw_stats delayed") + a(brPos, "fr", "gact", "gact pass index 1 hw_stats disabled") + a(brPos, "fr", "gact", "gact pass index 1 no_percpu") + a(brCorner, "w170-hw", "gact", "gact pass index 1 hw_stats d") + add(brPos, "fr", tcAwRb("gact"), "actions add action police rate 1mbit burst 10k index 1 action mirred egress redirect dev d1 index 1"+ + " action skbedit mark 1 index 1 action gact drop index 2", base) + add(brBoundary, "fr32", tcAwRb("gact"), "actions add"+tcAwRange("gact pass", 1, 32), base) + add(brBoundary, "w179", tcAwRb("gact"), "actions delete"+tcAwRange("gact", 1, 33), + tcAwPre("tc actions add"+tcAwRange("gact pass", 1, 32), "tc actions add action gact pass index 33")) + add(brPos, "fr", tcAwRb("simple"), "actions add action simple sdata a index 1 action simple sdata b index 2", base) + add(brPos, "fr-del2", tcAwRb("gact"), "actions delete action gact index 1 action gact index 2", + tcAwPre("tc actions add action gact pass index 1 action gact drop index 2")) + add(brPos, "fr-del-mixed", tcAwRb("gact"), "actions delete action gact index 1 action police index 1", + tcAwPre("tc actions add action gact pass index 1 action police rate 1mbit burst 10k index 1")) + add(brPos, "fr-del-abbrev", tcAwRb("gact"), "actions del action gact index 1", tcAwPre("tc actions add action gact pass index 1")) + + // m_action.c's own corners. + add(brCorner, "w177", tcAwRb("gact"), "actions add action get action gact index 1", tcAwPre("tc actions add action gact pass index 1")) + add(brCorner, "w180", tcAwRb("gact"), "actions flush action gact since 1000", tcAwPre("tc actions add action gact pass index 1")) + add(brCorner, "w181", tcAwRb("gact"), "actions flush foo gact", tcAwPre("tc actions add action gact pass index 1")) + add(brCorner, "w182", tcAwRb("gact"), "actions flush action nosuch", base) + add(brCorner, "flush-empty", tcAwRb("gact"), "actions flush action gact", base) + add(brCorner, "w186", tcAwRb("gact"), "actions", base) + add(brCorner, "two-cmds", tcAwRb("gact"), "actions add action gact drop index 1 delete action gact index 1", base) + add(brCorner, "two-adds", tcAwRb("gact"), "actions add action gact drop index 1 add action gact pass index 2", base) + + // Inside filters: a matchall carrying each kind, and filter-side + // police on the six kinds that take it. + for _, k := range tcAwKinds { + add(brPos, "f-"+k, tcFwRbE, tcFwM+"action "+tcAwOne[k], base) + } + add(brPos, "f-u32", tcFwRbI, tcFwI+"pref 12 protocol ip handle 800::1 u32 match ip src 10.0.0.0/8 action skbedit mark 1 action mirred egress mirror dev d1", base) + add(brPos, "f-list", tcFwRbE, tcFwM+"action police rate 1mbit burst 10k action vlan push id 5 action csum iph action nat egress 10.0.0.1 10.0.0.2", base) + add(brPos, "f-bind", tcFwRbE, tcFwM+"action police index 1", tcAwPre("tc actions add action police rate 1mbit burst 10k index 1")) + add(brPos, "fp-basic", tcFwRbI, tcFwI+"pref 1 protocol all handle 1 basic police rate 1mbit burst 10k drop", base) + add(brPos, "fp-cgroup", tcFwRbE, tcFwE+"pref 1 protocol all handle 1 cgroup police rate 1mbit burst 10k drop", base) + add(brPos, "fp-fw", tcFwRbP, tcFwP+"pref 40 protocol ip handle 5 fw police rate 1mbit burst 10k drop", base) + add(brPos, "fp-route", tcFwRbP, tcFwP+"pref 41 protocol ip route to 5 police rate 1mbit burst 10k drop", base) + add(brPos, "fp-u32", tcFwRbI, tcFwI+"pref 12 protocol ip u32 match ip src 10.0.0.0/8 police rate 1mbit burst 10k drop", base) + add(brPos, "fp-flow", tcFwRbP, tcFwP+"pref 30 protocol ip handle 1 flow hash keys dst divisor 8 police rate 1mbit burst 10k drop", base) + add(brPos, "fp-act", tcFwRbI, tcFwI+"pref 1 protocol all handle 1 basic police rate 1mbit burst 10k drop action pass", base) + add(brPos, "fp-index", tcFwRbI, tcFwI+"pref 1 protocol all handle 1 basic police index 1", + tcAwPre("tc actions add action police rate 1mbit burst 10k index 1")) + + // Batches: two adds; a flush then an add; W189's line buffer; and the + // exits that end a -force batch (W185, W201). + batch := func(kind brKind, fix, name string, r readback, opts string, lines ...string) { + cmds = append(cmds, bb(kind, fix, name, opts, false, batchFile(lines...), base)) + rb[cmds[len(cmds)-1].Name] = []readback{r} + } + batch(brPos, "batch", "two", tcAwRb("gact"), "", + "actions add action gact drop index 1", + "actions add action police rate 1mbit burst 10k index 1") + batch(brPos, "batch", "flush-add", tcAwRb("gact"), "", + "actions flush action gact", + "actions add action gact pass index 1") + batch(brCorner, "w189-batch", "leftover", tcAwRb("simple"), "", + "actions add action simple sdata "+strings.Repeat("L", 20)+" index 1 cookie "+strings.Repeat("ab", 16), + "actions add action simple sdata hi index 2") + + // The refusals. tc parses before any request, so most stop with no + // message sent: exit(-1) or a return of -1. + // ack255 and ack1 are refusals after every request was answered: an + // add (W176), mirred's GETLINK for its device (W161), or tc -batch's + // opening link dump (W185, W201). + ack255 := expect{RC: intp(255), RefusedBy: refAckThenFail} + ack1 := expect{RC: intp(1), RefusedBy: refAckThenFail} + // kNodev: mirred's GETLINK by name is refused, then tc gives up. + kNodev := expect{RC: intp(255), Errno: "ENODEV", RefusedBy: refKernel} + k := func(errno string) expect { return expect{RC: intp(255), Errno: errno, RefusedBy: refKernel} } + aB := func(fix, words string, exp expect, why string) badValue { + return brBad(fix, "actions add action "+words, base, exp, why) + } + bad := []badValue{ + // police. + aB("w156", "police rate 1mbit index 1", tcTool, "rate with no burst: 'burst' requires 'rate'. (W156)"), + aB("w156-pps", "police pkts_rate 10 index 1", tcTool, "'pkts_burst' requires 'pkts_rate'. (W156)"), + aB("pol-dup", "police rate 1mbit rate 2mbit burst 10k index 1", tcTool, "duplicate rate"), + aB("w188", "police rate 1mbit burst 10k avrate 1mbit index 1", tcTool, + "rate with avrate: -1 with no message of its own, bad action parsing (W188)"), + aB("pol-avrate", "police avrate 1mbit index 1", k("EINVAL"), + "avrate needs an estimator, which tc actions add never sends: EINVAL with no extack (K)"), + aB("w169", "police rate 1mbit burst 10k conform-exceed goto/pass index 1", k("EINVAL"), + "conform goto with no chain is goto chain 0: can't goto NULL proto/chain (W169)"), + aB("w164", "police rate 1mbit burst 10k mtu 255 index 1", k("ENOMEM"), + "mtu 255 gives cell_log 0; the kernel's rtab refusal is ENOMEM (W164)"), + aB("w164-cell", "police rate 1mbit burst 10k/1 mtu 2k index 1", k("ENOMEM"), "burst 10k/1: cell_log 0 (W164)"), + aB("w184", "police rate 1mbit burst 10x index 1", tcTool, "argument \"10x\" is wrong: buffer (W184)"), + aB("w184-cell", "police rate 1mbit burst 10k/x index 1", tcTool, "the / is cut to NUL: \"10k\" (W184)"), + aB("w169-bad", "police rate 1mbit burst 10k conform-exceed foo/pass index 1", tcTool, + "a bad conform side: -1 with no message (W169)"), + aB("w169-goto", "police rate 1mbit burst 10k conform-exceed pass/goto index 1", k("EINVAL"), + "exceed goto with no chain is goto chain 0 (W169)"), + aB("pol-rate-bad", "police rate zz burst 10k index 1", tcTool, "an unparsable rate"), + aB("pol-mtu-bad", "police rate 1mbit burst 10k mtu zz index 1", tcTool, "an unparsable mtu"), + aB("pol-ll", "police rate 1mbit burst 10k linklayer foo index 1", tcTool, "an unknown linklayer"), + aB("pol-tail", "police rate 1mbit burst", tcTool, "burst with no value: NEXT_ARG, rc 255"), + aB("pol-help", "police help", tcTool, "police's usage, rc 255"), + aB("pol-maxburst", "police rate 1mbit buffer 10k maxburst 2k index 1", tcTool, "maxburst is burst's third name: duplicate \"buffer/burst\""), + aB("pol-pps-rate", "police rate 1mbit burst 10k pkts_rate 1000 pkts_burst 100 index 1", tcTool, "rate and pkts_rate are not allowed in one action"), + aB("w169-jump", "police rate 1mbit burst 10k conform-exceed jump 1/pass index 1", tcTool, "the slash form takes no jump: Invalid \"jump count\" (1/pass) (W169)"), + // mirred. + aB("w162", "mirred egress redirect dev nosuch index 1", kNodev, + "Cannot find device, bad action parsing, parse_action: bad value, Illegal \"action\" (W162)"), + aB("w160", "mirred egress redirect blockid 0 index 1", tcTool, "invalid block IDbad action parsing (W160)"), + aB("mir-nodev", "mirred egress redirect index 1", tcTool, "neither dev nor blockid"), + aB("mir-dir", "mirred redirect dev d1 index 1", tcTool, "no direction"), + aB("mir-act", "mirred egress dev d1 index 1", tcTool, "no mirror or redirect"), + aB("mir-tail", "mirred egress redirect dev", tcTool, "dev with no value: NEXT_ARG"), + aB("mir-help", "mirred help", tcTool, "mirred's usage"), + aB("w161", "mirred egress redirect dev d1 blockid 5", ack255, "blockid after dev is the next kind: Bad action type blockid (W161)"), + // skbedit. + aB("skb-ptype", "skbedit ptype nosuch index 1", tcTool, "an unknown ptype"), + aB("skb-none", "skbedit index 5", k("EINVAL"), "no flags: the kernel refuses a create (K)"), + aB("skb-qm", "skbedit queue_mapping zz index 1", tcTool, "an unparsable queue_mapping"), + aB("skb-mark", "skbedit mark zz index 1", tcTool, "an unparsable mark"), + aB("skb-help", "skbedit help", tcTool, "skbedit's usage"), + // vlan. + aB("w171-4095", "vlan push id 4095 index 1", k("ERANGE"), "id 4095: ERANGE with no extack (W171)"), + aB("vl-noid", "vlan push index 1", tcTool, "push with no id"), + aB("vl-prio", "vlan push id 5 priority 8 index 1", tcTool, "priority past 7"), + aB("vl-proto", "vlan push id 5 protocol foo index 1", tcTool, "an unknown protocol"), + aB("w172-bad", "vlan push_eth dst_mac zz:00:00:00:00:01 src_mac 02:00:00:00:00:02 index 1", tcTool, + "a bad MAC: the invarg is cut at the first colon (W172)"), + aB("vl-none", "vlan index 1", k("EINVAL"), "no vlan action"), + aB("vl-help", "vlan help", tcTool, "vlan's usage"), + // csum. + aB("w173-foo", "csum foo index 1", tcTool, "empty list (W173)"), + aB("cs-help", "csum help", tcTool, "csum's usage"), + aB("cs-and", "csum and index 1", tcTool, "and alone: Illegal csum construct, empty list"), + // nat. + aB("w192", "nat ingress 10.0.0.0/33 1.1.1.1 index 1", tcTool, "Illegal nat construct (ingress) (W192)"), + aB("nat-dir", "nat sideways 10.0.0.0/8 1.1.1.1 index 1", tcTool, "neither ingress nor egress"), + aB("nat-new", "nat egress 10.0.0.0/8 zz index 1", tcTool, "a bad new address"), + aB("w191-nat", "nat", tcTool, "a bare nat: NEXT_ARG, Command line is not complete (W191)"), + // simple. + aB("w191-sim", "simple", tcTool, "a bare simple: NEXT_ARG (W191)"), + aB("w213", "simple index 5", k("EINVAL"), "no sdata: the kernel refuses a create (W213)"), + aB("sim-tail", "simple sdata", tcTool, "sdata with no value: NEXT_ARG"), + aB("sim-32", "simple sdata "+tcAwSdata(32)+" index 1", tcTool, "simple: Illegal string len 32"), + aB("sim-33", "simple sdata "+tcAwSdata(33)+" index 1", tcTool, "simple: Illegal string len 33"), + // connmark and ctinfo. + aB("cm-zone", "connmark zone zz index 1", tcTool, "an unparsable zone"), + aB("w215", "connmark goto chain x index 1", tcTool, "Illegal \"chain index\" (W215)"), + aB("cti-mask", "ctinfo dscp 0xf0f00000 index 1", tcTool, "a dscp mask that isn't contiguous"), + aB("w208", "ctinfo dscp 0xfc000000 0x1junk index 1", tcTool, "a junk statemask is the next kind: Bad action type 0x1junk (W208)"), + // sample. + aB("w211", "sample", tcTool, "argument \"sample count\" is required (W211)"), + aB("w212", "sample rate 5 index 3", k("EINVAL"), "index skips the rate and group checks (W212)"), + aB("smp-group", "sample rate 5 index", tcTool, "index with no value"), + aB("smp-rate0", "sample rate 0 group 1 index 1", k("EINVAL"), "rate 0"), + // skbmod. + aB("w191-smod", "skbmod set", tcTool, "set with no value: NEXT_ARG (W191)"), + aB("w198", "skbmod set etype 0 index 1", k("EINVAL"), "etype 0: the flag with no ETYPE attribute (W198)"), + aB("smod-mac", "skbmod set dmac zz index 1", tcTool, "an unparsable MAC"), + aB("smod-none", "skbmod index 1", k("EINVAL"), "no skbmod action"), + // mpls. + aB("mp-nolabel", "mpls push index 1", tcTool, "push with no label"), + aB("w205", "mpls pipe", tcTool, "no action word (W205)"), + aB("w205-ind", "mpls ind 5", tcTool, "ind is strcmp'd: no action word (W205)"), + aB("w206-t", "mpls push label 5 t 64 index 1", tcTool, "t is tc: tc field is 3 bits max (W206)"), + aB("w204", "mpls pop protocol 0 index 1", tcTool, "protocol 0 is unset: argument \"protocol\" is required (W204)"), + aB("w207-3", "mpls push label 3 index 1", k("EINVAL"), "label 3: act_mpls: MPLS label out of range (W207)"), + aB("w203", "mpls mac_push index 1", k("EINVAL"), "mac_push with no label: act_mpls: Label is required for MPLS push (W203)"), + aB("mp-label", "mpls push label 1048576 index 1", tcTool, "a label past 20 bits"), + aB("mp-tc", "mpls push label 5 tc 8 index 1", tcTool, "tc past 3 bits"), + aB("mp-ttl", "mpls push label 5 ttl 0 index 1", tcTool, "ttl 0"), + aB("mp-pop", "mpls pop index 1", tcTool, "pop with no protocol"), + aB("mp-help", "mpls help", tcTool, "mpls's usage"), + // The frame. + aB("w183", "gact pass index 1 skip_sw skip_hw", k("EINVAL"), "skip_sw with skip_hw: EINVAL with no extack (W183)"), + aB("fr-skipsw", "gact pass index 1 skip_sw", k("EINVAL"), "skip_sw with no device to offload to: EINVAL with no extack (K)"), + aB("fr-cookie", "gact pass index 1 cookie zz", tcTool, "a cookie that isn't hex"), + aB("fr-cookie-long", "gact pass index 1 cookie "+strings.Repeat("ab", 33), tcTool, "a cookie past 32 bytes"), + aB("fr-hw", "gact pass index 1 hw_stats foo", tcTool, "an unknown hw_stats"), + aB("fr-hw-any", "gact pass index 1 hw_stats any", tcTool, "any is no hw_stats word"), + brBad("w113", "actions add"+tcAwRange("gact pass", 1, 33), base, k("EINVAL"), "33 actions: tc sends all 33 (W113)"), + // m_action.c. + brBad("w176", "actions add action drop flowid 1:1", base, ack255, + "the add is committed, then Command \"flowid\" is unknown (W176)"), + brBad("w178", "actions delete action gact index 0", tcAwPre("tc actions add action gact pass index 1"), k("EINVAL"), + "index 0 sends no INDEX: Invalid TC action index value, then Command \"action\" is unknown (W178, W187)"), + brBad("w187", "actions delete action gact index 7", base, k("ENOENT"), + "no such index: the failed delete returns 1, so do_action reads action as a command (W187)"), + brBad("del-noidx", "actions delete action gact", base, tcTool, "delete with no index"), + brBad("add-dup", "actions add action gact pass index 1", tcAwPre("tc actions add action gact pass index 1"), k("EEXIST"), + "add of an index that exists: EXCL"), + brBad("act-help", "actions add help", base, tcTool, "add help: Illegal \"action\" (W186)"), + brBad("act-unknown", "actions bogus", base, tcTool, "Command \"bogus\" is unknown"), + brBad("flush-none", "actions flush", base, tcTool, "flush with no kind: the usage"), + // The batches whose exit ends a -force run. + bbBad("w185", "usage-exit", "-force", false, batchFile( + "actions add action police rate 1mbit burst 10x index 1", + "actions add action gact pass index 2"), base, ack255, + "police's invarg exits, so line 2 never runs (W185)"), + bbBad("w201", "mpls-exit", "-force", false, batchFile( + "actions add action mpls push index 1", + "actions add action gact pass index 2"), base, ack255, + "mpls's missarg exits (W201)"), + bbBad("w185-ret", "return", "-force", false, batchFile( + "actions add action nat sideways 10.0.0.0/8 1.1.1.1 index 1", + "actions add action gact pass index 2"), base, ack1, + "nat returns -1, so -force carries on to line 2"), + } + sp := &space{ + Name: "tcactwrite", + Axes: []axis{{Name: "opt", Values: []value{v("plain", "", f("json", "0"))}}, {Name: "cmd", Values: cmds}}, + Bad: slices.Clone(bad), + } + sp.NegBase = func([]value) bool { return true } + sp.Build = func(vals []value) row { + r := tcBuildMods(tcActWriteModules, vals) + last := vals[len(vals)-1] + r.Readback = rb[last.Name] + if last.Facts["fix"] == "w162-junk" { + // The GETLINK by name is refused, then the if%u fallback + // sends the action: rc 0 over the kernel's ENODEV (W75). + r.Expect = expect{RC: intp(0), Errno: "ENODEV", RefusedBy: refKernelIgnored} + } + return r + } + return sp +} diff --git a/tools/nlcapgen/matrix_tcactwrite_test.go b/tools/nlcapgen/matrix_tcactwrite_test.go new file mode 100644 index 000000000..43ecfe502 --- /dev/null +++ b/tools/nlcapgen/matrix_tcactwrite_test.go @@ -0,0 +1,342 @@ +package main + +import ( + "bytes" + "strings" + "testing" +) + +// TestTcActWriteSpace pins the action write rows (gotc 22C): each kind's +// verb grid, its keywords, the frame words, the leads, the increment-23 +// refusals by name and the batches. +// +// go test ./tools/nlcapgen/ -run TestTcActWriteSpace +func TestTcActWriteSpace(t *testing.T) { + rows, err := matrixRows(families["tcactwrite"](), matrixOpts{Seed: 1}) + if err != nil { + t.Fatal(err) + } + if err := checkRows(rows); err != nil { + t.Fatal(err) + } + const want = 363 + if len(rows) != want { + t.Errorf("%d rows, want %d", len(rows), want) + } + fixes := map[string]bool{} + byCmd := map[string]bool{} + for _, r := range rows { + if !strings.HasPrefix(r.ID, "tcactwrite/") { + t.Errorf("%s: not in tcactwrite/", r.ID) + } + if r.InitNS || r.Serial || r.Proto != "route" { + t.Errorf("%s: initns %t serial %t proto %q", r.ID, r.InitNS, r.Serial, r.Proto) + } + for _, m := range r.Modules { + if !tdcGuestModules[m] { + t.Errorf("%s: module %s is not one the guest has", r.ID, m) + } + } + // Every write targets d0, d1 or block 10, made in the row's own + // namespace. + all := r.Cmd + "\n" + strings.Join(preCmds(r), "\n") + if strings.Contains(all, "dev lo") || strings.Contains(all, "-netns") || strings.Contains(all, "dev eth") { + t.Errorf("%s: writes outside its dummies: %q", r.ID, r.Cmd) + } + if r.Expect.RefusedBy == refNone && len(r.Readback) == 0 { + t.Errorf("%s: a positive write with no readback", r.ID) + } + // Increment 23's kinds appear only in their own out- rows, one + // each: tc and the kernel accept them, and gotc refuses them by + // name, so no other row may depend on them. + for _, k := range []string{"pedit", "tunnel_key", "ife", " ct ", "gate", "action bpf"} { + if strings.Contains(r.Cmd+" ", k) && !strings.HasPrefix(r.Axes["fix"], "out-") { + t.Errorf("%s: increment-23 kind %q outside an out- row", r.ID, strings.TrimSpace(k)) + } + } + k := r.Cmd + "|" + r.Axes["fix"] + "|" + strings.Join(preCmds(r), ";") + if byCmd[k] { + t.Errorf("%s: %q twice", r.ID, k) + } + byCmd[k] = true + fixes[r.Axes["fix"]] = true + } + has := func(sub string) bool { + for _, r := range rows { + if strings.Contains(r.Cmd, sub) || strings.Contains(strings.Join(preCmds(r), "\n"), sub) { + return true + } + } + return false + } + + // Every kind has the full verb grid: add, change, replace (of an + // action that exists and of a new one), delete and flush. + for _, k := range tcAwKinds { + for _, verb := range []string{"actions add action ", "actions change action ", "actions replace action "} { + if !has(verb + strings.Fields(tcAwOne[k])[0]) { + t.Errorf("%s: no %q row", k, verb) + } + } + for _, sub := range []string{"actions delete action " + k + " index 1", "actions flush action " + k} { + if !has(sub) { + t.Errorf("%s: no %q row", k, sub) + } + } + } + for _, fix := range []string{"v-add", "v-change", "v-replace", "v-replace-new", "v-delete", "v-flush"} { + if !fixes[fix] { + t.Errorf("no %s row", fix) + } + } + + tests := []struct { + description string + sub string // a substring some row's command (or batch file) holds + expected bool + }{ + // police: every keyword. + {"positive: police rate burst mtu", "police rate 1mbit burst 10k mtu 2k", true}, + {"positive: police peakrate", "peakrate 2mbit", true}, + {"positive: police cell forms", "burst 10k/8 mtu 2k/8", true}, + {"positive: police overhead linklayer mpu", "overhead 20 linklayer atm mpu 64", true}, + {"positive: police conform-exceed slash", "conform-exceed drop/pipe", true}, + {"positive: police conform-exceed one word", "conform-exceed continue", true}, + {"positive: police pps", "pkts_rate 1000 pkts_burst 100", true}, + {"positive: police past 32 bits", "rate 40gbit", true}, + {"positive: police avrate refused", "avrate 1mbit", true}, + // mirred. + {"positive: mirred egress mirror", "mirred egress mirror dev d1", true}, + {"positive: mirred egress redirect", "mirred egress redirect dev d1", true}, + {"positive: mirred ingress redirect", "mirred ingress redirect dev d1", true}, + {"positive: mirred ingress mirror", "mirred ingress mirror dev d1", true}, + {"positive: mirred blockid", "redirect blockid 10", true}, + // skbedit. + {"positive: skbedit queue_mapping", "skbedit queue_mapping 3", true}, + {"positive: skbedit priority", "skbedit priority 1:2", true}, + {"positive: skbedit mark mask", "skbedit mark 0x10/0xff", true}, + {"positive: skbedit ptype", "skbedit ptype otherhost", true}, + {"positive: skbedit inheritdsfield", "skbedit inheritdsfield", true}, + // vlan. + {"positive: vlan push with protocol and priority", "vlan push id 100 protocol 802.1ad priority 3", true}, + {"positive: vlan pop", "vlan pop", true}, + {"positive: vlan modify", "vlan modify id 200", true}, + {"positive: vlan push_eth", "vlan push_eth dst_mac", true}, + {"positive: vlan pop_eth", "vlan pop_eth", true}, + // csum: each flag. + {"positive: csum iph", "csum iph index", true}, + {"positive: csum icmp", "csum icmp", true}, + {"positive: csum igmp", "csum igmp", true}, + {"positive: csum udplite", "csum udplite", true}, + {"positive: csum sctp", "csum sctp", true}, + {"positive: csum and", "csum iph and tcp", true}, + // nat. + {"positive: nat ingress prefix", "nat ingress 10.0.0.0/24", true}, + {"positive: nat egress host", "nat egress 10.1.2.3 10.4.5.6", true}, + {"positive: nat default", "nat ingress default", true}, + // simple. + {"positive: simple sdata", "simple sdata hello", true}, + // connmark and ctinfo. + {"positive: connmark zone", "connmark zone 5", true}, + {"positive: ctinfo dscp with statemask", "ctinfo dscp 0xfc000000 0x01000000", true}, + {"positive: ctinfo cpmark and zone", "ctinfo cpmark 0xffffffff zone 3", true}, + // sample. + {"positive: sample rate group trunc", "sample rate 100 group 5 trunc 64", true}, + // skbmod. + {"positive: skbmod set dmac smac", "skbmod set dmac 02:00:00:00:00:01 set smac", true}, + {"positive: skbmod etype", "skbmod set etype 0x800", true}, + {"positive: skbmod swap mac", "skbmod swap mac", true}, + {"positive: skbmod ecn", "skbmod ecn", true}, + // mpls. + {"positive: mpls push tc ttl", "mpls push label 100 tc 3 ttl 64", true}, + {"positive: mpls bos and protocol", "protocol mpls_mc label 100 bos 0", true}, + {"positive: mpls mac_push", "mpls mac_push label 300", true}, + {"positive: mpls modify", "mpls modify label 200", true}, + {"positive: mpls dec_ttl", "mpls dec_ttl", true}, + {"positive: mpls pop", "mpls pop protocol ipv6", true}, + // The frame. + {"positive: cookie", "cookie 0102030405060708090a0b0c0d0e0f10", true}, + {"positive: hw_stats immediate", "hw_stats immediate", true}, + {"positive: hw_stats delayed", "hw_stats delayed", true}, + {"positive: hw_stats disabled", "hw_stats disabled", true}, + {"positive: no_percpu", "no_percpu", true}, + {"positive: skip_sw", "index 1 skip_sw", true}, + {"positive: skip_hw", "skip_sw skip_hw", true}, + {"positive: several kinds in one add", "action mirred egress redirect dev d1 index 1 action skbedit", true}, + {"positive: a delete of two", "actions delete action gact index 1 action gact index 2", true}, + {"positive: del abbreviated", "actions del action gact", true}, + // In filters. + {"positive: matchall with each kind", "matchall action mpls pop", true}, + {"positive: u32 with actions", "u32 match ip src 10.0.0.0/8 action skbedit", true}, + {"positive: filter police basic", "basic police rate 1mbit", true}, + {"positive: filter police cgroup", "cgroup police rate 1mbit", true}, + {"positive: filter police fw", "fw police rate 1mbit", true}, + {"positive: filter police route", "route to 5 police", true}, + {"positive: filter police u32", "u32 match ip src 10.0.0.0/8 police", true}, + {"positive: filter police flow", "divisor 8 police rate 1mbit", true}, + {"positive: filter binds an action", "matchall action police index 1", true}, + // Boundaries. + {"boundary: 32 actions", tcAwRange("gact pass", 1, 32), true}, + {"boundary: 33 actions", tcAwRange("gact pass", 1, 33), true}, + {"boundary: a delete of 33", "actions delete" + tcAwRange("gact", 1, 33), true}, + {"boundary: sdata 30", "sdata " + tcAwSdata(30) + " ", true}, + {"boundary: sdata 31", "sdata " + tcAwSdata(31) + " ", true}, + {"boundary: sdata 32", "sdata " + tcAwSdata(32) + " ", true}, + {"boundary: sdata 33", "sdata " + tcAwSdata(33) + " ", true}, + {"boundary: mtu 256", "mtu 256", true}, + {"boundary: mpu 65535", "mpu 65535", true}, + {"boundary: vlan id 0", "vlan push id 0", true}, + {"boundary: vlan id 4094", "vlan push id 4094", true}, + {"boundary: queue_mapping 65535", "queue_mapping 65535", true}, + {"boundary: zone 65535", "zone 65535", true}, + {"boundary: sample at u32 max", "rate 4294967295 group 4294967295 trunc 4294967295", true}, + {"boundary: mpls label 20 bits", "label 1048575", true}, + {"boundary: mpls label past 20 bits", "label 1048576", true}, + {"boundary: nat /0", "0.0.0.0/0", true}, + // Leads. + {"lead: W156", "police rate 1mbit index 1", true}, + {"lead: W157", "burst 10k trap", true}, + {"lead: W158", "redirect dev d1 pipe", true}, + {"lead: W159", "egress bogus egress", true}, + {"lead: W160", "blockid 0", true}, + {"lead: W161", "dev d1 blockid 5", true}, + {"lead: W162 missing device", "dev nosuch", true}, + {"lead: W162 junk ifindex", "dev if3junk", true}, + {"lead: W163", "mpu 65536", true}, + {"lead: W163 no rate", "pkts_burst 100 mpu 64 overhead 4", true}, + {"lead: W164", "mtu 255", true}, + {"lead: W164 cell", "burst 10k/1", true}, + {"lead: W165", "mtu 4294967295", true}, + {"lead: W166 rate 0", "rate 0 rate 1mbit", true}, + {"lead: W166 tiny", "rate 7bit", true}, + {"lead: W166 nan", "rate nan", true}, + {"lead: W167", "pkts_rate 1 pkts_burst 1000", true}, + {"lead: W168", "conform-exceed drop pass", true}, + {"lead: W169 goto", "conform-exceed goto/pass", true}, + {"lead: W169 bad", "conform-exceed foo/pass", true}, + {"lead: W170 p", "burst 10k p 2mbit", true}, + {"lead: W170 hw_stats d", "hw_stats d", true}, + {"lead: W171 base 0", "vlan push id 010", true}, + {"lead: W171 4095", "vlan push id 4095", true}, + {"lead: W172 short MAC", "dst_mac aa src_mac 1.2.3.4", true}, + {"lead: W173", "csum index 5", true}, + {"lead: W174 hex priority", "skbedit priority 10 ", true}, + {"lead: W174 mark twice", "mark 5/0xff mark 6", true}, + {"lead: W175", "skbedit mark 1 index 5 pipe", true}, + {"lead: W176", "actions add action drop flowid 1:1", true}, + {"lead: W177", "actions add action get", true}, + {"lead: W178", "delete action gact index 0", true}, + {"lead: W180", "since 1000", true}, + {"lead: W181", "actions flush foo gact", true}, + {"lead: W182", "flush action nosuch", true}, + {"lead: W183", "skip_sw skip_hw", true}, + {"lead: W184", "burst 10x", true}, + {"lead: W184 cell", "burst 10k/x", true}, + {"lead: W189", "simple sdata hi index 7", true}, + {"lead: W190", "simple sdata x index 5 drop", true}, + {"lead: W192", "10.0.0.0/33", true}, + {"lead: W193", "nat egress 10.0.0.0/8 2.0.0.0 nat ingress", true}, + {"lead: W194", "1.2.3.4/16", true}, + {"lead: W195", "010.0.0.1 10.1", true}, + {"lead: W196", "00:00:00:01:junk", true}, + {"lead: W197", "swap mac index 1", true}, + {"lead: W198", "set etype 0 ", true}, + {"lead: W200", "index 010", true}, + {"lead: W203", "mpls mac_push index 1", true}, + {"lead: W204", "pop protocol 0", true}, + {"lead: W205", "mpls ind 5", true}, + {"lead: W206", "label 5 t 64", true}, + {"lead: W207", "push label 3 ", true}, + {"lead: W208", "0x1junk", true}, + {"lead: W209", "cpmark 0 ", true}, + {"lead: W210", "ctinfo c dscp", true}, + {"lead: W212", "sample rate 5 index 3", true}, + {"lead: W213", "simple index 5", true}, + {"lead: W215", "goto chain x", true}, + // Increment 23, refused by name. + {"lead: W187", "actions delete action gact index 7", true}, + {"lead: W188", "burst 10k avrate 1mbit", true}, + {"corner: avrate alone", "police avrate 1mbit index 1", true}, + {"corner: police with no rate", "add action police index 1", true}, + {"corner: ctinfo with no mode", "add action ctinfo index 1", true}, + {"refused: pedit", "pedit ex munge", true}, + {"refused: tunnel_key", "tunnel_key unset", true}, + {"refused: ife", "ife encode", true}, + {"refused: ct", "ct commit", true}, + {"refused: gate", "gate base-time", true}, + {"refused: bpf", "bpf bytecode", true}, + // Negatives. + {"negative: no show or list command is captured", "actions ls", false}, + {"negative: no get command is captured", "actions get", false}, + {"negative: no host device", "dev eth0", false}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + if got := has(tc.sub); got != tc.expected { + t.Errorf("a row with %q: %t, want %t", tc.sub, got, tc.expected) + } + }) + } + + // A bare kind word is its own row (W191, W211). + for _, bare := range []string{"tc actions add action simple", "tc actions add action sample", "tc actions add action nat"} { + var found bool + for _, r := range rows { + found = found || r.Cmd == bare + } + if !found { + t.Errorf("lead W191/W211: no row %q", bare) + } + } + + // The batches carry their lines, with -force where the lead needs + // it. + batches := []struct { + description string + fix string + force bool + }{ + {"corner: W189's leftover line buffer", "w189-batch", false}, + {"corner: W185's usage exit ends -force", "w185", true}, + {"corner: W201's mpls exit ends -force", "w201", true}, + {"corner: a -1 return carries on", "w185-ret", true}, + } + for _, tc := range batches { + t.Run(tc.description, func(t *testing.T) { + var found bool + for _, r := range rows { + if r.Axes["fix"] != tc.fix { + continue + } + found = true + if !strings.Contains(r.Cmd, "-batch") { + t.Errorf("%s: not a batch: %q", r.ID, r.Cmd) + } + if got := strings.Contains(r.Cmd, "-force"); got != tc.force { + t.Errorf("%s: -force %t, want %t", r.ID, got, tc.force) + } + if n := strings.Count(strings.Join(preCmds(r), "\n")+r.Cmd, "actions "); n < 2 { + t.Errorf("%s: %d lines, want 2 or more", r.ID, n) + } + } + if !found { + t.Errorf("no %s row", tc.fix) + } + }) + } + + // Generation is deterministic. + var a, b bytes.Buffer + for i, buf := range []*bytes.Buffer{&a, &b} { + rs, err := matrixRows(families["tcactwrite"](), matrixOpts{Seed: 1}) + if err != nil { + t.Fatalf("run %d: %v", i, err) + } + if err := writeRows(buf, nil, rs); err != nil { + t.Fatal(err) + } + } + if !bytes.Equal(a.Bytes(), b.Bytes()) { + t.Error("two generations differ") + } +}