diff --git a/.golangci-comprehensive.yml b/.golangci-comprehensive.yml index ae9dd13d0..8532b9cdf 100644 --- a/.golangci-comprehensive.yml +++ b/.golangci-comprehensive.yml @@ -350,7 +350,7 @@ linters: # since those ARE the canonical identifiers. Lifting to consts # would obscure rather than clarify. - goconst - # The next five are verbatim-upstream-spelling rules. The first two were + # The next six are verbatim-upstream-spelling rules. The first two were # once copies of rules already carried by .golangci.yml that had never # been ported here, which is why this tier reported three misspellings the # gating tier did not. Keep the three configs' misspell rules in step; @@ -368,6 +368,15 @@ linters: linters: - misspell text: "`prefered` is a misspelling of `preferred`" + # `any_ect` and `l4s_ect` are dualpi2 keywords a user types + # (tc/q_dualpi2.c:216-218) and its printed values, from ECT, the ECN + # codepoint (RFC 3168), not a misspelling of "etc". Scoped to the + # dualpi2 capture, decoder and printer files, so a genuine "ect" + # anywhere else still fails. + - path: "(tools/nlcapgen/matrix_tcaqm|internal/gotc/(q_dualpi2|aqm)|pkg/xtcpnl/xtcpnl_tc_aqm)(_test)?\\.go" + linters: + - misspell + text: "`(ect|ECT)` is a misspelling of `(etc|ETC)`" # `neighbour` is a command name a user types, not prose. iproute2's object # table carries both `neighbor` and `neighbour` (ip/ip.c:93-94), and # `matches()` is prefix matching, not fuzzy matching — "neighbour" is not diff --git a/.golangci.yml b/.golangci.yml index 47d41b76c..4c167a360 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -339,6 +339,15 @@ linters: linters: - misspell text: "`prefered` is a misspelling of `preferred`" + # `any_ect` and `l4s_ect` are dualpi2 keywords a user types + # (tc/q_dualpi2.c:216-218) and its printed values, from ECT, the ECN + # codepoint (RFC 3168), not a misspelling of "etc". Scoped to the + # dualpi2 capture, decoder and printer files, so a genuine "ect" + # anywhere else still fails. + - path: "(tools/nlcapgen/matrix_tcaqm|internal/gotc/(q_dualpi2|aqm)|pkg/xtcpnl/xtcpnl_tc_aqm)(_test)?\\.go" + linters: + - misspell + text: "`(ect|ECT)` is a misspelling of `(etc|ETC)`" # `neighbour` is a command name a user types, not prose. iproute2's object # table carries both `neighbor` and `neighbour` (ip/ip.c), and `matches()` # is prefix matching, not fuzzy matching — "neighbour" is not a prefix of diff --git a/docs/netlink/gotc-status.md b/docs/netlink/gotc-status.md index 822fe7474..04f58a27f 100644 --- a/docs/netlink/gotc-status.md +++ b/docs/netlink/gotc-status.md @@ -195,6 +195,19 @@ - **15L (live diff): done.** 83 of 87 tcsched rows identical live; the other four are the planned write refusals. Live tc matched the corpus on all 87 (V032). **Increment 15 is complete.** +**Increment 16: AQM and leaf qdiscs** (red, gred, choke, sfb, codel, pie, fq_pie, hhf, cake, cake_mq, dualpi2, plug, +skbprio; branch `gotc/aqm`; plan leads Q66–Q87, K32–K42): + +- **16C (captures): done.** `tcaqm`: 132 rows over 26 fixtures, every command plain and `-j`, two batches and four + refusals. Two batches on one boot agree on stdout, stderr and rc for all 132 rows (V033). +- **16P (parsers): done.** `pkg/xtcpnl/xtcpnl_tc_aqm.go` decodes the 13 kinds' options and xstats at C's widths; + `TestWsTcKinds` decodes every tcaqm message with no error (V034). +- **16R (printers): done.** gotc prints all 13 kinds; tcaqm replays 129/132 rows byte for byte (the other 3 are the + refused writes), and `readbackSkips` is empty: all 136 readbacks it held render exactly (V035). +- **16B (write-up): done.** `docs/netlink/upstream/iproute2-tc-aqm.md`: Q66–Q89 and K32–K43, all present at HEAD; + not submitted to netdev (DOC009). +- **16L (live diff): done.** 129/132 rows identical live; the other 3 are the planned write refusals (V036). + ## Ledger | id | task | what was verified | @@ -240,6 +253,11 @@ | V031 | 15R | **Printers** (`internal/gotc`), each following its C printer at v7.2.0 line by line. `q_sched.go`: drr (the quantum and deficit through print_size(PRINT_FP), so text only, Q37/Q38), qfq (no print_xstats, so its class xstats never print, Q39), multiq (`bands %u/%u` in text, two numbers in JSON, Q60), cbs (five print_ints, offload a number, Q61), etf (delta through print_uint's `%d`, signed in text and unsigned in JSON, Q62; offload `on`/`off`, Q61; `skip_sock_check` with no trailing space, Q63). `q_hfsc.go`: the qdisc's ` default %#llx ` with its leading space and the JSON string, nothing at 0 (Q40); xstats with work and rtwork only when nonzero (Q41) and the text-only `_SL_` (Q42); class curves, rt and ls merged into `sc` when their bytes match (Q43), d through tc_core_ktime2time, `sprint_time` in text and the number in JSON (Q44), and tc's "HFSC: truncated ... option" warning for a short curve. `q_ets.go`: the quanta and priomap walks as C does them, arrays closed with a text `" "` (Q45); a missing band prints tc's message and returns with the JSON array open (Q47); a strict class prints no quantum (Q46). `q_mqprio.go`: the hard `\n ` indents (Q48); mode and shaper print `dcb` when absent, nothing when present at their default, and only when attributes follow the header (Q49); `fp:` up to the highest class set, with a print_nl that, with the caller's, leaves a blank line (Q50); queues `(off:off+count-1)` in int arithmetic printed `%u`, `[[off,last]]` in JSON (Q51); text `map ` against JSON `map` (Q52); rate lists stop at 16 where tc writes past its array (Q53). `q_taprio.go`: map and queues; clockid, flags and `txtime delay` (an s32 into a `__u32`, signed in text and unsigned in JSON, Q55); the oper schedule, then the admin one with no text label, as a JSON `admin` object (Q57); print_sched_list with its JSON-only `schedule` array and a print_nl per entry; s64 times through print_lluint (Q59); `max-sdu` with a hyphen (Q56) and `fp`, each with its blank line (Q58); offload-stats xstats. **dump_tc_entries** is one function for both kinds. **Refused** (`tc reads it unchecked`): an attribute shorter than the read tc makes (`kindNeed`: drr, qfq, ets, mqprio mode/shaper/rates/entries, taprio fields; Q54), a taprio PRIOMAP short of `tc_mqprio_qopt` (Q54), and an mqprio or taprio num_tc over 16. As with the action refusals, the stdout already printed stays. **Plumbing:** the print hooks still return nothing, as tc ignores their returns. A hook records a refusal with `refuseKind`, and `printQdisc`/`printClass` take it after each hook; the `-g` graph keeps it in `r.cf.err`. `rtaWalk` is the silent RTA_OK loop. `qdiscUtils` gains the nine kinds (htb's pattern for drr, qfq, hfsc and ets, which set printCopt). **print_size_table** (`qdisc.go`, `tc_stab.c`): two tdc taprio readbacks under `-d` carry `TCA_STAB`, which gotc refused before; it is now ported (BASE MIN-copied into a zeroed `tc_sizespec`, each nonzero field, `" overhead 24 "`). **Lint:** goconst flagged a third `"unknown"`, so the three sites now use `wordUnknown`. **Tests:** `TestGotcSched` (`sched_test.go`), 33 rows. 16 positive: drr text and `-j`, qfq `-s`, hfsc default text and JSON, sc, rt/ls/ul JSON, ets qdisc and classes, mqprio text and JSON (mode channel), taprio text and JSON with an admin schedule, multiq, cbs/etf text and JSON. 6 negative: Q47 in text and `-j`; a 1-byte mqprio mode; a 20-byte taprio PRIOMAP; `red` refused by name; mqprio options of sizeof but short of `RTA_ALIGN`, giving "options size error". 4 boundary: queue count 0 is `(0:4294967295)`; 17 min rates; num_tc 17; tc-entry index 16 is tc's "Unexpected tc entry index 16". 7 corner: `-o` mqprio; `TXTIME_DELAY` 0x80000000 in text and JSON; base-time -1; hfsc `-s` with and without work; `-g` over hfsc; `-d` with a size table. `corpus_test.go`: `corpusRows["tcsched"] = 87`, joined to the replay loop, its four writes (ng-001 to ng-004) refused: **87/87 byte for byte**, 810 corpus rows in all. `readback_test.go`: the nine kinds leave `readbackSkips`; `readbackRendered` goes from 1025 to **1114** (+89); plug goes from 7 to 11 (4 readbacks that also hold a sched kind). **Mutants** (each `systemd-run --user --scope -p MemoryMax=6G go test -timeout=180s`, in a scratch worktree): 10/10 killed (drr quantum in JSON; hfsc default without its space; rt/ls never merged; ets arrays without the trailing space; mqprio fp cut to num_tc; mqprio without `mode:dcb`; TXTIME_DELAY as u32; `max_sdu`; cbs offload as a string; qfq printing xstats). Nine were killed by a corpus row, one (TXTIME_DELAY) by `TestGotcSched`. Coverage of `internal/gotc` is 85.1%. **Gates:** `go test ./internal/gotc/ ./pkg/xtcpnl/ ./tools/nlcapgen/ ./internal/wsreplay/`; `CGO_ENABLED=0 go build ./...`; golangci-lint (comprehensive) on `internal/gotc`, 0 issues; gofmt -s. | | DOC008 | 15B | **Write-up:** `docs/netlink/upstream/iproute2-tc-sched.md`: status header, reachability, contents, 29 summary rows, seven sections, and K24–K31. Not submitted to netdev. **Leads:** each was read at v7.2.0 (`q_{drr,qfq,hfsc,ets,mqprio,taprio,multiq,cbs,etf}.c`) against the tcsched corpus, and the kernel side at v7.4-rc4. **At HEAD** (GitHub mirror, `5d13122576d6`, 2026-11-26): none of the nine printers, `tc_qdisc.c`, `tc_class.c`, `tc_util.c` or `tc_stab.c` has a commit since v7.2.0, so all are present. **Confirmed in the corpus:** Q37, Q38, Q39, Q40, Q42, Q43, Q44, Q45, Q46, Q48, Q49, Q50, Q51 (the JSON shape), Q52, Q55, Q56, Q57, Q58, Q60, Q61 and Q63. **Latent, with unit rows:** Q41, Q47, Q51 (count 0; the kernel rejects it, sch_mqprio_lib.c:29), Q53, Q54, Q59, Q62 (the kernel rejects a negative delta, sch_etf.c:67), Q64 and Q65. **Dropped:** none. **New leads:** **Q64**: the ets list walks print the first band from each offset to the end but step by the attribute at the offset, +3 for the priomap, so a foreign attribute repeats a band and a non-canonical length misaligns the walk; this is the same hand-rolled walk as tunnel_key's geneve (AC46). **Q65**: an explicit `mode dcb` (or `shaper dcb`), which the kernel echoes only when it was given (sch_mqprio.c:602), prints nothing, while an absent one prints `mode:dcb`; it needs `hw 1` (sch_mqprio.c:263). **Kernel notes:** K24 (qfq's `tc_qfq_stats`, sch_qfq.c:663-677). K25 (ets: NSTRICT only when nonzero, QUANTA only when `nbands > nstrict`, an empty class nest for a strict band, sch_ets.c:313-319, 764, 767). K26 (16 TC entries whatever num_tc, sch_mqprio.c:531, sch_taprio.c:2319). K27, corrected from the plan: tc never sends bands, as multiq takes no options; `multiq_tune` writes `real_num_tx_queues` into the request's own attribute (sch_multiq.c:186). K28, refined: the tc entries and the oper schedule are dumped only `if (oper)` (sch_taprio.c:2446, 2449); in software mode oper is set at the first cycle start (:220), under txtime-assist at change time (:1989); the xstats need `ndo_setup_tc` (:2371). K29 (drr and qfq have no qdisc `.dump`). K30, corrected from the plan: TCA_OPTIONS is noflag for every one of these kinds, ets included. The flagged nests are ets's QUANTA/PRIOMAP and the mqprio/taprio TC_ENTRYs; mqprio's rate nests are noflag. tc's printers depend on exactly that: TC_ENTRY is matched by its raw type with the flag, and the rates are parsed without masking it, while tc's own parser sends the rates flagged. **K31 (new):** `qdisc_change` returns EINVAL ("Change operation not supported by specified qdisc", sch_api.c:1456-1460) for a kind with no `.change`, so any `tc qdisc replace` over an etf fails before its options are read; this is why 15C's etf negative grafts a new etf. **Re-confirmed:** Q22 (`-j -g` prints `[]`, then text, pw-011) and Q36 (`-g` over hfsc's nested tree, ec-011 and pw-011). **Unit rows added** to `TestGotcSched` for Q65 and Q62 (35 rows). **Bug classes:** none edited. One candidate is noted for the user: a hand-rolled TLV walk that reads with `parse_rtattr` from an offset but steps by another stride (Q64, AC46). | | V032 | 15L | **Live diff** on the workbench (kernel 7.3.1, tc 7.2.0): `gotc` from `nix build "git+file://…?rev=f64f6d074#gotc"` (`/nix/store/lcm6hr7nykwldhlkrhkb3186q2klxsv8-gotc-0.2.1`) beside `tc` (`/nix/store/x1pwsbz5cm23hk58b7fcpn3hhg9j7gwh-iproute2-7.2.0`), with `GOTC_CONF_USR_DIR` set to tc's `share/iproute2`. The guest script is generated from `nix/microvms/workbench/tcsched.rows.jsonl` by 13L's generator, without its two `-netns` reads. The row's ten modules are loaded once, then each row runs its pre steps in a fresh named namespace, in its own directory (so the batch rows' `b.txt` is there), then tc and gotc in turn. **Result:** 87 rows, **83 identical** on stdout, stderr and exit code, the `-s`, `-d`, `-o`, `-g`, `-j -g` and batch rows included. **The other four** are the planned write refusals: ng-001 (mqprio under drr; tc `RTNETLINK answers: Operation not supported`, rc 2), ng-002 (taprio with no clockid; `Error: Specifying a 'clockid' is mandatory.`, rc 2), ng-003 (cbs offload; `Error: Specified device does not support cbs offload.`, rc 2) and ng-004 (etf offload; `Error: Specified device does not support ETF offload.`, rc 2). gotc gives `not implemented: tc qdisc add`/`replace`, rc 255, for each. **tc against the corpus:** stdout, stderr and rc match `ws/tcsched` on all 87 rows, so nothing has drifted since the capture (the taprio base-times are fixed, and no row sends packets). **VM:** pre-checked (`free -g`, port 12061 free, no other workbench process), booted for this run. The modules this run loaded (the ten, plus `sch_mqprio_lib`) were removed with `modprobe -r`, leaving lsmod equal to the pre-run list; no namespace or extra link is left, there are no core files, `/tmp/t15l` is removed, and the VM is powered off again, as it was before. | +| V036 | 16L | **Live diff** on the workbench (kernel 7.3.1, tc 7.2.0): `gotc` from `nix build "git+file://…?rev=a74e25f35#gotc"` (`/nix/store/fyk73qxkzp4hbn4abfiwh8glvr2qdnfv-gotc-0.2.1`) beside `tc` (`/nix/store/x1pwsbz5cm23hk58b7fcpn3hhg9j7gwh-iproute2-7.2.0`), with `GOTC_CONF_USR_DIR` set to tc's `share/iproute2`. The guest script is generated from `nix/microvms/workbench/tcaqm.rows.jsonl` by 15L's generator; the twelve sch_* modules are loaded once, then each row runs its pre steps in a fresh named namespace, then tc and gotc in turn. **Result:** 132 rows, **129 identical** on stdout, stderr and exit code, the `-s`, `-d`, `-o` and `-j` rows included. **The other three** are the planned write refusals: ng-001 (`Error: Parent qdisc is not classful.`, rc 2), ng-002 (`Error: Can't use autorate-ingress with cake_mq.`, rc 2) and ng-003 (gred `change` before `setup`: `Error: Invalid qdisc name: must match existing qdisc.`, rc 2). gotc gives `not implemented: tc qdisc add`/`replace`/`change`, rc 255, for each. **tc against the corpus:** stdout, stderr and rc match `ws/tcaqm` on all 132 rows, so nothing has drifted since the capture. **VM:** pre-checked (`free -g`, a bracketed pgrep); it was the boot this session started for 16C. The twelve modules were removed with `modprobe -r` (none left); no namespace or extra link is left, there are no core files, `/tmp/t16l` is removed, and the VM is powered off (`systemctl poweroff`; port 12061 free). | +| 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. | +| 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. | +| V034 | 16P | **Parsers** `pkg/xtcpnl/xtcpnl_tc_aqm.go` (+ `xtcpnl_tc_aqm_test.go`): 13 `TcKind*` constants; TCA_* for red, choke, gred (with VQ enums), sfb, codel, pie, fq_pie, hhf, cake (stats, tin stats), dualpi2; structs for red/gred/sfb qopts and the red, choke, sfb, codel, pie, fq_pie, hhf, dualpi2 and cake xstats. A generic `TcVals` store (32 u64 plus a presence mask) filled from per-kind width tables covers the flat-attribute kinds; widths follow tc's reads (0 = unread, -1 = presence only). **Errors:** an unchecked short read is `ErrTcShort` (Q69, Q77); gred without DPS is `ErrTcMissing` (Q67); gred short is `ErrTcGredSmall` (wraps ErrTcShort, Q72); a VQ entry with rta_len < 4 is `ErrTcShort` rather than a hang (Q71); a VQ DP ≥ 16 is skipped and flagged `VqDpOver` (Q68); VQ_STAT_BYTES keeps the u64 and tc's truncated u32 (Q70). **Plan corrections:** a cake tin missing an attribute tin 0 has sets `TinGap` rather than erroring, since tc's JSON path tests each tin (Q78; gotc refuses in 16R); K38's idle MIN_NETLEN is 65535, not 4294967295; codel's times lose 1 µs in tc's conversion; dualpi2's bare `step_thresh 10` is µs (STEP_THRESH_US). **Size:** gred and cake are pointers, so `TcQopt` is 2040 bytes (HEAD 1680) and `TcXstats` 632 (HEAD 384). **Corpus:** `TestWsTcKinds` decodes cake 155, cake_mq 39, choke 15, codel 20, dualpi2 29, fq_pie 8, gred 18, hhf 20, pie 9, plug 15, red 30, sfb 19, skbprio 201 messages, no errors. **Tests:** `TestParseTcAqm` 35 rows; allocs pinned: skbprio 0, red 1, cake 1, red xstats 0, gred 2, cake xstats 1, plug 0. **Bench (host load ~43, noisy):** red ~331 ns, gred ~1 µs, cake xstats ~634 ns. netlink-audit and kernel-citation-audit clean; both golangci configs 0 issues. | +| V035 | 16R | **Printers** `internal/gotc/q_red.go` (red, choke, the shared red flags and qevents, and red_has_block), `q_gred.go`, `q_aqm.go` (sfb, codel, pie, fq_pie, hhf, plug, skbprio), `q_cake.go` (cake, cake_mq), `q_dualpi2.go`, each following its v7.2.0 C printer line by line, with every lead printed as tc prints it: Q66 Scell_log runs into the qevent, Q87 text-only-true flags, Q73 sfb's u32 wrap, Q79 cake's hard newlines under `-o`, Q80/Q81 cake's JSON, Q83/Q84/Q86 dualpi2, Q70 gred's u32 bytes, Q72 gred's raw message inside JSON, Q75/Q76 cake's unnegated, text-only blue_timer, Q74 codel's INT_MIN drop_next. **Refusals** (partial stdout kept, rc 255): gred without DPS (Q67), a VQ_DP of MAX_DPs or more (Q68), a short VQ attribute (Q69), a VQ entry with rta_len < 4 (Q71); a short cake stat (Q77); in text, a cake tin missing an attribute tin 0 has (Q78; JSON tests each tin and prints); a short red qevent block. **qkind.go:** the 13 kinds are registered; every kind tc links now prints, so `tcBuiltinKinds` and `errKind` are gone, and `qdiscKind` cannot fail. `filter show block N` used to refuse any red in the qdisc dump; it now runs red_has_block (qevents_have_block compares every qevent, an unset one's 0 included; a zero block is "Illegal qevent block index" and the dump's -1). sfq's red flags reuse `printRedFlags`. **Tests:** corpus: tcaqm added to `corpusRows` (132), with ng-001..003 as refused writes; 942 tc rows replay. `readbackSkips` empty; `readbackRendered` 1114 → 1250. `TestGotcAqm` 43 rows (positive, negative, boundary, corner), including four `filter show block` rows for red_has_block. The `TestGotcSched` and `TestGotcShow` refusal-by-name rows now expect red and cake to print. **Mutants:** 10/10 killed, each checked to build (Scell_log trailing space, JSON flags only when true, gred bytes as u64, cake skipping `raw`, `ack_filter` key, `_SL_` for cake's hard newlines, blue_timer negated, dualpi2's last print_nl dropped, sfb rehash in u64, plug printing options). Coverage 86.1%. **Notes for 16B:** the kernel sends TCA_GRED_VQ_ENTRY without NLA_F_NESTED (nla_nest_start_noflag), and tc's plain parse_rtattr needs that: a flagged entry would be "ERROR: Failed to parse Virtual Queue entry". **Lint:** the dualpi2 misspell exclusion now matches `ECT` as well as `ect` (uapi names in comments); both configs 0 issues. **PR 353 review (P3):** a short cake tin attribute is no longer a decode error; `TcCakeXstats.TinShort` keeps each tin's mask and `ShortTin(text)` applies the mode's reads: text reads a row only when tin 0 has the attribute (PRINT_TSTAT, q_cake.c:770), JSON each tin's own. So a short tin 1 field tin 0 lacks prints in text (identical to tc 7.2.0 on the review's monitor file: tin headings, rc 0) and is refused in JSON; the Q78 gap test counts a short attribute as present. Rows: 4 in `TestParseTcAqmXstats`, 3 in `TestGotcAqm` (47). | ## Findings (9B write-up: [upstream/iproute2-tc-qdisc-class.md](upstream/iproute2-tc-qdisc-class.md)) diff --git a/docs/netlink/upstream/iproute2-tc-aqm.md b/docs/netlink/upstream/iproute2-tc-aqm.md new file mode 100644 index 000000000..aee06691f --- /dev/null +++ b/docs/netlink/upstream/iproute2-tc-aqm.md @@ -0,0 +1,167 @@ +# iproute2 AQM and leaf qdisc printers: run-together words, text-only fields, unchecked reads in gred and cake, and u32 wraps + +**Status (2026-11-26, increment 16):** + +- **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 printers of red, gred, choke, sfb, codel, pie, fq_pie, hhf, cake, cake_mq, dualpi2, plug and skbprio + (`tc/q_*.c`), plus the shared `tc/tc_red.c` and `tc/tc_qevent.c`, as `tc qdisc show` and `tc class show` call them. + The lead numbers continue [iproute2-tc-sched.md](iproute2-tc-sched.md)'s sequence (Q37–Q65), and the kernel notes + continue its K24–K31. +- **Source:** + - Line numbers are iproute2 **v7.2.0**, the version the corpus was captured with. Kernel lines are linux + **v7.4-rc4** (`net/sched/sch_*.c`, `include/uapi/linux/pkt_sched.h`). + - **"At HEAD"** means the GitHub mirror's `main` on 2026-11-26 (`5d13122576d6`), checked with + `gh api repos/iproute2/iproute2/commits?path=...`. None of the thirteen `q_*.c` files, `tc_red.c`, `tc_qevent.c` or + `tc_qdisc.c` has a commit since v7.2.0 (`880505966c17`, 2026-08-17). Every finding below is present at HEAD. +- **How they were found:** in increment 16 ([gotc-status.md](../gotc-status.md), V033–V035). + - The plan's bug-class sweep ([bug-classes.md](bug-classes.md)) listed leads Q66–Q87 and kernel notes K32–K42. + - Writing the printers (16R, V035) added Q88, Q89 and K43. + - `gotc` replays 129 of the 132 capture rows (the other 3 are refused writes) and all 136 tdc readbacks of these + kinds byte for byte. So every captured finding is reproduced by an independent implementation, not just read from + the source. +- **Corpus:** `pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/` (132 rows), kernel 7.3.1, tc 7.2.0. "ec-N" and "pw-N" below are + its rows. +- **Reachability:** + - **In the corpus:** Q66, Q73, Q79, Q80, Q81, Q83, Q84, Q86 and Q87. + - **Latent, with unit rows** in `pkg/xtcpnl/xtcpnl_tc_aqm_test.go` (`TestParseTcAqm`) and `internal/gotc/aqm_test.go` + (`TestGotcAqm`): Q67–Q72, Q74–Q78, Q82, Q85, Q88 and Q89. The kernel never sends what reaches them; a crafted or + future message does. + - **Kernel notes:** K32–K43. + - **Dropped:** none. + +## Contents + +- [Summary](#summary) +- [Q66, Q79, Q82, Q86. Spaces and line breaks](#q66-q79-q82-q86-spaces-and-line-breaks) +- [Q76, Q81, Q84, Q87. Text and JSON that disagree](#q76-q81-q84-q87-text-and-json-that-disagree) +- [Q80, Q83. JSON keys and types](#q80-q83-json-keys-and-types) +- [Q70, Q73, Q74, Q75. Widths and signedness](#q70-q73-q74-q75-widths-and-signedness) +- [Q85, Q89. ECN mask names](#q85-q89-ecn-mask-names) +- [Q67, Q68, Q69, Q71, Q72, Q77, Q78, Q88. Unchecked reads in gred and cake](#q67-q68-q69-q71-q72-q77-q78-q88-unchecked-reads-in-gred-and-cake) +- [K32–K43. Kernel notes](#k32k43-kernel-notes) + +## Summary + +| ID | File:line (v7.2.0) | Class | Finding | Pinned by | At HEAD | gotc | +|---|---|---|---|---|---|---| +| Q66 | q_red.c:224, q_choke.c:200 | C10 | `Scell_log %u` has no trailing space, so `-d` with a qevent prints `Scell_log 0qevent early_drop block 10` | ec-007 | present | reproduces | +| Q67 | q_gred.c:425, 436 | C12 | only TCA_GRED_PARMS is checked; `tb[TCA_GRED_DPS]` is dereferenced unchecked | TestGotcAqm | present | refuses | +| Q68 | q_gred.c:330 | C4 | `VQ_DP` indexes `infos[MAX_DPs]` unbounded: an out-of-bounds write | TestGotcAqm | present | refuses | +| Q69 | q_gred.c:330-362 | C3 | every VQ attribute is read as a u32 with no payload check | TestParseTcAqm, TestGotcAqm | present | refuses | +| Q70 | q_gred.c:333 | C2 | `VQ_STAT_BYTES` is a u64 on the wire, read as a u32 | TestGotcAqm | present | reproduces | +| Q71 | q_gred.c:310-313 | C3/C12 | an `rta_len` under 4 makes the VQ loop spin forever | TestParseTcAqm, TestGotcAqm | present | refuses | +| Q72 | q_gred.c:440 | C6/C5 | the "message smaller than expected" warning is a raw fprintf to stdout, inside `-j`'s open object | TestGotcAqm | present | reproduces | +| Q73 | q_sfb.c:151-153 | C2 | `rehash*1000` and `db*1000` wrap a u32: `rehash 5000000` prints `705s` and `705032704` | ec-021, pw-021 | present | reproduces | +| Q74 | q_codel.c:177 | C12 | `-drop_next` is undefined behaviour at INT_MIN | TestGotcAqm | present | reproduces (wraps) | +| Q75 | q_cake.c:712 | C2 | a negative `blue_timer` prints `-` and then the unnegated u32 time (drop_next is negated, 694) | TestGotcAqm | present | reproduces | +| Q76 | q_cake.c:694-716 | C5 | negative drop_next and blue_timer are text only; codel prints drop_next in both | TestGotcAqm | present | reproduces | +| Q77 | q_cake.c:627 | C3 | the `GET_STAT` getters read with no payload check | TestParseTcAqm, TestGotcAqm | present | refuses | +| Q78 | q_cake.c:772 | C12 | `PRINT_TSTAT` checks the attribute in tin 0 only; a later tin missing it dereferences NULL in text | TestGotcAqm | present | refuses in text; JSON prints | +| Q79 | q_cake.c:635, 677 | C10 | hard `"\n"` ignores `-o` (the tin table uses `_SL_`); `"\n\n"` plus the caller's newline | ec-038 | present | reproduces | +| Q80 | q_cake.c:540-545 | C7 | JSON `"ack-filter"` is a hyphenated string (`disabled`, `enabled`, `aggressive`); its siblings are bools | pw-035, pw-042 | present | reproduces | +| Q81 | q_cake.c:554, 579 | C5/C7 | `rtt` and `fwmark` print in text only when nonzero, but always in JSON; fwmark is a hex string | ec-035, pw-035, ec-040, pw-040 | present | reproduces | +| Q82 | q_cake.c:414 | C10 | an unknown mode prints `(?%s?)` with no trailing space | TestGotcAqm | present | reproduces | +| Q83 | q_dualpi2.c:410-524 | C7 | hyphenated JSON keys, and text names that differ from them (`memlimit %uB`, `coupling_factor`) | pw-052 | present | reproduces | +| Q84 | q_dualpi2.c:484-486 | C5 | split_gso true is `"split-gso": null`; false has no key, while text prints `no_split_gso` | pw-052, ec-055, pw-055 | present | reproduces | +| Q85 | q_dualpi2.c:52-75 | C5 | `CLA_ECT` (2) prints as `any_ect` | TestGotcAqm | present | reproduces | +| Q86 | q_dualpi2.c:507-525; tc_qdisc.c:337-338 | C10 | xstats end with a bare print_nl plus the caller's: a blank line, and no 2-space indent | ec-053 | present | reproduces | +| Q87 | tc_red.c:100-118 | C5 | red flags: JSON always has the four bools, text shows only the true ones | ec-001, pw-005 | present | reproduces | +| Q88 | q_gred.c:310 | C3/C15 | `gred_parse_vqs` uses plain `parse_rtattr`, so a VQ_ENTRY with NLA_F_NESTED is not found | TestGotcAqm | present | reproduces | +| Q89 | q_dualpi2.c:52-75, 477-479 | C10 | an ECN mask with neither bit warns twice (both getters run in any mode) and prints an empty word | TestGotcAqm | present | reproduces | + +## Q66, Q79, Q82, Q86. Spaces and line breaks + +- **Q66:** red and choke print `Scell_log %u` with no trailing space (q_red.c:224, q_choke.c:200). gred's has one. red + then prints its qevents, so `tc -d qdisc show` gives `Scell_log 0qevent early_drop block 10` (ec-007). +- **Q79:** cake's xstats use a hard `"\n"` before and after the memory and capacity lines (q_cake.c:635, 677), while the + tin table uses `_SL_`. Under `-o` the output still breaks across lines, and the `"\n\n"` plus `print_qdisc`'s own + newline leaves a blank line (ec-038). +- **Q82:** `cake_print_mode` prints `(?%s?)` for an unknown value with no trailing space (q_cake.c:414), so the next + word runs into it. Only a future kernel mode reaches it. +- **Q86:** dualpi2's xstats end with a bare `print_nl()` (q_dualpi2.c:525), and `tc_qdisc.c:337-338` adds one more. + Text gets a blank line, and the lines have no 2-space indent, unlike other kinds' xstats (ec-053). + +## Q76, Q81, Q84, Q87. Text and JSON that disagree + +- **Q87:** `tc_red_print_flags` prints `ecn`, `harddrop`, `adaptive` and `nodrop` in text only when set, but always + emits the four bools in JSON (tc_red.c:100-118). red, choke, gred and sfq share it (ec-001, pw-005). +- **Q81:** cake prints `rtt` and `fwmark` in text only when nonzero, and always in JSON (q_cake.c:554, 579). fwmark is + printed with `print_0xhex`, so it is the string `"0xff"` (ec-040, pw-040). +- **Q84:** dualpi2's split_gso true is `print_null`, giving `"split-gso": null`. False prints `no_split_gso` in text and + nothing in JSON (q_dualpi2.c:484-486; pw-052, pw-055). +- **Q76:** cake prints drop_next and blue_timer only when non-negative in JSON. The negative branch is text only + (q_cake.c:694-716). codel prints drop_next in both. + +## Q80, Q83. JSON keys and types + +- **Q80:** cake's `ack-filter` is a hyphenated string key (`"disabled"`, `"enabled"`, `"aggressive"`), while its + neighbours (`nat`, `wash`, `ingress`, `split_gso`) are bools with underscores (q_cake.c:540-545; pw-035, pw-042). +- **Q83:** dualpi2's JSON keys are hyphenated (`memory-limit`, `step-thresh-pkts`, `c-protection`), and its text names + differ from them (`memlimit %uB` is not print_size, `coupling_factor`, `classic_protection`). The rest of tc uses + underscores (q_dualpi2.c:410-524; pw-052). + +## Q70, Q73, Q74, Q75. Widths and signedness + +- **Q73:** sfb converts `rehash` and `db` to µs as `qopt->rehash_interval * 1000` in u32 (q_sfb.c:151-153). Above + 4294967 ms that wraps: `rehash 5000000` prints `705s` in text and `705032704` in JSON (ec-021, pw-021). +- **Q70:** the kernel sends `TCA_GRED_VQ_STAT_BYTES` as a u64 (`nla_put_u64_64bit`), and tc reads it with + `rta_getattr_u32` (q_gred.c:333). Above 4 GiB the byte count wraps. +- **Q74:** codel prints a negative drop_next as `-` and `sprint_time(-drop_next)` (q_codel.c:177). At INT_MIN the + negation is undefined behaviour; in practice it wraps to itself. +- **Q75:** cake negates drop_next (q_cake.c:694) but not blue_timer (712), so a negative blue_timer prints `-` and then + the huge unsigned time. + +## Q85, Q89. ECN mask names + +- **Q85:** `get_ecn_type` maps mask bit L4S_ECT to `l4s_ect` and anything else with a bit set to `any_ect` + (q_dualpi2.c:52-75), so `CLA_ECT` (2) prints as `any_ect`. +- **Q89 (new):** with neither bit set it prints `Warning: Unexpected ecn type %d!` and returns `""`. Both the text and + the JSON getter run whatever the mode (q_dualpi2.c:477-479), so the warning prints twice, and the text has an empty + word. The kernel validates the mask, so this is latent. + +## Q67, Q68, Q69, Q71, Q72, Q77, Q78, Q88. Unchecked reads in gred and cake + +- **Q67:** `gred_print_opt` checks only `tb[TCA_GRED_PARMS]` (q_gred.c:425), then reads `tb[TCA_GRED_DPS]` (436) with + no NULL check. A message without DPS dereferences NULL. gotc refuses. +- **Q68:** `gred_parse_vqs` writes `infos[dp]` for any `TCA_GRED_VQ_DP` (q_gred.c:330). `infos` has `MAX_DPs` (16) + entries, so a DP of 16 or more writes past the array. The kernel marks empty slots with `DP = MAX_DPs + i` in + the qopt array, not the VQ list (K33). gotc refuses. +- **Q69:** every VQ attribute is read as a u32 with no payload check (q_gred.c:330-362). gotc refuses a short one. +- **Q71:** the VQ walk steps by `RTA_LENGTH(RTA_PAYLOAD(entry))` with no `RTA_OK` check (q_gred.c:310-313). An + entry with `rta_len` 0 does not advance, and under 4 misaligns or stalls, so tc can spin forever. gotc refuses. +- **Q72:** a TCA_GRED_PARMS smaller than expected prints `\n GRED received message smaller than expected\n` with + `fprintf(stdout)` (q_gred.c:440), inside `-j`'s open object. The JSON is then invalid. +- **Q88 (new):** `gred_parse_vqs` uses plain `parse_rtattr` on each entry (q_gred.c:310). The kernel sends + TCA_GRED_VQ_ENTRY with `nla_nest_start_noflag`, so that works today. An entry flagged NLA_F_NESTED is "ERROR: Failed to + parse Virtual Queue entry", and nothing prints. The same class as K30's printers that depend on the flag choice. +- **Q77:** cake's `GET_STAT_U32`/`GET_STAT_S32`/`GET_STAT_U64` read with no payload check (q_cake.c:627). gotc refuses + a short one. +- **Q78:** in the tin table, `PRINT_TSTAT` checks the attribute only in tin 0 (q_cake.c:772) and then dereferences it in + every tin. A later tin missing it dereferences NULL. The JSON path tests each tin, so it prints. gotc refuses in text + and prints in JSON. + +## K32–K43. Kernel notes + +- **K32 (red, choke):** MAX_P is always sent, so `-d` takes the probability branch. red sends FLAGS always, and its + qevent blocks only when bound. Idle xstats are zero. +- **K33 (gred):** empty DP slots are sent as `DP = MAX_DPs + i` in the qopt array, and tc skips them. VQ_LIST is + always sent, with a u64 BYTES and a PAD attribute. gred has no xstats; its stats print inside the options under `-s` + (ec-014, pw-013). +- **K34 (sfb):** rehash and db round-trip through jiffies, so fixtures use multiples of 4 ms. +- **K35 (codel):** CE_THRESHOLD is sent only when set. +- **K36 (pie):** the xstats prob is shifted by 8, and avg_dq_rate is sent only with dq_rate_estimator. +- **K37 (fq_pie):** its TCA_OPTIONS nest has NLA_F_NESTED set; pie's does not. +- **K38 (cake):** TARGET is sent, and tc ignores it. With no overhead keyword RAW is sent, so the default prints `raw`. + When idle, MIN_NETLEN and MIN_ADJLEN are **65535** (`u16 min_netlen = ~0`, sch_cake.c:264, 2918), not 4294967295 as + the plan had it. The diffserv mode sets the number of tins. Classes are listed only for active flows. +- **K39 (cake_mq):** it needs a multi-queue root and rejects autorate. `cake_mq_qdisc_ops` has no `dump_stats`, so no + xstats. Its child cakes print on their own lines (ec-048). +- **K40 (dualpi2):** the kernel rejects both step_thresh attributes together (sch_dualpi2.c:812) and dumps PKTS or US + (1034, 1061). When idle the delays are 0 and credit equals c_protection's initial value. +- **K41 (plug):** has no `.dump`, so the options are `{}`. +- **K42 (skbprio):** its options are a flat struct; it has 64 classes (SKBPRIO_MAX_PRIORITY, ec-062). +- **K43 (new, codel):** times lose 1 µs on the way back: `target 4ms` dumps as 3999 µs, because of the + CODEL_SHIFT (10) conversion (pw-024). +- **Unreachable, so not a finding:** `qevents_have_block` would match an unset qevent's 0 against block 0, but tc + rejects `block 0` (tc_filter.c:102). diff --git a/internal/gotc/aqm_test.go b/internal/gotc/aqm_test.go new file mode 100644 index 000000000..117a028cc --- /dev/null +++ b/internal/gotc/aqm_test.go @@ -0,0 +1,353 @@ +package gotc + +import ( + "bytes" + "strings" + "testing" + + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" + "golang.org/x/sys/unix" +) + +// The increment-16 kinds (red, choke, gred, sfb, codel, pie, fq_pie, hhf, +// cake, cake_mq, dualpi2, plug, skbprio) against scripted replies: one row +// per lead the tcaqm corpus pins, so a mutant that breaks one fails here by +// name, and the crafted paths the kernel never sends (a VQ_DP past +// MAX_DPs, a zero-length VQ entry, a tin missing an attribute). +// +// go test ./internal/gotc/ -run TestGotcAqm + +// redQopt is a struct tc_red_qopt. +func redQopt(limit, lo, hi uint32, wlog, plog, scell, flags uint8) []byte { + return cat(le32(limit), le32(lo), le32(hi), []byte{wlog, plog, scell, flags}) +} + +// aqmQ is a qdisc 1: of kind k with a nested TCA_OPTIONS. +func aqmQ(k string, opts ...[]byte) Msg { return schedQ(k, nestOpts(opts...)) } + +// aqmQs is aqmQ with zero basic stats and xs as TCA_STATS_APP. +func aqmQs(k string, xs []byte, opts ...[]byte) Msg { + return schedQ(k, nestOpts(opts...), stats2(basic(0, 0), attr(xtcpnl.TcaStatsApp, xs))) +} + +// gredParms is TCA_GRED_PARMS: sixteen struct tc_gred_qopt, slot i's DP +// dps[i] (MAX_DPs+i, the kernel's empty marker, past len(dps)). +func gredParms(dps ...uint32) []byte { + b := make([]byte, 0, xtcpnl.GredMaxDPsCst*xtcpnl.TcGredQoptSizeCst) + for i := range xtcpnl.GredMaxDPsCst { + dp := uint32(xtcpnl.GredMaxDPsCst + i) + if i < len(dps) { + dp = dps[i] + } + q := make([]byte, xtcpnl.TcGredQoptSizeCst) + copy(q[0:], le32(60000)) + copy(q[4:], le32(15000)) + copy(q[8:], le32(45000)) + copy(q[12:], le32(dp)) + q[43] = 1 // prio + copy(q[44:], le32(7)) // packets + copy(q[48:], le32(99)) // bytesin + b = append(b, q...) + } + return attr(xtcpnl.TcaGredParms, b) +} + +// gredDps is TCA_GRED_DPS: a struct tc_gred_sopt. +func gredDps(dps, def uint32, grio uint8) []byte { + return attr(xtcpnl.TcaGredDps, cat(le32(dps), le32(def), []byte{grio, 0, 0, 0})) +} + +// gredVqList is TCA_GRED_VQ_LIST of entries, each a TCA_GRED_VQ_ENTRY +// of attrs, without NLA_F_NESTED, as the kernel's nla_nest_start_noflag +// sends it and tc's plain parse_rtattr needs it. +func gredVqList(entries ...[]byte) []byte { + b := make([]byte, 0, len(entries)*8) + for _, e := range entries { + b = append(b, attr(xtcpnl.TcaGredVqEntry, e)...) + } + return attr(xtcpnl.TcaGredVqList|unix.NLA_F_NESTED, b) +} + +// cakeTinAttrs is one tin's stats: all twenty printed attributes, zero +// but threshold_rate and the times. +func cakeTinAttrs(skip uint16) []byte { + var b []byte + for _, f := range cakeJSONTins { + if f.t == skip { + continue + } + switch f.t { + case xtcpnl.TcaCakeTinStatsThresholdRate64, xtcpnl.TcaCakeTinStatsSentBytes64: + b = append(b, attr(f.t, le64(0))...) + case xtcpnl.TcaCakeTinStatsTargetUs: + b = append(b, attr(f.t, le32(5000))...) + default: + b = append(b, attr(f.t, le32(0))...) + } + } + return b +} + +// cakeXstats is a cake TCA_STATS_APP: stats then n tins, tin `gap` +// missing TARGET_US. +func cakeXstats(n, gap int, stats ...[]byte) []byte { + var tins []byte + for i := 1; i <= n; i++ { + skip := uint16(0) + if i-1 == gap { + skip = xtcpnl.TcaCakeTinStatsTargetUs + } + tins = append(tins, attr(uint16(i)|unix.NLA_F_NESTED, cakeTinAttrs(skip))...) + } + return cat(cat(stats...), attr(xtcpnl.TcaCakeStatsTinStats|unix.NLA_F_NESTED, tins)) +} + +// cakeShortTins is two cake tins, tin 1's TARGET_US one byte long; tin 0 +// has a full TARGET_US when has0. +func cakeShortTins(has0 bool) []byte { + var t0 []byte + if has0 { + t0 = attr(xtcpnl.TcaCakeTinStatsTargetUs, le32(5000)) + } + tins := cat(attr(1|unix.NLA_F_NESTED, t0), + attr(2|unix.NLA_F_NESTED, attr(xtcpnl.TcaCakeTinStatsTargetUs, []byte{1}))) + return attr(xtcpnl.TcaCakeStatsTinStats|unix.NLA_F_NESTED, tins) +} + +const aqmHead = "qdisc %s 1: root refcnt 2 " + +func aqmLine(k, rest string) string { return strings.Replace(aqmHead, "%s", k, 1) + rest } + +// aqmSent is tc's -s line for zero basic stats with no queue stats. +const aqmSent = "\n Sent 0 bytes 0 pkt\n" + +func TestGotcAqm(t *testing.T) { + show := []string{"qdisc", "show", "dev", "d0"} + showS := []string{"-s", "qdisc", "show", "dev", "d0"} + showD := []string{"-d", "qdisc", "show", "dev", "d0"} + showJ := []string{"-j", "qdisc", "show", "dev", "d0"} + showSO := []string{"-s", "-o", "qdisc", "show", "dev", "d0"} + redParms := attr(xtcpnl.TcaRedParms, redQopt(400000, 30000, 90000, 5, 21, 15, 0)) + gred2 := []byte(nil) + gred2 = cat(gredParms(0, 1), gredDps(4, 0, 1)) + cakeBase := []byte(nil) + cakeBase = cat(attr(xtcpnl.TcaCakeBaseRate64, le64(0)), attr(xtcpnl.TcaCakeDiffservMode, le32(0)), + attr(xtcpnl.TcaCakeFlowMode, le32(4)), attr(xtcpnl.TcaCakeRaw, nil), attr(xtcpnl.TcaCakeRtt, le32(0))) + tests := []struct { + description string + args []string + replies []Reply + expected result + }{ + // Positive. + {"positive: red -d with a qevent: Scell_log has no trailing space (Q66)", showD, + showD0(aqmQ("red", redParms, attr(xtcpnl.TcaRedEarlyDropBlock, le32(10)))), + result{stdout: aqmLine("red", "limit 400000b min 30000b max 90000b ewma 5 Plog 21 Scell_log 15qevent early_drop block 10 \n")}}, + {"positive: red flags in text, only the true ones (Q87)", show, + showD0(aqmQ("red", redParms, attr(xtcpnl.TcaRedFlags, cat(le32(0x5), le32(0xff))))), + result{stdout: aqmLine("red", "limit 400000b min 30000b max 90000b ecn adaptive \n")}}, + {"positive: red flags in JSON, all four bools (Q87)", showJ, + showD0(aqmQ("red", redParms)), + result{stdout: `[{"kind":"red","handle":"1:","root":true,"refcnt":2,"options":{"limit":400000,"min":30000,"max":90000,"ecn":false,"harddrop":false,"adaptive":false,"nodrop":false}}]` + "\n"}}, + {"positive: red -d with MAX_P prints the probability", showD, + showD0(aqmQ("red", redParms, attr(xtcpnl.TcaRedMaxP, le32(85899346)))), + result{stdout: aqmLine("red", "limit 400000b min 30000b max 90000b ewma 5 probability 0.02 Scell_log 15\n")}}, + {"positive: choke -s, counts in packets", showS, + showD0(aqmQs("choke", cat(le32(1), le32(2), le32(3), le32(4), le32(5)), + attr(xtcpnl.TcaChokeParms, redQopt(1000, 100, 300, 7, 17, 0, 1)))), + result{stdout: aqmLine("choke", "limit 1000p min 100p max 300p ecn ") + aqmSent + " marked 4 early 1 pdrop 2 other 3 matched 5\n"}}, + {"positive: gred with two DPs and -s, empty slots skipped (K33)", showS, + showD0(aqmQ("gred", gred2, gredVqList(cat(attr(xtcpnl.TcaGredVqDp, le32(1)), + attr(xtcpnl.TcaGredVqStatBytes, le64(1<<32+5)), attr(xtcpnl.TcaGredVqFlags, le32(1)))))), + result{stdout: aqmLine("gred", "vqs 4 default 0 grio \n vq 0 prio 1 limit 60000b min 15000b max 45000b "+ + "\n Queue size: average 0b current 0b \n Dropped packets: forced 0 early 0 pdrop 0 other 0 "+ + "\n Marked packets: forced 0 early 0 \n Total packets: 7 (0b) "+ + "\n vq 1 prio 1 limit 60000b min 15000b max 45000b ecn "+ + "\n Queue size: average 0b current 0b \n Dropped packets: forced 0 early 0 pdrop 0 other 0 "+ + "\n Marked packets: forced 0 early 0 \n Total packets: 7 (5b) \n")}}, + {"positive: gred -s with no VQ list prints the qopt's counters", showS, + showD0(aqmQ("gred", cat(gredParms(3), gredDps(4, 3, 0)))), + result{stdout: aqmLine("gred", "vqs 4 default 3 \n vq 3 prio 1 limit 60000b min 15000b max 45000b "+ + "\n Queue size: average 0b current 0b \n Dropped packets: forced 0 early 0 pdrop 0 other 0 "+ + "\n Total packets: 7 (99b) \n")}}, + {"positive: cake default: raw, no-ack-filter (K38, Q80)", show, + showD0(aqmQ("cake", cakeBase)), + result{stdout: aqmLine("cake", "bandwidth unlimited diffserv3 flows nonat nowash no-ack-filter no-split-gso raw overhead 0 \n")}}, + {"positive: cake default in JSON: ack-filter a string, rtt and fwmark present (Q80, Q81)", showJ, + showD0(aqmQ("cake", cakeBase)), + result{stdout: `[{"kind":"cake","handle":"1:","root":true,"refcnt":2,"options":{"bandwidth":"unlimited","diffserv":"diffserv3","flowmode":"flows","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":false,"rtt":0,"raw":true,"overhead":0,"fwmark":"0"}}]` + "\n"}}, + {"positive: cake fwmark and rtt in text when nonzero (Q81)", show, + showD0(aqmQ("cake", attr(xtcpnl.TcaCakeFwmark, le32(0xff)), attr(xtcpnl.TcaCakeRtt, le32(20000)), + attr(xtcpnl.TcaCakeAckFilter, le32(2)), attr(xtcpnl.TcaCakeAtm, le32(1)))), + result{stdout: aqmLine("cake", "nonat nowash ack-filter-aggressive no-split-gso rtt 20ms atm overhead 0 fwmark 0xff \n")}}, + {"positive: cake diffserv4 -s: the four-tin header", showS, + showD0(aqmQs("cake", cakeXstats(4, -1, attr(xtcpnl.TcaCakeStatsMinNetlen, le32(65535)), + attr(xtcpnl.TcaCakeStatsMaxNetlen, le32(0))), cakeBase)), + result{stdout: aqmLine("cake", "bandwidth unlimited diffserv3 flows nonat nowash no-ack-filter no-split-gso raw overhead 0 ") + aqmSent + + " min/max network layer size: 65535 / 0\n" + + " Bulk Best Effort Video Voice\n" + + " thresh 0bit 0bit 0bit 0bit\n" + + " target 5ms 5ms 5ms 5ms\n" + + " interval 0us 0us 0us 0us\n" + + " pk_delay 0us 0us 0us 0us\n" + + " av_delay 0us 0us 0us 0us\n" + + " sp_delay 0us 0us 0us 0us\n" + + " backlog 0b 0b 0b 0b\n" + + " pkts 0 0 0 0\n" + + " bytes 0 0 0 0\n" + + " way_inds 0 0 0 0\n" + + " way_miss 0 0 0 0\n" + + " way_cols 0 0 0 0\n" + + " drops 0 0 0 0\n" + + " marks 0 0 0 0\n" + + " ack_drop 0 0 0 0\n" + + " sp_flows 0 0 0 0\n" + + " bk_flows 0 0 0 0\n" + + " un_flows 0 0 0 0\n" + + " max_len 0 0 0 0\n" + + " quantum 0 0 0 0\n\n"}}, + {"positive: dualpi2 -j: hyphenated keys (Q83)", showJ, + showD0(aqmQ("dualpi2", attr(xtcpnl.TcaDualpi2MemoryLimit, le32(4000000)), + attr(xtcpnl.TcaDualpi2StepThreshUs, le32(1000)), attr(xtcpnl.TcaDualpi2Alpha, le32(41)), + attr(xtcpnl.TcaDualpi2DropEarly, []byte{1}), attr(xtcpnl.TcaDualpi2EcnMask, []byte{3}))), + result{stdout: `[{"kind":"dualpi2","handle":"1:","root":true,"refcnt":2,"options":{"memory-limit":4000000,"alpha":0.160156,"step-thresh-us":1000,"drop-early":"drop-enqueue","ecn-mask":"any-ect"}}]` + "\n"}}, + {"positive: dualpi2 -s: a blank line after the xstats (Q86)", showS, + showD0(aqmQs("dualpi2", cat(le32(0), le32(0), le32(0), le32(0), le32(0), le32(0), le32(0), le32(0), + le32(0xfffffff6), le32(0), le32(0), le32(9)), attr(xtcpnl.TcaDualpi2Limit, le32(5)))), + result{stdout: aqmLine("dualpi2", "limit 5p ") + aqmSent + "prob 0.000000 delay_c 0us delay_l 0us\npkts_in_c 0 pkts_in_l 0 maxq 0\n" + + "ecn_mark 0 step_mark 0\ncredit -10 (L-queue)\nmemory_used 0 (max 0) of memory limit 9\n\n"}}, + {"positive: plug prints no options (K41)", show, + showD0(aqmQ("plug", attr(1, le32(5)))), result{stdout: aqmLine("plug", "\n")}}, + {"positive: skbprio's bare struct (K42)", show, + showD0(schedQ("skbprio", rawOpts(le32(100)))), result{stdout: aqmLine("skbprio", "limit 100 \n")}}, + {"positive: hhf options", show, + showD0(aqmQ("hhf", attr(xtcpnl.TcaHhfBacklogLimit, le32(500)), attr(xtcpnl.TcaHhfResetTimeout, le32(40000)), + attr(xtcpnl.TcaHhfAdmitBytes, le32(65536)))), + result{stdout: aqmLine("hhf", "limit 500p reset_timeout 40ms admit_bytes 64Kb \n")}}, + {"positive: codel options, ecn only when set", show, + showD0(aqmQ("codel", attr(xtcpnl.TcaCodelLimit, le32(1000)), attr(xtcpnl.TcaCodelTarget, le32(4999)), + attr(xtcpnl.TcaCodelEcn, le32(0)))), + result{stdout: aqmLine("codel", "limit 1000p target 5ms \n")}}, + {"positive: pie -s with dq_rate_estimating", showS, + showD0(aqmQs("pie", cat(le64(1<<63), le32(20), le32(7), le32(1), le32(0), le32(0), le32(0), le32(0), le32(0)), + attr(xtcpnl.TcaPieBytemode, le32(1)))), + result{stdout: aqmLine("pie", "bytemode ") + aqmSent + " prob 0.5 delay 20us avg_dq_rate 7\n pkts_in 0 overlimit 0 dropped 0 maxq 0 ecn_mark 0\n"}}, + {"positive: fq_pie options", show, + showD0(aqmQ("fq_pie", attr(xtcpnl.TcaFqPieFlows, le32(256)), attr(xtcpnl.TcaFqPieQuantum, le32(1514)))), + result{stdout: aqmLine("fq_pie", "flows 256 quantum 1514b \n")}}, + {"positive: sfb -s", showS, + showD0(aqmQs("sfb", cat(le32(1), le32(2), le32(3), le32(4), le32(5), le32(6), le32(7), le32(0xffff), le32(0)), + attr(xtcpnl.TcaSfbParms, cat(le32(600), le32(60), le32(25), le32(10), le32(5), le32(1), le32(100), le32(10), le32(20))))), + result{stdout: aqmLine("sfb", "rehash 600ms db 60ms limit 100p max 25p target 10p increment 7.62951e-05 decrement 1.5259e-05 penalty_rate 10pps penalty_burst 20p ") + + aqmSent + " earlydrop 1 penaltydrop 2 bucketdrop 3 queuedrop 4 childdrop 5 marked 6\n maxqlen 7 maxprob 1 avgprob 0\n"}}, + // Negative. + {"negative: gred VQ_DP 99 is refused (Q68)", show, + showD0(aqmQ("gred", gred2, gredVqList(attr(xtcpnl.TcaGredVqDp, le32(99))))), + result{stdout: aqmLine("gred", ""), stderr: "gotc: not implemented: gred VQ_DP past MAX_DPs (Q68) (tc reads it unchecked)\n", rc: 255}}, + {"negative: a VQ entry with rta_len 2 is refused (Q71)", show, + showD0(aqmQ("gred", gred2, attr(xtcpnl.TcaGredVqList, cat(le16(2), le16(1))))), + result{stdout: aqmLine("gred", ""), stderr: "gotc: not implemented: gred xtcpnl: tc structure payload is short: gred VQ entry rta_len 2 at offset 0 (Q71)\n", rc: 255}}, + {"negative: gred without DPS is refused (Q67)", show, + showD0(aqmQ("gred", gredParms(0))), + result{stdout: aqmLine("gred", ""), stderr: "gotc: not implemented: gred xtcpnl: tc attribute missing: TCA_GRED_DPS (Q67)\n", rc: 255}}, + {"negative: gred PARMS short prints tc's raw message (Q72)", show, + showD0(aqmQ("gred", attr(xtcpnl.TcaGredParms, le32(0)), gredDps(1, 0, 0))), + result{stdout: aqmLine("gred", "\n GRED received message smaller than expected\n\n")}}, + {"negative: cake text with tin 1 missing an attribute tin 0 has is refused (Q78)", showS, + showD0(aqmQs("cake", cakeXstats(3, 1))), + result{stdout: aqmLine("cake", "nonat nowash no-ack-filter no-split-gso noatm overhead 0 ") + aqmSent, + stderr: "gotc: not implemented: cake tin attribute that only tin 0 has (Q78) (tc reads it unchecked)\n", rc: 255}}, + {"corner: cake text skips a short tin 1 field tin 0 lacks (PR 353 review)", showS, + showD0(aqmQs("cake", cakeShortTins(false))), + result{stdout: aqmLine("cake", "nonat nowash no-ack-filter no-split-gso noatm overhead 0 ") + aqmSent + " Tin 0 Tin 1\n\n"}}, + {"negative: cake JSON reads a short tin 1 field tin 0 lacks", []string{"-s", "-j", "qdisc", "show", "dev", "d0"}, + showD0(aqmQs("cake", cakeShortTins(false))), + result{stdout: "[{\"kind\":\"cake\",\"handle\":\"1:\",\"root\":true,\"refcnt\":2,\"options\":{\"nat\":false,\"wash\":false,\"ingress\":false,\"ack-filter\":\"disabled\",\"split_gso\":false,\"rtt\":0,\"raw\":false,\"atm\":\"noatm\",\"overhead\":0,\"fwmark\":\"0\"},\"bytes\":0,\"packets\":0", stderr: "gotc: not implemented: cake xtcpnl: tc structure payload is short: cake tin 1 attribute mask 0x2000\n", rc: 255}}, + {"negative: cake text reads a short tin 1 field tin 0 has", showS, + showD0(aqmQs("cake", cakeShortTins(true))), + result{stdout: aqmLine("cake", "nonat nowash no-ack-filter no-split-gso noatm overhead 0 ") + aqmSent, stderr: "gotc: not implemented: cake xtcpnl: tc structure payload is short: cake tin 1 attribute mask 0x2000\n", rc: 255}}, + {"negative: a short cake stat is refused (Q77)", showS, + showD0(aqmQs("cake", attr(xtcpnl.TcaCakeStatsActiveQueues, []byte{1}))), + result{stdout: aqmLine("cake", "nonat nowash no-ack-filter no-split-gso noatm overhead 0 ") + aqmSent, + stderr: "gotc: not implemented: cake xtcpnl: tc structure payload is short: cake stats attribute mask 0x20000\n", rc: 255}}, + {"negative: red's short qevent block is refused", show, + showD0(aqmQ("red", redParms, attr(xtcpnl.TcaRedMarkBlock, []byte{1}))), + result{stdout: aqmLine("red", "limit 400000b min 30000b max 90000b "), + stderr: "gotc: not implemented: red qevent mark block of 1 bytes (tc reads it unchecked)\n", rc: 255}}, + {"negative: red's zero qevent block is illegal", show, + showD0(aqmQ("red", redParms, attr(xtcpnl.TcaRedMarkBlock, le32(0)))), + result{stdout: aqmLine("red", "limit 400000b min 30000b max 90000b \n"), stderr: "Illegal qevent block index\n"}}, + {"negative: red without PARMS prints nothing", show, + showD0(aqmQ("red", attr(xtcpnl.TcaRedMaxP, le32(1)))), result{stdout: aqmLine("red", "\n")}}, + // Boundary. + {"boundary: sfb rehash 5000000 ms wraps in u32 (Q73)", show, + showD0(aqmQ("sfb", attr(xtcpnl.TcaSfbParms, cat(le32(5000000), le32(5000000), le32(0), le32(0), le32(0), le32(0), le32(0), le32(0), le32(0))))), + result{stdout: aqmLine("sfb", "rehash 705s db 705s limit 0p max 0p target 0p increment 0 decrement 0 penalty_rate 0pps penalty_burst 0p \n")}}, + {"boundary: dualpi2 split_gso true is a JSON null (Q84)", showJ, + showD0(aqmQ("dualpi2", attr(xtcpnl.TcaDualpi2SplitGso, []byte{1}))), + result{stdout: `[{"kind":"dualpi2","handle":"1:","root":true,"refcnt":2,"options":{"split-gso":null}}]` + "\n"}}, + {"boundary: dualpi2 split_gso false has no key, text no_split_gso; CLA_ECT prints any_ect (Q84, Q85)", show, + showD0(aqmQ("dualpi2", attr(xtcpnl.TcaDualpi2SplitGso, []byte{0}), attr(xtcpnl.TcaDualpi2EcnMask, []byte{2}))), + result{stdout: aqmLine("dualpi2", "any_ect no_split_gso \n")}}, + {"boundary: gred VQ_STAT_BYTES 2^32+5 prints tc's u32 (Q70)", showS, + showD0(aqmQ("gred", cat(gredParms(0), gredDps(1, 0, 0)), gredVqList(cat(attr(xtcpnl.TcaGredVqDp, le32(0)), + attr(xtcpnl.TcaGredVqStatBytes, le64(1<<32+5)))))), + result{stdout: aqmLine("gred", "vqs 1 default 0 \n vq 0 prio 1 limit 60000b min 15000b max 45000b "+ + "\n Queue size: average 0b current 0b \n Dropped packets: forced 0 early 0 pdrop 0 other 0 "+ + "\n Marked packets: forced 0 early 0 \n Total packets: 7 (5b) \n")}}, + {"positive: filter show block finds red's qevent block (red_has_block)", []string{"filter", "show", "block", "10"}, + []Reply{links(), rep(aqmQ("red", redParms, attr(xtcpnl.TcaRedEarlyDropBlock, le32(10))), done()), rep(done())}, + result{}}, + {"negative: filter show block with red on another block finds none", []string{"filter", "show", "block", "10"}, + []Reply{links(), rep(aqmQ("red", redParms, attr(xtcpnl.TcaRedMarkBlock, le32(11))), done())}, + result{stderr: "Cannot find block \"10\"\n", rc: 1}}, + {"negative: filter show block over red's zero qevent block ends the dump", []string{"filter", "show", "block", "10"}, + []Reply{links(), rep(aqmQ("red", redParms, attr(xtcpnl.TcaRedMarkBlock, le32(0))), done())}, + result{stderr: "Illegal qevent block index\nDump terminated\n: Success\nCannot find block \"10\"\n", rc: 1}}, + {"negative: filter show block over red's short qevent block is refused", []string{"filter", "show", "block", "10"}, + []Reply{links(), rep(aqmQ("red", redParms, attr(xtcpnl.TcaRedMarkBlock, []byte{1})), done())}, + result{stderr: "gotc: not implemented: red qevent mark block of 1 bytes (tc reads it unchecked)\n", rc: 255}}, + // Corner. + {"corner: cake -s -o keeps the hard newlines (Q79)", showSO, + showD0(aqmQs("cake", cat(attr(xtcpnl.TcaCakeStatsActiveQueues, le32(0)), attr(xtcpnl.TcaCakeStatsAvgNetoff, le32(14))))), + result{stdout: aqmLine("cake", "nonat nowash no-ack-filter no-split-gso noatm overhead 0 ") + + "\\ Sent 0 bytes 0 pkt\\ active queues: 0\n average network hdr offset: 14\n\n\\"}}, + {"corner: cake negative blue_timer: text unnegated, JSON none (Q75, Q76)", showS, + showD0(aqmQs("cake", cat(attr(xtcpnl.TcaCakeStatsPDrop, le32(3)), attr(xtcpnl.TcaCakeStatsBlueTimerUs, le32(0xfffffc18))))), + result{stdout: aqmLine("cake", "nonat nowash no-ack-filter no-split-gso noatm overhead 0 ") + aqmSent + + " blue_prob 3 blue_timer -4.29e+03s\n"}}, + {"corner: cake negative drop_next is negated", showS, + showD0(aqmQs("cake", cat(attr(xtcpnl.TcaCakeStatsDropping, le32(1)), attr(xtcpnl.TcaCakeStatsDropNextUs, le32(0xfffffc18))))), + result{stdout: aqmLine("cake", "nonat nowash no-ack-filter no-split-gso noatm overhead 0 ") + aqmSent + + " dropping drop_next -1ms\n"}}, + {"corner: codel drop_next INT_MIN (Q74)", showS, + showD0(aqmQs("codel", cat(le32(0), le32(0), le32(0), le32(0), le32(0x80000000)))), + result{stdout: aqmLine("codel", "") + aqmSent + " count 0 lastcount 0 ldelay 0us drop_next -2.15e+03s\n maxpacket 0 ecn_mark 0 drop_overlimit 0\n"}}, + {"corner: dualpi2 ecn mask with neither bit warns twice (Q89)", show, + showD0(aqmQ("dualpi2", attr(xtcpnl.TcaDualpi2EcnMask, []byte{4}))), + result{stdout: aqmLine("dualpi2", " \n"), stderr: "Warning: Unexpected ecn type 4!\nWarning: Unexpected ecn type 4!\n"}}, + {"corner: a VQ entry with NLA_F_NESTED is not found: tc's plain parse_rtattr (Q88)", showS, + showD0(aqmQ("gred", cat(gredParms(0), gredDps(1, 0, 0)), attr(xtcpnl.TcaGredVqList|unix.NLA_F_NESTED, + attr(xtcpnl.TcaGredVqEntry|unix.NLA_F_NESTED, cat(attr(xtcpnl.TcaGredVqDp, le32(0)), + attr(xtcpnl.TcaGredVqStatBytes, le64(5))))))), + result{stdout: aqmLine("gred", "vqs 1 default 0 \n vq 0 prio 1 limit 60000b min 15000b max 45000b "+ + "\n Queue size: average 0b current 0b \n Dropped packets: forced 0 early 0 pdrop 0 other 0 "+ + "\n Marked packets: forced 0 early 0 \n Total packets: 7 (0b) \n"), + stderr: "ERROR: Failed to parse Virtual Queue entry\n"}}, + {"corner: cake_mq shares cake's printer; an unknown mode's (?diffserv?) has no space (K39, Q82)", show, + showD0(aqmQ("cake_mq", attr(xtcpnl.TcaCakeDiffservMode, le32(9)))), + result{stdout: aqmLine("cake_mq", "(?diffserv?)nonat nowash no-ack-filter no-split-gso noatm overhead 0 \n")}}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + src := &fakeSource{replies: tc.replies} + var out, errb bytes.Buffer + cfg := config{src: src, stdin: strings.NewReader(""), sys: emptySys(t)} + rc := run(cfg, tc.args, &out, &errb) + got := result{stdout: out.String(), stderr: errb.String(), rc: rc, pending: len(src.replies)} + if got != tc.expected { + t.Errorf("tc %q\n got %#v\n want %#v", tc.args, got, tc.expected) + } + }) + } +} diff --git a/internal/gotc/class.go b/internal/gotc/class.go index 87b8c3f54..80575bb3e 100644 --- a/internal/gotc/class.go +++ b/internal/gotc/class.go @@ -196,11 +196,7 @@ func (r *runner) printClass(m Msg) (int, error) { r.errf("print_class: NULL kind\n") return -1, nil } - q, err := qdiscKind(ti.Kind) - if err != nil { - return 0, err - } - return 0, r.printClassBody(m, &ti, q) + return 0, r.printClassBody(m, &ti, qdiscKind(ti.Kind)) } func (r *runner) printClassBody(m Msg, ti *xtcpnl.TcInfo, q *qdiscUtil) error { @@ -347,17 +343,14 @@ func (r *runner) graphNodeShow(buf *strings.Builder, cls *graphNode) { buf.WriteString(" " + kind + " ") o.raw(buf.String()) buf.Reset() - q, err := qdiscKind(kind) - if err != nil { - r.cf.err, q = err, nil - } - if q != nil && q.printCopt != nil { + q := qdiscKind(kind) + if q.printCopt != nil { q.printCopt(r, q, tb.Bytes(xtcpnl.TcaOptions), tb.Has(xtcpnl.TcaOptions)) if err := r.takeKindErr(); err != nil && r.cf.err == nil { r.cf.err = err } } - if q != nil && r.stats > 0 { + if r.stats > 0 { r.graphStats(buf, cls, q, id, tb) } } diff --git a/internal/gotc/corpus_test.go b/internal/gotc/corpus_test.go index bf320be8a..e4069da59 100644 --- a/internal/gotc/corpus_test.go +++ b/internal/gotc/corpus_test.go @@ -15,7 +15,7 @@ import ( // corpusRows is how many rows each space holds (V002). var corpusRows = map[string]int{ "tcqdisc": 142, "tcclass": 82, "tcfilter": 159, "tcflower": 97, "tcaction": 138, "tcaction2": 105, - "tcsched": 87, + "tcsched": 87, "tcaqm": 132, } // corpusKnown are the rows gotc cannot match byte for byte, each with the @@ -41,6 +41,7 @@ var corpusWrites = map[string]bool{ "tcqdisc/ng-018": true, "tcclass/ng-011": true, "tcfilter/ng-024": true, "tcflower/ng-009": true, "tcaction/ng-006": true, "tcaction2/ng-007": true, "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, } // pschedRow is the one row that reads the workbench's /proc/net/psched @@ -189,7 +190,7 @@ func TestGotcCorpus(t *testing.T) { if err != nil { t.Fatal(err) } - for _, sp := range []string{"tcclass", "tcfilter", "tcflower", "tcaction", "tcaction2", "tcsched"} { + for _, sp := range []string{"tcclass", "tcfilter", "tcflower", "tcaction", "tcaction2", "tcsched", "tcaqm"} { more, err := filepath.Glob("../../pkg/xtcpnl/testdata/*/ws/" + sp) if err != nil { t.Fatal(err) diff --git a/internal/gotc/filter.go b/internal/gotc/filter.go index f33e8358f..d76377ae6 100644 --- a/internal/gotc/filter.go +++ b/internal/gotc/filter.go @@ -375,9 +375,17 @@ func (r *runner) blockExists(block uint32) (bool, error) { found = true } } - if kind, _ := tb.Str(xtcpnl.TcaKind); kind == "red" { - kerr = errKind("red") // red's has_block reads its options - return -1 + // red is the one kind with a has_block. + if kind, _ := tb.Str(xtcpnl.TcaKind); kind == xtcpnl.TcKindRed { + f, rc, err := r.redHasBlock(tb.Bytes(xtcpnl.TcaOptions), tb.Has(xtcpnl.TcaOptions), block) + if err != nil { + kerr = err + return -1 + } + if f { + found = true + } + return rc } return 0 }) diff --git a/internal/gotc/q_aqm.go b/internal/gotc/q_aqm.go new file mode 100644 index 000000000..09d024508 --- /dev/null +++ b/internal/gotc/q_aqm.go @@ -0,0 +1,292 @@ +package gotc + +import ( + "encoding/binary" + "math" + + "github.com/randomizedcoder/xtcp2/pkg/cint" + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// The flat AQM printers: tc/q_sfb.c, q_codel.c, q_pie.c, q_fq_pie.c, +// q_hhf.c, q_plug.c and q_skbprio.c. Every option read is length-checked, +// so none refuses. + +// The option names more than one AQM printer uses, text and JSON alike. +const ( + wordLimit = "limit" + wordTarget = "target" + wordEcn = "ecn" + wordAlpha = "alpha" + wordBeta = "beta" +) + +// sfbMaxProb is q_sfb.c's SFB_MAX_PROB. +const sfbMaxProb = 0xFFFF + +// aqmField is one flat option: a u32 attribute printed when it holds one. +type aqmField struct { + t uint16 + key string + kind aqmFieldKind +} + +type aqmFieldKind uint8 + +const ( + aqmPkts aqmFieldKind = iota // "key %up " + aqmUint // "key %u " + aqmTime // JSON uint, text "key %s " of sprint_time + aqmSize // print_size "key %s " + aqmFlag // print_bool "key " when nonzero +) + +// printAqmFields prints fs in order, each when its attribute holds a u32. +func (r *runner) printAqmFields(tb xtcpnl.AttrTable, fs []aqmField) { + o := r.o + for _, f := range fs { + v, ok := tb.U32(f.t) + if !ok { + continue + } + switch f.kind { + case aqmPkts: + o.uint(printAny, f.key, f.key+" "+u32s(v)+"p ", v) + case aqmUint: + o.uint(printAny, f.key, f.key+" "+u32s(v)+" ", v) + case aqmTime: + o.uint(printJSON, f.key, "", v) + o.fp(f.key + " " + sprintTime(v) + " ") + case aqmSize: + o.size(printAny, f.key, f.key+" ", " ", uint64(v)) + case aqmFlag: + if v != 0 { + o.boolean(printAny, f.key, f.key+" ", true) + } + } + } +} + +// aqmXstats is the kind's xstats decoded, ok false where tc's printer +// returns -1 on a short payload. +func aqmXstats(kind string, xs []byte) (xtcpnl.TcAqmXstats, bool) { + x, err := xtcpnl.ParseTcXstats(kind, xs) + return x.Aqm, err == nil +} + +// printSfbOpt is sfb_print_opt. rehash and db are u32 milliseconds times +// 1000 in u32, which wraps above 4294967 ms (Q73). +func printSfbOpt(r *runner, _ *qdiscUtil, opt []byte, has bool) { + if !has { + return + } + tb := r.nested(opt, xtcpnl.TcaSfbMaxKnown) + q, err := xtcpnl.DecodeTcSfbQopt(tb.Bytes(xtcpnl.TcaSfbParms)) + if err != nil { + return + } + o := r.o + rehash, db := q.RehashInterval*1000, q.WarmupTime*1000 + o.uint(printJSON, "rehash", "", rehash) + o.fp("rehash " + sprintTime(rehash) + " ") + o.uint(printJSON, "db", "", db) + o.fp("db " + sprintTime(db) + " ") + o.uint(printAny, "limit", "limit "+u32s(q.Limit)+"p ", q.Limit) + o.uint(printAny, "max", "max "+u32s(q.Max)+"p ", q.Max) + o.uint(printAny, "target", "target "+u32s(q.BinSize)+"p ", q.BinSize) + inc, dec := float64(q.Increment)/sfbMaxProb, float64(q.Decrement)/sfbMaxProb + o.float(printAny, "increment", "increment "+cG(inc)+" ", inc) + o.float(printAny, "decrement", "decrement "+cG(dec)+" ", dec) + o.uint(printAny, "penalty_rate", "penalty_rate "+u32s(q.PenaltyRate)+"pps ", q.PenaltyRate) + o.uint(printAny, "penalty_burst", "penalty_burst "+u32s(q.PenaltyBurst)+"p ", q.PenaltyBurst) +} + +// printSfbXstats is sfb_print_xstats. +func printSfbXstats(r *runner, xs []byte) { + a, ok := aqmXstats(xtcpnl.TcKindSfb, xs) + if !ok { + return + } + st := a.Sfb + o := r.o + o.uint(printAny, "earlydrop", " earlydrop "+u32s(st.Earlydrop), st.Earlydrop) + o.uint(printAny, "penaltydrop", " penaltydrop "+u32s(st.Penaltydrop), st.Penaltydrop) + o.uint(printAny, "bucketdrop", " bucketdrop "+u32s(st.Bucketdrop), st.Bucketdrop) + o.uint(printAny, "queuedrop", " queuedrop "+u32s(st.Queuedrop), st.Queuedrop) + o.uint(printAny, "childdrop", " childdrop "+u32s(st.Childdrop), st.Childdrop) + o.uint(printAny, "marked", " marked "+u32s(st.Marked), st.Marked) + o.nl() + o.uint(printAny, "maxqlen", " maxqlen "+u32s(st.Maxqlen), st.Maxqlen) + mx, av := float64(st.Maxprob)/sfbMaxProb, float64(st.Avgprob)/sfbMaxProb + o.float(printAny, "maxprob", " maxprob "+cG(mx), mx) + o.float(printAny, "avgprob", " avgprob "+cG(av), av) +} + +var codelFields = []aqmField{ + {xtcpnl.TcaCodelLimit, wordLimit, aqmPkts}, + {xtcpnl.TcaCodelTarget, wordTarget, aqmTime}, + {xtcpnl.TcaCodelCeThreshold, "ce_threshold", aqmTime}, + {xtcpnl.TcaCodelInterval, "interval", aqmTime}, + {xtcpnl.TcaCodelEcn, wordEcn, aqmFlag}, +} + +// printCodelOpt is codel_print_opt. +func printCodelOpt(r *runner, _ *qdiscUtil, opt []byte, has bool) { + if has { + r.printAqmFields(r.nested(opt, xtcpnl.TcaCodelMaxKnown), codelFields) + } +} + +// printCodelXstats is codel_print_xstats: the MIN-copy, so it never +// stops. -drop_next of INT_MIN is INT_MIN again, whose u32 sprint_time +// prints (Q74). +func printCodelXstats(r *runner, xs []byte) { + a, _ := aqmXstats(xtcpnl.TcKindCodel, xs) + st := a.Codel + o := r.o + o.uint(printAny, "count", " count "+u32s(st.Count), st.Count) + o.uint(printAny, "lastcount", " lastcount "+u32s(st.Lastcount), st.Lastcount) + o.uint(printJSON, "ldelay", "", st.Ldelay) + o.fp(" ldelay " + sprintTime(st.Ldelay)) + if st.Dropping != 0 { + o.boolean(printAny, "dropping", " dropping", true) + } + o.int(printJSON, "drop_next", "", st.DropNext) + if st.DropNext < 0 { + o.fp(" drop_next -" + sprintTime(cint.Bits(-st.DropNext))) + } else { + o.fp(" drop_next " + sprintTime(cint.Bits(st.DropNext))) + } + o.nl() + o.uint(printAny, "maxpacket", " maxpacket "+u32s(st.Maxpacket), st.Maxpacket) + o.uint(printAny, "ecn_mark", " ecn_mark "+u32s(st.EcnMark), st.EcnMark) + o.uint(printAny, "drop_overlimit", " drop_overlimit "+u32s(st.DropOverlimit), st.DropOverlimit) + if st.CeMark != 0 { + o.uint(printAny, "ce_mark", " ce_mark "+u32s(st.CeMark), st.CeMark) + } +} + +var pieFields = []aqmField{ + {xtcpnl.TcaPieLimit, wordLimit, aqmPkts}, + {xtcpnl.TcaPieTarget, wordTarget, aqmTime}, + {xtcpnl.TcaPieTupdate, "tupdate", aqmTime}, + {xtcpnl.TcaPieAlpha, wordAlpha, aqmUint}, + {xtcpnl.TcaPieBeta, wordBeta, aqmUint}, + {xtcpnl.TcaPieEcn, wordEcn, aqmFlag}, + {xtcpnl.TcaPieBytemode, "bytemode", aqmFlag}, + {xtcpnl.TcaPieDqRateEstimator, "dq_rate_estimator", aqmFlag}, +} + +// printPieOpt is pie_print_opt. +func printPieOpt(r *runner, _ *qdiscUtil, opt []byte, has bool) { + if has { + r.printAqmFields(r.nested(opt, xtcpnl.TcaPieMaxKnown), pieFields) + } +} + +// printPieXstats is pie_print_xstats: prob as a fraction of UINT64_MAX. +func printPieXstats(r *runner, xs []byte) { + a, ok := aqmXstats(xtcpnl.TcKindPie, xs) + if !ok { + return + } + st := a.Pie + o := r.o + p := float64(st.Prob) / float64(uint64(math.MaxUint64)) + o.float(printAny, "prob", " prob "+cG(p), p) + o.uint(printJSON, "delay", "", st.Delay) + o.fp(" delay " + sprintTime(st.Delay)) + if st.DqRateEstimating != 0 { + o.uint(printAny, "avg_dq_rate", " avg_dq_rate "+u32s(st.AvgDqRate), st.AvgDqRate) + } + o.nl() + o.uint(printAny, "pkts_in", " pkts_in "+u32s(st.PacketsIn), st.PacketsIn) + o.uint(printAny, "overlimit", " overlimit "+u32s(st.Overlimit), st.Overlimit) + o.uint(printAny, "dropped", " dropped "+u32s(st.Dropped), st.Dropped) + o.uint(printAny, "maxq", " maxq "+u32s(st.Maxq), st.Maxq) + o.uint(printAny, "ecn_mark", " ecn_mark "+u32s(st.EcnMark), st.EcnMark) +} + +var fqPieFields = []aqmField{ + {xtcpnl.TcaFqPieLimit, wordLimit, aqmPkts}, + {xtcpnl.TcaFqPieFlows, "flows", aqmUint}, + {xtcpnl.TcaFqPieTarget, wordTarget, aqmTime}, + {xtcpnl.TcaFqPieTupdate, "tupdate", aqmTime}, + {xtcpnl.TcaFqPieAlpha, wordAlpha, aqmUint}, + {xtcpnl.TcaFqPieBeta, wordBeta, aqmUint}, + {xtcpnl.TcaFqPieQuantum, "quantum", aqmSize}, + {xtcpnl.TcaFqPieMemoryLimit, "memory_limit", aqmSize}, + {xtcpnl.TcaFqPieEcnProb, "ecn_prob", aqmUint}, + {xtcpnl.TcaFqPieEcn, wordEcn, aqmFlag}, + {xtcpnl.TcaFqPieBytemode, "bytemode", aqmFlag}, + {xtcpnl.TcaFqPieDqRateEstimator, "dq_rate_estimator", aqmFlag}, +} + +// printFqPieOpt is fq_pie_print_opt. +func printFqPieOpt(r *runner, _ *qdiscUtil, opt []byte, has bool) { + if has { + r.printAqmFields(r.nested(opt, xtcpnl.TcaFqPieMaxKnown), fqPieFields) + } +} + +// printFqPieXstats is fq_pie_print_xstats: the MIN-copy, so it never +// stops. +func printFqPieXstats(r *runner, xs []byte) { + a, _ := aqmXstats(xtcpnl.TcKindFqPie, xs) + st := a.FqPie + o := r.o + o.uint(printAny, "pkts_in", " pkts_in "+u32s(st.PacketsIn), st.PacketsIn) + o.uint(printAny, "overlimit", " overlimit "+u32s(st.Overlimit), st.Overlimit) + o.uint(printAny, "overmemory", " overmemory "+u32s(st.Overmemory), st.Overmemory) + o.uint(printAny, "dropped", " dropped "+u32s(st.Dropped), st.Dropped) + o.uint(printAny, "ecn_mark", " ecn_mark "+u32s(st.EcnMark), st.EcnMark) + o.nl() + o.uint(printAny, "new_flow_count", " new_flow_count "+u32s(st.NewFlowCount), st.NewFlowCount) + o.uint(printAny, "new_flows_len", " new_flows_len "+u32s(st.NewFlowsLen), st.NewFlowsLen) + o.uint(printAny, "old_flows_len", " old_flows_len "+u32s(st.OldFlowsLen), st.OldFlowsLen) + o.uint(printAny, "memory_used", " memory_used "+u32s(st.MemoryUsage), st.MemoryUsage) +} + +var hhfFields = []aqmField{ + {xtcpnl.TcaHhfBacklogLimit, wordLimit, aqmPkts}, + {xtcpnl.TcaHhfQuantum, "quantum", aqmSize}, + {xtcpnl.TcaHhfHhFlowsLimit, "hh_limit", aqmUint}, + {xtcpnl.TcaHhfResetTimeout, "reset_timeout", aqmTime}, + {xtcpnl.TcaHhfAdmitBytes, "admit_bytes", aqmSize}, + {xtcpnl.TcaHhfEvictTimeout, "evict_timeout", aqmTime}, + {xtcpnl.TcaHhfNonHhWeight, "non_hh_weight", aqmUint}, +} + +// printHhfOpt is hhf_print_opt. +func printHhfOpt(r *runner, _ *qdiscUtil, opt []byte, has bool) { + if has { + r.printAqmFields(r.nested(opt, xtcpnl.TcaHhfMaxKnown), hhfFields) + } +} + +// printHhfXstats is hhf_print_xstats. +func printHhfXstats(r *runner, xs []byte) { + a, ok := aqmXstats(xtcpnl.TcKindHhf, xs) + if !ok { + return + } + st := a.Hhf + o := r.o + o.uint(printAny, "drop_overlimit", " drop_overlimit "+u32s(st.DropOverlimit), st.DropOverlimit) + o.uint(printAny, "hh_overlimit", " hh_overlimit "+u32s(st.HhOverlimit), st.HhOverlimit) + o.uint(printAny, "tot_hh", " tot_hh "+u32s(st.HhTotCount), st.HhTotCount) + o.uint(printAny, "cur_hh", " cur_hh "+u32s(st.HhCurCount), st.HhCurCount) +} + +// printPlugOpt is plug_print_opt: sch_plug has no dump (K41). +func printPlugOpt(*runner, *qdiscUtil, []byte, bool) {} + +// printSkbprioOpt is skbprio_print_opt: the options are the bare struct +// (K42). +func printSkbprioOpt(r *runner, _ *qdiscUtil, opt []byte, has bool) { + if !has || len(opt) < xtcpnl.TcSkbprioQoptSizeCst { + return + } + l := binary.LittleEndian.Uint32(opt) + r.o.uint(printAny, "limit", "limit "+u32s(l)+" ", l) +} diff --git a/internal/gotc/q_cake.go b/internal/gotc/q_cake.go new file mode 100644 index 000000000..018908f74 --- /dev/null +++ b/internal/gotc/q_cake.go @@ -0,0 +1,325 @@ +package gotc + +import ( + "fmt" + "strconv" + "strings" + + "github.com/randomizedcoder/xtcp2/pkg/cint" + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// tc/q_cake.c cake_print_opt, cake_print_mode, cake_print_xstats and +// cake_print_json_tin; cake_mq shares them (K39). + +var ( + cakeDiffservNames = [xtcpnl.CakeDiffservMax]string{"diffserv3", "diffserv4", "diffserv8", "besteffort", "precedence"} + cakeFlowmodeNames = [xtcpnl.CakeFlowMax]string{"flowblind", "srchost", "dsthost", "hosts", "flows", + "dual-srchost", "dual-dsthost", "triple-isolate"} +) + +// cakePrintMode is cake_print_mode: an unknown value's text "(?key?)" has +// no trailing space (Q82). +func cakePrintMode(o *out, v uint32, table []string, key string) { + if int64(v) < int64(len(table)) { + o.str(printAny, colorNone, key, table[v]+" ", table[v]) + return + } + o.str(printJSON, colorNone, key, "", "unknown") + o.fp("(?" + key + "?)") +} + +// cakeU32 is the guarded `if (tb[t] && RTA_PAYLOAD >= 4) v = u32` read, +// 0 otherwise. +func cakeU32(tb xtcpnl.AttrTable, t uint16) uint32 { + v, _ := tb.U32(t) + return v +} + +// cakeFlag is a word in text when on, and a JSON bool always. +func cakeFlag(o *out, on bool, key, yes, no string) { + if on { + o.fp(yes) + } else if no != "" { + o.fp(no) + } + o.boolean(printJSON, key, "", on) +} + +// printCakeOpt is cake_print_opt. The flags are JSON bools beside an +// "ack-filter" string (Q80); rtt and fwmark print in text when nonzero, +// in JSON always, fwmark as a hex string (Q81). TARGET is not read (K38). +func printCakeOpt(r *runner, _ *qdiscUtil, opt []byte, has bool) { + if !has { + return + } + tb := r.nested(opt, xtcpnl.TcaCakeMaxKnown) + o := r.o + if bw, ok := tb.U64(xtcpnl.TcaCakeBaseRate64); ok { + if bw != 0 { + o.rate(r.iec > 0, printAny, "bandwidth", "bandwidth ", " ", bw) + } else { + o.str(printAny, colorNone, "bandwidth", "bandwidth unlimited ", "unlimited") + } + } + if v, ok := tb.U32(xtcpnl.TcaCakeAutorate); ok { + switch { + case v == 1: + o.str(printAny, colorNone, "autorate", "autorate-ingress ", "autorate-ingress") + case v != 0: + o.str(printAny, colorNone, "autorate", "(?autorate?) ", "unknown") + } + } + if v, ok := tb.U32(xtcpnl.TcaCakeDiffservMode); ok { + cakePrintMode(o, v, cakeDiffservNames[:], "diffserv") + } + if v, ok := tb.U32(xtcpnl.TcaCakeFlowMode); ok { + cakePrintMode(o, v, cakeFlowmodeNames[:], "flowmode") + } + cakeFlag(o, cakeU32(tb, xtcpnl.TcaCakeNat) != 0, "nat", "nat ", "nonat ") + atm := cakeU32(tb, xtcpnl.TcaCakeAtm) + overhead := cint.Int(cakeU32(tb, xtcpnl.TcaCakeOverhead)) + mpu := cakeU32(tb, xtcpnl.TcaCakeMpu) + ack := cakeU32(tb, xtcpnl.TcaCakeAckFilter) + raw := tb.Has(xtcpnl.TcaCakeRaw) + interval := cakeU32(tb, xtcpnl.TcaCakeRtt) + memlimit := cakeU32(tb, xtcpnl.TcaCakeMemory) + fwmark := cakeU32(tb, xtcpnl.TcaCakeFwmark) + cakeFlag(o, cakeU32(tb, xtcpnl.TcaCakeWash) != 0, "wash", "wash ", "nowash ") + cakeFlag(o, cakeU32(tb, xtcpnl.TcaCakeIngress) != 0, "ingress", "ingress ", "") + switch ack { + case xtcpnl.CakeAckAggressive: + o.str(printAny, colorNone, "ack-filter", "ack-filter-aggressive ", "aggressive") + case xtcpnl.CakeAckFilter: + o.str(printAny, colorNone, "ack-filter", "ack-filter ", "enabled") + default: + o.str(printAny, colorNone, "ack-filter", "no-ack-filter ", "disabled") + } + cakeFlag(o, cakeU32(tb, xtcpnl.TcaCakeSplitGso) != 0, "split_gso", "split-gso ", "no-split-gso ") + if interval != 0 { + o.fp("rtt " + sprintTime(interval) + " ") + } + o.uint(printJSON, "rtt", "", interval) + cakeFlag(o, raw, "raw", "raw ", "") + switch { + case atm == xtcpnl.CakeAtmAtm: + o.str(printAny, colorNone, "atm", "atm ", "atm") + case atm == xtcpnl.CakeAtmPtm: + o.str(printAny, colorNone, "atm", "ptm ", "ptm") + case !raw: + o.str(printAny, colorNone, "atm", "noatm ", "noatm") + } + o.int(printAny, "overhead", "overhead "+strconv.Itoa(int(overhead))+" ", overhead) + if mpu != 0 { + o.uint(printAny, "mpu", "mpu "+u32s(mpu)+" ", mpu) + } + if memlimit != 0 { + o.size(printAny, "memlimit", "memlimit ", " ", uint64(memlimit)) + } + if fwmark != 0 { + o.fp("fwmark 0x" + strconv.FormatUint(uint64(fwmark), 16) + " ") + } + o.hex0x(printJSON, "fwmark", "", uint64(fwmark)) +} + +// printCakeXstats is cake_print_xstats. Its text lines end in hard "\n"s +// that ignore -o, the average offset's in two (Q79); a negative drop_next +// or blue_timer is text only (Q76), and blue_timer goes to sprint_time +// unnegated (Q75). Where tc reads a short stat (Q77), a short tin +// attribute its mode reads, or, in text, a later tin's attribute that only +// tin 0 has (Q78), gotc refuses. +func printCakeXstats(r *runner, xs []byte) { + x, err := xtcpnl.ParseTcXstats(xtcpnl.TcKindCake, xs) + if err != nil { + r.refuseKind(fmt.Errorf("%w: cake %w", errNotImplemented, err)) + return + } + c := x.Aqm.Cake + st := &c.Stats + o := r.o + used, okU := st.U32(xtcpnl.TcaCakeStatsMemoryUsed) + limit, okL := st.U32(xtcpnl.TcaCakeStatsMemoryLimit) + if okU && okL { + o.fp(" memory used: " + sprintSize(uint64(used))) + o.fp(" of " + sprintSize(uint64(limit)) + "\n") + o.uint(printJSON, "memory_used", "", used) + o.uint(printJSON, "memory_limit", "", limit) + } + if v, ok := st.Get(xtcpnl.TcaCakeStatsCapacityEstimate64); ok { + o.rate(r.iec > 0, printAny, "capacity_estimate", " capacity estimate: ", "\n", v) + } + r.cakePair(st, xtcpnl.TcaCakeStatsMinNetlen, xtcpnl.TcaCakeStatsMaxNetlen, + "min_network_size", " min/max network layer size: ", 12, "max_network_size") + r.cakePair(st, xtcpnl.TcaCakeStatsMinAdjlen, xtcpnl.TcaCakeStatsMaxAdjlen, + "min_adj_size", " min/max overhead-adjusted size: ", 8, "max_adj_size") + if v, ok := st.U32(xtcpnl.TcaCakeStatsActiveQueues); ok { + o.uint(printAny, "active_queues", fmt.Sprintf(" active queues: %25d\n", v), v) + } + if v, ok := st.U32(xtcpnl.TcaCakeStatsAvgNetoff); ok { + o.uint(printAny, "avg_hdr_offset", fmt.Sprintf(" average network hdr offset: %12d\n\n", v), v) + } + if v, ok := st.S32(xtcpnl.TcaCakeStatsDeficit); ok { + o.int(printAny, "deficit", " deficit "+strconv.Itoa(int(v)), v) + } + if v, ok := st.U32(xtcpnl.TcaCakeStatsCobaltCount); ok { + o.uint(printAny, "count", " count "+u32s(v), v) + } + if d, ok := st.U32(xtcpnl.TcaCakeStatsDropping); ok && d != 0 { + o.boolean(printAny, "dropping", " dropping", true) + if v, ok := st.S32(xtcpnl.TcaCakeStatsDropNextUs); ok { + if v < 0 { + o.fp(" drop_next -" + sprintTime(cint.Bits(-v))) + } else { + o.uint(printJSON, "drop_next", "", cint.Bits(v)) + o.fp(" drop_next " + sprintTime(cint.Bits(v))) + } + } + } + if v, ok := st.U32(xtcpnl.TcaCakeStatsPDrop); ok { + o.uint(printAny, "blue_prob", " blue_prob "+u32s(v), v) + if t, ok := st.S32(xtcpnl.TcaCakeStatsBlueTimerUs); ok { + if t < 0 { + o.fp(" blue_timer -" + sprintTime(cint.Bits(t))) + } else { + o.uint(printJSON, "blue_timer", "", cint.Bits(t)) + o.fp(" blue_timer " + sprintTime(cint.Bits(t))) + } + } + } + if c.NTins == 0 { + return + } + if i, m := c.ShortTin(!o.isJSON()); i >= 0 { + r.refuseKind(fmt.Errorf("%w: cake %w: cake tin %d attribute mask %#x", + errNotImplemented, xtcpnl.ErrTcShort, i, m)) + return + } + if o.isJSON() { + o.openArray(printJSON, "tins") + for i := range c.NTins { + cakeJSONTin(o, &c.Tins[i]) + } + o.closeArray(printJSON, "") + return + } + if c.TinGap { + r.refuseKind(actUnchecked(xtcpnl.TcKindCake, "tin attribute that only tin 0 has (Q78)")) + return + } + r.cakeTinTable(c) +} + +// cakePair is the min/max pair printed when both are there. +func (r *runner) cakePair(st *xtcpnl.TcVals, minT, maxT uint16, minKey, label string, width int, maxKey string) { + lo, ok1 := st.U32(minT) + hi, ok2 := st.U32(maxT) + if !ok1 || !ok2 { + return + } + r.o.uint(printAny, minKey, fmt.Sprintf("%s%*d", label, width, lo), lo) + r.o.uint(printAny, maxKey, fmt.Sprintf(" /%8d\n", hi), hi) +} + +// cakeJSONTins are cake_print_json_tin's keys, in order. +var cakeJSONTins = [...]struct { + key string + t uint16 +}{ + {"threshold_rate", xtcpnl.TcaCakeTinStatsThresholdRate64}, + {"sent_bytes", xtcpnl.TcaCakeTinStatsSentBytes64}, + {"backlog_bytes", xtcpnl.TcaCakeTinStatsBacklogBytes}, + {"target_us", xtcpnl.TcaCakeTinStatsTargetUs}, + {"interval_us", xtcpnl.TcaCakeTinStatsIntervalUs}, + {"peak_delay_us", xtcpnl.TcaCakeTinStatsPeakDelayUs}, + {"avg_delay_us", xtcpnl.TcaCakeTinStatsAvgDelayUs}, + {"base_delay_us", xtcpnl.TcaCakeTinStatsBaseDelayUs}, + {"sent_packets", xtcpnl.TcaCakeTinStatsSentPackets}, + {"way_indirect_hits", xtcpnl.TcaCakeTinStatsWayIndirectHits}, + {"way_misses", xtcpnl.TcaCakeTinStatsWayMisses}, + {"way_collisions", xtcpnl.TcaCakeTinStatsWayCollisions}, + {"drops", xtcpnl.TcaCakeTinStatsDroppedPackets}, + {"ecn_mark", xtcpnl.TcaCakeTinStatsEcnMarkedPackets}, + {"ack_drops", xtcpnl.TcaCakeTinStatsAcksDroppedPackets}, + {"sparse_flows", xtcpnl.TcaCakeTinStatsSparseFlows}, + {"bulk_flows", xtcpnl.TcaCakeTinStatsBulkFlows}, + {"unresponsive_flows", xtcpnl.TcaCakeTinStatsUnresponsiveFlows}, + {"max_pkt_len", xtcpnl.TcaCakeTinStatsMaxSkblen}, + {"flow_quantum", xtcpnl.TcaCakeTinStatsFlowQuantum}, +} + +// cakeJSONTin is cake_print_json_tin: each attribute the tin has. +func cakeJSONTin(o *out, tin *xtcpnl.TcVals) { + o.openObject("") + for _, f := range cakeJSONTins { + if v, ok := tin.Get(f.t); ok { + o.u64(printJSON, f.key, "", v) + } + } + o.closeObject() +} + +// cakeTinRow is one PRINT_TSTAT row: the label and how a value prints. +type cakeTinRow struct { + label string + t uint16 + cell func(r *runner, v uint64) string +} + +func cakeCellTime(_ *runner, v uint64) string { return sprintTime(uint32(v & 0xffffffff)) } +func cakeCellSize(_ *runner, v uint64) string { return sprintSize(v & 0xffffffff) } +func cakeCellUint(_ *runner, v uint64) string { return strconv.FormatUint(v, 10) } +func cakeCellRate(r *runner, v uint64) string { return sprintRate(r.iec > 0, v) } + +var cakeTinRows = [...]cakeTinRow{ + {" thresh ", xtcpnl.TcaCakeTinStatsThresholdRate64, cakeCellRate}, + {" target ", xtcpnl.TcaCakeTinStatsTargetUs, cakeCellTime}, + {" interval", xtcpnl.TcaCakeTinStatsIntervalUs, cakeCellTime}, + {" pk_delay", xtcpnl.TcaCakeTinStatsPeakDelayUs, cakeCellTime}, + {" av_delay", xtcpnl.TcaCakeTinStatsAvgDelayUs, cakeCellTime}, + {" sp_delay", xtcpnl.TcaCakeTinStatsBaseDelayUs, cakeCellTime}, + {" backlog ", xtcpnl.TcaCakeTinStatsBacklogBytes, cakeCellSize}, + {" pkts ", xtcpnl.TcaCakeTinStatsSentPackets, cakeCellUint}, + {" bytes ", xtcpnl.TcaCakeTinStatsSentBytes64, cakeCellUint}, + {" way_inds", xtcpnl.TcaCakeTinStatsWayIndirectHits, cakeCellUint}, + {" way_miss", xtcpnl.TcaCakeTinStatsWayMisses, cakeCellUint}, + {" way_cols", xtcpnl.TcaCakeTinStatsWayCollisions, cakeCellUint}, + {" drops ", xtcpnl.TcaCakeTinStatsDroppedPackets, cakeCellUint}, + {" marks ", xtcpnl.TcaCakeTinStatsEcnMarkedPackets, cakeCellUint}, + {" ack_drop", xtcpnl.TcaCakeTinStatsAcksDroppedPackets, cakeCellUint}, + {" sp_flows", xtcpnl.TcaCakeTinStatsSparseFlows, cakeCellUint}, + {" bk_flows", xtcpnl.TcaCakeTinStatsBulkFlows, cakeCellUint}, + {" un_flows", xtcpnl.TcaCakeTinStatsUnresponsiveFlows, cakeCellUint}, + {" max_len ", xtcpnl.TcaCakeTinStatsMaxSkblen, cakeCellUint}, + {" quantum ", xtcpnl.TcaCakeTinStatsFlowQuantum, cakeCellUint}, +} + +// cakeTinTable is the text tin table: a header by tin count, then a row +// for each attribute tin 0 has, each line ending _SL_. +func (r *runner) cakeTinTable(c *xtcpnl.TcCakeXstats) { + o := r.o + switch c.NTins { + case 3: + o.raw(" Bulk Best Effort Voice\n") + case 4: + o.raw(" Bulk Best Effort Video Voice\n") + default: + var b strings.Builder + b.WriteString(" ") + for i := range c.NTins { + fmt.Fprintf(&b, " Tin %d", i) + } + o.raw(b.String() + o.sl) + } + for _, row := range cakeTinRows { + if _, ok := c.Tins[0].Get(row.t); !ok { + continue + } + var b strings.Builder + b.WriteString(row.label) + for i := range c.NTins { + v, _ := c.Tins[i].Get(row.t) + fmt.Fprintf(&b, " %12s", row.cell(r, v)) + } + o.raw(b.String() + o.sl) + } +} diff --git a/internal/gotc/q_dualpi2.go b/internal/gotc/q_dualpi2.go new file mode 100644 index 000000000..d3053f2a6 --- /dev/null +++ b/internal/gotc/q_dualpi2.go @@ -0,0 +1,150 @@ +package gotc + +import ( + "strconv" + + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// tc/q_dualpi2.c dualpi2_print_opt and dualpi2_print_xstats. Its JSON keys +// are hyphenated and its text names differ from them (Q83). + +const ( + dualpi2AlphaBetaScale = 1 << 8 // ALPHA_BETA_SCALE + dualpi2EcnAnyEct = 3 // TC_DUALPI2_ECN_MASK_ANY_ECT + dualpi2EcnL4sEct = 1 // TC_DUALPI2_ECN_MASK_L4S_ECT +) + +// cF is C's "%f". +func cF(v float64) string { return strconv.FormatFloat(v, 'f', 6, 64) } + +// dualpi2EcnType is get_ecn_type and get_ecn_type_json: CLA_ECT prints as +// any_ect (Q85); neither bit set is a warning and "". +func (r *runner) dualpi2EcnType(ect uint8, json bool) string { + switch ect & dualpi2EcnAnyEct { + case dualpi2EcnL4sEct: + if json { + return "l4s-ect" + } + return "l4s_ect" + case 0: + r.errf("Warning: Unexpected ecn type %d!\n", ect) + return "" + } + if json { + return "any-ect" + } + return "any_ect" +} + +// printDualpi2Opt is dualpi2_print_opt. +func printDualpi2Opt(r *runner, _ *qdiscUtil, opt []byte, has bool) { + if !has { + return + } + tb := r.nested(opt, xtcpnl.TcaDualpi2MaxKnown) + o := r.o + if v, ok := tb.U32(xtcpnl.TcaDualpi2Limit); ok { + o.uint(printAny, "limit", "limit "+u32s(v)+"p ", v) + } + if v, ok := tb.U32(xtcpnl.TcaDualpi2MemoryLimit); ok { + o.uint(printAny, "memory-limit", "memlimit "+u32s(v)+"B ", v) + } + r.jsonTime(tb, xtcpnl.TcaDualpi2Target, "target") + r.jsonTime(tb, xtcpnl.TcaDualpi2Tupdate, "tupdate") + for _, ab := range []struct { + t uint16 + key string + }{{xtcpnl.TcaDualpi2Alpha, wordAlpha}, {xtcpnl.TcaDualpi2Beta, wordBeta}} { + if v, ok := tb.U32(ab.t); ok { + // get_scaled_alpha_beta: a float, promoted for printf. + f := float64(float32(v) / dualpi2AlphaBetaScale) + o.float(printAny, ab.key, ab.key+" "+cF(f)+" ", f) + } + } + if v, ok := tb.U32(xtcpnl.TcaDualpi2StepThreshPkts); ok { + o.uint(printAny, "step-thresh-pkts", "step_thresh "+u32s(v)+"p ", v) + } + if v, ok := tb.U32(xtcpnl.TcaDualpi2StepThreshUs); ok { + o.uint(printJSON, "step-thresh-us", "", v) + o.fp("step_thresh " + sprintTime(v) + " ") + } + if v, ok := tb.U32(xtcpnl.TcaDualpi2MinQlenStep); ok { + o.uint(printAny, "min-qlen-step", "min_qlen_step "+u32s(v)+"p ", v) + } + if v, ok := tb.U8(xtcpnl.TcaDualpi2Coupling); ok { + o.uint(printAny, "coupling", "coupling_factor "+u32s(uint32(v))+" ", uint32(v)) + } + printDualpi2Choice(o, tb, xtcpnl.TcaDualpi2DropOverload, "drop-overload", + [2]string{"overflow", "drop_on_overload"}, [2]string{"overflow", "drop"}) + printDualpi2Choice(o, tb, xtcpnl.TcaDualpi2DropEarly, "drop-early", + [2]string{"drop_dequeue", "drop_enqueue"}, [2]string{"drop-dequeue", "drop-enqueue"}) + if v, ok := tb.U8(xtcpnl.TcaDualpi2CProtection); ok { + o.uint(printAny, "c-protection", "classic_protection "+u32s(uint32(v))+"% ", uint32(v)) + } + if v, ok := tb.U8(xtcpnl.TcaDualpi2EcnMask); ok { + // Both getters run in either mode, so a bad mask warns twice. + text, js := r.dualpi2EcnType(v, false), r.dualpi2EcnType(v, true) + o.fp(text + " ") + o.str(printJSON, colorNone, "ecn-mask", "", js) + } + if v, ok := tb.U8(xtcpnl.TcaDualpi2SplitGso); ok { + // split_gso true is a JSON null; false has no key (Q84). + if v != 0 { + o.fp("split_gso ") + o.null(printJSON, "split-gso", "") + } else { + o.fp("no_split_gso ") + } + } +} + +// printDualpi2Choice is a u8 printed as one of two words, text and JSON +// apart. +func printDualpi2Choice(o *out, tb xtcpnl.AttrTable, t uint16, key string, text, js [2]string) { + v, ok := tb.U8(t) + if !ok { + return + } + i := 0 + if v != 0 { + i = 1 + } + o.fp(text[i] + " ") + o.str(printJSON, colorNone, key, "", js[i]) +} + +// printDualpi2Xstats is dualpi2_print_xstats: bare print_nl's, the last +// one before the caller's, so text ends with a blank line and no indent +// (Q86). +func printDualpi2Xstats(r *runner, xs []byte) { + a, ok := aqmXstats(xtcpnl.TcKindDualpi2, xs) + if !ok { + return + } + st := a.Dualpi2 + o := r.o + p := float64(st.Prob) / float64(^uint32(0)) + o.float(printAny, "prob", "prob "+cF(p)+" ", p) + o.uint(printAny, "delay-c", "delay_c "+u32s(st.DelayC)+"us ", st.DelayC) + o.uint(printAny, "delay-l", "delay_l "+u32s(st.DelayL)+"us", st.DelayL) + o.nl() + o.uint(printAny, "pkts-in-c", "pkts_in_c "+u32s(st.PacketsInC)+" ", st.PacketsInC) + o.uint(printAny, "pkts-in-l", "pkts_in_l "+u32s(st.PacketsInL)+" ", st.PacketsInL) + o.uint(printAny, "maxq", "maxq "+u32s(st.Maxq), st.Maxq) + o.nl() + o.uint(printAny, "ecn-mark", "ecn_mark "+u32s(st.EcnMark)+" ", st.EcnMark) + o.uint(printAny, "step-mark", "step_mark "+u32s(st.StepMarks), st.StepMarks) + o.nl() + o.int(printAny, "credit", "credit "+strconv.Itoa(int(st.Credit))+" ", st.Credit) + q := "L-queue" + if st.Credit > 0 { + q = "C-queue" + } + o.fp("(" + q + ")") + o.nl() + o.uint(printAny, "memory-used", "memory_used "+u32s(st.MemoryUsed)+" ", st.MemoryUsed) + o.uint(printAny, "max-memory-used", "(max "+u32s(st.MaxMemoryUsed)+") ", st.MaxMemoryUsed) + o.uint(printAny, "memory-limit", "of memory limit "+u32s(st.MemoryLimit), st.MemoryLimit) + o.nl() +} diff --git a/internal/gotc/q_gred.go b/internal/gotc/q_gred.go new file mode 100644 index 000000000..1f91df7f1 --- /dev/null +++ b/internal/gotc/q_gred.go @@ -0,0 +1,123 @@ +package gotc + +import ( + "errors" + "fmt" + "math" + + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// tc/q_gred.c gred_print_opt, gred_parse_vqs and gred_print_stats. + +// printGredOpt is gred_print_opt. Where tc would dereference a missing +// DPS (Q67), write past infos[] for a VQ_DP of MAX_DPs or more (Q68), +// read a short VQ attribute (Q69) or spin on an rta_len under 4 (Q71), +// gotc refuses. The "message smaller" line is raw, inside -j's JSON too +// (Q72). +func printGredOpt(r *runner, _ *qdiscUtil, opt []byte, has bool) { + if !has { + return + } + tb := r.nested(opt, xtcpnl.TcaGredMaxKnown) + if !tb.Has(xtcpnl.TcaGredParms) { + return + } + q, err := xtcpnl.ParseTcQopt(xtcpnl.TcKindGred, opt[:validAttrPrefix(opt)]) + g := q.Aqm.Gred + if g != nil { + for _, w := range g.Warn { + r.errf("%s\n", w) + } + } + switch { + case errors.Is(err, xtcpnl.ErrTcGredSmall): + r.o.raw("\n GRED received message smaller than expected\n") + return + case err != nil: + r.refuseKind(fmt.Errorf("%w: gred %w", errNotImplemented, err)) + return + case g.VqDpOver: + r.refuseKind(actUnchecked(xtcpnl.TcKindGred, "VQ_DP past MAX_DPs (Q68)")) + return + } + o := r.o + o.uint(printAny, "dp_cnt", "vqs "+u32s(g.Sopt.DPs)+" ", g.Sopt.DPs) + o.uint(printAny, "dp_default", "default "+u32s(g.Sopt.DefDP)+" ", g.Sopt.DefDP) + if g.Sopt.Grio != 0 { + o.boolean(printAny, "grio", "grio ", true) + } else { + o.boolean(printAny, "grio", "", false) + } + if g.HasLimit { + o.size(printAny, "limit", "limit ", " ", uint64(g.Limit)) + } + printRedFlags(o, uint32(g.Sopt.Flags)) + o.openArray(printJSON, "vqs") + for i := range g.Qopts { + qo := &g.Qopts[i] + if qo.DP >= xtcpnl.GredMaxDPsCst { + continue + } + o.openObject("") + o.uint(printAny, "vq", "\n vq "+u32s(qo.DP)+" ", qo.DP) + o.hhu(printAny, "prio", "prio "+u32s(uint32(qo.Prio))+" ", qo.Prio) + o.size(printAny, "limit", "limit ", " ", uint64(qo.Limit)) + o.size(printAny, "min", "min ", " ", uint64(qo.QthMin)) + o.size(printAny, "max", "max ", " ", uint64(qo.QthMax)) + if g.Info[i].FlagsPresent { + printRedFlags(o, g.Info[i].Flags) + } + if r.details > 0 { + o.uint(printAny, "ewma", "ewma "+u32s(uint32(qo.Wlog))+" ", uint32(qo.Wlog)) + if g.HasMaxP { + p := float64(g.MaxP[i]) / math.Pow(2, 32) + o.float(printAny, "probability", "probability "+cG(p)+" ", p) + } else { + o.uint(printAny, "Plog", "Plog "+u32s(uint32(qo.Plog))+" ", uint32(qo.Plog)) + } + o.uint(printAny, "Scell_log", "Scell_log "+u32s(uint32(qo.ScellLog))+" ", uint32(qo.ScellLog)) + } + if r.stats > 0 { + var in *xtcpnl.TcGredInfo + if g.HasVQ { + in = &g.Info[i] + } + r.gredStats(in, qo) + } + o.closeObject() + } + o.closeArray(printJSON, "vqs") +} + +// gredStats is gred_print_stats: the VQ list's counters when the kernel +// sent one, else the qopt's. bytes is tc's u32 read of the u64 attribute +// (Q70). +func (r *runner) gredStats(in *xtcpnl.TcGredInfo, qo *xtcpnl.TcGredQopt) { + o := r.o + bytes := uint64(qo.Bytesin) + if in != nil { + bytes = uint64(in.Bytes) + } + o.fp("\n Queue size: ") + o.size(printAny, "qave", "average ", " ", uint64(qo.Qave)) + o.size(printAny, "backlog", "current ", " ", uint64(qo.Backlog)) + o.fp("\n Dropped packets: ") + if in != nil { + o.uint(printAny, "forced_drop", "forced "+u32s(in.ForcedDrop)+" ", in.ForcedDrop) + o.uint(printAny, "prob_drop", "early "+u32s(in.ProbDrop)+" ", in.ProbDrop) + o.uint(printAny, "pdrop", "pdrop "+u32s(in.Pdrop)+" ", in.Pdrop) + o.uint(printAny, "other", "other "+u32s(in.Other)+" ", in.Other) + o.fp("\n Marked packets: ") + o.uint(printAny, "forced_mark", "forced "+u32s(in.ForcedMark)+" ", in.ForcedMark) + o.uint(printAny, "prob_mark", "early "+u32s(in.ProbMark)+" ", in.ProbMark) + } else { + o.uint(printAny, "forced_drop", "forced "+u32s(qo.Forced)+" ", qo.Forced) + o.uint(printAny, "prob_drop", "early "+u32s(qo.Early)+" ", qo.Early) + o.uint(printAny, "pdrop", "pdrop "+u32s(qo.Pdrop)+" ", qo.Pdrop) + o.uint(printAny, "other", "other "+u32s(qo.Other)+" ", qo.Other) + } + o.fp("\n Total packets: ") + o.uint(printAny, "packets", u32s(qo.Packets)+" ", qo.Packets) + o.size(printAny, "bytes", "(", ") ", bytes) +} diff --git a/internal/gotc/q_red.go b/internal/gotc/q_red.go new file mode 100644 index 000000000..75fe2c970 --- /dev/null +++ b/internal/gotc/q_red.go @@ -0,0 +1,208 @@ +package gotc + +import ( + "encoding/binary" + "math" + + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// tc/q_red.c red_print_opt and red_print_xstats, tc/q_choke.c +// choke_print_opt and choke_print_xstats, tc/tc_red.c tc_red_print_flags +// and tc/tc_qevent.c's qevents_read and qevents_print. + +// redFlags are tc_red_print_flags' bits, in its order. +var redFlags = [...]struct { + bit uint32 + name string +}{{1, wordEcn}, {2, "harddrop"}, {4, "adaptive"}, {8, "nodrop"}} + +// printRedFlags is tc_red_print_flags: JSON always has the four bools, text +// only the true ones (Q87). +func printRedFlags(o *out, flags uint32) { + for _, f := range redFlags { + on := flags&f.bit != 0 + text := "" + if on { + text = f.name + " " + } + o.boolean(printAny, f.name, text, on) + } +} + +// redParms is red_print_opt's and choke_print_opt's head: PARMS present +// and at least a struct tc_red_qopt, else the printer returns -1 having +// printed nothing; MAX_P read when a u32. +func redParms(tb xtcpnl.AttrTable, parms, maxPType uint16) (q xtcpnl.TcRedQopt, maxP uint32, ok bool) { + q, err := xtcpnl.DecodeTcRedQopt(tb.Bytes(parms)) + if err != nil { + return q, 0, false + } + if v, has := tb.U32(maxPType); has { + maxP = v + } + return q, maxP, true +} + +// printRedDetails is the show_details block both printers share. Its +// Scell_log has no trailing space, so a qevent after it runs on (Q66). +func (r *runner) printRedDetails(q xtcpnl.TcRedQopt, maxP uint32) { + if r.details == 0 { + return + } + o := r.o + o.uint(printAny, "ewma", "ewma "+u32s(uint32(q.Wlog))+" ", uint32(q.Wlog)) + if maxP != 0 { + p := float64(maxP) / math.Pow(2, 32) + o.float(printAny, "probability", "probability "+cG(p)+" ", p) + } else { + o.uint(printAny, "Plog", "Plog "+u32s(uint32(q.Plog))+" ", uint32(q.Plog)) + } + o.uint(printAny, "Scell_log", "Scell_log "+u32s(uint32(q.ScellLog)), uint32(q.ScellLog)) +} + +// printRedOpt is red_print_opt. +func printRedOpt(r *runner, _ *qdiscUtil, opt []byte, has bool) { + if !has { + return + } + tb := r.nested(opt, xtcpnl.TcaRedMaxKnown) + q, maxP, ok := redParms(tb, xtcpnl.TcaRedParms, xtcpnl.TcaRedMaxP) + if !ok { + return + } + if fb := tb.Bytes(xtcpnl.TcaRedFlags); len(fb) >= xtcpnl.NlaBitfield32SizeCst { + q.Flags = fb[0] // qopt->flags, an unsigned char, = flags_bf->value + } + o := r.o + o.size(printAny, "limit", "limit ", " ", uint64(q.Limit)) + o.size(printAny, "min", "min ", " ", uint64(q.QthMin)) + o.size(printAny, "max", "max ", " ", uint64(q.QthMax)) + printRedFlags(o, uint32(q.Flags)) + r.printRedDetails(q, maxP) + r.printRedQevents(tb) +} + +// redQevents are red's plain qevents, in qevents[] order. +var redQevents = [...]struct { + id string + t uint16 +}{{"early_drop", xtcpnl.TcaRedEarlyDropBlock}, {"mark", xtcpnl.TcaRedMarkBlock}} + +// readRedQevents is qevents_init then qevents_read: read_block_idx reads +// each present block's u32 unchecked (a short one is refused), and a zero +// one is "Illegal qevent block index" and the caller's -1 (bad). +func (r *runner) readRedQevents(tb xtcpnl.AttrTable) (blk [len(redQevents)]uint32, bad bool, err error) { + for i, q := range redQevents { + if !tb.Has(q.t) { + continue + } + b := tb.Bytes(q.t) + if err := attrNeed(xtcpnl.TcKindRed, "qevent "+q.id+" block", b, 4); err != nil { + return blk, true, err + } + blk[i] = binary.LittleEndian.Uint32(b) + if blk[i] == 0 { + r.errf("Illegal qevent block index\n") + return blk, true, nil + } + } + return blk, false, nil +} + +// printRedQevents is qevents_read then qevents_print. +func (r *runner) printRedQevents(tb xtcpnl.AttrTable) { + blk, bad, err := r.readRedQevents(tb) + if err != nil { + r.refuseKind(err) + } + if bad { + return + } + o := r.o + first := true + for i, q := range redQevents { + if blk[i] == 0 { + continue + } + if first { + o.openArray(printJSON, "qevents") + first = false + } + o.openObject("") + o.str(printAny, colorNone, "kind", "qevent "+q.id, q.id) + o.uint(printAny, "block", " block "+u32s(blk[i]), blk[i]) + o.fp(" ") + o.closeObject() + } + if !first { + o.closeArray(printAny, "") + } +} + +// redHasBlock is red_has_block: qevents_have_block compares every +// qevent's index, an unset one's 0 included. rc is the callback's -1 on +// an illegal block. +func (r *runner) redHasBlock(opt []byte, has bool, block uint32) (found bool, rc int, err error) { + if !has { + return false, 0, nil + } + blk, bad, err := r.readRedQevents(r.nested(opt, xtcpnl.TcaRedMaxKnown)) + if err != nil || bad { + return false, -1, err + } + for _, b := range blk { + if b == block { + found = true + } + } + return found, 0, nil +} + +// printRedXstats is red_print_xstats: a short payload is its -1. +func printRedXstats(r *runner, xs []byte) { + x, err := xtcpnl.ParseTcXstats(xtcpnl.TcKindRed, xs) + if err != nil { + return + } + st := x.Aqm.Red + o := r.o + o.uint(printAny, "marked", " marked "+u32s(st.Marked)+" ", st.Marked) + o.uint(printAny, "early", "early "+u32s(st.Early)+" ", st.Early) + o.uint(printAny, "pdrop", "pdrop "+u32s(st.Pdrop)+" ", st.Pdrop) + o.uint(printAny, "other", "other "+u32s(st.Other)+" ", st.Other) +} + +// printChokeOpt is choke_print_opt: red's, with packet counts for sizes, +// no FLAGS attribute and no qevents. +func printChokeOpt(r *runner, _ *qdiscUtil, opt []byte, has bool) { + if !has { + return + } + tb := r.nested(opt, xtcpnl.TcaChokeMaxKnown) + q, maxP, ok := redParms(tb, xtcpnl.TcaChokeParms, xtcpnl.TcaChokeMaxP) + if !ok { + return + } + o := r.o + o.uint(printAny, "limit", "limit "+u32s(q.Limit)+"p ", q.Limit) + o.uint(printAny, "min", "min "+u32s(q.QthMin)+"p ", q.QthMin) + o.uint(printAny, "max", "max "+u32s(q.QthMax)+"p ", q.QthMax) + printRedFlags(o, uint32(q.Flags)) + r.printRedDetails(q, maxP) +} + +// printChokeXstats is choke_print_xstats: a short payload is its -1. +func printChokeXstats(r *runner, xs []byte) { + x, err := xtcpnl.ParseTcXstats(xtcpnl.TcKindChoke, xs) + if err != nil { + return + } + st := x.Aqm.Red + o := r.o + o.uint(printAny, "marked", " marked "+u32s(st.Marked), st.Marked) + o.uint(printAny, "early", " early "+u32s(st.Early), st.Early) + o.uint(printAny, "pdrop", " pdrop "+u32s(st.Pdrop), st.Pdrop) + o.uint(printAny, "other", " other "+u32s(st.Other), st.Other) + o.uint(printAny, "matched", " matched "+u32s(st.Matched), st.Matched) +} diff --git a/internal/gotc/q_shape.go b/internal/gotc/q_shape.go index 7db197d4a..e8bf315a4 100644 --- a/internal/gotc/q_shape.go +++ b/internal/gotc/q_shape.go @@ -248,17 +248,7 @@ func (r *runner) sfqRed(ext *xtcpnl.TcSfqQoptV1) { o.size(printAny, "max", "max ", " ", uint64(ext.QthMax)) p := float64(ext.MaxP) / math.Pow(2, 32) o.float(printAny, "probability", "probability "+cG(p)+" ", p) - for _, f := range []struct { - bit uint8 - name string - }{{1, "ecn"}, {2, "harddrop"}, {4, "adaptive"}, {8, "nodrop"}} { - on := ext.Flags&f.bit != 0 - text := "" - if on { - text = f.name + " " - } - o.boolean(printAny, f.name, text, on) - } + printRedFlags(o, uint32(ext.Flags)) if r.stats == 0 { return } diff --git a/internal/gotc/qdisc.go b/internal/gotc/qdisc.go index c31ad8e85..ae027c26b 100644 --- a/internal/gotc/qdisc.go +++ b/internal/gotc/qdisc.go @@ -261,11 +261,7 @@ func (r *runner) printQdisc(m Msg) (int, error) { r.errf("print_qdisc: NULL kind\n") return -1, nil } - q, err := qdiscKind(qdiscKindName(ti.Kind)) - if err != nil { - return 0, err - } - return 0, r.printQdiscBody(m, &ti, q) + return 0, r.printQdiscBody(m, &ti, qdiscKind(qdiscKindName(ti.Kind))) } // qdiscKindName is print_qdisc's lookup name: pfifo_fast is printed by diff --git a/internal/gotc/qkind.go b/internal/gotc/qkind.go index 02a0a43a2..13f729eb0 100644 --- a/internal/gotc/qkind.go +++ b/internal/gotc/qkind.go @@ -20,19 +20,6 @@ type qdiscUtil struct { printXstats func(r *runner, xs []byte) } -// tcBuiltinKinds is every qdisc_util id the tc binary links (tc/q_*.c at -// v7.2.0): one gotc does not print is refused rather than misprinted. A -// kind outside this list is dlsym's miss, which tc prints with -// print_noqopt. -var tcBuiltinKinds = map[string]bool{ - "cake": true, "cake_mq": true, "cbs": true, "choke": true, "clsact": true, "codel": true, - "drr": true, "dualpi2": true, "etf": true, "ets": true, "bfifo": true, "pfifo": true, - "pfifo_head_drop": true, "pfifo_fast": true, "fq": true, "fq_codel": true, "fq_pie": true, - "gred": true, "hfsc": true, "hhf": true, "htb": true, wordIngress: true, "mqprio": true, - "multiq": true, "netem": true, "pie": true, "plug": true, "prio": true, "qfq": true, - "red": true, "sfb": true, "sfq": true, "skbprio": true, "taprio": true, "tbf": true, -} - // qdiscUtils are the kinds gotc prints. var qdiscUtils = map[string]*qdiscUtil{ xtcpnl.TcKindPrio: {id: xtcpnl.TcKindPrio, printQopt: printPrioOpt}, @@ -57,6 +44,19 @@ var qdiscUtils = map[string]*qdiscUtil{ xtcpnl.TcKindMultiq: {id: xtcpnl.TcKindMultiq, printQopt: printMultiqOpt}, xtcpnl.TcKindCbs: {id: xtcpnl.TcKindCbs, printQopt: printCbsOpt}, xtcpnl.TcKindEtf: {id: xtcpnl.TcKindEtf, printQopt: printEtfOpt}, + xtcpnl.TcKindRed: {id: xtcpnl.TcKindRed, printQopt: printRedOpt, printXstats: printRedXstats}, + xtcpnl.TcKindSfb: {id: xtcpnl.TcKindSfb, printQopt: printSfbOpt, printXstats: printSfbXstats}, + xtcpnl.TcKindCodel: {id: xtcpnl.TcKindCodel, printQopt: printCodelOpt, printXstats: printCodelXstats}, + xtcpnl.TcKindPie: {id: xtcpnl.TcKindPie, printQopt: printPieOpt, printXstats: printPieXstats}, + xtcpnl.TcKindFqPie: {id: xtcpnl.TcKindFqPie, printQopt: printFqPieOpt, printXstats: printFqPieXstats}, + xtcpnl.TcKindHhf: {id: xtcpnl.TcKindHhf, printQopt: printHhfOpt, printXstats: printHhfXstats}, + xtcpnl.TcKindPlug: {id: xtcpnl.TcKindPlug, printQopt: printPlugOpt}, + xtcpnl.TcKindSkbprio: {id: xtcpnl.TcKindSkbprio, printQopt: printSkbprioOpt}, + xtcpnl.TcKindDualpi2: {id: xtcpnl.TcKindDualpi2, printQopt: printDualpi2Opt, printXstats: printDualpi2Xstats}, + xtcpnl.TcKindCake: {id: xtcpnl.TcKindCake, printQopt: printCakeOpt, printXstats: printCakeXstats}, + xtcpnl.TcKindCakeMq: {id: xtcpnl.TcKindCakeMq, printQopt: printCakeOpt, printXstats: printCakeXstats}, + xtcpnl.TcKindGred: {id: xtcpnl.TcKindGred, printQopt: printGredOpt}, + xtcpnl.TcKindChoke: {id: xtcpnl.TcKindChoke, printQopt: printChokeOpt, printXstats: printChokeXstats}, } // refuseKind records a qdisc_util printer's refusal of what tc would read @@ -99,17 +99,14 @@ func rtaWalk(data []byte, fn func(raw uint16, val []byte)) { } } -// qdiscKind is get_qdisc_kind: a printed kind's util, print_noqopt's for a -// kind tc does not link (noqueue, mq), and errNotImplemented for one it -// links that gotc does not print. -func qdiscKind(kind string) (*qdiscUtil, error) { +// qdiscKind is get_qdisc_kind: a printed kind's util, which is every +// kind the tc binary links (tc/q_*.c at v7.2.0), and print_noqopt's for +// one it does not (noqueue, mq), dlsym's miss. +func qdiscKind(kind string) *qdiscUtil { if q, ok := qdiscUtils[kind]; ok { - return q, nil - } - if tcBuiltinKinds[kind] { - return nil, errKind(kind) + return q } - return &qdiscUtil{id: kind, printQopt: printNoqopt}, nil + return &qdiscUtil{id: kind, printQopt: printNoqopt} } // printNoqopt is tc.c print_noqopt: "[Unknown qdisc, optlen=N] " for a diff --git a/internal/gotc/readback_test.go b/internal/gotc/readback_test.go index 7923acba4..f03a650a1 100644 --- a/internal/gotc/readback_test.go +++ b/internal/gotc/readback_test.go @@ -22,10 +22,7 @@ const tdcGlob = "../../pkg/xtcpnl/testdata/*/ws/tdc" // readbackSkips pins how many readbacks each out-of-slice kind takes away, // so a decoder that starts (or stops) refusing one shows. -var readbackSkips = map[string]int{ - "cake": 19, "cake_mq": 22, "choke": 7, "codel": 13, "dualpi2": 14, "fq_pie": 2, "gred": 6, - "hhf": 14, "pie": 1, "plug": 11, "red": 10, "sfb": 13, "skbprio": 4, -} +var readbackSkips = map[string]int{} // readbackRendered pins how many readbacks render exactly: 216 qdisc and // class shows, 273 filter and chain shows and gets, and 398 `tc actions` @@ -34,7 +31,8 @@ var readbackSkips = map[string]int{ // or bpf, in filters and in `tc actions`. None is eBPF. Increment 15's // nine kinds add 89 (two of them taprio under -d with a size table); 4 // more readbacks of those kinds also hold plug, and are now plug's. -const readbackRendered = 1114 +// Increment 16's thirteen kinds add the 136 they refused, so none is. +const readbackRendered = 1250 // kindRefused is a refusal by name: a qdisc kind is its bare name, the // filter path's are prefixed (filter:, action:, ematch:). diff --git a/internal/gotc/sched_test.go b/internal/gotc/sched_test.go index c48965365..b70cdc395 100644 --- a/internal/gotc/sched_test.go +++ b/internal/gotc/sched_test.go @@ -211,8 +211,8 @@ func TestGotcSched(t *testing.T) { showD0(schedQ("taprio", nestOpts(attr(xtcpnl.TcaTaprioAttrPriomap, make([]byte, 20))))), result{stdout: "qdisc taprio 1: root refcnt 2 ", stderr: "gotc: not implemented: taprio parameters of 20 bytes (tc reads it unchecked)\n", rc: 255}}, - {"negative: red, an increment-16 kind, is refused by name", []string{"qdisc", "show", "dev", "d0"}, - showD0(schedQ("red")), result{stderr: "gotc: not implemented: qdisc kind \"red\"\n", rc: 255}}, + {"corner: red with no options prints none", []string{"qdisc", "show", "dev", "d0"}, + showD0(schedQ("red")), result{stdout: "qdisc red 1: root refcnt 2 \n"}}, {"negative: mqprio options short of RTA_ALIGN(sizeof)", []string{"qdisc", "show", "dev", "d0"}, showD0(schedQ("mqprio", rawOpts(mqprioQopt(2, 4, 0, 4, 4)))), result{stdout: "qdisc mqprio 1: root refcnt 2 \n", stderr: "options size error\n"}}, diff --git a/internal/gotc/show_test.go b/internal/gotc/show_test.go index be74f0ee9..5c0b05865 100644 --- a/internal/gotc/show_test.go +++ b/internal/gotc/show_test.go @@ -166,10 +166,10 @@ func TestGotcShow(t *testing.T) { expected: result{stderr: "Error: argument \"root\" is wrong: parent is already specified\n", rc: 255}, }, { - description: "negative: an out-of-slice kind in the dump is refused by name", + description: "corner: cake with no options prints none", args: []string{"qdisc", "show", "dev", "d0"}, replies: []Reply{rep(linkMsg(2, "d0")), rep(qmsg(tcBody(2, 0, tcHRoot, 1, kind("cake"))), done())}, - expected: result{stderr: "gotc: not implemented: qdisc kind \"cake\"\n", rc: 255}, + expected: result{stdout: "qdisc cake 0: root \n"}, }, { description: "negative: an NLMSG_ERROR mid-dump is Dump terminated, rc 1 (Q26)", diff --git a/internal/gotc/util.go b/internal/gotc/util.go index 4d6aff444..ff745431e 100644 --- a/internal/gotc/util.go +++ b/internal/gotc/util.go @@ -1,7 +1,6 @@ package gotc import ( - "fmt" "math" "strconv" ) @@ -170,8 +169,3 @@ func cDoubleToU32(v float64) uint32 { } return uint32(uint64(int64(v)) & math.MaxUint32) } - -// errKind names an out-of-slice kind gotc refuses to print. -func errKind(kind string) error { - return fmt.Errorf("%w: qdisc kind %q", errNotImplemented, kind) -} diff --git a/nix/microvms/workbench/tcaqm.rows.jsonl b/nix/microvms/workbench/tcaqm.rows.jsonl new file mode 100644 index 000000000..c09bd521d --- /dev/null +++ b/nix/microvms/workbench/tcaqm.rows.jsonl @@ -0,0 +1,135 @@ +# Generated by `nlcapgen matrix -family tcaqm -seed 1 -random 0`. +# Do not edit; regenerate. tools/nlcapgen/matrix.go explains the strategies. +# 132 rows. +{"id":"tcaqm/ec-001","desc":"positive: opt=plain cmd=aqmred:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmred","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-002","desc":"corner: opt=json cmd=aqmred:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmred","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-003","desc":"corner: opt=plain cmd=aqmred:-d_qdisc_show_dev_d0","cmd":"tc -d qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmred","json":"0","words":"-d qdisc show dev d0"}} +{"id":"tcaqm/ec-004","desc":"corner: opt=plain cmd=aqmred:-o_qdisc_show_dev_d0","cmd":"tc -o qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmred","json":"0","words":"-o qdisc show dev d0"}} +{"id":"tcaqm/ec-005","desc":"positive: opt=plain cmd=aqmred2:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmred2","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-006","desc":"corner: opt=plain cmd=aqmred2:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmred2","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-007","desc":"corner: opt=plain cmd=aqmred2:-d_qdisc_show_dev_d0","cmd":"tc -d qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmred2","json":"0","words":"-d qdisc show dev d0"}} +{"id":"tcaqm/ec-008","desc":"corner: opt=plain cmd=aqmred2:-o_qdisc_show_dev_d0","cmd":"tc -o qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmred2","json":"0","words":"-o qdisc show dev d0"}} +{"id":"tcaqm/ec-009","desc":"positive: opt=plain cmd=aqmchoke:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmchoke","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-010","desc":"corner: opt=plain cmd=aqmchoke:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmchoke","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-011","desc":"corner: opt=plain cmd=aqmchoke:-d_qdisc_show_dev_d0","cmd":"tc -d qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmchoke","json":"0","words":"-d qdisc show dev d0"}} +{"id":"tcaqm/ec-012","desc":"corner: opt=plain cmd=aqmchoke:-o_qdisc_show_dev_d0","cmd":"tc -o qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmchoke","json":"0","words":"-o qdisc show dev d0"}} +{"id":"tcaqm/ec-013","desc":"positive: opt=plain cmd=aqmgred:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio","tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1","tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmgred","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-014","desc":"corner: opt=plain cmd=aqmgred:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio","tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1","tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmgred","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-015","desc":"corner: opt=plain cmd=aqmgred:-d_qdisc_show_dev_d0","cmd":"tc -d qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio","tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1","tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmgred","json":"0","words":"-d qdisc show dev d0"}} +{"id":"tcaqm/ec-016","desc":"corner: opt=plain cmd=aqmgred:-o_qdisc_show_dev_d0","cmd":"tc -o qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio","tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1","tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmgred","json":"0","words":"-o qdisc show dev d0"}} +{"id":"tcaqm/ec-017","desc":"boundary: opt=plain cmd=aqmgred0:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: gred setup vqs 2 default 1"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmgred0","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-018","desc":"corner: opt=plain cmd=aqmgred0:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: gred setup vqs 2 default 1"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmgred0","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-019","desc":"positive: opt=plain cmd=aqmsfb:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: sfb"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmsfb","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-020","desc":"corner: opt=plain cmd=aqmsfb:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: sfb"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmsfb","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-021","desc":"boundary: opt=plain cmd=aqmsfb2:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: sfb rehash 5000000 db 5000000 limit 100"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmsfb2","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-022","desc":"positive: opt=plain cmd=aqmcodel:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: codel"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcodel","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-023","desc":"corner: opt=plain cmd=aqmcodel:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: codel"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcodel","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-024","desc":"positive: opt=plain cmd=aqmcodel2:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: codel limit 500 target 4ms interval 50ms ecn ce_threshold 2ms"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcodel2","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-025","desc":"positive: opt=plain cmd=aqmpie:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: pie"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmpie","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-026","desc":"corner: opt=plain cmd=aqmpie:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: pie"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmpie","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-027","desc":"positive: opt=plain cmd=aqmpie2:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: pie limit 500 target 10ms tupdate 20ms alpha 2 beta 20 bytemode ecn dq_rate_estimator"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmpie2","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-028","desc":"corner: opt=plain cmd=aqmpie2:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: pie limit 500 target 10ms tupdate 20ms alpha 2 beta 20 bytemode ecn dq_rate_estimator"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmpie2","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-029","desc":"positive: opt=plain cmd=aqmfqpie:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: fq_pie"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmfqpie","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-030","desc":"corner: opt=plain cmd=aqmfqpie:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: fq_pie"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmfqpie","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-031","desc":"positive: opt=plain cmd=aqmfqpie2:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: fq_pie limit 2048 flows 256 quantum 1514 memory_limit 16Mb ecn_prob 20 ecn bytemode dq_rate_estimator"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmfqpie2","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-032","desc":"positive: opt=plain cmd=aqmhhf:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: hhf"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmhhf","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-033","desc":"corner: opt=plain cmd=aqmhhf:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: hhf"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmhhf","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-034","desc":"positive: opt=plain cmd=aqmhhf2:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: hhf limit 500 quantum 1514 hh_limit 1024 reset_timeout 50ms admit_bytes 65536 evict_timeout 500ms non_hh_weight 4"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmhhf2","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-035","desc":"positive: opt=plain cmd=aqmcake:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-036","desc":"corner: opt=plain cmd=aqmcake:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-037","desc":"corner: opt=plain cmd=aqmcake:-d_qdisc_show_dev_d0","cmd":"tc -d qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake","json":"0","words":"-d qdisc show dev d0"}} +{"id":"tcaqm/ec-038","desc":"corner: opt=plain cmd=aqmcake:-s_-o_qdisc_show_dev_d0","cmd":"tc -s -o qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake","json":"0","words":"-s -o qdisc show dev d0"}} +{"id":"tcaqm/ec-039","desc":"corner: opt=plain cmd=aqmcake:class_show_dev_d0","cmd":"tc class show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake","json":"0","words":"class show dev d0"}} +{"id":"tcaqm/ec-040","desc":"positive: opt=plain cmd=aqmcake2:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake bandwidth 100Mbit diffserv4 dual-srchost nat wash ingress ack-filter rtt 20ms atm overhead 44 mpu 64 memlimit 4Mb fwmark 0xff no-split-gso"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake2","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-041","desc":"corner: opt=plain cmd=aqmcake2:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake bandwidth 100Mbit diffserv4 dual-srchost nat wash ingress ack-filter rtt 20ms atm overhead 44 mpu 64 memlimit 4Mb fwmark 0xff no-split-gso"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake2","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-042","desc":"positive: opt=plain cmd=aqmcake3:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake autorate-ingress diffserv8 dual-dsthost ack-filter-aggressive"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake3","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-043","desc":"corner: opt=plain cmd=aqmcake3:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake autorate-ingress diffserv8 dual-dsthost ack-filter-aggressive"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake3","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-044","desc":"positive: opt=plain cmd=aqmcake4:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake besteffort flowblind"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake4","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-045","desc":"corner: opt=plain cmd=aqmcake4:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake besteffort flowblind"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake4","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-046","desc":"positive: opt=plain cmd=aqmcake5:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake bandwidth 10Mbit precedence triple-isolate docsis"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake5","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-047","desc":"corner: opt=plain cmd=aqmcake5:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake bandwidth 10Mbit precedence triple-isolate docsis"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake5","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-048","desc":"positive: opt=plain cmd=aqmcakemq:qdisc_show_dev_d1","cmd":"tc qdisc show dev d1","pre":["ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcakemq","json":"0","words":"qdisc show dev d1"}} +{"id":"tcaqm/ec-049","desc":"corner: opt=plain cmd=aqmcakemq:qdisc_show_dev_d1_root","cmd":"tc qdisc show dev d1 root","pre":["ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcakemq","json":"0","words":"qdisc show dev d1 root"}} +{"id":"tcaqm/ec-050","desc":"corner: opt=plain cmd=aqmcakemq:-s_qdisc_show_dev_d1","cmd":"tc -s qdisc show dev d1","pre":["ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcakemq","json":"0","words":"-s qdisc show dev d1"}} +{"id":"tcaqm/ec-051","desc":"corner: opt=plain cmd=aqmcakemq:class_show_dev_d1","cmd":"tc class show dev d1","pre":["ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcakemq","json":"0","words":"class show dev d1"}} +{"id":"tcaqm/ec-052","desc":"positive: opt=plain cmd=aqmdpi:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: dualpi2"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmdpi","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-053","desc":"corner: opt=plain cmd=aqmdpi:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: dualpi2"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmdpi","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-054","desc":"corner: opt=plain cmd=aqmdpi:-o_qdisc_show_dev_d0","cmd":"tc -o qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: dualpi2"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmdpi","json":"0","words":"-o qdisc show dev d0"}} +{"id":"tcaqm/ec-055","desc":"positive: opt=plain cmd=aqmdpi2:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: dualpi2 limit 5000 memlimit 4000000 step_thresh 10 drop_on_overload drop_enqueue any_ect no_split_gso classic_protection 20"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmdpi2","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-056","desc":"corner: opt=plain cmd=aqmdpi2:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: dualpi2 limit 5000 memlimit 4000000 step_thresh 10 drop_on_overload drop_enqueue any_ect no_split_gso classic_protection 20"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmdpi2","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-057","desc":"positive: opt=plain cmd=aqmdpi3:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: dualpi2 step_thresh 1ms max_rtt 50ms typical_rtt 10ms"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmdpi3","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-058","desc":"corner: opt=plain cmd=aqmplug:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: plug limit 1000"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmplug","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-059","desc":"corner: opt=plain cmd=aqmplug:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: plug limit 1000"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmplug","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-060","desc":"positive: opt=plain cmd=aqmskbprio:qdisc_show_dev_d0","cmd":"tc qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: skbprio limit 100"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmskbprio","json":"0","words":"qdisc show dev d0"}} +{"id":"tcaqm/ec-061","desc":"corner: opt=plain cmd=aqmskbprio:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: skbprio limit 100"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmskbprio","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/ec-062","desc":"corner: opt=plain cmd=aqmskbprio:class_show_dev_d0","cmd":"tc class show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: skbprio limit 100"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmskbprio","json":"0","words":"class show dev d0"}} +{"id":"tcaqm/ec-063","desc":"positive: opt=plain cmd=aqmcake:batch:qdisc-then-class","cmd":"tc -s -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","tc qdisc add dev d0 root handle 1: cake","printf '%s\\n' 'qdisc show dev d0' 'class show dev d0' 'qdisc show dev d0' > b.txt"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"batch":"qdisc-then-class","fix":"aqmcake","json":"0","words":"-s -batch b.txt"}} +{"id":"tcaqm/ec-064","desc":"corner: opt=plain cmd=aqmred2:batch:red-twice","cmd":"tc -d -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","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10","printf '%s\\n' 'qdisc show dev d0' 'qdisc show dev d0' > b.txt"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"batch":"red-twice","fix":"aqmred2","json":"0","words":"-d -batch b.txt"}} +{"id":"tcaqm/pw-001","desc":"corner: opt=plain cmd=aqmred:-s_qdisc_show_dev_d0","cmd":"tc -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmred","json":"0","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-002","desc":"positive: opt=json cmd=aqmred:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmred","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-003","desc":"corner: opt=json cmd=aqmred:-d_qdisc_show_dev_d0","cmd":"tc -j -d qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmred","json":"1","words":"-d qdisc show dev d0"}} +{"id":"tcaqm/pw-004","desc":"corner: opt=json cmd=aqmred:-o_qdisc_show_dev_d0","cmd":"tc -j -o qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmred","json":"1","words":"-o qdisc show dev d0"}} +{"id":"tcaqm/pw-005","desc":"positive: opt=json cmd=aqmred2:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmred2","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-006","desc":"corner: opt=json cmd=aqmred2:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmred2","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-007","desc":"corner: opt=json cmd=aqmred2:-d_qdisc_show_dev_d0","cmd":"tc -j -d qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmred2","json":"1","words":"-d qdisc show dev d0"}} +{"id":"tcaqm/pw-008","desc":"corner: opt=json cmd=aqmred2:-o_qdisc_show_dev_d0","cmd":"tc -j -o qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmred2","json":"1","words":"-o qdisc show dev d0"}} +{"id":"tcaqm/pw-009","desc":"positive: opt=json cmd=aqmchoke:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmchoke","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-010","desc":"corner: opt=json cmd=aqmchoke:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmchoke","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-011","desc":"corner: opt=json cmd=aqmchoke:-d_qdisc_show_dev_d0","cmd":"tc -j -d qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmchoke","json":"1","words":"-d qdisc show dev d0"}} +{"id":"tcaqm/pw-012","desc":"corner: opt=json cmd=aqmchoke:-o_qdisc_show_dev_d0","cmd":"tc -j -o qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmchoke","json":"1","words":"-o qdisc show dev d0"}} +{"id":"tcaqm/pw-013","desc":"positive: opt=json cmd=aqmgred:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio","tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1","tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmgred","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-014","desc":"corner: opt=json cmd=aqmgred:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio","tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1","tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmgred","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-015","desc":"corner: opt=json cmd=aqmgred:-d_qdisc_show_dev_d0","cmd":"tc -j -d qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio","tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1","tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmgred","json":"1","words":"-d qdisc show dev d0"}} +{"id":"tcaqm/pw-016","desc":"corner: opt=json cmd=aqmgred:-o_qdisc_show_dev_d0","cmd":"tc -j -o qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio","tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1","tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmgred","json":"1","words":"-o qdisc show dev d0"}} +{"id":"tcaqm/pw-017","desc":"boundary: opt=json cmd=aqmgred0:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: gred setup vqs 2 default 1"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmgred0","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-018","desc":"corner: opt=json cmd=aqmgred0:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: gred setup vqs 2 default 1"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmgred0","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-019","desc":"positive: opt=json cmd=aqmsfb:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: sfb"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmsfb","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-020","desc":"corner: opt=json cmd=aqmsfb:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: sfb"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmsfb","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-021","desc":"boundary: opt=json cmd=aqmsfb2:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: sfb rehash 5000000 db 5000000 limit 100"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmsfb2","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-022","desc":"positive: opt=json cmd=aqmcodel:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: codel"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcodel","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-023","desc":"corner: opt=json cmd=aqmcodel:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: codel"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcodel","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-024","desc":"positive: opt=json cmd=aqmcodel2:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: codel limit 500 target 4ms interval 50ms ecn ce_threshold 2ms"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcodel2","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-025","desc":"positive: opt=json cmd=aqmpie:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: pie"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmpie","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-026","desc":"corner: opt=json cmd=aqmpie:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: pie"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmpie","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-027","desc":"positive: opt=json cmd=aqmpie2:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: pie limit 500 target 10ms tupdate 20ms alpha 2 beta 20 bytemode ecn dq_rate_estimator"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmpie2","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-028","desc":"corner: opt=json cmd=aqmpie2:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: pie limit 500 target 10ms tupdate 20ms alpha 2 beta 20 bytemode ecn dq_rate_estimator"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmpie2","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-029","desc":"positive: opt=json cmd=aqmfqpie:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: fq_pie"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmfqpie","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-030","desc":"corner: opt=json cmd=aqmfqpie:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: fq_pie"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmfqpie","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-031","desc":"positive: opt=json cmd=aqmfqpie2:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: fq_pie limit 2048 flows 256 quantum 1514 memory_limit 16Mb ecn_prob 20 ecn bytemode dq_rate_estimator"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmfqpie2","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-032","desc":"positive: opt=json cmd=aqmhhf:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: hhf"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmhhf","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-033","desc":"corner: opt=json cmd=aqmhhf:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: hhf"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmhhf","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-034","desc":"positive: opt=json cmd=aqmhhf2:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: hhf limit 500 quantum 1514 hh_limit 1024 reset_timeout 50ms admit_bytes 65536 evict_timeout 500ms non_hh_weight 4"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmhhf2","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-035","desc":"positive: opt=json cmd=aqmcake:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-036","desc":"corner: opt=json cmd=aqmcake:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-037","desc":"corner: opt=json cmd=aqmcake:-d_qdisc_show_dev_d0","cmd":"tc -j -d qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake","json":"1","words":"-d qdisc show dev d0"}} +{"id":"tcaqm/pw-038","desc":"corner: opt=json cmd=aqmcake:-s_-o_qdisc_show_dev_d0","cmd":"tc -j -s -o qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake","json":"1","words":"-s -o qdisc show dev d0"}} +{"id":"tcaqm/pw-039","desc":"corner: opt=json cmd=aqmcake:class_show_dev_d0","cmd":"tc -j class show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake","json":"1","words":"class show dev d0"}} +{"id":"tcaqm/pw-040","desc":"positive: opt=json cmd=aqmcake2:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake bandwidth 100Mbit diffserv4 dual-srchost nat wash ingress ack-filter rtt 20ms atm overhead 44 mpu 64 memlimit 4Mb fwmark 0xff no-split-gso"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake2","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-041","desc":"corner: opt=json cmd=aqmcake2:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake bandwidth 100Mbit diffserv4 dual-srchost nat wash ingress ack-filter rtt 20ms atm overhead 44 mpu 64 memlimit 4Mb fwmark 0xff no-split-gso"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake2","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-042","desc":"positive: opt=json cmd=aqmcake3:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake autorate-ingress diffserv8 dual-dsthost ack-filter-aggressive"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake3","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-043","desc":"corner: opt=json cmd=aqmcake3:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake autorate-ingress diffserv8 dual-dsthost ack-filter-aggressive"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake3","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-044","desc":"positive: opt=json cmd=aqmcake4:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake besteffort flowblind"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake4","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-045","desc":"corner: opt=json cmd=aqmcake4:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake besteffort flowblind"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake4","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-046","desc":"positive: opt=json cmd=aqmcake5:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake bandwidth 10Mbit precedence triple-isolate docsis"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake5","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-047","desc":"corner: opt=json cmd=aqmcake5:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: cake bandwidth 10Mbit precedence triple-isolate docsis"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcake5","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-048","desc":"positive: opt=json cmd=aqmcakemq:qdisc_show_dev_d1","cmd":"tc -j qdisc show dev d1","pre":["ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcakemq","json":"1","words":"qdisc show dev d1"}} +{"id":"tcaqm/pw-049","desc":"corner: opt=json cmd=aqmcakemq:qdisc_show_dev_d1_root","cmd":"tc -j qdisc show dev d1 root","pre":["ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcakemq","json":"1","words":"qdisc show dev d1 root"}} +{"id":"tcaqm/pw-050","desc":"corner: opt=json cmd=aqmcakemq:-s_qdisc_show_dev_d1","cmd":"tc -j -s qdisc show dev d1","pre":["ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcakemq","json":"1","words":"-s qdisc show dev d1"}} +{"id":"tcaqm/pw-051","desc":"corner: opt=json cmd=aqmcakemq:class_show_dev_d1","cmd":"tc -j class show dev d1","pre":["ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmcakemq","json":"1","words":"class show dev d1"}} +{"id":"tcaqm/pw-052","desc":"positive: opt=json cmd=aqmdpi:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: dualpi2"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmdpi","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-053","desc":"corner: opt=json cmd=aqmdpi:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: dualpi2"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmdpi","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-054","desc":"corner: opt=json cmd=aqmdpi:-o_qdisc_show_dev_d0","cmd":"tc -j -o qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: dualpi2"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmdpi","json":"1","words":"-o qdisc show dev d0"}} +{"id":"tcaqm/pw-055","desc":"positive: opt=json cmd=aqmdpi2:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: dualpi2 limit 5000 memlimit 4000000 step_thresh 10 drop_on_overload drop_enqueue any_ect no_split_gso classic_protection 20"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmdpi2","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-056","desc":"corner: opt=json cmd=aqmdpi2:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: dualpi2 limit 5000 memlimit 4000000 step_thresh 10 drop_on_overload drop_enqueue any_ect no_split_gso classic_protection 20"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmdpi2","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-057","desc":"positive: opt=json cmd=aqmdpi3:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: dualpi2 step_thresh 1ms max_rtt 50ms typical_rtt 10ms"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmdpi3","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-058","desc":"corner: opt=json cmd=aqmplug:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: plug limit 1000"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmplug","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-059","desc":"corner: opt=json cmd=aqmplug:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: plug limit 1000"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmplug","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-060","desc":"positive: opt=json cmd=aqmskbprio:qdisc_show_dev_d0","cmd":"tc -j qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: skbprio limit 100"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmskbprio","json":"1","words":"qdisc show dev d0"}} +{"id":"tcaqm/pw-061","desc":"corner: opt=json cmd=aqmskbprio:-s_qdisc_show_dev_d0","cmd":"tc -j -s qdisc show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: skbprio limit 100"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmskbprio","json":"1","words":"-s qdisc show dev d0"}} +{"id":"tcaqm/pw-062","desc":"corner: opt=json cmd=aqmskbprio:class_show_dev_d0","cmd":"tc -j class show dev d0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: skbprio limit 100"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"aqmskbprio","json":"1","words":"class show dev d0"}} +{"id":"tcaqm/pw-063","desc":"positive: opt=json cmd=aqmcake:batch:qdisc-then-class","cmd":"tc -j -s -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","tc qdisc add dev d0 root handle 1: cake","printf '%s\\n' 'qdisc show dev d0' 'class show dev d0' 'qdisc show dev d0' > b.txt"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"batch":"qdisc-then-class","fix":"aqmcake","json":"1","words":"-s -batch b.txt"}} +{"id":"tcaqm/pw-064","desc":"corner: opt=json cmd=aqmred2:batch:red-twice","cmd":"tc -j -d -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","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10","printf '%s\\n' 'qdisc show dev d0' 'qdisc show dev d0' > b.txt"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"batch":"red-twice","fix":"aqmred2","json":"1","words":"-d -batch b.txt"}} +{"id":"tcaqm/ng-001","desc":"negative: opt=plain cmd=ng:aqmplug:qdisc_add_dev_d0_parent_1:_handle_2:_cake_mq: cake_mq under a classless parent: \"Parent qdisc is not classful\", a write gotc refuses","cmd":"tc qdisc add dev d0 parent 1: handle 2: cake_mq","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up","tc qdisc add dev d0 root handle 1: plug limit 1000"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":2,"errno":"ENOTSUP","refused_by":"kernel"},"axes":{"fix":"aqmplug","json":"0","words":"qdisc add dev d0 parent 1: handle 2: cake_mq"}} +{"id":"tcaqm/ng-002","desc":"negative: opt=plain cmd=ng:aqmcakemq:qdisc_replace_dev_d1_root_handle_1:_cake_mq_autorate-ingress: cake_mq rejects autorate (K39)","cmd":"tc qdisc replace dev d1 root handle 1: cake_mq autorate-ingress","pre":["ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":2,"errno":"ENOTSUP","refused_by":"kernel"},"axes":{"fix":"aqmcakemq","json":"0","words":"qdisc replace dev d1 root handle 1: cake_mq autorate-ingress"}} +{"id":"tcaqm/ng-003","desc":"negative: opt=plain cmd=ng:aqmplug:qdisc_change_dev_d0_root_handle_1:_gred_vq_0_limit_60KB_min_15KB_max_45KB_avpkt_1000: gred change on a qdisc that is not gred: the kernel rejects the kind","cmd":"tc qdisc change dev d0 root handle 1: gred vq 0 limit 60KB min 15KB max 45KB avpkt 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","tc qdisc add dev d0 root handle 1: plug limit 1000"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":2,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"aqmplug","json":"0","words":"qdisc change dev d0 root handle 1: gred vq 0 limit 60KB min 15KB max 45KB avpkt 1000"}} +{"id":"tcaqm/ng-004","desc":"negative: opt=plain cmd=ng:aqmred:qdisc_show_dev_nosuch: no such device: Cannot find device, rc 1","cmd":"tc qdisc show dev 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","tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit"],"modules":["sch_cake","sch_choke","sch_codel","sch_dualpi2","sch_fq_pie","sch_gred","sch_hhf","sch_pie","sch_plug","sch_red","sch_sfb","sch_skbprio"],"proto":"route","expect":{"rc":1,"errno":"ENODEV","refused_by":"kernel"},"axes":{"fix":"aqmred","json":"0","words":"qdisc show dev nosuch"}} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-001/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-001/cmd.json new file mode 100644 index 000000000..7f710a1c8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-001/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmred", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmred:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-001", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-001/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-001/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-001/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-001/ip.out new file mode 100644 index 000000000..6344cafe8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-001/ip.out @@ -0,0 +1 @@ +qdisc red 1: root refcnt 2 limit 400000b min 30000b max 90000b diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-001/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-001/ip.pcap new file mode 100644 index 000000000..7b43376cd Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-001/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-001/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-001/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-001/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-002/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-002/cmd.json new file mode 100644 index 000000000..92b23ffb7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-002/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmred", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmred:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-002", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-002/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-002/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-002/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-002/ip.out new file mode 100644 index 000000000..09977dcd3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-002/ip.out @@ -0,0 +1 @@ +[{"kind":"red","handle":"1:","root":true,"refcnt":2,"options":{"limit":400000,"min":30000,"max":90000,"ecn":false,"harddrop":false,"adaptive":false,"nodrop":false},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"marked":0,"early":0,"pdrop":0,"other":0}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-002/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-002/ip.pcap new file mode 100644 index 000000000..a04af41a4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-002/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-002/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-002/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-002/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-003/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-003/cmd.json new file mode 100644 index 000000000..f2f38aaf4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-003/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmred", + "json": "0", + "words": "-d qdisc show dev d0" + }, + "cmd": "tc -d qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmred:-d_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-003", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-003/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-003/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-003/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-003/ip.out new file mode 100644 index 000000000..6e7b83c9b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-003/ip.out @@ -0,0 +1 @@ +qdisc red 1: root refcnt 2 limit 400000b min 30000b max 90000b ewma 5 probability 0.02 Scell_log 15 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-003/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-003/ip.pcap new file mode 100644 index 000000000..c749194f5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-003/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-003/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-003/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-003/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-004/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-004/cmd.json new file mode 100644 index 000000000..704932f7a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-004/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmred", + "json": "0", + "words": "-o qdisc show dev d0" + }, + "cmd": "tc -o qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmred:-o_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-004", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-004/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-004/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-004/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-004/ip.out new file mode 100644 index 000000000..62832ad5f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-004/ip.out @@ -0,0 +1 @@ +qdisc red 1: root refcnt 2 limit 400000b min 30000b max 90000b \ \ No newline at end of file diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-004/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-004/ip.pcap new file mode 100644 index 000000000..e7ba1f1f2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-004/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-004/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-004/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-004/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-005/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-005/cmd.json new file mode 100644 index 000000000..97c12ef05 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-005/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmred2", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmred2:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-005", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-005/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-005/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-005/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-005/ip.out new file mode 100644 index 000000000..a08a4988c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-005/ip.out @@ -0,0 +1 @@ +qdisc red 1: root refcnt 2 limit 400000b min 30000b max 90000b ecn harddrop adaptive qevent early_drop block 10 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-005/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-005/ip.pcap new file mode 100644 index 000000000..18b3635ec Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-005/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-005/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-005/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-005/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-006/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-006/cmd.json new file mode 100644 index 000000000..9ac122bff --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-006/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmred2", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmred2:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-006", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-006/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-006/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-006/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-006/ip.out new file mode 100644 index 000000000..b7c3dcdcb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-006/ip.out @@ -0,0 +1,4 @@ +qdisc red 1: root refcnt 2 limit 400000b min 30000b max 90000b ecn harddrop adaptive qevent early_drop block 10 + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + marked 0 early 0 pdrop 0 other 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-006/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-006/ip.pcap new file mode 100644 index 000000000..f2acbe439 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-006/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-006/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-006/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-006/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-007/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-007/cmd.json new file mode 100644 index 000000000..3ecccbe0a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-007/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmred2", + "json": "0", + "words": "-d qdisc show dev d0" + }, + "cmd": "tc -d qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmred2:-d_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-007", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-007/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-007/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-007/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-007/ip.out new file mode 100644 index 000000000..3323391e5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-007/ip.out @@ -0,0 +1 @@ +qdisc red 1: root refcnt 2 limit 400000b min 30000b max 90000b ecn harddrop adaptive ewma 5 probability 0.02 Scell_log 15qevent early_drop block 10 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-007/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-007/ip.pcap new file mode 100644 index 000000000..ba1c96b1c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-007/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-007/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-007/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-007/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-008/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-008/cmd.json new file mode 100644 index 000000000..1b907fc45 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-008/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmred2", + "json": "0", + "words": "-o qdisc show dev d0" + }, + "cmd": "tc -o qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmred2:-o_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-008", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-008/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-008/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-008/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-008/ip.out new file mode 100644 index 000000000..83297cfd5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-008/ip.out @@ -0,0 +1 @@ +qdisc red 1: root refcnt 2 limit 400000b min 30000b max 90000b ecn harddrop adaptive qevent early_drop block 10 \ \ No newline at end of file diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-008/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-008/ip.pcap new file mode 100644 index 000000000..21df4bd18 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-008/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-008/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-008/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-008/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-009/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-009/cmd.json new file mode 100644 index 000000000..8c95e5587 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-009/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmchoke", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmchoke:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-009", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-009/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-009/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-009/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-009/ip.out new file mode 100644 index 000000000..bf945831d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-009/ip.out @@ -0,0 +1 @@ +qdisc choke 1: root refcnt 2 limit 1000p min 100p max 300p ecn diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-009/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-009/ip.pcap new file mode 100644 index 000000000..6c447a30f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-009/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-009/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-009/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-009/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-010/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-010/cmd.json new file mode 100644 index 000000000..09da229cb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-010/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmchoke", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmchoke:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-010", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-010/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-010/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-010/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-010/ip.out new file mode 100644 index 000000000..028e6be07 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-010/ip.out @@ -0,0 +1,4 @@ +qdisc choke 1: root refcnt 2 limit 1000p min 100p max 300p ecn + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + marked 0 early 0 pdrop 0 other 0 matched 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-010/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-010/ip.pcap new file mode 100644 index 000000000..d4db0a6f0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-010/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-010/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-010/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-010/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-011/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-011/cmd.json new file mode 100644 index 000000000..3ed331120 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-011/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmchoke", + "json": "0", + "words": "-d qdisc show dev d0" + }, + "cmd": "tc -d qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmchoke:-d_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-011", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-011/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-011/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-011/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-011/ip.out new file mode 100644 index 000000000..996119a56 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-011/ip.out @@ -0,0 +1 @@ +qdisc choke 1: root refcnt 2 limit 1000p min 100p max 300p ecn ewma 7 probability 0.02 Scell_log 17 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-011/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-011/ip.pcap new file mode 100644 index 000000000..ce37416fb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-011/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-011/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-011/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-011/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-012/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-012/cmd.json new file mode 100644 index 000000000..16794f604 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-012/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmchoke", + "json": "0", + "words": "-o qdisc show dev d0" + }, + "cmd": "tc -o qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmchoke:-o_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-012", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-012/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-012/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-012/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-012/ip.out new file mode 100644 index 000000000..1b2d79420 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-012/ip.out @@ -0,0 +1 @@ +qdisc choke 1: root refcnt 2 limit 1000p min 100p max 300p ecn \ \ No newline at end of file diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-012/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-012/ip.pcap new file mode 100644 index 000000000..29e6b69db Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-012/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-012/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-012/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-012/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-013/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-013/cmd.json new file mode 100644 index 000000000..4a097401a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-013/cmd.json @@ -0,0 +1,68 @@ +{ + "axes": { + "fix": "aqmgred", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmgred:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-013", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio", + "tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1", + "tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio", + "rc": 0 + }, + { + "cmd": "tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1", + "rc": 0 + }, + { + "cmd": "tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-013/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-013/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-013/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-013/ip.out new file mode 100644 index 000000000..8479948d0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-013/ip.out @@ -0,0 +1,3 @@ +qdisc gred 1: root refcnt 2 vqs 4 default 0 grio limit 1514000b + vq 0 prio 1 limit 60Kb min 15Kb max 45Kb + vq 1 prio 2 limit 60Kb min 15Kb max 45Kb ecn diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-013/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-013/ip.pcap new file mode 100644 index 000000000..30cb2b95a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-013/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-013/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-013/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-013/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-014/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-014/cmd.json new file mode 100644 index 000000000..ef898da76 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-014/cmd.json @@ -0,0 +1,68 @@ +{ + "axes": { + "fix": "aqmgred", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmgred:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-014", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio", + "tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1", + "tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio", + "rc": 0 + }, + { + "cmd": "tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1", + "rc": 0 + }, + { + "cmd": "tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-014/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-014/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-014/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-014/ip.out new file mode 100644 index 000000000..c01d95b5c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-014/ip.out @@ -0,0 +1,13 @@ +qdisc gred 1: root refcnt 2 vqs 4 default 0 grio limit 1514000b + vq 0 prio 1 limit 60Kb min 15Kb max 45Kb + Queue size: average 0b current 0b + Dropped packets: forced 0 early 0 pdrop 0 other 0 + Marked packets: forced 0 early 0 + Total packets: 0 (0b) + vq 1 prio 2 limit 60Kb min 15Kb max 45Kb ecn + Queue size: average 0b current 0b + Dropped packets: forced 0 early 0 pdrop 0 other 0 + Marked packets: forced 0 early 0 + Total packets: 0 (0b) + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-014/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-014/ip.pcap new file mode 100644 index 000000000..129045d84 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-014/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-014/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-014/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-014/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-015/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-015/cmd.json new file mode 100644 index 000000000..23401adea --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-015/cmd.json @@ -0,0 +1,68 @@ +{ + "axes": { + "fix": "aqmgred", + "json": "0", + "words": "-d qdisc show dev d0" + }, + "cmd": "tc -d qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmgred:-d_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-015", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio", + "tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1", + "tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio", + "rc": 0 + }, + { + "cmd": "tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1", + "rc": 0 + }, + { + "cmd": "tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-015/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-015/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-015/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-015/ip.out new file mode 100644 index 000000000..a7e386d6c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-015/ip.out @@ -0,0 +1,3 @@ +qdisc gred 1: root refcnt 2 vqs 4 default 0 grio limit 1514000b + vq 0 prio 1 limit 60Kb min 15Kb max 45Kb ewma 3 probability 0.1 Scell_log 13 + vq 1 prio 2 limit 60Kb min 15Kb max 45Kb ecn ewma 3 probability 0.2 Scell_log 13 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-015/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-015/ip.pcap new file mode 100644 index 000000000..e6dc8f95a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-015/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-015/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-015/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-015/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-016/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-016/cmd.json new file mode 100644 index 000000000..aa228362f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-016/cmd.json @@ -0,0 +1,68 @@ +{ + "axes": { + "fix": "aqmgred", + "json": "0", + "words": "-o qdisc show dev d0" + }, + "cmd": "tc -o qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmgred:-o_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-016", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio", + "tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1", + "tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio", + "rc": 0 + }, + { + "cmd": "tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1", + "rc": 0 + }, + { + "cmd": "tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-016/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-016/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-016/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-016/ip.out new file mode 100644 index 000000000..5df832fd1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-016/ip.out @@ -0,0 +1,3 @@ +qdisc gred 1: root refcnt 2 vqs 4 default 0 grio limit 1514000b + vq 0 prio 1 limit 60Kb min 15Kb max 45Kb + vq 1 prio 2 limit 60Kb min 15Kb max 45Kb ecn \ \ No newline at end of file diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-016/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-016/ip.pcap new file mode 100644 index 000000000..767992789 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-016/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-016/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-016/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-016/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-017/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-017/cmd.json new file mode 100644 index 000000000..22aae8774 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-017/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmgred0", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "boundary: opt=plain cmd=aqmgred0:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-017", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: gred setup vqs 2 default 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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: gred setup vqs 2 default 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-017/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-017/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-017/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-017/ip.out new file mode 100644 index 000000000..134dcd907 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-017/ip.out @@ -0,0 +1 @@ +qdisc gred 1: root refcnt 2 vqs 2 default 1 limit 1514000b diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-017/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-017/ip.pcap new file mode 100644 index 000000000..daf8b8712 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-017/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-017/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-017/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-017/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-018/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-018/cmd.json new file mode 100644 index 000000000..872dab391 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-018/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmgred0", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmgred0:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-018", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: gred setup vqs 2 default 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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: gred setup vqs 2 default 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-018/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-018/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-018/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-018/ip.out new file mode 100644 index 000000000..305f4b400 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-018/ip.out @@ -0,0 +1,3 @@ +qdisc gred 1: root refcnt 2 vqs 2 default 1 limit 1514000b + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-018/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-018/ip.pcap new file mode 100644 index 000000000..bf69abb5d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-018/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-018/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-018/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-018/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-019/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-019/cmd.json new file mode 100644 index 000000000..a85020ad0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-019/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmsfb", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmsfb:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-019", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: sfb" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: sfb", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-019/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-019/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-019/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-019/ip.out new file mode 100644 index 000000000..89cd26365 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-019/ip.out @@ -0,0 +1 @@ +qdisc sfb 1: root refcnt 2 rehash 600s db 60s limit 1000p max 25p target 20p increment 0.000503548 decrement 4.57771e-05 penalty_rate 10pps penalty_burst 20p diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-019/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-019/ip.pcap new file mode 100644 index 000000000..8d951eebd Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-019/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-019/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-019/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-019/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-020/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-020/cmd.json new file mode 100644 index 000000000..5f0579512 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-020/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmsfb", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmsfb:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-020", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: sfb" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: sfb", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-020/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-020/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-020/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-020/ip.out new file mode 100644 index 000000000..b146a005b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-020/ip.out @@ -0,0 +1,5 @@ +qdisc sfb 1: root refcnt 2 rehash 600s db 60s limit 1000p max 25p target 20p increment 0.000503548 decrement 4.57771e-05 penalty_rate 10pps penalty_burst 20p + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + earlydrop 0 penaltydrop 0 bucketdrop 0 queuedrop 0 childdrop 0 marked 0 + maxqlen 0 maxprob 0 avgprob 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-020/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-020/ip.pcap new file mode 100644 index 000000000..e3965d2bb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-020/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-020/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-020/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-020/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-021/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-021/cmd.json new file mode 100644 index 000000000..a08632710 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-021/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmsfb2", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "boundary: opt=plain cmd=aqmsfb2:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-021", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: sfb rehash 5000000 db 5000000 limit 100" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: sfb rehash 5000000 db 5000000 limit 100", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-021/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-021/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-021/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-021/ip.out new file mode 100644 index 000000000..dac1b8a3a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-021/ip.out @@ -0,0 +1 @@ +qdisc sfb 1: root refcnt 2 rehash 705s db 705s limit 100p max 25p target 20p increment 0.000503548 decrement 4.57771e-05 penalty_rate 10pps penalty_burst 20p diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-021/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-021/ip.pcap new file mode 100644 index 000000000..8a6ccfede Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-021/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-021/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-021/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-021/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-022/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-022/cmd.json new file mode 100644 index 000000000..fb52e94f2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-022/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcodel", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmcodel:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-022", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: codel" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: codel", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-022/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-022/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-022/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-022/ip.out new file mode 100644 index 000000000..220e2c138 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-022/ip.out @@ -0,0 +1 @@ +qdisc codel 1: root refcnt 2 limit 1000p target 5ms interval 100ms diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-022/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-022/ip.pcap new file mode 100644 index 000000000..33c70b1cc Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-022/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-022/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-022/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-022/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-023/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-023/cmd.json new file mode 100644 index 000000000..cdab67ed0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-023/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcodel", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmcodel:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-023", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: codel" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: codel", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-023/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-023/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-023/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-023/ip.out new file mode 100644 index 000000000..e85c090ff --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-023/ip.out @@ -0,0 +1,5 @@ +qdisc codel 1: root refcnt 2 limit 1000p target 5ms interval 100ms + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + count 0 lastcount 0 ldelay 0us drop_next 0us + maxpacket 0 ecn_mark 0 drop_overlimit 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-023/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-023/ip.pcap new file mode 100644 index 000000000..3743a49f3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-023/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-023/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-023/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-023/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-024/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-024/cmd.json new file mode 100644 index 000000000..523b0d1c0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-024/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcodel2", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmcodel2:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-024", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: codel limit 500 target 4ms interval 50ms ecn ce_threshold 2ms" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: codel limit 500 target 4ms interval 50ms ecn ce_threshold 2ms", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-024/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-024/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-024/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-024/ip.out new file mode 100644 index 000000000..66b5aa680 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-024/ip.out @@ -0,0 +1 @@ +qdisc codel 1: root refcnt 2 limit 500p target 4ms ce_threshold 2ms interval 50ms ecn diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-024/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-024/ip.pcap new file mode 100644 index 000000000..9490e151b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-024/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-024/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-024/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-024/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-025/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-025/cmd.json new file mode 100644 index 000000000..45f6c7a15 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-025/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmpie", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmpie:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-025", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: pie" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: pie", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-025/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-025/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-025/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-025/ip.out new file mode 100644 index 000000000..f50ef1981 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-025/ip.out @@ -0,0 +1 @@ +qdisc pie 1: root refcnt 2 limit 1000p target 15ms tupdate 15ms alpha 2 beta 20 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-025/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-025/ip.pcap new file mode 100644 index 000000000..f1b4e0a4a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-025/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-025/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-025/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-025/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-026/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-026/cmd.json new file mode 100644 index 000000000..9394a2083 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-026/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmpie", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmpie:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-026", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: pie" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: pie", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-026/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-026/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-026/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-026/ip.out new file mode 100644 index 000000000..c70c1416c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-026/ip.out @@ -0,0 +1,5 @@ +qdisc pie 1: root refcnt 2 limit 1000p target 15ms tupdate 15ms alpha 2 beta 20 + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + prob 0 delay 0us + pkts_in 0 overlimit 0 dropped 0 maxq 0 ecn_mark 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-026/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-026/ip.pcap new file mode 100644 index 000000000..85f4bd4f7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-026/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-026/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-026/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-026/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-027/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-027/cmd.json new file mode 100644 index 000000000..14ef01281 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-027/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmpie2", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmpie2:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-027", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: pie limit 500 target 10ms tupdate 20ms alpha 2 beta 20 bytemode ecn dq_rate_estimator" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: pie limit 500 target 10ms tupdate 20ms alpha 2 beta 20 bytemode ecn dq_rate_estimator", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-027/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-027/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-027/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-027/ip.out new file mode 100644 index 000000000..949955986 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-027/ip.out @@ -0,0 +1 @@ +qdisc pie 1: root refcnt 2 limit 500p target 10ms tupdate 20ms alpha 2 beta 20 ecn bytemode dq_rate_estimator diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-027/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-027/ip.pcap new file mode 100644 index 000000000..777387bec Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-027/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-027/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-027/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-027/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-028/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-028/cmd.json new file mode 100644 index 000000000..22ce45d0f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-028/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmpie2", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmpie2:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-028", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: pie limit 500 target 10ms tupdate 20ms alpha 2 beta 20 bytemode ecn dq_rate_estimator" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: pie limit 500 target 10ms tupdate 20ms alpha 2 beta 20 bytemode ecn dq_rate_estimator", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-028/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-028/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-028/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-028/ip.out new file mode 100644 index 000000000..89957826c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-028/ip.out @@ -0,0 +1,5 @@ +qdisc pie 1: root refcnt 2 limit 500p target 10ms tupdate 20ms alpha 2 beta 20 ecn bytemode dq_rate_estimator + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + prob 0 delay 0us avg_dq_rate 0 + pkts_in 0 overlimit 0 dropped 0 maxq 0 ecn_mark 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-028/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-028/ip.pcap new file mode 100644 index 000000000..ff1a80088 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-028/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-028/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-028/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-028/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-029/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-029/cmd.json new file mode 100644 index 000000000..4d261b49d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-029/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmfqpie", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmfqpie:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-029", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: fq_pie" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: fq_pie", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-029/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-029/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-029/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-029/ip.out new file mode 100644 index 000000000..5cdcf97c3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-029/ip.out @@ -0,0 +1 @@ +qdisc fq_pie 1: root refcnt 2 limit 10240p flows 1024 target 15ms tupdate 15ms alpha 2 beta 20 quantum 1514b memory_limit 32Mb ecn_prob 10 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-029/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-029/ip.pcap new file mode 100644 index 000000000..d3a3b439c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-029/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-029/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-029/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-029/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-030/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-030/cmd.json new file mode 100644 index 000000000..e3c0fd121 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-030/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmfqpie", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmfqpie:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-030", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: fq_pie" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: fq_pie", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-030/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-030/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-030/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-030/ip.out new file mode 100644 index 000000000..700e64f93 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-030/ip.out @@ -0,0 +1,5 @@ +qdisc fq_pie 1: root refcnt 2 limit 10240p flows 1024 target 15ms tupdate 15ms alpha 2 beta 20 quantum 1514b memory_limit 32Mb ecn_prob 10 + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + pkts_in 0 overlimit 0 overmemory 0 dropped 0 ecn_mark 0 + new_flow_count 0 new_flows_len 0 old_flows_len 0 memory_used 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-030/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-030/ip.pcap new file mode 100644 index 000000000..1432f94dd Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-030/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-030/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-030/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-030/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-031/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-031/cmd.json new file mode 100644 index 000000000..28c3ec117 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-031/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmfqpie2", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmfqpie2:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-031", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: fq_pie limit 2048 flows 256 quantum 1514 memory_limit 16Mb ecn_prob 20 ecn bytemode dq_rate_estimator" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: fq_pie limit 2048 flows 256 quantum 1514 memory_limit 16Mb ecn_prob 20 ecn bytemode dq_rate_estimator", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-031/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-031/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-031/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-031/ip.out new file mode 100644 index 000000000..a6680aa1e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-031/ip.out @@ -0,0 +1 @@ +qdisc fq_pie 1: root refcnt 2 limit 2048p flows 256 target 15ms tupdate 15ms alpha 2 beta 20 quantum 1514b memory_limit 16Mb ecn_prob 20 ecn bytemode dq_rate_estimator diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-031/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-031/ip.pcap new file mode 100644 index 000000000..6fb1bf23d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-031/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-031/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-031/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-031/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-032/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-032/cmd.json new file mode 100644 index 000000000..71849a4dc --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-032/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmhhf", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmhhf:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-032", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: hhf" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hhf", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-032/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-032/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-032/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-032/ip.out new file mode 100644 index 000000000..2be3ad92f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-032/ip.out @@ -0,0 +1 @@ +qdisc hhf 1: root refcnt 2 limit 1000p quantum 1514b hh_limit 2048 reset_timeout 40ms admit_bytes 128Kb evict_timeout 1s non_hh_weight 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-032/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-032/ip.pcap new file mode 100644 index 000000000..f64bf2a7d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-032/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-032/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-032/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-032/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-033/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-033/cmd.json new file mode 100644 index 000000000..23f98fc92 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-033/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmhhf", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmhhf:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-033", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: hhf" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hhf", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-033/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-033/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-033/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-033/ip.out new file mode 100644 index 000000000..5ecb32151 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-033/ip.out @@ -0,0 +1,4 @@ +qdisc hhf 1: root refcnt 2 limit 1000p quantum 1514b hh_limit 2048 reset_timeout 40ms admit_bytes 128Kb evict_timeout 1s non_hh_weight 2 + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + drop_overlimit 0 hh_overlimit 0 tot_hh 0 cur_hh 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-033/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-033/ip.pcap new file mode 100644 index 000000000..9393632ff Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-033/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-033/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-033/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-033/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-034/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-034/cmd.json new file mode 100644 index 000000000..c32259ed3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-034/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmhhf2", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmhhf2:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-034", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: hhf limit 500 quantum 1514 hh_limit 1024 reset_timeout 50ms admit_bytes 65536 evict_timeout 500ms non_hh_weight 4" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hhf limit 500 quantum 1514 hh_limit 1024 reset_timeout 50ms admit_bytes 65536 evict_timeout 500ms non_hh_weight 4", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-034/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-034/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-034/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-034/ip.out new file mode 100644 index 000000000..03532b3e9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-034/ip.out @@ -0,0 +1 @@ +qdisc hhf 1: root refcnt 2 limit 500p quantum 1514b hh_limit 1024 reset_timeout 50ms admit_bytes 64Kb evict_timeout 500ms non_hh_weight 4 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-034/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-034/ip.pcap new file mode 100644 index 000000000..463526959 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-034/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-034/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-034/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-034/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-035/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-035/cmd.json new file mode 100644 index 000000000..de06aa0f3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-035/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmcake:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-035", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-035/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-035/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-035/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-035/ip.out new file mode 100644 index 000000000..e918be2ab --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-035/ip.out @@ -0,0 +1 @@ +qdisc cake 1: root refcnt 2 bandwidth unlimited diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-035/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-035/ip.pcap new file mode 100644 index 000000000..d9c016d0c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-035/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-035/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-035/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-035/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-036/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-036/cmd.json new file mode 100644 index 000000000..1878878f6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-036/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmcake:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-036", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-036/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-036/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-036/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-036/ip.out new file mode 100644 index 000000000..2a37b35f3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-036/ip.out @@ -0,0 +1,32 @@ +qdisc cake 1: root refcnt 2 bandwidth unlimited diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + memory used: 0b of 15140Kb + capacity estimate: 0bit + min/max network layer size: 65535 / 0 + min/max overhead-adjusted size: 65535 / 0 + active queues: 0 + average network hdr offset: 0 + + Bulk Best Effort Voice + thresh 0bit 0bit 0bit + target 5ms 5ms 5ms + interval 100ms 100ms 100ms + pk_delay 0us 0us 0us + av_delay 0us 0us 0us + sp_delay 0us 0us 0us + backlog 0b 0b 0b + pkts 0 0 0 + bytes 0 0 0 + way_inds 0 0 0 + way_miss 0 0 0 + way_cols 0 0 0 + drops 0 0 0 + marks 0 0 0 + ack_drop 0 0 0 + sp_flows 0 0 0 + bk_flows 0 0 0 + un_flows 0 0 0 + max_len 0 0 0 + quantum 1514 1514 1514 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-036/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-036/ip.pcap new file mode 100644 index 000000000..6caef9037 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-036/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-036/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-036/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-036/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-037/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-037/cmd.json new file mode 100644 index 000000000..c48649f31 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-037/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake", + "json": "0", + "words": "-d qdisc show dev d0" + }, + "cmd": "tc -d qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmcake:-d_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-037", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-037/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-037/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-037/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-037/ip.out new file mode 100644 index 000000000..e918be2ab --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-037/ip.out @@ -0,0 +1 @@ +qdisc cake 1: root refcnt 2 bandwidth unlimited diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-037/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-037/ip.pcap new file mode 100644 index 000000000..73c60554b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-037/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-037/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-037/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-037/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-038/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-038/cmd.json new file mode 100644 index 000000000..b00533046 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-038/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake", + "json": "0", + "words": "-s -o qdisc show dev d0" + }, + "cmd": "tc -s -o qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmcake:-s_-o_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-038", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-038/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-038/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-038/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-038/ip.out new file mode 100644 index 000000000..0fb6597a6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-038/ip.out @@ -0,0 +1,9 @@ +qdisc cake 1: root refcnt 2 bandwidth unlimited diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 \ Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) \ backlog 0b 0p requeues 0\ memory used: 0b of 15140Kb + capacity estimate: 0bit + min/max network layer size: 65535 / 0 + min/max overhead-adjusted size: 65535 / 0 + active queues: 0 + average network hdr offset: 0 + + Bulk Best Effort Voice + thresh 0bit 0bit 0bit\ target 5ms 5ms 5ms\ interval 100ms 100ms 100ms\ pk_delay 0us 0us 0us\ av_delay 0us 0us 0us\ sp_delay 0us 0us 0us\ backlog 0b 0b 0b\ pkts 0 0 0\ bytes 0 0 0\ way_inds 0 0 0\ way_miss 0 0 0\ way_cols 0 0 0\ drops 0 0 0\ marks 0 0 0\ ack_drop 0 0 0\ sp_flows 0 0 0\ bk_flows 0 0 0\ un_flows 0 0 0\ max_len 0 0 0\ quantum 1514 1514 1514\\ \ No newline at end of file diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-038/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-038/ip.pcap new file mode 100644 index 000000000..8694193b2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-038/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-038/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-038/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-038/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-039/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-039/cmd.json new file mode 100644 index 000000000..b54aeba37 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-039/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake", + "json": "0", + "words": "class show dev d0" + }, + "cmd": "tc class show dev d0", + "desc": "corner: opt=plain cmd=aqmcake:class_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-039", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-039/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-039/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-039/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-039/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-039/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-039/ip.pcap new file mode 100644 index 000000000..e076911db Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-039/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-039/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-039/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-039/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-040/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-040/cmd.json new file mode 100644 index 000000000..f38db6c57 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-040/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake2", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmcake2:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-040", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake bandwidth 100Mbit diffserv4 dual-srchost nat wash ingress ack-filter rtt 20ms atm overhead 44 mpu 64 memlimit 4Mb fwmark 0xff no-split-gso" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake bandwidth 100Mbit diffserv4 dual-srchost nat wash ingress ack-filter rtt 20ms atm overhead 44 mpu 64 memlimit 4Mb fwmark 0xff no-split-gso", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-040/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-040/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-040/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-040/ip.out new file mode 100644 index 000000000..40d9a1439 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-040/ip.out @@ -0,0 +1 @@ +qdisc cake 1: root refcnt 2 bandwidth 100Mbit diffserv4 dual-srchost nat wash ingress ack-filter no-split-gso rtt 20ms atm overhead 44 mpu 64 memlimit 4Mb fwmark 0xff diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-040/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-040/ip.pcap new file mode 100644 index 000000000..b28616c7f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-040/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-040/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-040/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-040/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-041/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-041/cmd.json new file mode 100644 index 000000000..a29aff936 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-041/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake2", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmcake2:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-041", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake bandwidth 100Mbit diffserv4 dual-srchost nat wash ingress ack-filter rtt 20ms atm overhead 44 mpu 64 memlimit 4Mb fwmark 0xff no-split-gso" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake bandwidth 100Mbit diffserv4 dual-srchost nat wash ingress ack-filter rtt 20ms atm overhead 44 mpu 64 memlimit 4Mb fwmark 0xff no-split-gso", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-041/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-041/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-041/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-041/ip.out new file mode 100644 index 000000000..beac63f45 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-041/ip.out @@ -0,0 +1,32 @@ +qdisc cake 1: root refcnt 2 bandwidth 100Mbit diffserv4 dual-srchost nat wash ingress ack-filter no-split-gso rtt 20ms atm overhead 44 mpu 64 memlimit 4Mb fwmark 0xff + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + memory used: 0b of 4Mb + capacity estimate: 100Mbit + min/max network layer size: 65535 / 0 + min/max overhead-adjusted size: 65535 / 0 + active queues: 0 + average network hdr offset: 0 + + Bulk Best Effort Video Voice + thresh 6250Kbit 100Mbit 50Mbit 25Mbit + target 2.91ms 1ms 1ms 1ms + interval 21.9ms 20ms 20ms 20ms + pk_delay 0us 0us 0us 0us + av_delay 0us 0us 0us 0us + sp_delay 0us 0us 0us 0us + backlog 0b 0b 0b 0b + pkts 0 0 0 0 + bytes 0 0 0 0 + way_inds 0 0 0 0 + way_miss 0 0 0 0 + way_cols 0 0 0 0 + drops 0 0 0 0 + marks 0 0 0 0 + ack_drop 0 0 0 0 + sp_flows 0 0 0 0 + bk_flows 0 0 0 0 + un_flows 0 0 0 0 + max_len 0 0 0 0 + quantum 300 1514 1514 762 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-041/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-041/ip.pcap new file mode 100644 index 000000000..fd7f42a46 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-041/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-041/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-041/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-041/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-042/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-042/cmd.json new file mode 100644 index 000000000..009954a56 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-042/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake3", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmcake3:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-042", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake autorate-ingress diffserv8 dual-dsthost ack-filter-aggressive" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake autorate-ingress diffserv8 dual-dsthost ack-filter-aggressive", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-042/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-042/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-042/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-042/ip.out new file mode 100644 index 000000000..66429add8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-042/ip.out @@ -0,0 +1 @@ +qdisc cake 1: root refcnt 2 bandwidth unlimited autorate-ingress diffserv8 dual-dsthost nonat nowash ack-filter-aggressive split-gso rtt 100ms raw overhead 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-042/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-042/ip.pcap new file mode 100644 index 000000000..1cf9fa4c6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-042/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-042/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-042/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-042/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-043/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-043/cmd.json new file mode 100644 index 000000000..b3998718d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-043/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake3", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmcake3:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-043", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake autorate-ingress diffserv8 dual-dsthost ack-filter-aggressive" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake autorate-ingress diffserv8 dual-dsthost ack-filter-aggressive", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-043/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-043/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-043/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-043/ip.out new file mode 100644 index 000000000..678fb87bb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-043/ip.out @@ -0,0 +1,32 @@ +qdisc cake 1: root refcnt 2 bandwidth unlimited autorate-ingress diffserv8 dual-dsthost nonat nowash ack-filter-aggressive split-gso rtt 100ms raw overhead 0 + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + memory used: 0b of 15140Kb + capacity estimate: 0bit + min/max network layer size: 65535 / 0 + min/max overhead-adjusted size: 65535 / 0 + active queues: 0 + average network hdr offset: 0 + + Tin 0 Tin 1 Tin 2 Tin 3 Tin 4 Tin 5 Tin 6 Tin 7 + thresh 0bit 0bit 0bit 0bit 0bit 0bit 0bit 0bit + target 5ms 5ms 5ms 5ms 5ms 5ms 5ms 5ms + interval 100ms 100ms 100ms 100ms 100ms 100ms 100ms 100ms + pk_delay 0us 0us 0us 0us 0us 0us 0us 0us + av_delay 0us 0us 0us 0us 0us 0us 0us 0us + sp_delay 0us 0us 0us 0us 0us 0us 0us 0us + backlog 0b 0b 0b 0b 0b 0b 0b 0b + pkts 0 0 0 0 0 0 0 0 + bytes 0 0 0 0 0 0 0 0 + way_inds 0 0 0 0 0 0 0 0 + way_miss 0 0 0 0 0 0 0 0 + way_cols 0 0 0 0 0 0 0 0 + drops 0 0 0 0 0 0 0 0 + marks 0 0 0 0 0 0 0 0 + ack_drop 0 0 0 0 0 0 0 0 + sp_flows 0 0 0 0 0 0 0 0 + bk_flows 0 0 0 0 0 0 0 0 + un_flows 0 0 0 0 0 0 0 0 + max_len 0 0 0 0 0 0 0 0 + quantum 1514 1514 1514 1514 1514 1514 1514 1514 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-043/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-043/ip.pcap new file mode 100644 index 000000000..4e2702f68 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-043/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-043/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-043/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-043/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-044/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-044/cmd.json new file mode 100644 index 000000000..45f7ca5b4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-044/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake4", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmcake4:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-044", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake besteffort flowblind" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake besteffort flowblind", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-044/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-044/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-044/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-044/ip.out new file mode 100644 index 000000000..d477fd80c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-044/ip.out @@ -0,0 +1 @@ +qdisc cake 1: root refcnt 2 bandwidth unlimited besteffort flowblind nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-044/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-044/ip.pcap new file mode 100644 index 000000000..f16787208 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-044/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-044/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-044/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-044/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-045/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-045/cmd.json new file mode 100644 index 000000000..59f21a774 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-045/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake4", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmcake4:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-045", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake besteffort flowblind" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake besteffort flowblind", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-045/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-045/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-045/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-045/ip.out new file mode 100644 index 000000000..ae28b96d0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-045/ip.out @@ -0,0 +1,32 @@ +qdisc cake 1: root refcnt 2 bandwidth unlimited besteffort flowblind nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + memory used: 0b of 15140Kb + capacity estimate: 0bit + min/max network layer size: 65535 / 0 + min/max overhead-adjusted size: 65535 / 0 + active queues: 0 + average network hdr offset: 0 + + Tin 0 + thresh 0bit + target 5ms + interval 100ms + pk_delay 0us + av_delay 0us + sp_delay 0us + backlog 0b + pkts 0 + bytes 0 + way_inds 0 + way_miss 0 + way_cols 0 + drops 0 + marks 0 + ack_drop 0 + sp_flows 0 + bk_flows 0 + un_flows 0 + max_len 0 + quantum 1514 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-045/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-045/ip.pcap new file mode 100644 index 000000000..20ff35d16 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-045/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-045/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-045/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-045/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-046/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-046/cmd.json new file mode 100644 index 000000000..bd31a8196 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-046/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake5", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmcake5:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-046", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake bandwidth 10Mbit precedence triple-isolate docsis" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake bandwidth 10Mbit precedence triple-isolate docsis", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-046/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-046/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-046/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-046/ip.out new file mode 100644 index 000000000..fffe191d9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-046/ip.out @@ -0,0 +1 @@ +qdisc cake 1: root refcnt 2 bandwidth 10Mbit precedence triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms noatm overhead 18 mpu 64 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-046/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-046/ip.pcap new file mode 100644 index 000000000..abf2b5d27 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-046/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-046/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-046/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-046/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-047/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-047/cmd.json new file mode 100644 index 000000000..fb40d81cb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-047/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake5", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmcake5:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-047", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake bandwidth 10Mbit precedence triple-isolate docsis" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake bandwidth 10Mbit precedence triple-isolate docsis", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-047/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-047/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-047/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-047/ip.out new file mode 100644 index 000000000..4eb529193 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-047/ip.out @@ -0,0 +1,32 @@ +qdisc cake 1: root refcnt 2 bandwidth 10Mbit precedence triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms noatm overhead 18 mpu 64 + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + memory used: 0b of 4Mb + capacity estimate: 10Mbit + min/max network layer size: 65535 / 0 + min/max overhead-adjusted size: 65535 / 0 + active queues: 0 + average network hdr offset: 0 + + Tin 0 Tin 1 Tin 2 Tin 3 Tin 4 Tin 5 Tin 6 Tin 7 + thresh 10Mbit 8750Kbit 7656Kbit 6699Kbit 5861Kbit 5129Kbit 4487Kbit 3926Kbit + target 5ms 5ms 5ms 5ms 5ms 5ms 5ms 5ms + interval 100ms 100ms 100ms 100ms 100ms 100ms 100ms 100ms + pk_delay 0us 0us 0us 0us 0us 0us 0us 0us + av_delay 0us 0us 0us 0us 0us 0us 0us 0us + sp_delay 0us 0us 0us 0us 0us 0us 0us 0us + backlog 0b 0b 0b 0b 0b 0b 0b 0b + pkts 0 0 0 0 0 0 0 0 + bytes 0 0 0 0 0 0 0 0 + way_inds 0 0 0 0 0 0 0 0 + way_miss 0 0 0 0 0 0 0 0 + way_cols 0 0 0 0 0 0 0 0 + drops 0 0 0 0 0 0 0 0 + marks 0 0 0 0 0 0 0 0 + ack_drop 0 0 0 0 0 0 0 0 + sp_flows 0 0 0 0 0 0 0 0 + bk_flows 0 0 0 0 0 0 0 0 + un_flows 0 0 0 0 0 0 0 0 + max_len 0 0 0 0 0 0 0 0 + quantum 305 300 300 300 300 300 300 300 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-047/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-047/ip.pcap new file mode 100644 index 000000000..6173df972 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-047/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-047/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-047/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-047/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-048/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-048/cmd.json new file mode 100644 index 000000000..3498ee86f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-048/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcakemq", + "json": "0", + "words": "qdisc show dev d1" + }, + "cmd": "tc qdisc show dev d1", + "desc": "positive: opt=plain cmd=aqmcakemq:qdisc_show_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": "tcaqm/ec-048", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-048/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-048/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-048/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-048/ip.out new file mode 100644 index 000000000..71e5078a1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-048/ip.out @@ -0,0 +1,5 @@ +qdisc cake_mq 1: root bandwidth 100Mbit diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 +qdisc cake 0: parent 1:4 bandwidth 100Mbit diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 +qdisc cake 0: parent 1:3 bandwidth 100Mbit diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 +qdisc cake 0: parent 1:2 bandwidth 100Mbit diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 +qdisc cake 0: parent 1:1 bandwidth 100Mbit diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-048/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-048/ip.pcap new file mode 100644 index 000000000..878234dc4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-048/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-048/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-048/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-048/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-049/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-049/cmd.json new file mode 100644 index 000000000..e3e0f4241 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-049/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcakemq", + "json": "0", + "words": "qdisc show dev d1 root" + }, + "cmd": "tc qdisc show dev d1 root", + "desc": "corner: opt=plain cmd=aqmcakemq:qdisc_show_dev_d1_root", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-049", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-049/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-049/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-049/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-049/ip.out new file mode 100644 index 000000000..09fa99022 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-049/ip.out @@ -0,0 +1 @@ +qdisc cake_mq 1: root bandwidth 100Mbit diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-049/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-049/ip.pcap new file mode 100644 index 000000000..53ee707d5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-049/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-049/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-049/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-049/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-050/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-050/cmd.json new file mode 100644 index 000000000..eaec41d88 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-050/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcakemq", + "json": "0", + "words": "-s qdisc show dev d1" + }, + "cmd": "tc -s qdisc show dev d1", + "desc": "corner: opt=plain cmd=aqmcakemq:-s_qdisc_show_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": "tcaqm/ec-050", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-050/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-050/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-050/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-050/ip.out new file mode 100644 index 000000000..f46abe1ff --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-050/ip.out @@ -0,0 +1,131 @@ +qdisc cake_mq 1: root bandwidth 100Mbit diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 +qdisc cake 0: parent 1:4 bandwidth 100Mbit diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + memory used: 0b of 5000000b + capacity estimate: 0bit + min/max network layer size: 65535 / 0 + min/max overhead-adjusted size: 65535 / 0 + active queues: 0 + average network hdr offset: 0 + + Bulk Best Effort Voice + thresh 6250Kbit 100Mbit 25Mbit + target 5ms 5ms 5ms + interval 100ms 100ms 100ms + pk_delay 0us 0us 0us + av_delay 0us 0us 0us + sp_delay 0us 0us 0us + backlog 0b 0b 0b + pkts 0 0 0 + bytes 0 0 0 + way_inds 0 0 0 + way_miss 0 0 0 + way_cols 0 0 0 + drops 0 0 0 + marks 0 0 0 + ack_drop 0 0 0 + sp_flows 0 0 0 + bk_flows 0 0 0 + un_flows 0 0 0 + max_len 0 0 0 + quantum 300 1514 762 + +qdisc cake 0: parent 1:3 bandwidth 100Mbit diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + memory used: 0b of 5000000b + capacity estimate: 0bit + min/max network layer size: 65535 / 0 + min/max overhead-adjusted size: 65535 / 0 + active queues: 0 + average network hdr offset: 0 + + Bulk Best Effort Voice + thresh 6250Kbit 100Mbit 25Mbit + target 5ms 5ms 5ms + interval 100ms 100ms 100ms + pk_delay 0us 0us 0us + av_delay 0us 0us 0us + sp_delay 0us 0us 0us + backlog 0b 0b 0b + pkts 0 0 0 + bytes 0 0 0 + way_inds 0 0 0 + way_miss 0 0 0 + way_cols 0 0 0 + drops 0 0 0 + marks 0 0 0 + ack_drop 0 0 0 + sp_flows 0 0 0 + bk_flows 0 0 0 + un_flows 0 0 0 + max_len 0 0 0 + quantum 300 1514 762 + +qdisc cake 0: parent 1:2 bandwidth 100Mbit diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + memory used: 0b of 5000000b + capacity estimate: 0bit + min/max network layer size: 65535 / 0 + min/max overhead-adjusted size: 65535 / 0 + active queues: 0 + average network hdr offset: 0 + + Bulk Best Effort Voice + thresh 6250Kbit 100Mbit 25Mbit + target 5ms 5ms 5ms + interval 100ms 100ms 100ms + pk_delay 0us 0us 0us + av_delay 0us 0us 0us + sp_delay 0us 0us 0us + backlog 0b 0b 0b + pkts 0 0 0 + bytes 0 0 0 + way_inds 0 0 0 + way_miss 0 0 0 + way_cols 0 0 0 + drops 0 0 0 + marks 0 0 0 + ack_drop 0 0 0 + sp_flows 0 0 0 + bk_flows 0 0 0 + un_flows 0 0 0 + max_len 0 0 0 + quantum 300 1514 762 + +qdisc cake 0: parent 1:1 bandwidth 100Mbit diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + memory used: 0b of 5000000b + capacity estimate: 0bit + min/max network layer size: 65535 / 0 + min/max overhead-adjusted size: 65535 / 0 + active queues: 0 + average network hdr offset: 0 + + Bulk Best Effort Voice + thresh 6250Kbit 100Mbit 25Mbit + target 5ms 5ms 5ms + interval 100ms 100ms 100ms + pk_delay 0us 0us 0us + av_delay 0us 0us 0us + sp_delay 0us 0us 0us + backlog 0b 0b 0b + pkts 0 0 0 + bytes 0 0 0 + way_inds 0 0 0 + way_miss 0 0 0 + way_cols 0 0 0 + drops 0 0 0 + marks 0 0 0 + ack_drop 0 0 0 + sp_flows 0 0 0 + bk_flows 0 0 0 + un_flows 0 0 0 + max_len 0 0 0 + quantum 300 1514 762 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-050/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-050/ip.pcap new file mode 100644 index 000000000..540119925 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-050/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-050/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-050/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-050/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-051/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-051/cmd.json new file mode 100644 index 000000000..c7a0f1a6e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-051/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcakemq", + "json": "0", + "words": "class show dev d1" + }, + "cmd": "tc class show dev d1", + "desc": "corner: opt=plain cmd=aqmcakemq:class_show_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": "tcaqm/ec-051", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-051/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-051/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-051/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-051/ip.out new file mode 100644 index 000000000..27eac03f9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-051/ip.out @@ -0,0 +1,4 @@ +class cake_mq 1:1 root +class cake_mq 1:2 root +class cake_mq 1:3 root +class cake_mq 1:4 root diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-051/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-051/ip.pcap new file mode 100644 index 000000000..19d67525e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-051/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-051/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-051/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-051/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-052/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-052/cmd.json new file mode 100644 index 000000000..1682dfdcb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-052/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmdpi", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmdpi:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-052", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: dualpi2" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: dualpi2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-052/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-052/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-052/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-052/ip.out new file mode 100644 index 000000000..2b0fcd20e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-052/ip.out @@ -0,0 +1 @@ +qdisc dualpi2 1: root refcnt 2 limit 10000p memlimit 30280000B target 15ms tupdate 16ms alpha 0.156250 beta 3.195312 step_thresh 1ms min_qlen_step 0p coupling_factor 2 drop_on_overload drop_dequeue classic_protection 10% l4s_ect split_gso diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-052/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-052/ip.pcap new file mode 100644 index 000000000..d4500e579 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-052/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-052/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-052/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-052/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-053/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-053/cmd.json new file mode 100644 index 000000000..7ffb2fae5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-053/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmdpi", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmdpi:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-053", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: dualpi2" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: dualpi2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-053/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-053/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-053/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-053/ip.out new file mode 100644 index 000000000..6e1c9ba10 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-053/ip.out @@ -0,0 +1,9 @@ +qdisc dualpi2 1: root refcnt 2 limit 10000p memlimit 30280000B target 15ms tupdate 16ms alpha 0.156250 beta 3.195312 step_thresh 1ms min_qlen_step 0p coupling_factor 2 drop_on_overload drop_dequeue classic_protection 10% l4s_ect split_gso + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 +prob 0.000000 delay_c 0us delay_l 0us +pkts_in_c 0 pkts_in_l 0 maxq 0 +ecn_mark 0 step_mark 0 +credit -121120 (L-queue) +memory_used 0 (max 0) of memory limit 30280000 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-053/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-053/ip.pcap new file mode 100644 index 000000000..acff93404 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-053/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-053/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-053/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-053/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-054/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-054/cmd.json new file mode 100644 index 000000000..bc559ba23 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-054/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmdpi", + "json": "0", + "words": "-o qdisc show dev d0" + }, + "cmd": "tc -o qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmdpi:-o_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-054", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: dualpi2" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: dualpi2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-054/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-054/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-054/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-054/ip.out new file mode 100644 index 000000000..821aca12d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-054/ip.out @@ -0,0 +1 @@ +qdisc dualpi2 1: root refcnt 2 limit 10000p memlimit 30280000B target 15ms tupdate 16ms alpha 0.156250 beta 3.195312 step_thresh 1ms min_qlen_step 0p coupling_factor 2 drop_on_overload drop_dequeue classic_protection 10% l4s_ect split_gso \ \ No newline at end of file diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-054/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-054/ip.pcap new file mode 100644 index 000000000..bf52bbd04 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-054/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-054/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-054/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-054/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-055/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-055/cmd.json new file mode 100644 index 000000000..a2e580bdc --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-055/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmdpi2", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmdpi2:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-055", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: dualpi2 limit 5000 memlimit 4000000 step_thresh 10 drop_on_overload drop_enqueue any_ect no_split_gso classic_protection 20" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: dualpi2 limit 5000 memlimit 4000000 step_thresh 10 drop_on_overload drop_enqueue any_ect no_split_gso classic_protection 20", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-055/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-055/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-055/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-055/ip.out new file mode 100644 index 000000000..9728a4682 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-055/ip.out @@ -0,0 +1 @@ +qdisc dualpi2 1: root refcnt 2 limit 5000p memlimit 4000000B target 15ms tupdate 16ms alpha 0.156250 beta 3.195312 step_thresh 10us min_qlen_step 0p coupling_factor 2 drop_on_overload drop_enqueue classic_protection 20% any_ect no_split_gso diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-055/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-055/ip.pcap new file mode 100644 index 000000000..dc508d957 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-055/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-055/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-055/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-055/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-056/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-056/cmd.json new file mode 100644 index 000000000..d6eca46f7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-056/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmdpi2", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmdpi2:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-056", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: dualpi2 limit 5000 memlimit 4000000 step_thresh 10 drop_on_overload drop_enqueue any_ect no_split_gso classic_protection 20" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: dualpi2 limit 5000 memlimit 4000000 step_thresh 10 drop_on_overload drop_enqueue any_ect no_split_gso classic_protection 20", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-056/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-056/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-056/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-056/ip.out new file mode 100644 index 000000000..9fd244520 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-056/ip.out @@ -0,0 +1,9 @@ +qdisc dualpi2 1: root refcnt 2 limit 5000p memlimit 4000000B target 15ms tupdate 16ms alpha 0.156250 beta 3.195312 step_thresh 10us min_qlen_step 0p coupling_factor 2 drop_on_overload drop_enqueue classic_protection 20% any_ect no_split_gso + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 +prob 0.000000 delay_c 0us delay_l 0us +pkts_in_c 0 pkts_in_l 0 maxq 0 +ecn_mark 0 step_mark 0 +credit -90840 (L-queue) +memory_used 0 (max 0) of memory limit 4000000 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-056/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-056/ip.pcap new file mode 100644 index 000000000..d3c900370 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-056/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-056/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-056/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-056/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-057/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-057/cmd.json new file mode 100644 index 000000000..9e859860a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-057/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmdpi3", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmdpi3:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-057", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: dualpi2 step_thresh 1ms max_rtt 50ms typical_rtt 10ms" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: dualpi2 step_thresh 1ms max_rtt 50ms typical_rtt 10ms", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-057/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-057/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-057/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-057/ip.out new file mode 100644 index 000000000..6f91af615 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-057/ip.out @@ -0,0 +1 @@ +qdisc dualpi2 1: root refcnt 2 limit 10000p memlimit 30280000B target 10ms tupdate 10ms alpha 0.394531 beta 5.996094 step_thresh 1ms min_qlen_step 0p coupling_factor 2 drop_on_overload drop_dequeue classic_protection 10% l4s_ect split_gso diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-057/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-057/ip.pcap new file mode 100644 index 000000000..c85acaf44 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-057/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-057/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-057/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-057/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-058/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-058/cmd.json new file mode 100644 index 000000000..fb442c2de --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-058/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmplug", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmplug:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-058", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: plug limit 1000" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: plug limit 1000", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-058/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-058/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-058/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-058/ip.out new file mode 100644 index 000000000..e0efcf7aa --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-058/ip.out @@ -0,0 +1 @@ +qdisc plug 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-058/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-058/ip.pcap new file mode 100644 index 000000000..495deadf9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-058/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-058/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-058/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-058/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-059/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-059/cmd.json new file mode 100644 index 000000000..0e89318d4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-059/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmplug", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmplug:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-059", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: plug limit 1000" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: plug limit 1000", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-059/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-059/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-059/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-059/ip.out new file mode 100644 index 000000000..3a0a67443 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-059/ip.out @@ -0,0 +1,3 @@ +qdisc plug 1: root refcnt 2 + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-059/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-059/ip.pcap new file mode 100644 index 000000000..7ab6a4e0f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-059/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-059/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-059/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-059/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-060/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-060/cmd.json new file mode 100644 index 000000000..14160afe1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-060/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmskbprio", + "json": "0", + "words": "qdisc show dev d0" + }, + "cmd": "tc qdisc show dev d0", + "desc": "positive: opt=plain cmd=aqmskbprio:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-060", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: skbprio limit 100" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: skbprio limit 100", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-060/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-060/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-060/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-060/ip.out new file mode 100644 index 000000000..64d7e0c92 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-060/ip.out @@ -0,0 +1 @@ +qdisc skbprio 1: root refcnt 2 limit 100 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-060/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-060/ip.pcap new file mode 100644 index 000000000..484dfe0c6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-060/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-060/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-060/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-060/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-061/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-061/cmd.json new file mode 100644 index 000000000..b9ce99c1f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-061/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmskbprio", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmskbprio:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-061", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: skbprio limit 100" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: skbprio limit 100", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-061/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-061/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-061/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-061/ip.out new file mode 100644 index 000000000..1791e69ff --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-061/ip.out @@ -0,0 +1,3 @@ +qdisc skbprio 1: root refcnt 2 limit 100 + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-061/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-061/ip.pcap new file mode 100644 index 000000000..bd5dbc19e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-061/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-061/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-061/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-061/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-062/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-062/cmd.json new file mode 100644 index 000000000..ac029b1bb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-062/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmskbprio", + "json": "0", + "words": "class show dev d0" + }, + "cmd": "tc class show dev d0", + "desc": "corner: opt=plain cmd=aqmskbprio:class_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-062", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: skbprio limit 100" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: skbprio limit 100", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-062/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-062/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-062/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-062/ip.out new file mode 100644 index 000000000..a14459883 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-062/ip.out @@ -0,0 +1,64 @@ +class skbprio 1:1 parent 1: +class skbprio 1:2 parent 1: +class skbprio 1:3 parent 1: +class skbprio 1:4 parent 1: +class skbprio 1:5 parent 1: +class skbprio 1:6 parent 1: +class skbprio 1:7 parent 1: +class skbprio 1:8 parent 1: +class skbprio 1:9 parent 1: +class skbprio 1:a parent 1: +class skbprio 1:b parent 1: +class skbprio 1:c parent 1: +class skbprio 1:d parent 1: +class skbprio 1:e parent 1: +class skbprio 1:f parent 1: +class skbprio 1:10 parent 1: +class skbprio 1:11 parent 1: +class skbprio 1:12 parent 1: +class skbprio 1:13 parent 1: +class skbprio 1:14 parent 1: +class skbprio 1:15 parent 1: +class skbprio 1:16 parent 1: +class skbprio 1:17 parent 1: +class skbprio 1:18 parent 1: +class skbprio 1:19 parent 1: +class skbprio 1:1a parent 1: +class skbprio 1:1b parent 1: +class skbprio 1:1c parent 1: +class skbprio 1:1d parent 1: +class skbprio 1:1e parent 1: +class skbprio 1:1f parent 1: +class skbprio 1:20 parent 1: +class skbprio 1:21 parent 1: +class skbprio 1:22 parent 1: +class skbprio 1:23 parent 1: +class skbprio 1:24 parent 1: +class skbprio 1:25 parent 1: +class skbprio 1:26 parent 1: +class skbprio 1:27 parent 1: +class skbprio 1:28 parent 1: +class skbprio 1:29 parent 1: +class skbprio 1:2a parent 1: +class skbprio 1:2b parent 1: +class skbprio 1:2c parent 1: +class skbprio 1:2d parent 1: +class skbprio 1:2e parent 1: +class skbprio 1:2f parent 1: +class skbprio 1:30 parent 1: +class skbprio 1:31 parent 1: +class skbprio 1:32 parent 1: +class skbprio 1:33 parent 1: +class skbprio 1:34 parent 1: +class skbprio 1:35 parent 1: +class skbprio 1:36 parent 1: +class skbprio 1:37 parent 1: +class skbprio 1:38 parent 1: +class skbprio 1:39 parent 1: +class skbprio 1:3a parent 1: +class skbprio 1:3b parent 1: +class skbprio 1:3c parent 1: +class skbprio 1:3d parent 1: +class skbprio 1:3e parent 1: +class skbprio 1:3f parent 1: +class skbprio 1:40 parent 1: diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-062/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-062/ip.pcap new file mode 100644 index 000000000..b12a3a6b2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-062/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-062/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-062/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-062/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-063/b.txt b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-063/b.txt new file mode 100644 index 000000000..cd519630e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-063/b.txt @@ -0,0 +1,3 @@ +qdisc show dev d0 +class show dev d0 +qdisc show dev d0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-063/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-063/cmd.json new file mode 100644 index 000000000..5e78063bc --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-063/cmd.json @@ -0,0 +1,64 @@ +{ + "axes": { + "batch": "qdisc-then-class", + "fix": "aqmcake", + "json": "0", + "words": "-s -batch b.txt" + }, + "cmd": "tc -s -batch b.txt", + "desc": "positive: opt=plain cmd=aqmcake:batch:qdisc-then-class", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-063", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake", + "printf '%s\\n' 'qdisc show dev d0' 'class show dev d0' 'qdisc show dev d0' > 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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake", + "rc": 0 + }, + { + "cmd": "printf '%s\\n' 'qdisc show dev d0' 'class show dev d0' 'qdisc show dev d0' > b.txt", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-063/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-063/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-063/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-063/ip.out new file mode 100644 index 000000000..5ba4551d1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-063/ip.out @@ -0,0 +1,64 @@ +qdisc cake 1: root refcnt 2 bandwidth unlimited diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + memory used: 0b of 15140Kb + capacity estimate: 0bit + min/max network layer size: 65535 / 0 + min/max overhead-adjusted size: 65535 / 0 + active queues: 0 + average network hdr offset: 0 + + Bulk Best Effort Voice + thresh 0bit 0bit 0bit + target 5ms 5ms 5ms + interval 100ms 100ms 100ms + pk_delay 0us 0us 0us + av_delay 0us 0us 0us + sp_delay 0us 0us 0us + backlog 0b 0b 0b + pkts 0 0 0 + bytes 0 0 0 + way_inds 0 0 0 + way_miss 0 0 0 + way_cols 0 0 0 + drops 0 0 0 + marks 0 0 0 + ack_drop 0 0 0 + sp_flows 0 0 0 + bk_flows 0 0 0 + un_flows 0 0 0 + max_len 0 0 0 + quantum 1514 1514 1514 + +qdisc cake 1: root refcnt 2 bandwidth unlimited diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + memory used: 0b of 15140Kb + capacity estimate: 0bit + min/max network layer size: 65535 / 0 + min/max overhead-adjusted size: 65535 / 0 + active queues: 0 + average network hdr offset: 0 + + Bulk Best Effort Voice + thresh 0bit 0bit 0bit + target 5ms 5ms 5ms + interval 100ms 100ms 100ms + pk_delay 0us 0us 0us + av_delay 0us 0us 0us + sp_delay 0us 0us 0us + backlog 0b 0b 0b + pkts 0 0 0 + bytes 0 0 0 + way_inds 0 0 0 + way_miss 0 0 0 + way_cols 0 0 0 + drops 0 0 0 + marks 0 0 0 + ack_drop 0 0 0 + sp_flows 0 0 0 + bk_flows 0 0 0 + un_flows 0 0 0 + max_len 0 0 0 + quantum 1514 1514 1514 + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-063/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-063/ip.pcap new file mode 100644 index 000000000..429048f86 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-063/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-063/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-063/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-063/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-064/b.txt b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-064/b.txt new file mode 100644 index 000000000..8058c1648 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-064/b.txt @@ -0,0 +1,2 @@ +qdisc show dev d0 +qdisc show dev d0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-064/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-064/cmd.json new file mode 100644 index 000000000..8946f2c57 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-064/cmd.json @@ -0,0 +1,64 @@ +{ + "axes": { + "batch": "red-twice", + "fix": "aqmred2", + "json": "0", + "words": "-d -batch b.txt" + }, + "cmd": "tc -d -batch b.txt", + "desc": "corner: opt=plain cmd=aqmred2:batch:red-twice", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/ec-064", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10", + "printf '%s\\n' 'qdisc show dev d0' 'qdisc show dev d0' > 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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10", + "rc": 0 + }, + { + "cmd": "printf '%s\\n' 'qdisc show dev d0' 'qdisc show dev d0' > b.txt", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-064/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-064/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-064/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-064/ip.out new file mode 100644 index 000000000..341cf966a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-064/ip.out @@ -0,0 +1,2 @@ +qdisc red 1: root refcnt 2 limit 400000b min 30000b max 90000b ecn harddrop adaptive ewma 5 probability 0.02 Scell_log 15qevent early_drop block 10 +qdisc red 1: root refcnt 2 limit 400000b min 30000b max 90000b ecn harddrop adaptive ewma 5 probability 0.02 Scell_log 15qevent early_drop block 10 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-064/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-064/ip.pcap new file mode 100644 index 000000000..470e3b4b4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-064/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-064/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-064/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ec-064/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-001/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-001/cmd.json new file mode 100644 index 000000000..83c6c2a24 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-001/cmd.json @@ -0,0 +1,59 @@ +{ + "axes": { + "fix": "aqmplug", + "json": "0", + "words": "qdisc add dev d0 parent 1: handle 2: cake_mq" + }, + "cmd": "tc qdisc add dev d0 parent 1: handle 2: cake_mq", + "desc": "negative: opt=plain cmd=ng:aqmplug:qdisc_add_dev_d0_parent_1:_handle_2:_cake_mq: cake_mq under a classless parent: \"Parent qdisc is not classful\", a write gotc refuses", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "ENOTSUP", + "rc": 2, + "refused_by": "kernel" + }, + "id": "tcaqm/ng-001", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: plug limit 1000" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: plug limit 1000", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-001/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-001/ip.err new file mode 100644 index 000000000..1813600db --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-001/ip.err @@ -0,0 +1 @@ +Error: Parent qdisc is not classful. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-001/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-001/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-001/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-001/ip.pcap new file mode 100644 index 000000000..858119edd Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-001/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-001/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-001/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-001/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-002/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-002/cmd.json new file mode 100644 index 000000000..754e2684b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-002/cmd.json @@ -0,0 +1,59 @@ +{ + "axes": { + "fix": "aqmcakemq", + "json": "0", + "words": "qdisc replace dev d1 root handle 1: cake_mq autorate-ingress" + }, + "cmd": "tc qdisc replace dev d1 root handle 1: cake_mq autorate-ingress", + "desc": "negative: opt=plain cmd=ng:aqmcakemq:qdisc_replace_dev_d1_root_handle_1:_cake_mq_autorate-ingress: cake_mq rejects autorate (K39)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "ENOTSUP", + "rc": 2, + "refused_by": "kernel" + }, + "id": "tcaqm/ng-002", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-002/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-002/ip.err new file mode 100644 index 000000000..8922a507b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-002/ip.err @@ -0,0 +1 @@ +Error: Can't use autorate-ingress with cake_mq. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-002/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-002/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-002/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-002/ip.pcap new file mode 100644 index 000000000..621d5ed10 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-002/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-002/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-002/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-002/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-003/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-003/cmd.json new file mode 100644 index 000000000..c20c16f75 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-003/cmd.json @@ -0,0 +1,59 @@ +{ + "axes": { + "fix": "aqmplug", + "json": "0", + "words": "qdisc change dev d0 root handle 1: gred vq 0 limit 60KB min 15KB max 45KB avpkt 1000" + }, + "cmd": "tc qdisc change dev d0 root handle 1: gred vq 0 limit 60KB min 15KB max 45KB avpkt 1000", + "desc": "negative: opt=plain cmd=ng:aqmplug:qdisc_change_dev_d0_root_handle_1:_gred_vq_0_limit_60KB_min_15KB_max_45KB_avpkt_1000: gred change on a qdisc that is not gred: the kernel rejects the kind", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": 2, + "refused_by": "kernel" + }, + "id": "tcaqm/ng-003", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: plug limit 1000" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: plug limit 1000", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-003/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-003/ip.err new file mode 100644 index 000000000..b0f8a4d1b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-003/ip.err @@ -0,0 +1,3 @@ +GRED: set burst to 25 +GRED: set bandwidth to 10Mbit +Error: Invalid qdisc name: must match existing qdisc. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-003/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-003/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-003/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-003/ip.pcap new file mode 100644 index 000000000..e6ae5d645 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-003/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-003/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-003/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-003/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-004/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-004/cmd.json new file mode 100644 index 000000000..a2a29140d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-004/cmd.json @@ -0,0 +1,59 @@ +{ + "axes": { + "fix": "aqmred", + "json": "0", + "words": "qdisc show dev nosuch" + }, + "cmd": "tc qdisc show dev nosuch", + "desc": "negative: opt=plain cmd=ng:aqmred:qdisc_show_dev_nosuch: no such device: Cannot find device, rc 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": 1, + "refused_by": "kernel" + }, + "id": "tcaqm/ng-004", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-004/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-004/ip.err new file mode 100644 index 000000000..11be93da0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-004/ip.err @@ -0,0 +1 @@ +Cannot find device "nosuch" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-004/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-004/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-004/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-004/ip.pcap new file mode 100644 index 000000000..aaaff2993 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-004/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-004/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-004/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/ng-004/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-001/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-001/cmd.json new file mode 100644 index 000000000..8188ec95f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-001/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmred", + "json": "0", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -s qdisc show dev d0", + "desc": "corner: opt=plain cmd=aqmred:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-001", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-001/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-001/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-001/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-001/ip.out new file mode 100644 index 000000000..f9b2694d8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-001/ip.out @@ -0,0 +1,4 @@ +qdisc red 1: root refcnt 2 limit 400000b min 30000b max 90000b + Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) + backlog 0b 0p requeues 0 + marked 0 early 0 pdrop 0 other 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-001/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-001/ip.pcap new file mode 100644 index 000000000..3b0e649d9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-001/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-001/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-001/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-001/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-002/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-002/cmd.json new file mode 100644 index 000000000..ab34f98e0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-002/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmred", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmred:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-002", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-002/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-002/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-002/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-002/ip.out new file mode 100644 index 000000000..1f1522092 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-002/ip.out @@ -0,0 +1 @@ +[{"kind":"red","handle":"1:","root":true,"refcnt":2,"options":{"limit":400000,"min":30000,"max":90000,"ecn":false,"harddrop":false,"adaptive":false,"nodrop":false}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-002/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-002/ip.pcap new file mode 100644 index 000000000..a69964f02 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-002/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-002/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-002/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-002/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-003/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-003/cmd.json new file mode 100644 index 000000000..74ead3c75 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-003/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmred", + "json": "1", + "words": "-d qdisc show dev d0" + }, + "cmd": "tc -j -d qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmred:-d_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-003", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-003/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-003/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-003/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-003/ip.out new file mode 100644 index 000000000..8f82275b6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-003/ip.out @@ -0,0 +1 @@ +[{"kind":"red","handle":"1:","root":true,"refcnt":2,"options":{"limit":400000,"min":30000,"max":90000,"ecn":false,"harddrop":false,"adaptive":false,"nodrop":false,"ewma":5,"probability":0.02,"Scell_log":15}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-003/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-003/ip.pcap new file mode 100644 index 000000000..a47c7a2fe Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-003/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-003/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-003/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-003/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-004/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-004/cmd.json new file mode 100644 index 000000000..dc093cbe2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-004/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmred", + "json": "1", + "words": "-o qdisc show dev d0" + }, + "cmd": "tc -j -o qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmred:-o_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-004", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-004/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-004/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-004/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-004/ip.out new file mode 100644 index 000000000..1f1522092 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-004/ip.out @@ -0,0 +1 @@ +[{"kind":"red","handle":"1:","root":true,"refcnt":2,"options":{"limit":400000,"min":30000,"max":90000,"ecn":false,"harddrop":false,"adaptive":false,"nodrop":false}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-004/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-004/ip.pcap new file mode 100644 index 000000000..f6dc62753 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-004/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-004/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-004/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-004/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-005/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-005/cmd.json new file mode 100644 index 000000000..4eb952314 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-005/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmred2", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmred2:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-005", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-005/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-005/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-005/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-005/ip.out new file mode 100644 index 000000000..03fe60d75 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-005/ip.out @@ -0,0 +1 @@ +[{"kind":"red","handle":"1:","root":true,"refcnt":2,"options":{"limit":400000,"min":30000,"max":90000,"ecn":true,"harddrop":true,"adaptive":true,"nodrop":false,"qevents":[{"kind":"early_drop","block":10}]}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-005/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-005/ip.pcap new file mode 100644 index 000000000..d1d6cc1b2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-005/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-005/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-005/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-005/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-006/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-006/cmd.json new file mode 100644 index 000000000..303ce9251 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-006/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmred2", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmred2:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-006", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-006/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-006/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-006/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-006/ip.out new file mode 100644 index 000000000..dff5a1bbe --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-006/ip.out @@ -0,0 +1 @@ +[{"kind":"red","handle":"1:","root":true,"refcnt":2,"options":{"limit":400000,"min":30000,"max":90000,"ecn":true,"harddrop":true,"adaptive":true,"nodrop":false,"qevents":[{"kind":"early_drop","block":10}]},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"marked":0,"early":0,"pdrop":0,"other":0}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-006/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-006/ip.pcap new file mode 100644 index 000000000..f3b5e484a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-006/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-006/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-006/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-006/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-007/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-007/cmd.json new file mode 100644 index 000000000..ce18d075f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-007/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmred2", + "json": "1", + "words": "-d qdisc show dev d0" + }, + "cmd": "tc -j -d qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmred2:-d_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-007", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-007/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-007/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-007/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-007/ip.out new file mode 100644 index 000000000..7c49d2507 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-007/ip.out @@ -0,0 +1 @@ +[{"kind":"red","handle":"1:","root":true,"refcnt":2,"options":{"limit":400000,"min":30000,"max":90000,"ecn":true,"harddrop":true,"adaptive":true,"nodrop":false,"ewma":5,"probability":0.02,"Scell_log":15,"qevents":[{"kind":"early_drop","block":10}]}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-007/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-007/ip.pcap new file mode 100644 index 000000000..b75257ba1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-007/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-007/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-007/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-007/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-008/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-008/cmd.json new file mode 100644 index 000000000..ebbc71fc8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-008/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmred2", + "json": "1", + "words": "-o qdisc show dev d0" + }, + "cmd": "tc -j -o qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmred2:-o_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-008", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-008/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-008/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-008/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-008/ip.out new file mode 100644 index 000000000..03fe60d75 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-008/ip.out @@ -0,0 +1 @@ +[{"kind":"red","handle":"1:","root":true,"refcnt":2,"options":{"limit":400000,"min":30000,"max":90000,"ecn":true,"harddrop":true,"adaptive":true,"nodrop":false,"qevents":[{"kind":"early_drop","block":10}]}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-008/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-008/ip.pcap new file mode 100644 index 000000000..a976e93bb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-008/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-008/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-008/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-008/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-009/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-009/cmd.json new file mode 100644 index 000000000..aaed0ef14 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-009/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmchoke", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmchoke:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-009", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-009/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-009/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-009/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-009/ip.out new file mode 100644 index 000000000..27520a9c4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-009/ip.out @@ -0,0 +1 @@ +[{"kind":"choke","handle":"1:","root":true,"refcnt":2,"options":{"limit":1000,"min":100,"max":300,"ecn":true,"harddrop":false,"adaptive":false,"nodrop":false}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-009/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-009/ip.pcap new file mode 100644 index 000000000..b629f3551 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-009/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-009/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-009/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-009/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-010/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-010/cmd.json new file mode 100644 index 000000000..c3936ff88 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-010/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmchoke", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmchoke:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-010", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-010/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-010/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-010/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-010/ip.out new file mode 100644 index 000000000..45a6e54f7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-010/ip.out @@ -0,0 +1 @@ +[{"kind":"choke","handle":"1:","root":true,"refcnt":2,"options":{"limit":1000,"min":100,"max":300,"ecn":true,"harddrop":false,"adaptive":false,"nodrop":false},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"marked":0,"early":0,"pdrop":0,"other":0,"matched":0}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-010/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-010/ip.pcap new file mode 100644 index 000000000..747251eb4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-010/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-010/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-010/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-010/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-011/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-011/cmd.json new file mode 100644 index 000000000..ce8853348 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-011/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmchoke", + "json": "1", + "words": "-d qdisc show dev d0" + }, + "cmd": "tc -j -d qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmchoke:-d_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-011", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-011/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-011/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-011/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-011/ip.out new file mode 100644 index 000000000..43d97796f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-011/ip.out @@ -0,0 +1 @@ +[{"kind":"choke","handle":"1:","root":true,"refcnt":2,"options":{"limit":1000,"min":100,"max":300,"ecn":true,"harddrop":false,"adaptive":false,"nodrop":false,"ewma":7,"probability":0.02,"Scell_log":17}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-011/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-011/ip.pcap new file mode 100644 index 000000000..79cf2ebe9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-011/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-011/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-011/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-011/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-012/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-012/cmd.json new file mode 100644 index 000000000..5af5b274d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-012/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmchoke", + "json": "1", + "words": "-o qdisc show dev d0" + }, + "cmd": "tc -j -o qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmchoke:-o_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-012", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-012/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-012/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-012/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-012/ip.out new file mode 100644 index 000000000..27520a9c4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-012/ip.out @@ -0,0 +1 @@ +[{"kind":"choke","handle":"1:","root":true,"refcnt":2,"options":{"limit":1000,"min":100,"max":300,"ecn":true,"harddrop":false,"adaptive":false,"nodrop":false}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-012/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-012/ip.pcap new file mode 100644 index 000000000..b615f2c0f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-012/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-012/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-012/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-012/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-013/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-013/cmd.json new file mode 100644 index 000000000..a98b00f34 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-013/cmd.json @@ -0,0 +1,68 @@ +{ + "axes": { + "fix": "aqmgred", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmgred:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-013", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio", + "tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1", + "tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio", + "rc": 0 + }, + { + "cmd": "tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1", + "rc": 0 + }, + { + "cmd": "tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-013/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-013/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-013/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-013/ip.out new file mode 100644 index 000000000..900b372fc --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-013/ip.out @@ -0,0 +1 @@ +[{"kind":"gred","handle":"1:","root":true,"refcnt":2,"options":{"dp_cnt":4,"dp_default":0,"grio":true,"limit":1514000,"ecn":false,"harddrop":false,"adaptive":false,"nodrop":false,"vqs":[{"vq":0,"prio":1,"limit":61440,"min":15360,"max":46080,"ecn":false,"harddrop":false,"adaptive":false,"nodrop":false},{"vq":1,"prio":2,"limit":61440,"min":15360,"max":46080,"ecn":true,"harddrop":false,"adaptive":false,"nodrop":false}]}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-013/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-013/ip.pcap new file mode 100644 index 000000000..e8199b77b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-013/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-013/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-013/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-013/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-014/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-014/cmd.json new file mode 100644 index 000000000..ce21357de --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-014/cmd.json @@ -0,0 +1,68 @@ +{ + "axes": { + "fix": "aqmgred", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmgred:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-014", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio", + "tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1", + "tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio", + "rc": 0 + }, + { + "cmd": "tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1", + "rc": 0 + }, + { + "cmd": "tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-014/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-014/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-014/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-014/ip.out new file mode 100644 index 000000000..893292d66 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-014/ip.out @@ -0,0 +1 @@ +[{"kind":"gred","handle":"1:","root":true,"refcnt":2,"options":{"dp_cnt":4,"dp_default":0,"grio":true,"limit":1514000,"ecn":false,"harddrop":false,"adaptive":false,"nodrop":false,"vqs":[{"vq":0,"prio":1,"limit":61440,"min":15360,"max":46080,"ecn":false,"harddrop":false,"adaptive":false,"nodrop":false,"qave":0,"backlog":0,"forced_drop":0,"prob_drop":0,"pdrop":0,"other":0,"forced_mark":0,"prob_mark":0,"packets":0,"bytes":0},{"vq":1,"prio":2,"limit":61440,"min":15360,"max":46080,"ecn":true,"harddrop":false,"adaptive":false,"nodrop":false,"qave":0,"backlog":0,"forced_drop":0,"prob_drop":0,"pdrop":0,"other":0,"forced_mark":0,"prob_mark":0,"packets":0,"bytes":0}]},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-014/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-014/ip.pcap new file mode 100644 index 000000000..a60f33434 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-014/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-014/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-014/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-014/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-015/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-015/cmd.json new file mode 100644 index 000000000..51c7a6935 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-015/cmd.json @@ -0,0 +1,68 @@ +{ + "axes": { + "fix": "aqmgred", + "json": "1", + "words": "-d qdisc show dev d0" + }, + "cmd": "tc -j -d qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmgred:-d_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-015", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio", + "tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1", + "tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio", + "rc": 0 + }, + { + "cmd": "tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1", + "rc": 0 + }, + { + "cmd": "tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-015/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-015/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-015/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-015/ip.out new file mode 100644 index 000000000..260816006 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-015/ip.out @@ -0,0 +1 @@ +[{"kind":"gred","handle":"1:","root":true,"refcnt":2,"options":{"dp_cnt":4,"dp_default":0,"grio":true,"limit":1514000,"ecn":false,"harddrop":false,"adaptive":false,"nodrop":false,"vqs":[{"vq":0,"prio":1,"limit":61440,"min":15360,"max":46080,"ecn":false,"harddrop":false,"adaptive":false,"nodrop":false,"ewma":3,"probability":0.1,"Scell_log":13},{"vq":1,"prio":2,"limit":61440,"min":15360,"max":46080,"ecn":true,"harddrop":false,"adaptive":false,"nodrop":false,"ewma":3,"probability":0.2,"Scell_log":13}]}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-015/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-015/ip.pcap new file mode 100644 index 000000000..75dc8ad43 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-015/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-015/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-015/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-015/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-016/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-016/cmd.json new file mode 100644 index 000000000..7b5f540a1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-016/cmd.json @@ -0,0 +1,68 @@ +{ + "axes": { + "fix": "aqmgred", + "json": "1", + "words": "-o qdisc show dev d0" + }, + "cmd": "tc -j -o qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmgred:-o_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-016", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio", + "tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1", + "tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio", + "rc": 0 + }, + { + "cmd": "tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1", + "rc": 0 + }, + { + "cmd": "tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-016/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-016/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-016/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-016/ip.out new file mode 100644 index 000000000..900b372fc --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-016/ip.out @@ -0,0 +1 @@ +[{"kind":"gred","handle":"1:","root":true,"refcnt":2,"options":{"dp_cnt":4,"dp_default":0,"grio":true,"limit":1514000,"ecn":false,"harddrop":false,"adaptive":false,"nodrop":false,"vqs":[{"vq":0,"prio":1,"limit":61440,"min":15360,"max":46080,"ecn":false,"harddrop":false,"adaptive":false,"nodrop":false},{"vq":1,"prio":2,"limit":61440,"min":15360,"max":46080,"ecn":true,"harddrop":false,"adaptive":false,"nodrop":false}]}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-016/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-016/ip.pcap new file mode 100644 index 000000000..6b270ec2b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-016/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-016/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-016/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-016/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-017/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-017/cmd.json new file mode 100644 index 000000000..4b8ec3297 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-017/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmgred0", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "boundary: opt=json cmd=aqmgred0:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-017", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: gred setup vqs 2 default 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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: gred setup vqs 2 default 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-017/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-017/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-017/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-017/ip.out new file mode 100644 index 000000000..e6ddd49f7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-017/ip.out @@ -0,0 +1 @@ +[{"kind":"gred","handle":"1:","root":true,"refcnt":2,"options":{"dp_cnt":2,"dp_default":1,"grio":false,"limit":1514000,"ecn":false,"harddrop":false,"adaptive":false,"nodrop":false,"vqs":[]}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-017/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-017/ip.pcap new file mode 100644 index 000000000..a5766f7f8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-017/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-017/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-017/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-017/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-018/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-018/cmd.json new file mode 100644 index 000000000..600275b5c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-018/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmgred0", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmgred0:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-018", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: gred setup vqs 2 default 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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: gred setup vqs 2 default 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-018/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-018/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-018/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-018/ip.out new file mode 100644 index 000000000..f38e23508 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-018/ip.out @@ -0,0 +1 @@ +[{"kind":"gred","handle":"1:","root":true,"refcnt":2,"options":{"dp_cnt":2,"dp_default":1,"grio":false,"limit":1514000,"ecn":false,"harddrop":false,"adaptive":false,"nodrop":false,"vqs":[]},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-018/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-018/ip.pcap new file mode 100644 index 000000000..c947642fb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-018/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-018/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-018/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-018/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-019/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-019/cmd.json new file mode 100644 index 000000000..566c50633 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-019/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmsfb", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmsfb:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-019", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: sfb" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: sfb", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-019/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-019/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-019/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-019/ip.out new file mode 100644 index 000000000..dc5128a44 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-019/ip.out @@ -0,0 +1 @@ +[{"kind":"sfb","handle":"1:","root":true,"refcnt":2,"options":{"rehash":600000000,"db":60000000,"limit":1000,"max":25,"target":20,"increment":0.000503548,"decrement":4.57771e-05,"penalty_rate":10,"penalty_burst":20}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-019/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-019/ip.pcap new file mode 100644 index 000000000..8f6fa400f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-019/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-019/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-019/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-019/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-020/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-020/cmd.json new file mode 100644 index 000000000..a85d21858 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-020/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmsfb", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmsfb:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-020", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: sfb" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: sfb", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-020/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-020/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-020/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-020/ip.out new file mode 100644 index 000000000..38ed197e4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-020/ip.out @@ -0,0 +1 @@ +[{"kind":"sfb","handle":"1:","root":true,"refcnt":2,"options":{"rehash":600000000,"db":60000000,"limit":1000,"max":25,"target":20,"increment":0.000503548,"decrement":4.57771e-05,"penalty_rate":10,"penalty_burst":20},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"earlydrop":0,"penaltydrop":0,"bucketdrop":0,"queuedrop":0,"childdrop":0,"marked":0,"maxqlen":0,"maxprob":0,"avgprob":0}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-020/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-020/ip.pcap new file mode 100644 index 000000000..afba8924a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-020/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-020/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-020/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-020/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-021/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-021/cmd.json new file mode 100644 index 000000000..04a8a335e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-021/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmsfb2", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "boundary: opt=json cmd=aqmsfb2:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-021", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: sfb rehash 5000000 db 5000000 limit 100" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: sfb rehash 5000000 db 5000000 limit 100", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-021/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-021/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-021/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-021/ip.out new file mode 100644 index 000000000..864233253 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-021/ip.out @@ -0,0 +1 @@ +[{"kind":"sfb","handle":"1:","root":true,"refcnt":2,"options":{"rehash":705032704,"db":705032704,"limit":100,"max":25,"target":20,"increment":0.000503548,"decrement":4.57771e-05,"penalty_rate":10,"penalty_burst":20}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-021/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-021/ip.pcap new file mode 100644 index 000000000..df699bf18 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-021/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-021/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-021/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-021/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-022/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-022/cmd.json new file mode 100644 index 000000000..9d441cb1a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-022/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcodel", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmcodel:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-022", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: codel" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: codel", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-022/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-022/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-022/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-022/ip.out new file mode 100644 index 000000000..1d92946c5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-022/ip.out @@ -0,0 +1 @@ +[{"kind":"codel","handle":"1:","root":true,"refcnt":2,"options":{"limit":1000,"target":4999,"interval":99999}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-022/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-022/ip.pcap new file mode 100644 index 000000000..352f59458 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-022/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-022/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-022/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-022/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-023/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-023/cmd.json new file mode 100644 index 000000000..85e9feae8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-023/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcodel", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmcodel:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-023", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: codel" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: codel", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-023/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-023/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-023/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-023/ip.out new file mode 100644 index 000000000..49799c3c4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-023/ip.out @@ -0,0 +1 @@ +[{"kind":"codel","handle":"1:","root":true,"refcnt":2,"options":{"limit":1000,"target":4999,"interval":99999},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"count":0,"lastcount":0,"ldelay":0,"drop_next":0,"maxpacket":0,"ecn_mark":0,"drop_overlimit":0}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-023/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-023/ip.pcap new file mode 100644 index 000000000..6459beb55 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-023/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-023/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-023/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-023/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-024/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-024/cmd.json new file mode 100644 index 000000000..0286ec0f2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-024/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcodel2", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmcodel2:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-024", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: codel limit 500 target 4ms interval 50ms ecn ce_threshold 2ms" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: codel limit 500 target 4ms interval 50ms ecn ce_threshold 2ms", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-024/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-024/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-024/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-024/ip.out new file mode 100644 index 000000000..aab303759 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-024/ip.out @@ -0,0 +1 @@ +[{"kind":"codel","handle":"1:","root":true,"refcnt":2,"options":{"limit":500,"target":3999,"ce_threshold":1999,"interval":49999,"ecn":true}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-024/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-024/ip.pcap new file mode 100644 index 000000000..1d02302c5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-024/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-024/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-024/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-024/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-025/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-025/cmd.json new file mode 100644 index 000000000..c4f0738f5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-025/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmpie", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmpie:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-025", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: pie" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: pie", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-025/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-025/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-025/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-025/ip.out new file mode 100644 index 000000000..aa46a3c15 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-025/ip.out @@ -0,0 +1 @@ +[{"kind":"pie","handle":"1:","root":true,"refcnt":2,"options":{"limit":1000,"target":15000,"tupdate":15000,"alpha":2,"beta":20}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-025/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-025/ip.pcap new file mode 100644 index 000000000..3da4e59d3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-025/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-025/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-025/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-025/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-026/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-026/cmd.json new file mode 100644 index 000000000..2d439f660 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-026/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmpie", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmpie:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-026", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: pie" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: pie", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-026/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-026/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-026/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-026/ip.out new file mode 100644 index 000000000..fae4882c9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-026/ip.out @@ -0,0 +1 @@ +[{"kind":"pie","handle":"1:","root":true,"refcnt":2,"options":{"limit":1000,"target":15000,"tupdate":15000,"alpha":2,"beta":20},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"prob":0,"delay":0,"pkts_in":0,"overlimit":0,"dropped":0,"maxq":0,"ecn_mark":0}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-026/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-026/ip.pcap new file mode 100644 index 000000000..1d73dffc3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-026/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-026/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-026/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-026/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-027/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-027/cmd.json new file mode 100644 index 000000000..ea37d3130 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-027/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmpie2", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmpie2:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-027", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: pie limit 500 target 10ms tupdate 20ms alpha 2 beta 20 bytemode ecn dq_rate_estimator" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: pie limit 500 target 10ms tupdate 20ms alpha 2 beta 20 bytemode ecn dq_rate_estimator", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-027/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-027/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-027/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-027/ip.out new file mode 100644 index 000000000..007333849 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-027/ip.out @@ -0,0 +1 @@ +[{"kind":"pie","handle":"1:","root":true,"refcnt":2,"options":{"limit":500,"target":10000,"tupdate":20000,"alpha":2,"beta":20,"ecn":true,"bytemode":true,"dq_rate_estimator":true}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-027/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-027/ip.pcap new file mode 100644 index 000000000..e9b6f103c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-027/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-027/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-027/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-027/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-028/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-028/cmd.json new file mode 100644 index 000000000..26524f720 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-028/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmpie2", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmpie2:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-028", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: pie limit 500 target 10ms tupdate 20ms alpha 2 beta 20 bytemode ecn dq_rate_estimator" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: pie limit 500 target 10ms tupdate 20ms alpha 2 beta 20 bytemode ecn dq_rate_estimator", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-028/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-028/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-028/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-028/ip.out new file mode 100644 index 000000000..d46bd261f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-028/ip.out @@ -0,0 +1 @@ +[{"kind":"pie","handle":"1:","root":true,"refcnt":2,"options":{"limit":500,"target":10000,"tupdate":20000,"alpha":2,"beta":20,"ecn":true,"bytemode":true,"dq_rate_estimator":true},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"prob":0,"delay":0,"avg_dq_rate":0,"pkts_in":0,"overlimit":0,"dropped":0,"maxq":0,"ecn_mark":0}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-028/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-028/ip.pcap new file mode 100644 index 000000000..960a0df17 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-028/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-028/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-028/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-028/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-029/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-029/cmd.json new file mode 100644 index 000000000..73bcc1d75 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-029/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmfqpie", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmfqpie:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-029", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: fq_pie" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: fq_pie", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-029/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-029/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-029/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-029/ip.out new file mode 100644 index 000000000..96e6ed99e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-029/ip.out @@ -0,0 +1 @@ +[{"kind":"fq_pie","handle":"1:","root":true,"refcnt":2,"options":{"limit":10240,"flows":1024,"target":15000,"tupdate":15000,"alpha":2,"beta":20,"quantum":1514,"memory_limit":33554432,"ecn_prob":10}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-029/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-029/ip.pcap new file mode 100644 index 000000000..5efdb7a95 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-029/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-029/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-029/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-029/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-030/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-030/cmd.json new file mode 100644 index 000000000..5ecc7859c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-030/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmfqpie", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmfqpie:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-030", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: fq_pie" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: fq_pie", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-030/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-030/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-030/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-030/ip.out new file mode 100644 index 000000000..5be67ea8b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-030/ip.out @@ -0,0 +1 @@ +[{"kind":"fq_pie","handle":"1:","root":true,"refcnt":2,"options":{"limit":10240,"flows":1024,"target":15000,"tupdate":15000,"alpha":2,"beta":20,"quantum":1514,"memory_limit":33554432,"ecn_prob":10},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"pkts_in":0,"overlimit":0,"overmemory":0,"dropped":0,"ecn_mark":0,"new_flow_count":0,"new_flows_len":0,"old_flows_len":0,"memory_used":0}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-030/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-030/ip.pcap new file mode 100644 index 000000000..31c766467 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-030/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-030/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-030/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-030/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-031/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-031/cmd.json new file mode 100644 index 000000000..487c705d1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-031/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmfqpie2", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmfqpie2:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-031", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: fq_pie limit 2048 flows 256 quantum 1514 memory_limit 16Mb ecn_prob 20 ecn bytemode dq_rate_estimator" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: fq_pie limit 2048 flows 256 quantum 1514 memory_limit 16Mb ecn_prob 20 ecn bytemode dq_rate_estimator", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-031/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-031/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-031/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-031/ip.out new file mode 100644 index 000000000..6aadc56bc --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-031/ip.out @@ -0,0 +1 @@ +[{"kind":"fq_pie","handle":"1:","root":true,"refcnt":2,"options":{"limit":2048,"flows":256,"target":15000,"tupdate":15000,"alpha":2,"beta":20,"quantum":1514,"memory_limit":16777216,"ecn_prob":20,"ecn":true,"bytemode":true,"dq_rate_estimator":true}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-031/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-031/ip.pcap new file mode 100644 index 000000000..47f2ca2f8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-031/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-031/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-031/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-031/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-032/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-032/cmd.json new file mode 100644 index 000000000..58bdb0545 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-032/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmhhf", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmhhf:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-032", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: hhf" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hhf", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-032/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-032/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-032/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-032/ip.out new file mode 100644 index 000000000..a1c4b6013 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-032/ip.out @@ -0,0 +1 @@ +[{"kind":"hhf","handle":"1:","root":true,"refcnt":2,"options":{"limit":1000,"quantum":1514,"hh_limit":2048,"reset_timeout":40000,"admit_bytes":131072,"evict_timeout":1000000,"non_hh_weight":2}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-032/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-032/ip.pcap new file mode 100644 index 000000000..911fe0f13 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-032/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-032/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-032/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-032/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-033/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-033/cmd.json new file mode 100644 index 000000000..fdf113384 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-033/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmhhf", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmhhf:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-033", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: hhf" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hhf", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-033/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-033/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-033/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-033/ip.out new file mode 100644 index 000000000..84775fedf --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-033/ip.out @@ -0,0 +1 @@ +[{"kind":"hhf","handle":"1:","root":true,"refcnt":2,"options":{"limit":1000,"quantum":1514,"hh_limit":2048,"reset_timeout":40000,"admit_bytes":131072,"evict_timeout":1000000,"non_hh_weight":2},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"drop_overlimit":0,"hh_overlimit":0,"tot_hh":0,"cur_hh":0}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-033/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-033/ip.pcap new file mode 100644 index 000000000..fdf19cd90 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-033/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-033/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-033/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-033/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-034/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-034/cmd.json new file mode 100644 index 000000000..d5cd550af --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-034/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmhhf2", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmhhf2:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-034", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: hhf limit 500 quantum 1514 hh_limit 1024 reset_timeout 50ms admit_bytes 65536 evict_timeout 500ms non_hh_weight 4" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hhf limit 500 quantum 1514 hh_limit 1024 reset_timeout 50ms admit_bytes 65536 evict_timeout 500ms non_hh_weight 4", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-034/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-034/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-034/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-034/ip.out new file mode 100644 index 000000000..85e2c040a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-034/ip.out @@ -0,0 +1 @@ +[{"kind":"hhf","handle":"1:","root":true,"refcnt":2,"options":{"limit":500,"quantum":1514,"hh_limit":1024,"reset_timeout":50000,"admit_bytes":65536,"evict_timeout":500000,"non_hh_weight":4}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-034/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-034/ip.pcap new file mode 100644 index 000000000..e294b50bc Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-034/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-034/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-034/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-034/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-035/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-035/cmd.json new file mode 100644 index 000000000..c54296655 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-035/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmcake:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-035", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-035/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-035/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-035/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-035/ip.out new file mode 100644 index 000000000..5609af90d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-035/ip.out @@ -0,0 +1 @@ +[{"kind":"cake","handle":"1:","root":true,"refcnt":2,"options":{"bandwidth":"unlimited","diffserv":"diffserv3","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-035/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-035/ip.pcap new file mode 100644 index 000000000..58a170cdf Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-035/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-035/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-035/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-035/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-036/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-036/cmd.json new file mode 100644 index 000000000..fb5a88b2e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-036/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmcake:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-036", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-036/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-036/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-036/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-036/ip.out new file mode 100644 index 000000000..3e9b1b4d1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-036/ip.out @@ -0,0 +1 @@ +[{"kind":"cake","handle":"1:","root":true,"refcnt":2,"options":{"bandwidth":"unlimited","diffserv":"diffserv3","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"memory_used":0,"memory_limit":15503360,"capacity_estimate":0,"min_network_size":65535,"max_network_size":0,"min_adj_size":65535,"max_adj_size":0,"active_queues":0,"avg_hdr_offset":0,"tins":[{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514}]}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-036/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-036/ip.pcap new file mode 100644 index 000000000..4ad78c6ec Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-036/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-036/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-036/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-036/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-037/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-037/cmd.json new file mode 100644 index 000000000..429b2c718 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-037/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake", + "json": "1", + "words": "-d qdisc show dev d0" + }, + "cmd": "tc -j -d qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmcake:-d_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-037", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-037/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-037/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-037/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-037/ip.out new file mode 100644 index 000000000..5609af90d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-037/ip.out @@ -0,0 +1 @@ +[{"kind":"cake","handle":"1:","root":true,"refcnt":2,"options":{"bandwidth":"unlimited","diffserv":"diffserv3","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-037/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-037/ip.pcap new file mode 100644 index 000000000..0671df8db Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-037/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-037/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-037/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-037/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-038/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-038/cmd.json new file mode 100644 index 000000000..224fa0d9f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-038/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake", + "json": "1", + "words": "-s -o qdisc show dev d0" + }, + "cmd": "tc -j -s -o qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmcake:-s_-o_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-038", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-038/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-038/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-038/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-038/ip.out new file mode 100644 index 000000000..3e9b1b4d1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-038/ip.out @@ -0,0 +1 @@ +[{"kind":"cake","handle":"1:","root":true,"refcnt":2,"options":{"bandwidth":"unlimited","diffserv":"diffserv3","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"memory_used":0,"memory_limit":15503360,"capacity_estimate":0,"min_network_size":65535,"max_network_size":0,"min_adj_size":65535,"max_adj_size":0,"active_queues":0,"avg_hdr_offset":0,"tins":[{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514}]}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-038/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-038/ip.pcap new file mode 100644 index 000000000..43329be43 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-038/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-038/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-038/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-038/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-039/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-039/cmd.json new file mode 100644 index 000000000..61ccc9b36 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-039/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake", + "json": "1", + "words": "class show dev d0" + }, + "cmd": "tc -j class show dev d0", + "desc": "corner: opt=json cmd=aqmcake:class_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-039", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-039/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-039/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-039/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-039/ip.out new file mode 100644 index 000000000..fe51488c7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-039/ip.out @@ -0,0 +1 @@ +[] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-039/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-039/ip.pcap new file mode 100644 index 000000000..1bb803562 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-039/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-039/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-039/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-039/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-040/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-040/cmd.json new file mode 100644 index 000000000..c4c379862 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-040/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake2", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmcake2:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-040", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake bandwidth 100Mbit diffserv4 dual-srchost nat wash ingress ack-filter rtt 20ms atm overhead 44 mpu 64 memlimit 4Mb fwmark 0xff no-split-gso" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake bandwidth 100Mbit diffserv4 dual-srchost nat wash ingress ack-filter rtt 20ms atm overhead 44 mpu 64 memlimit 4Mb fwmark 0xff no-split-gso", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-040/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-040/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-040/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-040/ip.out new file mode 100644 index 000000000..9ac33cfe7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-040/ip.out @@ -0,0 +1 @@ +[{"kind":"cake","handle":"1:","root":true,"refcnt":2,"options":{"bandwidth":12500000,"diffserv":"diffserv4","flowmode":"dual-srchost","nat":true,"wash":true,"ingress":true,"ack-filter":"enabled","split_gso":false,"rtt":20000,"raw":false,"atm":"atm","overhead":44,"mpu":64,"memlimit":4194304,"fwmark":"0xff"}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-040/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-040/ip.pcap new file mode 100644 index 000000000..9499d9edf Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-040/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-040/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-040/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-040/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-041/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-041/cmd.json new file mode 100644 index 000000000..f68648824 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-041/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake2", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmcake2:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-041", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake bandwidth 100Mbit diffserv4 dual-srchost nat wash ingress ack-filter rtt 20ms atm overhead 44 mpu 64 memlimit 4Mb fwmark 0xff no-split-gso" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake bandwidth 100Mbit diffserv4 dual-srchost nat wash ingress ack-filter rtt 20ms atm overhead 44 mpu 64 memlimit 4Mb fwmark 0xff no-split-gso", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-041/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-041/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-041/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-041/ip.out new file mode 100644 index 000000000..1c60d3502 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-041/ip.out @@ -0,0 +1 @@ +[{"kind":"cake","handle":"1:","root":true,"refcnt":2,"options":{"bandwidth":12500000,"diffserv":"diffserv4","flowmode":"dual-srchost","nat":true,"wash":true,"ingress":true,"ack-filter":"enabled","split_gso":false,"rtt":20000,"raw":false,"atm":"atm","overhead":44,"mpu":64,"memlimit":4194304,"fwmark":"0xff"},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"memory_used":0,"memory_limit":4194304,"capacity_estimate":12500000,"min_network_size":65535,"max_network_size":0,"min_adj_size":65535,"max_adj_size":0,"active_queues":0,"avg_hdr_offset":0,"tins":[{"threshold_rate":781250,"sent_bytes":0,"backlog_bytes":0,"target_us":2906,"interval_us":21906,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":300},{"threshold_rate":12500000,"sent_bytes":0,"backlog_bytes":0,"target_us":1000,"interval_us":20000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":6250000,"sent_bytes":0,"backlog_bytes":0,"target_us":1000,"interval_us":20000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":3125000,"sent_bytes":0,"backlog_bytes":0,"target_us":1000,"interval_us":20000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":762}]}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-041/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-041/ip.pcap new file mode 100644 index 000000000..0383f437c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-041/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-041/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-041/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-041/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-042/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-042/cmd.json new file mode 100644 index 000000000..b233be9e3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-042/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake3", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmcake3:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-042", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake autorate-ingress diffserv8 dual-dsthost ack-filter-aggressive" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake autorate-ingress diffserv8 dual-dsthost ack-filter-aggressive", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-042/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-042/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-042/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-042/ip.out new file mode 100644 index 000000000..958b526d4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-042/ip.out @@ -0,0 +1 @@ +[{"kind":"cake","handle":"1:","root":true,"refcnt":2,"options":{"bandwidth":"unlimited","autorate":"autorate-ingress","diffserv":"diffserv8","flowmode":"dual-dsthost","nat":false,"wash":false,"ingress":false,"ack-filter":"aggressive","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-042/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-042/ip.pcap new file mode 100644 index 000000000..526645c56 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-042/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-042/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-042/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-042/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-043/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-043/cmd.json new file mode 100644 index 000000000..19b8367f5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-043/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake3", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmcake3:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-043", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake autorate-ingress diffserv8 dual-dsthost ack-filter-aggressive" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake autorate-ingress diffserv8 dual-dsthost ack-filter-aggressive", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-043/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-043/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-043/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-043/ip.out new file mode 100644 index 000000000..c4119adb4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-043/ip.out @@ -0,0 +1 @@ +[{"kind":"cake","handle":"1:","root":true,"refcnt":2,"options":{"bandwidth":"unlimited","autorate":"autorate-ingress","diffserv":"diffserv8","flowmode":"dual-dsthost","nat":false,"wash":false,"ingress":false,"ack-filter":"aggressive","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"memory_used":0,"memory_limit":15503360,"capacity_estimate":0,"min_network_size":65535,"max_network_size":0,"min_adj_size":65535,"max_adj_size":0,"active_queues":0,"avg_hdr_offset":0,"tins":[{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514}]}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-043/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-043/ip.pcap new file mode 100644 index 000000000..4e40ef8ae Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-043/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-043/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-043/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-043/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-044/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-044/cmd.json new file mode 100644 index 000000000..05fdb7f88 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-044/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake4", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmcake4:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-044", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake besteffort flowblind" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake besteffort flowblind", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-044/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-044/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-044/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-044/ip.out new file mode 100644 index 000000000..1334cfcb6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-044/ip.out @@ -0,0 +1 @@ +[{"kind":"cake","handle":"1:","root":true,"refcnt":2,"options":{"bandwidth":"unlimited","diffserv":"besteffort","flowmode":"flowblind","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-044/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-044/ip.pcap new file mode 100644 index 000000000..39a19dfa2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-044/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-044/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-044/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-044/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-045/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-045/cmd.json new file mode 100644 index 000000000..4cf127a0a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-045/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake4", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmcake4:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-045", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake besteffort flowblind" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake besteffort flowblind", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-045/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-045/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-045/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-045/ip.out new file mode 100644 index 000000000..b95e97077 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-045/ip.out @@ -0,0 +1 @@ +[{"kind":"cake","handle":"1:","root":true,"refcnt":2,"options":{"bandwidth":"unlimited","diffserv":"besteffort","flowmode":"flowblind","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"memory_used":0,"memory_limit":15503360,"capacity_estimate":0,"min_network_size":65535,"max_network_size":0,"min_adj_size":65535,"max_adj_size":0,"active_queues":0,"avg_hdr_offset":0,"tins":[{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514}]}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-045/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-045/ip.pcap new file mode 100644 index 000000000..7a5be70d7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-045/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-045/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-045/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-045/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-046/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-046/cmd.json new file mode 100644 index 000000000..c8354ceb7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-046/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake5", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmcake5:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-046", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake bandwidth 10Mbit precedence triple-isolate docsis" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake bandwidth 10Mbit precedence triple-isolate docsis", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-046/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-046/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-046/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-046/ip.out new file mode 100644 index 000000000..1e17ecf05 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-046/ip.out @@ -0,0 +1 @@ +[{"kind":"cake","handle":"1:","root":true,"refcnt":2,"options":{"bandwidth":1250000,"diffserv":"precedence","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":false,"atm":"noatm","overhead":18,"mpu":64,"fwmark":"0"}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-046/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-046/ip.pcap new file mode 100644 index 000000000..763b9b0ee Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-046/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-046/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-046/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-046/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-047/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-047/cmd.json new file mode 100644 index 000000000..22fb40da2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-047/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcake5", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmcake5:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-047", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake bandwidth 10Mbit precedence triple-isolate docsis" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake bandwidth 10Mbit precedence triple-isolate docsis", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-047/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-047/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-047/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-047/ip.out new file mode 100644 index 000000000..9b81478cd --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-047/ip.out @@ -0,0 +1 @@ +[{"kind":"cake","handle":"1:","root":true,"refcnt":2,"options":{"bandwidth":1250000,"diffserv":"precedence","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":false,"atm":"noatm","overhead":18,"mpu":64,"fwmark":"0"},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"memory_used":0,"memory_limit":4194304,"capacity_estimate":1250000,"min_network_size":65535,"max_network_size":0,"min_adj_size":65535,"max_adj_size":0,"active_queues":0,"avg_hdr_offset":0,"tins":[{"threshold_rate":1250000,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":305},{"threshold_rate":1093750,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":300},{"threshold_rate":957031,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":300},{"threshold_rate":837402,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":300},{"threshold_rate":732726,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":300},{"threshold_rate":641135,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":300},{"threshold_rate":560993,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":300},{"threshold_rate":490868,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":300}]}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-047/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-047/ip.pcap new file mode 100644 index 000000000..a2e381d73 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-047/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-047/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-047/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-047/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-048/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-048/cmd.json new file mode 100644 index 000000000..6526b6bcf --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-048/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcakemq", + "json": "1", + "words": "qdisc show dev d1" + }, + "cmd": "tc -j qdisc show dev d1", + "desc": "positive: opt=json cmd=aqmcakemq:qdisc_show_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": "tcaqm/pw-048", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-048/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-048/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-048/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-048/ip.out new file mode 100644 index 000000000..a482d0bfe --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-048/ip.out @@ -0,0 +1 @@ +[{"kind":"cake_mq","handle":"1:","root":true,"options":{"bandwidth":12500000,"diffserv":"diffserv3","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"}},{"kind":"cake","handle":"0:","parent":"1:4","options":{"bandwidth":12500000,"diffserv":"diffserv3","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"}},{"kind":"cake","handle":"0:","parent":"1:3","options":{"bandwidth":12500000,"diffserv":"diffserv3","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"}},{"kind":"cake","handle":"0:","parent":"1:2","options":{"bandwidth":12500000,"diffserv":"diffserv3","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"}},{"kind":"cake","handle":"0:","parent":"1:1","options":{"bandwidth":12500000,"diffserv":"diffserv3","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-048/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-048/ip.pcap new file mode 100644 index 000000000..373279daf Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-048/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-048/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-048/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-048/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-049/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-049/cmd.json new file mode 100644 index 000000000..46e80c5a1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-049/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcakemq", + "json": "1", + "words": "qdisc show dev d1 root" + }, + "cmd": "tc -j qdisc show dev d1 root", + "desc": "corner: opt=json cmd=aqmcakemq:qdisc_show_dev_d1_root", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-049", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-049/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-049/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-049/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-049/ip.out new file mode 100644 index 000000000..ea818794a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-049/ip.out @@ -0,0 +1 @@ +[{"kind":"cake_mq","handle":"1:","root":true,"options":{"bandwidth":12500000,"diffserv":"diffserv3","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-049/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-049/ip.pcap new file mode 100644 index 000000000..da5e4f849 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-049/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-049/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-049/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-049/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-050/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-050/cmd.json new file mode 100644 index 000000000..8c88e439f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-050/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcakemq", + "json": "1", + "words": "-s qdisc show dev d1" + }, + "cmd": "tc -j -s qdisc show dev d1", + "desc": "corner: opt=json cmd=aqmcakemq:-s_qdisc_show_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": "tcaqm/pw-050", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-050/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-050/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-050/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-050/ip.out new file mode 100644 index 000000000..7645e2b14 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-050/ip.out @@ -0,0 +1 @@ +[{"kind":"cake_mq","handle":"1:","root":true,"options":{"bandwidth":12500000,"diffserv":"diffserv3","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0},{"kind":"cake","handle":"0:","parent":"1:4","options":{"bandwidth":12500000,"diffserv":"diffserv3","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"memory_used":0,"memory_limit":5000000,"capacity_estimate":0,"min_network_size":65535,"max_network_size":0,"min_adj_size":65535,"max_adj_size":0,"active_queues":0,"avg_hdr_offset":0,"tins":[{"threshold_rate":781250,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":300},{"threshold_rate":12500000,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":3125000,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":762}]},{"kind":"cake","handle":"0:","parent":"1:3","options":{"bandwidth":12500000,"diffserv":"diffserv3","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"memory_used":0,"memory_limit":5000000,"capacity_estimate":0,"min_network_size":65535,"max_network_size":0,"min_adj_size":65535,"max_adj_size":0,"active_queues":0,"avg_hdr_offset":0,"tins":[{"threshold_rate":781250,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":300},{"threshold_rate":12500000,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":3125000,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":762}]},{"kind":"cake","handle":"0:","parent":"1:2","options":{"bandwidth":12500000,"diffserv":"diffserv3","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"memory_used":0,"memory_limit":5000000,"capacity_estimate":0,"min_network_size":65535,"max_network_size":0,"min_adj_size":65535,"max_adj_size":0,"active_queues":0,"avg_hdr_offset":0,"tins":[{"threshold_rate":781250,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":300},{"threshold_rate":12500000,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":3125000,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":762}]},{"kind":"cake","handle":"0:","parent":"1:1","options":{"bandwidth":12500000,"diffserv":"diffserv3","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"memory_used":0,"memory_limit":5000000,"capacity_estimate":0,"min_network_size":65535,"max_network_size":0,"min_adj_size":65535,"max_adj_size":0,"active_queues":0,"avg_hdr_offset":0,"tins":[{"threshold_rate":781250,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":300},{"threshold_rate":12500000,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":3125000,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":762}]}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-050/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-050/ip.pcap new file mode 100644 index 000000000..8dcf3cb12 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-050/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-050/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-050/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-050/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-051/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-051/cmd.json new file mode 100644 index 000000000..3a0bb43b1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-051/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmcakemq", + "json": "1", + "words": "class show dev d1" + }, + "cmd": "tc -j class show dev d1", + "desc": "corner: opt=json cmd=aqmcakemq:class_show_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": "tcaqm/pw-051", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d1 address 02:00:00:00:02:00 numtxqueues 4 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-051/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-051/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-051/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-051/ip.out new file mode 100644 index 000000000..abaea4a58 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-051/ip.out @@ -0,0 +1 @@ +[{"class":"cake_mq","handle":"1:1","root":true},{"class":"cake_mq","handle":"1:2","root":true},{"class":"cake_mq","handle":"1:3","root":true},{"class":"cake_mq","handle":"1:4","root":true}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-051/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-051/ip.pcap new file mode 100644 index 000000000..c2815c69c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-051/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-051/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-051/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-051/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-052/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-052/cmd.json new file mode 100644 index 000000000..4b5cc063b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-052/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmdpi", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmdpi:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-052", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: dualpi2" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: dualpi2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-052/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-052/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-052/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-052/ip.out new file mode 100644 index 000000000..974a7aa6f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-052/ip.out @@ -0,0 +1 @@ +[{"kind":"dualpi2","handle":"1:","root":true,"refcnt":2,"options":{"limit":10000,"memory-limit":30280000,"target":15000,"tupdate":16000,"alpha":0.15625,"beta":3.19531,"step-thresh-us":1000,"min-qlen-step":0,"coupling":2,"drop-overload":"drop","drop-early":"drop-dequeue","c-protection":10,"ecn-mask":"l4s-ect","split-gso":null}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-052/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-052/ip.pcap new file mode 100644 index 000000000..fe9dcea05 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-052/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-052/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-052/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-052/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-053/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-053/cmd.json new file mode 100644 index 000000000..10fbf517b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-053/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmdpi", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmdpi:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-053", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: dualpi2" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: dualpi2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-053/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-053/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-053/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-053/ip.out new file mode 100644 index 000000000..0c6886797 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-053/ip.out @@ -0,0 +1 @@ +[{"kind":"dualpi2","handle":"1:","root":true,"refcnt":2,"options":{"limit":10000,"memory-limit":30280000,"target":15000,"tupdate":16000,"alpha":0.15625,"beta":3.19531,"step-thresh-us":1000,"min-qlen-step":0,"coupling":2,"drop-overload":"drop","drop-early":"drop-dequeue","c-protection":10,"ecn-mask":"l4s-ect","split-gso":null},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"prob":0,"delay-c":0,"delay-l":0,"pkts-in-c":0,"pkts-in-l":0,"maxq":0,"ecn-mark":0,"step-mark":0,"credit":-121120,"memory-used":0,"max-memory-used":0,"memory-limit":30280000}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-053/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-053/ip.pcap new file mode 100644 index 000000000..e84b4a4bf Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-053/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-053/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-053/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-053/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-054/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-054/cmd.json new file mode 100644 index 000000000..275665d37 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-054/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmdpi", + "json": "1", + "words": "-o qdisc show dev d0" + }, + "cmd": "tc -j -o qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmdpi:-o_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-054", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: dualpi2" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: dualpi2", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-054/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-054/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-054/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-054/ip.out new file mode 100644 index 000000000..974a7aa6f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-054/ip.out @@ -0,0 +1 @@ +[{"kind":"dualpi2","handle":"1:","root":true,"refcnt":2,"options":{"limit":10000,"memory-limit":30280000,"target":15000,"tupdate":16000,"alpha":0.15625,"beta":3.19531,"step-thresh-us":1000,"min-qlen-step":0,"coupling":2,"drop-overload":"drop","drop-early":"drop-dequeue","c-protection":10,"ecn-mask":"l4s-ect","split-gso":null}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-054/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-054/ip.pcap new file mode 100644 index 000000000..e1c137cac Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-054/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-054/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-054/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-054/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-055/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-055/cmd.json new file mode 100644 index 000000000..633e70c43 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-055/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmdpi2", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmdpi2:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-055", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: dualpi2 limit 5000 memlimit 4000000 step_thresh 10 drop_on_overload drop_enqueue any_ect no_split_gso classic_protection 20" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: dualpi2 limit 5000 memlimit 4000000 step_thresh 10 drop_on_overload drop_enqueue any_ect no_split_gso classic_protection 20", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-055/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-055/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-055/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-055/ip.out new file mode 100644 index 000000000..ff4de72e3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-055/ip.out @@ -0,0 +1 @@ +[{"kind":"dualpi2","handle":"1:","root":true,"refcnt":2,"options":{"limit":5000,"memory-limit":4000000,"target":15000,"tupdate":16000,"alpha":0.15625,"beta":3.19531,"step-thresh-us":10,"min-qlen-step":0,"coupling":2,"drop-overload":"drop","drop-early":"drop-enqueue","c-protection":20,"ecn-mask":"any-ect"}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-055/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-055/ip.pcap new file mode 100644 index 000000000..dade04a55 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-055/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-055/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-055/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-055/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-056/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-056/cmd.json new file mode 100644 index 000000000..90ebe9f86 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-056/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmdpi2", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmdpi2:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-056", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: dualpi2 limit 5000 memlimit 4000000 step_thresh 10 drop_on_overload drop_enqueue any_ect no_split_gso classic_protection 20" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: dualpi2 limit 5000 memlimit 4000000 step_thresh 10 drop_on_overload drop_enqueue any_ect no_split_gso classic_protection 20", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-056/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-056/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-056/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-056/ip.out new file mode 100644 index 000000000..0309e2053 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-056/ip.out @@ -0,0 +1 @@ +[{"kind":"dualpi2","handle":"1:","root":true,"refcnt":2,"options":{"limit":5000,"memory-limit":4000000,"target":15000,"tupdate":16000,"alpha":0.15625,"beta":3.19531,"step-thresh-us":10,"min-qlen-step":0,"coupling":2,"drop-overload":"drop","drop-early":"drop-enqueue","c-protection":20,"ecn-mask":"any-ect"},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"prob":0,"delay-c":0,"delay-l":0,"pkts-in-c":0,"pkts-in-l":0,"maxq":0,"ecn-mark":0,"step-mark":0,"credit":-90840,"memory-used":0,"max-memory-used":0,"memory-limit":4000000}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-056/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-056/ip.pcap new file mode 100644 index 000000000..22632b21b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-056/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-056/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-056/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-056/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-057/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-057/cmd.json new file mode 100644 index 000000000..b1d6456ca --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-057/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmdpi3", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmdpi3:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-057", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: dualpi2 step_thresh 1ms max_rtt 50ms typical_rtt 10ms" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: dualpi2 step_thresh 1ms max_rtt 50ms typical_rtt 10ms", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-057/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-057/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-057/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-057/ip.out new file mode 100644 index 000000000..983a6238b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-057/ip.out @@ -0,0 +1 @@ +[{"kind":"dualpi2","handle":"1:","root":true,"refcnt":2,"options":{"limit":10000,"memory-limit":30280000,"target":10000,"tupdate":10000,"alpha":0.394531,"beta":5.99609,"step-thresh-us":1000,"min-qlen-step":0,"coupling":2,"drop-overload":"drop","drop-early":"drop-dequeue","c-protection":10,"ecn-mask":"l4s-ect","split-gso":null}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-057/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-057/ip.pcap new file mode 100644 index 000000000..006b86f80 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-057/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-057/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-057/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-057/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-058/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-058/cmd.json new file mode 100644 index 000000000..cfb840c9b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-058/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmplug", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmplug:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-058", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: plug limit 1000" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: plug limit 1000", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-058/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-058/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-058/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-058/ip.out new file mode 100644 index 000000000..5cbab0110 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-058/ip.out @@ -0,0 +1 @@ +[{"kind":"plug","handle":"1:","root":true,"refcnt":2,"options":{}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-058/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-058/ip.pcap new file mode 100644 index 000000000..efa4b3c96 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-058/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-058/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-058/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-058/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-059/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-059/cmd.json new file mode 100644 index 000000000..f9028fe59 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-059/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmplug", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmplug:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-059", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: plug limit 1000" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: plug limit 1000", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-059/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-059/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-059/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-059/ip.out new file mode 100644 index 000000000..cf2eb6714 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-059/ip.out @@ -0,0 +1 @@ +[{"kind":"plug","handle":"1:","root":true,"refcnt":2,"options":{},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-059/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-059/ip.pcap new file mode 100644 index 000000000..324beb15c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-059/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-059/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-059/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-059/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-060/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-060/cmd.json new file mode 100644 index 000000000..cd6ff63ed --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-060/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmskbprio", + "json": "1", + "words": "qdisc show dev d0" + }, + "cmd": "tc -j qdisc show dev d0", + "desc": "positive: opt=json cmd=aqmskbprio:qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-060", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: skbprio limit 100" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: skbprio limit 100", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-060/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-060/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-060/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-060/ip.out new file mode 100644 index 000000000..345dc379b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-060/ip.out @@ -0,0 +1 @@ +[{"kind":"skbprio","handle":"1:","root":true,"refcnt":2,"options":{"limit":100}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-060/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-060/ip.pcap new file mode 100644 index 000000000..40d229a05 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-060/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-060/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-060/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-060/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-061/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-061/cmd.json new file mode 100644 index 000000000..597b5e646 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-061/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmskbprio", + "json": "1", + "words": "-s qdisc show dev d0" + }, + "cmd": "tc -j -s qdisc show dev d0", + "desc": "corner: opt=json cmd=aqmskbprio:-s_qdisc_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-061", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: skbprio limit 100" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: skbprio limit 100", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-061/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-061/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-061/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-061/ip.out new file mode 100644 index 000000000..47576a5e3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-061/ip.out @@ -0,0 +1 @@ +[{"kind":"skbprio","handle":"1:","root":true,"refcnt":2,"options":{"limit":100},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-061/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-061/ip.pcap new file mode 100644 index 000000000..d6117cc13 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-061/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-061/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-061/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-061/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-062/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-062/cmd.json new file mode 100644 index 000000000..7c3fb973c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-062/cmd.json @@ -0,0 +1,58 @@ +{ + "axes": { + "fix": "aqmskbprio", + "json": "1", + "words": "class show dev d0" + }, + "cmd": "tc -j class show dev d0", + "desc": "corner: opt=json cmd=aqmskbprio:class_show_dev_d0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-062", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: skbprio limit 100" + ], + "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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: skbprio limit 100", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-062/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-062/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-062/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-062/ip.out new file mode 100644 index 000000000..2314626b6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-062/ip.out @@ -0,0 +1 @@ +[{"class":"skbprio","handle":"1:1","parent":"1:"},{"class":"skbprio","handle":"1:2","parent":"1:"},{"class":"skbprio","handle":"1:3","parent":"1:"},{"class":"skbprio","handle":"1:4","parent":"1:"},{"class":"skbprio","handle":"1:5","parent":"1:"},{"class":"skbprio","handle":"1:6","parent":"1:"},{"class":"skbprio","handle":"1:7","parent":"1:"},{"class":"skbprio","handle":"1:8","parent":"1:"},{"class":"skbprio","handle":"1:9","parent":"1:"},{"class":"skbprio","handle":"1:a","parent":"1:"},{"class":"skbprio","handle":"1:b","parent":"1:"},{"class":"skbprio","handle":"1:c","parent":"1:"},{"class":"skbprio","handle":"1:d","parent":"1:"},{"class":"skbprio","handle":"1:e","parent":"1:"},{"class":"skbprio","handle":"1:f","parent":"1:"},{"class":"skbprio","handle":"1:10","parent":"1:"},{"class":"skbprio","handle":"1:11","parent":"1:"},{"class":"skbprio","handle":"1:12","parent":"1:"},{"class":"skbprio","handle":"1:13","parent":"1:"},{"class":"skbprio","handle":"1:14","parent":"1:"},{"class":"skbprio","handle":"1:15","parent":"1:"},{"class":"skbprio","handle":"1:16","parent":"1:"},{"class":"skbprio","handle":"1:17","parent":"1:"},{"class":"skbprio","handle":"1:18","parent":"1:"},{"class":"skbprio","handle":"1:19","parent":"1:"},{"class":"skbprio","handle":"1:1a","parent":"1:"},{"class":"skbprio","handle":"1:1b","parent":"1:"},{"class":"skbprio","handle":"1:1c","parent":"1:"},{"class":"skbprio","handle":"1:1d","parent":"1:"},{"class":"skbprio","handle":"1:1e","parent":"1:"},{"class":"skbprio","handle":"1:1f","parent":"1:"},{"class":"skbprio","handle":"1:20","parent":"1:"},{"class":"skbprio","handle":"1:21","parent":"1:"},{"class":"skbprio","handle":"1:22","parent":"1:"},{"class":"skbprio","handle":"1:23","parent":"1:"},{"class":"skbprio","handle":"1:24","parent":"1:"},{"class":"skbprio","handle":"1:25","parent":"1:"},{"class":"skbprio","handle":"1:26","parent":"1:"},{"class":"skbprio","handle":"1:27","parent":"1:"},{"class":"skbprio","handle":"1:28","parent":"1:"},{"class":"skbprio","handle":"1:29","parent":"1:"},{"class":"skbprio","handle":"1:2a","parent":"1:"},{"class":"skbprio","handle":"1:2b","parent":"1:"},{"class":"skbprio","handle":"1:2c","parent":"1:"},{"class":"skbprio","handle":"1:2d","parent":"1:"},{"class":"skbprio","handle":"1:2e","parent":"1:"},{"class":"skbprio","handle":"1:2f","parent":"1:"},{"class":"skbprio","handle":"1:30","parent":"1:"},{"class":"skbprio","handle":"1:31","parent":"1:"},{"class":"skbprio","handle":"1:32","parent":"1:"},{"class":"skbprio","handle":"1:33","parent":"1:"},{"class":"skbprio","handle":"1:34","parent":"1:"},{"class":"skbprio","handle":"1:35","parent":"1:"},{"class":"skbprio","handle":"1:36","parent":"1:"},{"class":"skbprio","handle":"1:37","parent":"1:"},{"class":"skbprio","handle":"1:38","parent":"1:"},{"class":"skbprio","handle":"1:39","parent":"1:"},{"class":"skbprio","handle":"1:3a","parent":"1:"},{"class":"skbprio","handle":"1:3b","parent":"1:"},{"class":"skbprio","handle":"1:3c","parent":"1:"},{"class":"skbprio","handle":"1:3d","parent":"1:"},{"class":"skbprio","handle":"1:3e","parent":"1:"},{"class":"skbprio","handle":"1:3f","parent":"1:"},{"class":"skbprio","handle":"1:40","parent":"1:"}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-062/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-062/ip.pcap new file mode 100644 index 000000000..a2ba40038 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-062/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-062/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-062/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-062/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-063/b.txt b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-063/b.txt new file mode 100644 index 000000000..cd519630e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-063/b.txt @@ -0,0 +1,3 @@ +qdisc show dev d0 +class show dev d0 +qdisc show dev d0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-063/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-063/cmd.json new file mode 100644 index 000000000..20833e2a9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-063/cmd.json @@ -0,0 +1,64 @@ +{ + "axes": { + "batch": "qdisc-then-class", + "fix": "aqmcake", + "json": "1", + "words": "-s -batch b.txt" + }, + "cmd": "tc -j -s -batch b.txt", + "desc": "positive: opt=json cmd=aqmcake:batch:qdisc-then-class", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-063", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: cake", + "printf '%s\\n' 'qdisc show dev d0' 'class show dev d0' 'qdisc show dev d0' > 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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cake", + "rc": 0 + }, + { + "cmd": "printf '%s\\n' 'qdisc show dev d0' 'class show dev d0' 'qdisc show dev d0' > b.txt", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-063/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-063/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-063/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-063/ip.out new file mode 100644 index 000000000..b6f1de401 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-063/ip.out @@ -0,0 +1,3 @@ +[{"kind":"cake","handle":"1:","root":true,"refcnt":2,"options":{"bandwidth":"unlimited","diffserv":"diffserv3","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"memory_used":0,"memory_limit":15503360,"capacity_estimate":0,"min_network_size":65535,"max_network_size":0,"min_adj_size":65535,"max_adj_size":0,"active_queues":0,"avg_hdr_offset":0,"tins":[{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514}]}] +[] +[{"kind":"cake","handle":"1:","root":true,"refcnt":2,"options":{"bandwidth":"unlimited","diffserv":"diffserv3","flowmode":"triple-isolate","nat":false,"wash":false,"ingress":false,"ack-filter":"disabled","split_gso":true,"rtt":100000,"raw":true,"overhead":0,"fwmark":"0"},"bytes":0,"packets":0,"drops":0,"overlimits":0,"requeues":0,"backlog":0,"qlen":0,"memory_used":0,"memory_limit":15503360,"capacity_estimate":0,"min_network_size":65535,"max_network_size":0,"min_adj_size":65535,"max_adj_size":0,"active_queues":0,"avg_hdr_offset":0,"tins":[{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514},{"threshold_rate":0,"sent_bytes":0,"backlog_bytes":0,"target_us":5000,"interval_us":100000,"peak_delay_us":0,"avg_delay_us":0,"base_delay_us":0,"sent_packets":0,"way_indirect_hits":0,"way_misses":0,"way_collisions":0,"drops":0,"ecn_mark":0,"ack_drops":0,"sparse_flows":0,"bulk_flows":0,"unresponsive_flows":0,"max_pkt_len":0,"flow_quantum":1514}]}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-063/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-063/ip.pcap new file mode 100644 index 000000000..283597dac Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-063/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-063/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-063/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-063/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-064/b.txt b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-064/b.txt new file mode 100644 index 000000000..8058c1648 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-064/b.txt @@ -0,0 +1,2 @@ +qdisc show dev d0 +qdisc show dev d0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-064/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-064/cmd.json new file mode 100644 index 000000000..e8fa351cc --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-064/cmd.json @@ -0,0 +1,64 @@ +{ + "axes": { + "batch": "red-twice", + "fix": "aqmred2", + "json": "1", + "words": "-d -batch b.txt" + }, + "cmd": "tc -j -d -batch b.txt", + "desc": "corner: opt=json cmd=aqmred2:batch:red-twice", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcaqm/pw-064", + "modules": [ + "sch_cake", + "sch_choke", + "sch_codel", + "sch_dualpi2", + "sch_fq_pie", + "sch_gred", + "sch_hhf", + "sch_pie", + "sch_plug", + "sch_red", + "sch_sfb", + "sch_skbprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up", + "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10", + "printf '%s\\n' 'qdisc show dev d0' 'qdisc show dev d0' > 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", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit ecn harddrop adaptive qevent early_drop block 10", + "rc": 0 + }, + { + "cmd": "printf '%s\\n' 'qdisc show dev d0' 'qdisc show dev d0' > b.txt", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-064/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-064/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-064/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-064/ip.out new file mode 100644 index 000000000..b35e3bf25 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-064/ip.out @@ -0,0 +1,2 @@ +[{"kind":"red","handle":"1:","root":true,"refcnt":2,"options":{"limit":400000,"min":30000,"max":90000,"ecn":true,"harddrop":true,"adaptive":true,"nodrop":false,"ewma":5,"probability":0.02,"Scell_log":15,"qevents":[{"kind":"early_drop","block":10}]}}] +[{"kind":"red","handle":"1:","root":true,"refcnt":2,"options":{"limit":400000,"min":30000,"max":90000,"ecn":true,"harddrop":true,"adaptive":true,"nodrop":false,"ewma":5,"probability":0.02,"Scell_log":15,"qevents":[{"kind":"early_drop","block":10}]}}] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-064/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-064/ip.pcap new file mode 100644 index 000000000..8bf0c2cbf Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-064/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-064/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-064/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/pw-064/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/xtcpnl_tc_aqm.go b/pkg/xtcpnl/xtcpnl_tc_aqm.go new file mode 100644 index 000000000..676d430e1 --- /dev/null +++ b/pkg/xtcpnl/xtcpnl_tc_aqm.go @@ -0,0 +1,1117 @@ +package xtcpnl + +import ( + "encoding/binary" + "errors" + "fmt" + + "github.com/randomizedcoder/xtcp2/pkg/cint" +) + +// This file decodes the AQM and leaf qdisc kinds (gotc 16P): red, gred, +// choke, sfb, codel, pie, fq_pie, hhf, cake, cake_mq, dualpi2, plug and +// skbprio, each read the way its tc/q_*.c printer reads it (iproute2 +// v7.2.0). The constants and structures are include/uapi/linux/pkt_sched.h +// at linux v7.4-rc4. +// +// The decoders keep C's widths and walks, so the printers' quirks stay +// visible to gotc: red's FLAGS value lands in an unsigned char +// (q_red.c:180); gred reads VQ_STAT_BYTES, a u64 on the wire, as a u32 +// (q_gred.c:333, Q70) and walks its VQ list by unaligned rta_len +// (q_gred.c:312). Where tc reads past an attribute, crashes or loops, the +// decoder returns an error or a flag gotc refuses on: a short scalar tc +// reads unchecked is ErrTcShort; gred without TCA_GRED_DPS is ErrTcMissing +// (Q67); a gred VQ entry with rta_len under 4 is ErrTcShort, where tc +// spins (Q71); a VQ_DP of MAX_DPs or more sets TcGred.VqDpOver, where tc +// writes past infos[] (Q68); a cake tin missing an attribute tin 0 has +// sets TcCakeXstats.TinGap, where tc's text table dereferences NULL +// (Q78). + +// Qdisc kinds of increment 16 (tc/q_*.c qdisc_util.id). +const ( + TcKindRed = "red" + TcKindGred = "gred" + TcKindChoke = "choke" + TcKindSfb = "sfb" + TcKindCodel = "codel" + TcKindPie = "pie" + TcKindFqPie = "fq_pie" + TcKindHhf = "hhf" + TcKindCake = "cake" + TcKindCakeMq = "cake_mq" + TcKindDualpi2 = "dualpi2" + TcKindPlug = "plug" + TcKindSkbprio = "skbprio" +) + +// Structure sizes (include/uapi/linux/pkt_sched.h). +const ( + // TcRedQoptSizeCst is sizeof(struct tc_red_qopt) and of struct + // tc_choke_qopt: three u32 and four unsigned char. + TcRedQoptSizeCst = 16 + // TcRedXstatsSizeCst is sizeof(struct tc_red_xstats): four u32. + TcRedXstatsSizeCst = 16 + // TcChokeXstatsSizeCst is sizeof(struct tc_choke_xstats): five u32. + TcChokeXstatsSizeCst = 20 + // TcGredQoptSizeCst is sizeof(struct tc_gred_qopt): ten u32, four u8 + // and two u32. + TcGredQoptSizeCst = 52 + // TcGredSoptSizeCst is sizeof(struct tc_gred_sopt): two u32, two u8 + // and a u16. + TcGredSoptSizeCst = 12 + // TcSfbQoptSizeCst is sizeof(struct tc_sfb_qopt): nine u32. + TcSfbQoptSizeCst = 36 + // TcSfbXstatsSizeCst is sizeof(struct tc_sfb_xstats): nine u32. + TcSfbXstatsSizeCst = 36 + // TcCodelXstatsSizeCst is sizeof(struct tc_codel_xstats): nine + // 32-bit fields. + TcCodelXstatsSizeCst = 36 + // TcPieXstatsSizeCst is sizeof(struct tc_pie_xstats): a u64 and eight + // u32. + TcPieXstatsSizeCst = 40 + // TcFqPieXstatsSizeCst is sizeof(struct tc_fq_pie_xstats): nine u32. + TcFqPieXstatsSizeCst = 36 + // TcHhfXstatsSizeCst is sizeof(struct tc_hhf_xstats): four u32. + TcHhfXstatsSizeCst = 16 + // TcDualpi2XstatsSizeCst is sizeof(struct tc_dualpi2_xstats): twelve + // 32-bit fields. + TcDualpi2XstatsSizeCst = 48 + // TcSkbprioQoptSizeCst is sizeof(struct tc_skbprio_qopt): u32 limit. + TcSkbprioQoptSizeCst = 4 + + // GredMaxDPsCst is MAX_DPs. + GredMaxDPsCst = 16 + // CakeMaxTinsCst is TC_CAKE_MAX_TINS. + CakeMaxTinsCst = 8 + // SfbMaxProbCst is SFB_MAX_PROB. + SfbMaxProbCst = 0xFFFF + // SkbprioMaxPriorityCst is SKBPRIO_MAX_PRIORITY. + SkbprioMaxPriorityCst = 64 +) + +// TC_RED_* flags (struct tc_red_qopt.flags). +const ( + TcRedEcn = 1 + TcRedHarddrop = 2 + TcRedAdaptative = 4 + TcRedNodrop = 8 +) + +// TCA_RED_* attributes. +const ( + TcaRedParms uint16 = 1 + TcaRedStab uint16 = 2 + TcaRedMaxP uint16 = 3 + TcaRedFlags uint16 = 4 + TcaRedEarlyDropBlock uint16 = 5 + TcaRedMarkBlock uint16 = 6 + // TcaRedMaxKnown is TCA_RED_MAX. + TcaRedMaxKnown = TcaRedMarkBlock +) + +// TCA_CHOKE_* attributes. +const ( + TcaChokeParms uint16 = 1 + TcaChokeStab uint16 = 2 + TcaChokeMaxP uint16 = 3 + // TcaChokeMaxKnown is TCA_CHOKE_MAX. + TcaChokeMaxKnown = TcaChokeMaxP +) + +// TCA_GRED_* attributes. +const ( + TcaGredParms uint16 = 1 + TcaGredStab uint16 = 2 + TcaGredDps uint16 = 3 + TcaGredMaxP uint16 = 4 + TcaGredLimit uint16 = 5 + TcaGredVqList uint16 = 6 + // TcaGredMaxKnown is TCA_GRED_MAX. + TcaGredMaxKnown = TcaGredVqList + + // TcaGredVqEntry is TCA_GRED_VQ_ENTRY. + TcaGredVqEntry uint16 = 1 +) + +// TCA_GRED_VQ_* attributes. +const ( + TcaGredVqPad uint16 = 1 + TcaGredVqDp uint16 = 2 + TcaGredVqStatBytes uint16 = 3 + TcaGredVqStatPackets uint16 = 4 + TcaGredVqStatBacklog uint16 = 5 + TcaGredVqStatProbDrop uint16 = 6 + TcaGredVqStatProbMark uint16 = 7 + TcaGredVqStatForcedDrop uint16 = 8 + TcaGredVqStatForcedMark uint16 = 9 + TcaGredVqStatPdrop uint16 = 10 + TcaGredVqStatOther uint16 = 11 + TcaGredVqFlags uint16 = 12 + // TcaGredVqMaxKnown is TCA_GRED_VQ_MAX. + TcaGredVqMaxKnown = TcaGredVqFlags +) + +// TCA_SFB_PARMS, the only sfb attribute. +const ( + TcaSfbParms uint16 = 1 + // TcaSfbMaxKnown is TCA_SFB_MAX. + TcaSfbMaxKnown = TcaSfbParms +) + +// TCA_CODEL_* attributes. +const ( + TcaCodelTarget uint16 = 1 + TcaCodelLimit uint16 = 2 + TcaCodelInterval uint16 = 3 + TcaCodelEcn uint16 = 4 + TcaCodelCeThreshold uint16 = 5 + // TcaCodelMaxKnown is TCA_CODEL_MAX. + TcaCodelMaxKnown = TcaCodelCeThreshold +) + +// TCA_PIE_* attributes. +const ( + TcaPieTarget uint16 = 1 + TcaPieLimit uint16 = 2 + TcaPieTupdate uint16 = 3 + TcaPieAlpha uint16 = 4 + TcaPieBeta uint16 = 5 + TcaPieEcn uint16 = 6 + TcaPieBytemode uint16 = 7 + TcaPieDqRateEstimator uint16 = 8 + // TcaPieMaxKnown is TCA_PIE_MAX. + TcaPieMaxKnown = TcaPieDqRateEstimator +) + +// TCA_FQ_PIE_* attributes. +const ( + TcaFqPieLimit uint16 = 1 + TcaFqPieFlows uint16 = 2 + TcaFqPieTarget uint16 = 3 + TcaFqPieTupdate uint16 = 4 + TcaFqPieAlpha uint16 = 5 + TcaFqPieBeta uint16 = 6 + TcaFqPieQuantum uint16 = 7 + TcaFqPieMemoryLimit uint16 = 8 + TcaFqPieEcnProb uint16 = 9 + TcaFqPieEcn uint16 = 10 + TcaFqPieBytemode uint16 = 11 + TcaFqPieDqRateEstimator uint16 = 12 + // TcaFqPieMaxKnown is TCA_FQ_PIE_MAX. + TcaFqPieMaxKnown = TcaFqPieDqRateEstimator +) + +// TCA_HHF_* attributes. +const ( + TcaHhfBacklogLimit uint16 = 1 + TcaHhfQuantum uint16 = 2 + TcaHhfHhFlowsLimit uint16 = 3 + TcaHhfResetTimeout uint16 = 4 + TcaHhfAdmitBytes uint16 = 5 + TcaHhfEvictTimeout uint16 = 6 + TcaHhfNonHhWeight uint16 = 7 + // TcaHhfMaxKnown is TCA_HHF_MAX. + TcaHhfMaxKnown = TcaHhfNonHhWeight +) + +// TCA_CAKE_* attributes. +const ( + TcaCakePad uint16 = 1 + TcaCakeBaseRate64 uint16 = 2 + TcaCakeDiffservMode uint16 = 3 + TcaCakeAtm uint16 = 4 + TcaCakeFlowMode uint16 = 5 + TcaCakeOverhead uint16 = 6 + TcaCakeRtt uint16 = 7 + TcaCakeTarget uint16 = 8 + TcaCakeAutorate uint16 = 9 + TcaCakeMemory uint16 = 10 + TcaCakeNat uint16 = 11 + TcaCakeRaw uint16 = 12 + TcaCakeWash uint16 = 13 + TcaCakeMpu uint16 = 14 + TcaCakeIngress uint16 = 15 + TcaCakeAckFilter uint16 = 16 + TcaCakeSplitGso uint16 = 17 + TcaCakeFwmark uint16 = 18 + // TcaCakeMaxKnown is TCA_CAKE_MAX. + TcaCakeMaxKnown = TcaCakeFwmark +) + +// TCA_CAKE_STATS_* attributes. +const ( + TcaCakeStatsPad uint16 = 1 + TcaCakeStatsCapacityEstimate64 uint16 = 2 + TcaCakeStatsMemoryLimit uint16 = 3 + TcaCakeStatsMemoryUsed uint16 = 4 + TcaCakeStatsAvgNetoff uint16 = 5 + TcaCakeStatsMinNetlen uint16 = 6 + TcaCakeStatsMaxNetlen uint16 = 7 + TcaCakeStatsMinAdjlen uint16 = 8 + TcaCakeStatsMaxAdjlen uint16 = 9 + TcaCakeStatsTinStats uint16 = 10 + TcaCakeStatsDeficit uint16 = 11 + TcaCakeStatsCobaltCount uint16 = 12 + TcaCakeStatsDropping uint16 = 13 + TcaCakeStatsDropNextUs uint16 = 14 + TcaCakeStatsPDrop uint16 = 15 + TcaCakeStatsBlueTimerUs uint16 = 16 + TcaCakeStatsActiveQueues uint16 = 17 + // TcaCakeStatsMaxKnown is TCA_CAKE_STATS_MAX. + TcaCakeStatsMaxKnown = TcaCakeStatsActiveQueues +) + +// TCA_CAKE_TIN_STATS_* attributes. +const ( + TcaCakeTinStatsPad uint16 = 1 + TcaCakeTinStatsSentPackets uint16 = 2 + TcaCakeTinStatsSentBytes64 uint16 = 3 + TcaCakeTinStatsDroppedPackets uint16 = 4 + TcaCakeTinStatsDroppedBytes64 uint16 = 5 + TcaCakeTinStatsAcksDroppedPackets uint16 = 6 + TcaCakeTinStatsAcksDroppedBytes64 uint16 = 7 + TcaCakeTinStatsEcnMarkedPackets uint16 = 8 + TcaCakeTinStatsEcnMarkedBytes64 uint16 = 9 + TcaCakeTinStatsBacklogPackets uint16 = 10 + TcaCakeTinStatsBacklogBytes uint16 = 11 + TcaCakeTinStatsThresholdRate64 uint16 = 12 + TcaCakeTinStatsTargetUs uint16 = 13 + TcaCakeTinStatsIntervalUs uint16 = 14 + TcaCakeTinStatsWayIndirectHits uint16 = 15 + TcaCakeTinStatsWayMisses uint16 = 16 + TcaCakeTinStatsWayCollisions uint16 = 17 + TcaCakeTinStatsPeakDelayUs uint16 = 18 + TcaCakeTinStatsAvgDelayUs uint16 = 19 + TcaCakeTinStatsBaseDelayUs uint16 = 20 + TcaCakeTinStatsSparseFlows uint16 = 21 + TcaCakeTinStatsBulkFlows uint16 = 22 + TcaCakeTinStatsUnresponsiveFlows uint16 = 23 + TcaCakeTinStatsMaxSkblen uint16 = 24 + TcaCakeTinStatsFlowQuantum uint16 = 25 + TcaCakeTinStatsMaxKnown = TcaCakeTinStatsFlowQuantum // TCA_CAKE_TIN_STATS_MAX + tcaCakeTinStatsMaxKnownSlotsCst = int(TcaCakeTinStatsMaxKnown) + 1 +) + +// CAKE_* enums. +const ( + CakeFlowNone = 0 + CakeFlowSrcIP = 1 + CakeFlowDstIP = 2 + CakeFlowHosts = 3 + CakeFlowFlows = 4 + CakeFlowDualSrc = 5 + CakeFlowDualDst = 6 + CakeFlowTriple = 7 + CakeFlowMax = 8 + CakeDiffserv3 = 0 + CakeDiffserv4 = 1 + CakeDiffserv8 = 2 + CakeBesteffort = 3 + CakePrecedence = 4 + CakeDiffservMax = 5 + CakeAckNone = 0 + CakeAckFilter = 1 + CakeAckAggressive = 2 + CakeAtmNone = 0 + CakeAtmAtm = 1 + CakeAtmPtm = 2 +) + +// TCA_DUALPI2_* attributes. +const ( + TcaDualpi2Limit uint16 = 1 + TcaDualpi2MemoryLimit uint16 = 2 + TcaDualpi2Target uint16 = 3 + TcaDualpi2Tupdate uint16 = 4 + TcaDualpi2Alpha uint16 = 5 + TcaDualpi2Beta uint16 = 6 + TcaDualpi2StepThreshPkts uint16 = 7 + TcaDualpi2StepThreshUs uint16 = 8 + TcaDualpi2MinQlenStep uint16 = 9 + TcaDualpi2Coupling uint16 = 10 + TcaDualpi2DropOverload uint16 = 11 + TcaDualpi2DropEarly uint16 = 12 + TcaDualpi2CProtection uint16 = 13 + TcaDualpi2EcnMask uint16 = 14 + TcaDualpi2SplitGso uint16 = 15 + TcaDualpi2Pad uint16 = 16 + // TcaDualpi2MaxKnown is TCA_DUALPI2_MAX. + TcaDualpi2MaxKnown = TcaDualpi2Pad +) + +// TC_DUALPI2_ECN_MASK_* values. +const ( + TcDualpi2EcnMaskL4sEct = 1 + TcDualpi2EcnMaskClaEct = 2 + TcDualpi2EcnMaskAnyEct = 3 +) + +// ErrTcGredSmall is gred's "GRED received message smaller than expected": +// TCA_GRED_DPS or TCA_GRED_PARMS short, which tc prints to stdout, inside +// any open JSON object, before returning -1 (q_gred.c:440, Q72). +var ErrTcGredSmall = fmt.Errorf("%w: gred message smaller than expected", ErrTcShort) + +// ErrTcVals is a TcVals table over a kind with more attributes than it +// holds; no uapi kind here has. +var ErrTcVals = errors.New("xtcpnl: tc value table too small") + +// tcValsSlotsCst is TcVals' capacity: every kind's MAX here is under it. +const tcValsSlotsCst = 32 + +// TcVals is a kind's scalar attributes as its printer reads them: V[t] +// holds attribute t's value at the width tc reads, Has bit t says tc read +// it (the attribute present and, for the guarded reads, at least that +// wide). Signed fields hold their bits; take them with S32. +type TcVals struct { + V [tcValsSlotsCst]uint64 + Has uint32 +} + +// Get is attribute t's value and whether tc read it. +func (v *TcVals) Get(t uint16) (uint64, bool) { + if int(t) >= tcValsSlotsCst || v.Has&(1<= sizeof(...)) v = rta_getattr_*(tb[t])` reads: widths[t] is the read's +// width, 0 for an attribute tc does not read, tcPresenceCst for `if +// (tb[t])`. A present attribute shorter than its width is skipped, as tc +// skips it; short gets its bit. +func (v *TcVals) loose(tb AttrTable, widths []int8) (short uint32, err error) { + if len(widths) > tcValsSlotsCst { + return 0, ErrTcVals + } + for t := uint16(0); int(t) < len(widths); t++ { + w := widths[t] + if w == 0 || !tb.Has(t) { + continue + } + if w == tcPresenceCst { + v.Has |= 1 << t + continue + } + b := tb.Bytes(t) + if len(b) < int(w) { + short |= 1 << t + continue + } + v.V[t] = leUint(b, int(w)) + v.Has |= 1 << t + } + return short, nil +} + +// leUint reads the first w (1, 4 or 8) bytes of b little-endian, as +// rta_getattr_u8/u32/u64 read a longer payload's head. +func leUint(b []byte, w int) uint64 { + if len(b) < w { + return 0 + } + switch w { + case 1: + return uint64(b[0]) + case 4: + return uint64(binary.LittleEndian.Uint32(b)) + default: + return binary.LittleEndian.Uint64(b) + } +} + +// Read widths per kind, indexed by attribute: each printer's guarded +// reads. +var ( + codelWidths = []int8{TcaCodelTarget: 4, TcaCodelLimit: 4, TcaCodelInterval: 4, TcaCodelEcn: 4, + TcaCodelCeThreshold: 4} + pieWidths = []int8{TcaPieTarget: 4, TcaPieLimit: 4, TcaPieTupdate: 4, TcaPieAlpha: 4, TcaPieBeta: 4, + TcaPieEcn: 4, TcaPieBytemode: 4, TcaPieDqRateEstimator: 4} + fqPieWidths = []int8{TcaFqPieLimit: 4, TcaFqPieFlows: 4, TcaFqPieTarget: 4, TcaFqPieTupdate: 4, + TcaFqPieAlpha: 4, TcaFqPieBeta: 4, TcaFqPieQuantum: 4, TcaFqPieMemoryLimit: 4, TcaFqPieEcnProb: 4, + TcaFqPieEcn: 4, TcaFqPieBytemode: 4, TcaFqPieDqRateEstimator: 4} + hhfWidths = []int8{TcaHhfBacklogLimit: 4, TcaHhfQuantum: 4, TcaHhfHhFlowsLimit: 4, TcaHhfResetTimeout: 4, + TcaHhfAdmitBytes: 4, TcaHhfEvictTimeout: 4, TcaHhfNonHhWeight: 4} + // dualpi2's u8 attributes are guarded by sizeof(__u8). + dualpi2Widths = []int8{TcaDualpi2Limit: 4, TcaDualpi2MemoryLimit: 4, TcaDualpi2Target: 4, + TcaDualpi2Tupdate: 4, TcaDualpi2Alpha: 4, TcaDualpi2Beta: 4, TcaDualpi2StepThreshPkts: 4, + TcaDualpi2StepThreshUs: 4, TcaDualpi2MinQlenStep: 4, TcaDualpi2Coupling: 1, TcaDualpi2DropOverload: 1, + TcaDualpi2DropEarly: 1, TcaDualpi2CProtection: 1, TcaDualpi2EcnMask: 1, TcaDualpi2SplitGso: 1, + TcaDualpi2Pad: 0} + // cake reads no TARGET (K38) and tests RAW for presence. + cakeWidths = []int8{TcaCakeBaseRate64: 8, TcaCakeDiffservMode: 4, TcaCakeAtm: 4, TcaCakeFlowMode: 4, + TcaCakeOverhead: 4, TcaCakeRtt: 4, TcaCakeTarget: 0, TcaCakeAutorate: 4, TcaCakeMemory: 4, TcaCakeNat: 4, + TcaCakeRaw: tcPresenceCst, TcaCakeWash: 4, TcaCakeMpu: 4, TcaCakeIngress: 4, TcaCakeAckFilter: 4, + TcaCakeSplitGso: 4, TcaCakeFwmark: 4} + // cake's stats getters are unchecked (GET_STAT_*, q_cake.c:627-629); + // the tin stats nest is walked separately. + cakeStatsWidths = []int8{TcaCakeStatsCapacityEstimate64: 8, TcaCakeStatsMemoryLimit: 4, + TcaCakeStatsMemoryUsed: 4, TcaCakeStatsAvgNetoff: 4, TcaCakeStatsMinNetlen: 4, TcaCakeStatsMaxNetlen: 4, + TcaCakeStatsMinAdjlen: 4, TcaCakeStatsMaxAdjlen: 4, TcaCakeStatsTinStats: 0, TcaCakeStatsDeficit: 4, + TcaCakeStatsCobaltCount: 4, TcaCakeStatsDropping: 4, TcaCakeStatsDropNextUs: 4, TcaCakeStatsPDrop: 4, + TcaCakeStatsBlueTimerUs: 4, TcaCakeStatsActiveQueues: 4} + // The twenty tin attributes tc prints, text and JSON alike. + cakeTinWidths = []int8{TcaCakeTinStatsSentPackets: 4, TcaCakeTinStatsSentBytes64: 8, + TcaCakeTinStatsDroppedPackets: 4, TcaCakeTinStatsAcksDroppedPackets: 4, + TcaCakeTinStatsEcnMarkedPackets: 4, TcaCakeTinStatsBacklogBytes: 4, TcaCakeTinStatsThresholdRate64: 8, + TcaCakeTinStatsTargetUs: 4, TcaCakeTinStatsIntervalUs: 4, TcaCakeTinStatsWayIndirectHits: 4, + TcaCakeTinStatsWayMisses: 4, TcaCakeTinStatsWayCollisions: 4, TcaCakeTinStatsPeakDelayUs: 4, + TcaCakeTinStatsAvgDelayUs: 4, TcaCakeTinStatsBaseDelayUs: 4, TcaCakeTinStatsSparseFlows: 4, + TcaCakeTinStatsBulkFlows: 4, TcaCakeTinStatsUnresponsiveFlows: 4, TcaCakeTinStatsMaxSkblen: 4, + TcaCakeTinStatsFlowQuantum: 4} +) + +// TcRedQopt is struct tc_red_qopt, and struct tc_choke_qopt, which has +// the same layout. +type TcRedQopt struct { + Limit uint32 + QthMin uint32 + QthMax uint32 + Wlog uint8 + Plog uint8 + ScellLog uint8 + Flags uint8 +} + +// DecodeTcRedQopt decodes a struct tc_red_qopt. +func DecodeTcRedQopt(b []byte) (TcRedQopt, error) { + if err := tcNeed(b, TcRedQoptSizeCst, "tc_red_qopt"); err != nil { + return TcRedQopt{}, err + } + r := tcRd{b: b} + return TcRedQopt{Limit: r.u32(), QthMin: r.u32(), QthMax: r.u32(), Wlog: r.u8(), Plog: r.u8(), + ScellLog: r.u8(), Flags: r.u8()}, nil +} + +// TcRed is red_print_opt's and choke_print_opt's reads. Qopt.Flags is +// TCA_RED_FLAGS' value when that is at least a struct nla_bitfield32, +// truncated to the unsigned char it is stored in. EarlyDrop and Mark are +// red's qevent blocks (tc_qevent.c read_block_idx), read unchecked. +type TcRed struct { + Qopt TcRedQopt + MaxP uint32 // 0 when absent or short, as tc's max_P + EarlyDrop uint32 + HasEarlyDrop bool + Mark uint32 + HasMark bool +} + +// TcGredQopt is struct tc_gred_qopt, one per DP slot. +type TcGredQopt struct { + Limit uint32 + QthMin uint32 + QthMax uint32 + DP uint32 + Backlog uint32 + Qave uint32 + Forced uint32 + Early uint32 + Other uint32 + Pdrop uint32 + Wlog uint8 + Plog uint8 + ScellLog uint8 + Prio uint8 + Packets uint32 + Bytesin uint32 +} + +// TcGredSopt is struct tc_gred_sopt. +type TcGredSopt struct { + DPs uint32 + DefDP uint32 + Grio uint8 + Flags uint8 + Pad1 uint16 +} + +// TcGredInfo is q_gred.c's struct tc_gred_info, one VQ entry as +// gred_parse_vqs reads it. Bytes is tc's u32 read of VQ_STAT_BYTES (Q70); +// BytesWire is the u64 the kernel sent, when 8 bytes are there. +type TcGredInfo struct { + FlagsPresent bool + Bytes uint32 + BytesWire uint64 + HasBytesWire bool + Packets uint32 + Backlog uint32 + ProbDrop uint32 + ProbMark uint32 + ForcedDrop uint32 + ForcedMark uint32 + Pdrop uint32 + Other uint32 + Flags uint32 +} + +// TcGred is gred_print_opt's reads. Warn holds the stderr lines +// gred_parse_vqs prints for an entry it skips, in order. +type TcGred struct { + Sopt TcGredSopt + Qopts [GredMaxDPsCst]TcGredQopt + MaxP [GredMaxDPsCst]uint32 + HasMaxP bool // at least MAX_DPs u32 + Limit uint32 + HasLimit bool // exactly a u32 + Info [GredMaxDPsCst]TcGredInfo + HasVQ bool + VqDpOver bool // a VQ_DP of MAX_DPs or more: tc writes past infos[] (Q68) + Warn []string +} + +// TcSfbQopt is struct tc_sfb_qopt. +type TcSfbQopt struct { + RehashInterval uint32 + WarmupTime uint32 + Max uint32 + BinSize uint32 + Increment uint32 + Decrement uint32 + Limit uint32 + PenaltyRate uint32 + PenaltyBurst uint32 +} + +// DecodeTcSfbQopt decodes a struct tc_sfb_qopt. +func DecodeTcSfbQopt(b []byte) (TcSfbQopt, error) { + if err := tcNeed(b, TcSfbQoptSizeCst, "tc_sfb_qopt"); err != nil { + return TcSfbQopt{}, err + } + r := tcRd{b: b} + return TcSfbQopt{RehashInterval: r.u32(), WarmupTime: r.u32(), Max: r.u32(), BinSize: r.u32(), + Increment: r.u32(), Decrement: r.u32(), Limit: r.u32(), PenaltyRate: r.u32(), PenaltyBurst: r.u32()}, nil +} + +// TcAqm is the increment-16 kinds' options decoded; TcQopt.Aqm. codel, +// pie, fq_pie, hhf, dualpi2 and cake (and cake_mq) fill Vals. +type TcAqm struct { + Red TcRed // red, choke + // Gred is allocated for gred alone: its sixteen slots would + // otherwise grow every kind's TcQopt by 2 KB. + Gred *TcGred + Sfb TcSfbQopt + Vals TcVals + Skbprio uint32 // struct tc_skbprio_qopt.limit + HasSkbprio bool +} + +// parseAqm decodes kind's options; ok is false for a kind that is not one +// of increment 16's. A nil opt (no TCA_OPTIONS) is each printer's `opt == +// NULL` return and decodes to nothing. +func (q *TcQopt) parseAqm(kind string, opt []byte) (bool, error) { + var widths []int8 + var maxType uint16 + switch kind { + case TcKindRed, TcKindChoke, TcKindGred, TcKindSfb, TcKindSkbprio, TcKindPlug: + case TcKindCodel: + widths, maxType = codelWidths, TcaCodelMaxKnown + case TcKindPie: + widths, maxType = pieWidths, TcaPieMaxKnown + case TcKindFqPie: + widths, maxType = fqPieWidths, TcaFqPieMaxKnown + case TcKindHhf: + widths, maxType = hhfWidths, TcaHhfMaxKnown + case TcKindDualpi2: + widths, maxType = dualpi2Widths, TcaDualpi2MaxKnown + case TcKindCake, TcKindCakeMq: + widths, maxType = cakeWidths, TcaCakeMaxKnown + default: + return false, nil + } + if opt == nil { + return true, nil + } + a := &q.Aqm + var err error + switch kind { + case TcKindRed: + err = q.parseRed(opt, TcaRedMaxKnown, TcaRedParms, TcaRedMaxP, true) + case TcKindChoke: + err = q.parseRed(opt, TcaChokeMaxKnown, TcaChokeParms, TcaChokeMaxP, false) + case TcKindGred: + err = q.parseGred(opt) + case TcKindSfb: + var b []byte + if b, err = q.parms(opt, TcaSfbMaxKnown, TcaSfbParms, "TCA_SFB_PARMS"); err == nil { + a.Sfb, err = DecodeTcSfbQopt(b) + } + case TcKindSkbprio: + // skbprio's options are the bare struct (K42). + if err = tcNeed(opt, TcSkbprioQoptSizeCst, "tc_skbprio_qopt"); err == nil { + a.Skbprio, a.HasSkbprio = binary.LittleEndian.Uint32(opt), true + } + case TcKindPlug: + // sch_plug has no .dump (K41); plug_print_opt reads nothing. + default: + var tb AttrTable + if tb, err = ParseAttrTableFlags(opt, maxType, tcNestedFlags); err == nil { + q.Tb = tb + _, err = a.Vals.loose(tb, widths) + } + } + return true, err +} + +// parseRed is red_print_opt (red, with FLAGS and the qevents) and +// choke_print_opt: PARMS is required and at least a struct, MAX_P read +// when a u32. +func (q *TcQopt) parseRed(opt []byte, maxType, parms, maxP uint16, red bool) error { + b, err := q.parms(opt, maxType, parms, "PARMS") + if err != nil { + return err + } + r := &q.Aqm.Red + if r.Qopt, err = DecodeTcRedQopt(b); err != nil { + return err + } + tb := q.Tb + if v, ok := tb.U32(maxP); ok { + r.MaxP = v + } + if !red { + return nil + } + if fb := tb.Bytes(TcaRedFlags); len(fb) >= NlaBitfield32SizeCst { + r.Qopt.Flags = fb[0] // qopt->flags = flags_bf->value: the low byte + } + if r.EarlyDrop, r.HasEarlyDrop, err = tcOptU32(tb, TcaRedEarlyDropBlock, "TCA_RED_EARLY_DROP_BLOCK"); err != nil { + return err + } + r.Mark, r.HasMark, err = tcOptU32(tb, TcaRedMarkBlock, "TCA_RED_MARK_BLOCK") + return err +} + +// parseGred is gred_print_opt's reads, in its order: PARMS required, MAX_P +// when at least MAX_DPs u32, LIMIT when exactly a u32, then DPS (whose +// absence tc dereferences, Q67) and PARMS sized, then the VQ list. +func (q *TcQopt) parseGred(opt []byte) error { + tb, err := ParseAttrTableFlags(opt, TcaGredMaxKnown, tcNestedFlags) + if err != nil { + return err + } + q.Tb = tb + g := &TcGred{} + q.Aqm.Gred = g + if !tb.Has(TcaGredParms) { + return fmt.Errorf("%w: TCA_GRED_PARMS", ErrTcMissing) + } + if mp := tb.Bytes(TcaGredMaxP); len(mp) >= 4*GredMaxDPsCst { + for i := range g.MaxP { + g.MaxP[i] = binary.LittleEndian.Uint32(mp[4*i:]) + } + g.HasMaxP = true + } + if lb := tb.Bytes(TcaGredLimit); len(lb) == 4 { + g.Limit, g.HasLimit = binary.LittleEndian.Uint32(lb), true + } + if !tb.Has(TcaGredDps) { + return fmt.Errorf("%w: TCA_GRED_DPS (Q67)", ErrTcMissing) + } + sb, pb := tb.Bytes(TcaGredDps), tb.Bytes(TcaGredParms) + if len(sb) < TcGredSoptSizeCst || len(pb) < TcGredQoptSizeCst*GredMaxDPsCst { + return ErrTcGredSmall + } + r := tcRd{b: sb} + g.Sopt = TcGredSopt{DPs: r.u32(), DefDP: r.u32(), Grio: r.u8(), Flags: r.u8(), Pad1: r.u16()} + for i := range g.Qopts { + r := tcRd{b: pb[i*TcGredQoptSizeCst:]} + g.Qopts[i] = TcGredQopt{Limit: r.u32(), QthMin: r.u32(), QthMax: r.u32(), DP: r.u32(), Backlog: r.u32(), + Qave: r.u32(), Forced: r.u32(), Early: r.u32(), Other: r.u32(), Pdrop: r.u32(), Wlog: r.u8(), + Plog: r.u8(), ScellLog: r.u8(), Prio: r.u8(), Packets: r.u32(), Bytesin: r.u32()} + } + if tb.Has(TcaGredVqList) { + g.HasVQ = true + return g.parseVqs(tb.Bytes(TcaGredVqList)) + } + return nil +} + +// gredVqBuf backs one VQ entry's table on the caller's stack. +type gredVqBuf [TcaGredVqMaxKnown + 1][]byte + +// parseVqs is gred_parse_vqs: offset steps by each entry's rta_len, +// unaligned (q_gred.c:312); parse_rtattr from the entry over the rest +// finds the first TCA_GRED_VQ_ENTRY, raw type, no flag masked. An rta_len +// under 4 is where tc spins or walks misaligned (Q71), and fewer than 4 +// bytes left is where it reads the header past the list: both ErrTcShort. +func (g *TcGred) parseVqs(b []byte) error { + for off := 0; len(b) > off; { + rest := b[off:] + if len(rest) < RTAttrSizeCst { + return fmt.Errorf("%w: gred VQ list: %d bytes left at offset %d", ErrTcShort, len(rest), off) + } + alen := int(binary.LittleEndian.Uint16(rest)) + if alen < RTAttrSizeCst { + return fmt.Errorf("%w: gred VQ entry rta_len %d at offset %d (Q71)", ErrTcShort, alen, off) + } + off += alen + var entry []byte + found := false + walkRawAttrsLoose(rest, func(raw uint16, v []byte) { + if !found && raw == TcaGredVqEntry { + entry, found = v, true + } + }) + if !found { + g.Warn = append(g.Warn, "ERROR: Failed to parse Virtual Queue entry") + continue + } + var buf gredVqBuf + vt := parseIntoLoose(entry, buf[:]) + if !vt.Has(TcaGredVqDp) { + g.Warn = append(g.Warn, "ERROR: Virtual Queue without DP attribute") + continue + } + if err := g.vq(vt); err != nil { + return err + } + } + return nil +} + +// gredVqStats are the VQ counters gred_parse_vqs reads, in TcGredInfo's +// order. +var gredVqStats = [...]uint16{TcaGredVqStatBytes, TcaGredVqStatPackets, TcaGredVqStatBacklog, + TcaGredVqStatProbDrop, TcaGredVqStatProbMark, TcaGredVqStatForcedDrop, TcaGredVqStatForcedMark, + TcaGredVqStatPdrop, TcaGredVqStatOther} + +// gredVqStatOld is counter i's value before this entry: an absent +// attribute leaves what an earlier entry for the same DP wrote. +func gredVqStatOld(in *TcGredInfo, i int) uint32 { + return [...]uint32{in.Bytes, in.Packets, in.Backlog, in.ProbDrop, in.ProbMark, in.ForcedDrop, in.ForcedMark, + in.Pdrop, in.Other}[i] +} + +// vq is one entry's reads: every field a u32, unchecked (Q69). +func (g *TcGred) vq(vt AttrTable) error { + dp, _, err := tcOptU32(vt, TcaGredVqDp, "TCA_GRED_VQ_DP") + if err != nil { + return err + } + if dp >= GredMaxDPsCst { + g.VqDpOver = true + return nil + } + in := &g.Info[dp] + if bb := vt.Bytes(TcaGredVqStatBytes); len(bb) >= 8 { + in.BytesWire, in.HasBytesWire = binary.LittleEndian.Uint64(bb), true + } + var v [len(gredVqStats)]uint32 + for i, t := range gredVqStats { + x, has, err := tcOptU32(vt, t, "TCA_GRED_VQ_STAT_*") + if err != nil { + return err + } + if has { + v[i] = x + } else { + v[i] = gredVqStatOld(in, i) + } + } + in.Bytes, in.Packets, in.Backlog, in.ProbDrop, in.ProbMark = v[0], v[1], v[2], v[3], v[4] + in.ForcedDrop, in.ForcedMark, in.Pdrop, in.Other = v[5], v[6], v[7], v[8] + in.FlagsPresent = vt.Has(TcaGredVqFlags) + f, has, err := tcOptU32(vt, TcaGredVqFlags, "TCA_GRED_VQ_FLAGS") + if has { + in.Flags = f + } + return err +} + +// TcRedXstats is struct tc_red_xstats; choke's adds Matched. +type TcRedXstats struct { + Early uint32 + Pdrop uint32 + Other uint32 + Marked uint32 + Matched uint32 // choke only +} + +// TcSfbXstats is struct tc_sfb_xstats. +type TcSfbXstats struct { + Earlydrop uint32 + Penaltydrop uint32 + Bucketdrop uint32 + Queuedrop uint32 + Childdrop uint32 + Marked uint32 + Maxqlen uint32 + Maxprob uint32 + Avgprob uint32 +} + +// TcCodelXstats is struct tc_codel_xstats. +type TcCodelXstats struct { + Maxpacket uint32 + Count uint32 + Lastcount uint32 + Ldelay uint32 + DropNext int32 + DropOverlimit uint32 + EcnMark uint32 + Dropping uint32 + CeMark uint32 +} + +// TcPieXstats is struct tc_pie_xstats. +type TcPieXstats struct { + Prob uint64 + Delay uint32 + AvgDqRate uint32 + DqRateEstimating uint32 + PacketsIn uint32 + Dropped uint32 + Overlimit uint32 + Maxq uint32 + EcnMark uint32 +} + +// TcFqPieXstats is struct tc_fq_pie_xstats. +type TcFqPieXstats struct { + PacketsIn uint32 + Dropped uint32 + Overlimit uint32 + Overmemory uint32 + EcnMark uint32 + NewFlowCount uint32 + NewFlowsLen uint32 + OldFlowsLen uint32 + MemoryUsage uint32 +} + +// TcHhfXstats is struct tc_hhf_xstats. +type TcHhfXstats struct { + DropOverlimit uint32 + HhOverlimit uint32 + HhTotCount uint32 + HhCurCount uint32 +} + +// TcDualpi2Xstats is struct tc_dualpi2_xstats. +type TcDualpi2Xstats struct { + Prob uint32 + DelayC uint32 + DelayL uint32 + PacketsInC uint32 + PacketsInL uint32 + Maxq uint32 + EcnMark uint32 + StepMarks uint32 + Credit int32 + MemoryUsed uint32 + MaxMemoryUsed uint32 + MemoryLimit uint32 +} + +// TcCakeXstats is cake_print_xstats' reads: Stats the top-level values, +// Tins the tin stats tables, in order from tin 1 while present. TinShort +// is each tin's mask of printed attributes shorter than tc's getter; which +// of them tc reads depends on the mode (ShortTin). TinGap is a tin missing +// one of the printed attributes tin 0 has: tc's text table reads the NULL +// attribute (Q78); its JSON tests each tin. +type TcCakeXstats struct { + Stats TcVals + Tins [CakeMaxTinsCst]TcVals + TinShort [CakeMaxTinsCst]uint32 + NTins int + TinGap bool +} + +// ShortTin is the first tin with a short attribute tc reads, and its mask, +// or -1. JSON's cake_print_json_tin reads each tin's own attributes; the +// text table reads a row only when tin 0 has that attribute (PRINT_TSTAT, +// q_cake.c:770), so a short field absent from tin 0 is never read. +func (c *TcCakeXstats) ShortTin(text bool) (tin int, mask uint32) { + rows := ^uint32(0) + if text { + rows = c.Tins[0].Has | c.TinShort[0] + } + for i := range c.NTins { + if m := c.TinShort[i] & rows; m != 0 { + return i, m + } + } + return -1, 0 +} + +// TcAqmXstats is the increment-16 kinds' xstats decoded; TcXstats.Aqm. +type TcAqmXstats struct { + Red TcRedXstats // red, choke + Sfb TcSfbXstats + Codel TcCodelXstats + Pie TcPieXstats + FqPie TcFqPieXstats + Hhf TcHhfXstats + Dualpi2 TcDualpi2Xstats + // Cake (cake, cake_mq) is allocated for cake alone: its eight tin + // tables would otherwise grow every kind's TcXstats by 2.5 KB. + Cake *TcCakeXstats +} + +// parseAqmXstats decodes the increment-16 kinds' xstats; ok is false for +// another kind. codel and fq_pie MIN-copy and never fail; red, choke, +// sfb, pie, hhf and dualpi2 are ErrTcShort when short; gred, plug and +// skbprio have no print_xstats. +func (x *TcXstats) parseAqmXstats(kind string, b []byte) (bool, error) { + a := &x.Aqm + var err error + switch kind { + case TcKindGred, TcKindPlug, TcKindSkbprio: + return true, nil + case TcKindRed: + if err = tcNeed(b, TcRedXstatsSizeCst, "tc_red_xstats"); err == nil { + r := tcRd{b: b} + a.Red = TcRedXstats{Early: r.u32(), Pdrop: r.u32(), Other: r.u32(), Marked: r.u32()} + } + case TcKindChoke: + if err = tcNeed(b, TcChokeXstatsSizeCst, "tc_choke_xstats"); err == nil { + r := tcRd{b: b} + a.Red = TcRedXstats{Early: r.u32(), Pdrop: r.u32(), Other: r.u32(), Marked: r.u32(), Matched: r.u32()} + } + case TcKindSfb: + if err = tcNeed(b, TcSfbXstatsSizeCst, "tc_sfb_xstats"); err == nil { + r := tcRd{b: b} + a.Sfb = TcSfbXstats{Earlydrop: r.u32(), Penaltydrop: r.u32(), Bucketdrop: r.u32(), Queuedrop: r.u32(), + Childdrop: r.u32(), Marked: r.u32(), Maxqlen: r.u32(), Maxprob: r.u32(), Avgprob: r.u32()} + } + case TcKindCodel: + r := tcRd{b: TcMinCopy(b, TcCodelXstatsSizeCst)} + a.Codel = TcCodelXstats{Maxpacket: r.u32(), Count: r.u32(), Lastcount: r.u32(), Ldelay: r.u32(), + DropNext: r.s32(), DropOverlimit: r.u32(), EcnMark: r.u32(), Dropping: r.u32(), CeMark: r.u32()} + case TcKindPie: + if err = tcNeed(b, TcPieXstatsSizeCst, "tc_pie_xstats"); err == nil { + r := tcRd{b: b} + a.Pie = TcPieXstats{Prob: r.u64(), Delay: r.u32(), AvgDqRate: r.u32(), DqRateEstimating: r.u32(), + PacketsIn: r.u32(), Dropped: r.u32(), Overlimit: r.u32(), Maxq: r.u32(), EcnMark: r.u32()} + } + case TcKindFqPie: + r := tcRd{b: TcMinCopy(b, TcFqPieXstatsSizeCst)} + a.FqPie = TcFqPieXstats{PacketsIn: r.u32(), Dropped: r.u32(), Overlimit: r.u32(), Overmemory: r.u32(), + EcnMark: r.u32(), NewFlowCount: r.u32(), NewFlowsLen: r.u32(), OldFlowsLen: r.u32(), + MemoryUsage: r.u32()} + case TcKindHhf: + if err = tcNeed(b, TcHhfXstatsSizeCst, "tc_hhf_xstats"); err == nil { + r := tcRd{b: b} + a.Hhf = TcHhfXstats{DropOverlimit: r.u32(), HhOverlimit: r.u32(), HhTotCount: r.u32(), HhCurCount: r.u32()} + } + case TcKindDualpi2: + if err = tcNeed(b, TcDualpi2XstatsSizeCst, "tc_dualpi2_xstats"); err == nil { + r := tcRd{b: b} + a.Dualpi2 = TcDualpi2Xstats{Prob: r.u32(), DelayC: r.u32(), DelayL: r.u32(), PacketsInC: r.u32(), + PacketsInL: r.u32(), Maxq: r.u32(), EcnMark: r.u32(), StepMarks: r.u32(), Credit: r.s32(), + MemoryUsed: r.u32(), MaxMemoryUsed: r.u32(), MemoryLimit: r.u32()} + } + case TcKindCake, TcKindCakeMq: + a.Cake = &TcCakeXstats{} + err = a.Cake.parse(b) + default: + return false, nil + } + x.Has = err == nil + return true, err +} + +// cakeStatsBuf and cakeTinBuf back cake's tables on the caller's stack. +type ( + cakeStatsBuf [TcaCakeStatsMaxKnown + 1][]byte + cakeTinsBuf [CakeMaxTinsCst + 1][]byte + cakeTinBuf [tcaCakeTinStatsMaxKnownSlotsCst][]byte +) + +// bit is attribute t's mask bit in a TcVals. +func bit(t uint16) uint32 { return 1 << t } + +// parse is cake_print_xstats' reads. Each value is read only where tc +// reads it: MEMORY_USED and _LIMIT together, the NETLEN and ADJLEN pairs +// together, DROP_NEXT_US under a nonzero DROPPING, BLUE_TIMER_US under +// P_DROP. A read attribute shorter than its getter is ErrTcShort (Q77), +// A short printed tin attribute is recorded in TinShort, for the printer +// to check against the reads of its mode. +func (c *TcCakeXstats) parse(b []byte) error { + var sbuf cakeStatsBuf + st := parseIntoLoose(b, sbuf[:]) + short, err := c.Stats.loose(st, cakeStatsWidths) + if err != nil { + return err + } + present := uint32(0) + for t := uint16(0); t <= TcaCakeStatsMaxKnown; t++ { + if st.Has(t) { + present |= bit(t) + } + } + reads := present &^ (bit(TcaCakeStatsMemoryUsed) | bit(TcaCakeStatsMemoryLimit) | + bit(TcaCakeStatsMinNetlen) | bit(TcaCakeStatsMaxNetlen) | bit(TcaCakeStatsMinAdjlen) | + bit(TcaCakeStatsMaxAdjlen) | bit(TcaCakeStatsDropNextUs) | bit(TcaCakeStatsBlueTimerUs)) + for _, pair := range [][2]uint16{{TcaCakeStatsMemoryUsed, TcaCakeStatsMemoryLimit}, + {TcaCakeStatsMinNetlen, TcaCakeStatsMaxNetlen}, {TcaCakeStatsMinAdjlen, TcaCakeStatsMaxAdjlen}} { + if m := bit(pair[0]) | bit(pair[1]); present&m == m { + reads |= m + } + } + if d, ok := c.Stats.U32(TcaCakeStatsDropping); ok && d != 0 { + reads |= present & bit(TcaCakeStatsDropNextUs) + } + if present&bit(TcaCakeStatsPDrop) != 0 { + reads |= present & bit(TcaCakeStatsBlueTimerUs) + } + if bad := short & reads; bad != 0 { + return fmt.Errorf("%w: cake stats attribute mask %#x", ErrTcShort, bad) + } + if !st.Has(TcaCakeStatsTinStats) { + return nil + } + var tbuf cakeTinsBuf + parseIntoLoose(st.Bytes(TcaCakeStatsTinStats), tbuf[:]) + for i := 1; i <= CakeMaxTinsCst && tbuf[i] != nil; i++ { + var ibuf cakeTinBuf + tt := parseIntoLoose(tbuf[i], ibuf[:]) + short, err := c.Tins[i-1].loose(tt, cakeTinWidths) + if err != nil { + return err + } + c.TinShort[i-1] = short + c.NTins++ + } + // tc tests presence, so a short attribute is there for the gap test. + for i := 1; i < c.NTins; i++ { + if (c.Tins[0].Has|c.TinShort[0])&^(c.Tins[i].Has|c.TinShort[i]) != 0 { + c.TinGap = true + } + } + return nil +} + +// parseIntoLoose is parse_rtattr_nested into vals on the caller's stack: +// NLA_F_NESTED masked, the first of each type kept, RTA_OK stopping at a +// malformed attribute. +func parseIntoLoose(data []byte, vals [][]byte) AttrTable { + walkRawAttrsLoose(data, func(raw uint16, v []byte) { + t := raw &^ tcNestedFlags + if int(t) < len(vals) && vals[t] == nil { + vals[t] = v[:len(v):len(v)] + } + }) + return AttrTable{vals: vals} +} diff --git a/pkg/xtcpnl/xtcpnl_tc_aqm_test.go b/pkg/xtcpnl/xtcpnl_tc_aqm_test.go new file mode 100644 index 000000000..e177e9ce1 --- /dev/null +++ b/pkg/xtcpnl/xtcpnl_tc_aqm_test.go @@ -0,0 +1,472 @@ +package xtcpnl + +import ( + "errors" + "fmt" + "math" + "path/filepath" + "testing" + + "golang.org/x/sys/unix" +) + +// tcaqmMsgs is every kernel reply of kind in a tcaqm row's capture: +// qdiscs, or classes when class. +func tcaqmMsgs(t testing.TB, row, kind string, class bool) []TcInfo { + t.Helper() + want := uint16(unix.RTM_NEWQDISC) + if class { + want = unix.RTM_NEWTCLASS + } + var out []TcInfo + for _, m := range pcapNlMsgs(t, filepath.Join("testdata", "7_3_1", "ws", "tcaqm", row, "ip.pcap")) { + if m.proto != unix.NETLINK_ROUTE || m.h.Flags&unix.NLM_F_REQUEST != 0 || m.h.Type != want { + continue + } + ti, err := ParseTcMsg(m.body) + if err != nil { + t.Fatal(err) + } + if ti.Kind == kind { + out = append(out, ti) + } + } + if len(out) == 0 { + t.Fatalf("%s: no %s message", row, kind) + } + return out +} + +func aqmErr(err error) string { + for _, e := range []error{ErrTcGredSmall, ErrTcShort, ErrTcMissing, ErrTcKindUnknown, ErrRTAttrSmall} { + if errors.Is(err, e) { + return e.Error() + } + } + return err.Error() +} + +// aqmVals is the values tc read from v, attribute by attribute. +func aqmVals(v TcVals, maxType uint16) string { + s := "" + for t := uint16(1); t <= maxType; t++ { + if x, ok := v.Get(t); ok { + s += fmt.Sprintf(" %d=%d", t, x) + } + } + return s +} + +func aqmSum(q TcQopt, err error) string { + if err != nil { + return "err " + aqmErr(err) + } + a := q.Aqm + switch q.Kind { + case TcKindRed, TcKindChoke: + r := a.Red + o := r.Qopt + return fmt.Sprintf("limit %d min %d max %d ewma %d scell %d flags %#x p %.6g early %d %t mark %d %t", + o.Limit, o.QthMin, o.QthMax, o.Wlog, o.ScellLog, o.Flags, float64(r.MaxP)/math.Pow(2, 32), + r.EarlyDrop, r.HasEarlyDrop, r.Mark, r.HasMark) + case TcKindGred: + g := *a.Gred + s := fmt.Sprintf("vqs %d def %d grio %d limit %d %t maxp %t vq %t over %t warn %d", g.Sopt.DPs, g.Sopt.DefDP, + g.Sopt.Grio, g.Limit, g.HasLimit, g.HasMaxP, g.HasVQ, g.VqDpOver, len(g.Warn)) + for i, o := range g.Qopts { + if o.DP < GredMaxDPsCst { + s += fmt.Sprintf("; dp %d prio %d limit %d min %d max %d p %.6g flags %t %d", o.DP, o.Prio, o.Limit, + o.QthMin, o.QthMax, float64(g.MaxP[i])/math.Pow(2, 32), g.Info[i].FlagsPresent, g.Info[i].Flags) + } + } + return s + case TcKindSfb: + f := a.Sfb + return fmt.Sprintf("rehash %d db %d (us %d) limit %d max %d target %d inc %d dec %d rate %d burst %d", + f.RehashInterval, f.WarmupTime, f.RehashInterval*1000, f.Limit, f.Max, f.BinSize, f.Increment, + f.Decrement, f.PenaltyRate, f.PenaltyBurst) + case TcKindSkbprio: + return fmt.Sprintf("limit %d %t", a.Skbprio, a.HasSkbprio) + case TcKindPlug: + return fmt.Sprint(a.Vals == TcVals{} && a.Red == TcRed{} && !a.HasSkbprio) + case TcKindCodel: + return aqmVals(a.Vals, TcaCodelMaxKnown) + case TcKindPie: + return aqmVals(a.Vals, TcaPieMaxKnown) + case TcKindFqPie: + return aqmVals(a.Vals, TcaFqPieMaxKnown) + case TcKindHhf: + return aqmVals(a.Vals, TcaHhfMaxKnown) + case TcKindDualpi2: + return aqmVals(a.Vals, TcaDualpi2MaxKnown) + case TcKindCake, TcKindCakeMq: + return aqmVals(a.Vals, TcaCakeMaxKnown) + } + return "?" +} + +// gredQopt is a struct tc_gred_qopt for slot dp: limit, min, max and prio. +func gredQopt(dp, limit, lo, hi uint32, prio uint8) []byte { + b := cat(le32(limit), le32(lo), le32(hi), le32(dp), make([]byte, 24), []byte{3, 0, 13, prio}, make([]byte, 8)) + return b +} + +// gredOpts is gred's options: vqs, default 0, the given slots configured +// and the rest the kernel's empty-slot marker, plus extra attributes. +func gredOpts(dps uint32, configured int, extra ...[]byte) []byte { + var parms []byte + for i := range uint32(GredMaxDPsCst) { + if int(i) < configured { + parms = cat(parms, gredQopt(i, 61440, 15360, 46080, uint8(i+1))) + } else { + parms = cat(parms, gredQopt(GredMaxDPsCst+i, 0, 0, 0, 0)) + } + } + return cat(append([][]byte{rtattr(TcaGredDps, cat(le32(dps), le32(0), []byte{1, 0}, le16(0))), + rtattr(TcaGredParms, parms)}, extra...)...) +} + +// gredVq is a TCA_GRED_VQ_LIST of one entry with the given attributes. +func gredVq(kids ...[]byte) []byte { + return rtattr(TcaGredVqList, rtattr(TcaGredVqEntry, cat(kids...))) +} + +// cakeTin is a tin stats nest of the given attributes. +func cakeTin(i uint16, kids ...[]byte) []byte { return nest(i, kids...) } + +func TestParseTcAqm(t *testing.T) { + qopt := func(row, kind string, i int) string { + return aqmSum(ParseTcQopt(kind, tcaqmMsgs(t, row, kind, false)[i].Options)) + } + crafted := func(kind string, opt []byte) string { return aqmSum(ParseTcQopt(kind, opt)) } + red := func(extra ...[]byte) []byte { + return cat(append([][]byte{rtattr(TcaRedParms, cat(le32(400000), le32(30000), le32(90000), []byte{5, 0, 15, 0}))}, + extra...)...) + } + gredWith := func(vq ...[]byte) string { + q, err := ParseTcQopt(TcKindGred, gredOpts(4, 2, gredVq(vq...))) + if err != nil { + return "err " + aqmErr(err) + } + g := *q.Aqm.Gred + return fmt.Sprintf("over %t info1 %+v info15 %d warn %q", g.VqDpOver, g.Info[1], g.Info[15].Packets, g.Warn) + } + tests := []struct { + description string + input func() string + expected string + }{ + // Positive: each kind's options from the corpus, matching tc's text. + {"positive: red with flags and a qevent (ec-007, Q66, Q87)", func() string { return qopt("ec-007", TcKindRed, 0) }, + "limit 400000 min 30000 max 90000 ewma 5 scell 15 flags 0x7 p 0.02 early 10 true mark 0 false"}, + {"positive: choke ecn; ewma, p and Scell_log as ec-011's -d text", func() string { return qopt("ec-009", TcKindChoke, 0) }, + "limit 1000 min 100 max 300 ewma 7 scell 17 flags 0x1 p 0.02 early 0 false mark 0 false"}, + {"positive: gred with 2 DPs, the empty slots skipped (ec-015, K33)", func() string { return qopt("ec-015", TcKindGred, 0) }, + "vqs 4 def 0 grio 1 limit 1514000 true maxp true vq true over false warn 0; " + + "dp 0 prio 1 limit 61440 min 15360 max 46080 p 0.1 flags true 0; " + + "dp 1 prio 2 limit 61440 min 15360 max 46080 p 0.2 flags true 1"}, + {"positive: sfb (ec-019)", func() string { return qopt("ec-019", TcKindSfb, 0) }, + "rehash 600000 db 60000 (us 600000000) limit 1000 max 25 target 20 inc 33 dec 3 rate 10 burst 20"}, + // codel's times come back a microsecond short of what was set: tc + // prints 3999 as 4ms. + {"positive: codel with ce_threshold (ec-024)", func() string { return qopt("ec-024", TcKindCodel, 0) }, + " 1=3999 2=500 3=49999 4=1 5=1999"}, + {"positive: pie with every flag (ec-027)", func() string { return qopt("ec-027", TcKindPie, 0) }, + " 1=10000 2=500 3=20000 4=2 5=20 6=1 7=1 8=1"}, + {"positive: fq_pie (ec-031)", func() string { return qopt("ec-031", TcKindFqPie, 0) }, + " 1=2048 2=256 3=15000 4=15000 5=2 6=20 7=1514 8=16777216 9=20 10=1 11=1 12=1"}, + {"positive: hhf (ec-034)", func() string { return qopt("ec-034", TcKindHhf, 0) }, + " 1=500 2=1514 3=1024 4=50000 5=65536 6=500000 7=4"}, + {"positive: cake with every option (ec-040)", func() string { return qopt("ec-040", TcKindCake, 0) }, + " 2=12500000 3=1 4=1 5=5 6=44 7=20000 9=0 10=4194304 11=1 13=1 14=64 15=1 16=1 17=0 18=255"}, + {"positive: cake default prints raw (ec-035, K38)", func() string { return qopt("ec-035", TcKindCake, 0) }, + " 2=0 3=0 4=0 5=7 6=0 7=100000 9=0 10=0 11=0 12=0 13=0 14=0 15=0 16=0 17=1 18=0"}, + {"positive: cake_mq (ec-049)", func() string { return qopt("ec-049", TcKindCakeMq, 0) }, + " 2=12500000 3=0 4=0 5=7 6=0 7=100000 9=0 10=0 11=0 12=0 13=0 14=0 15=0 16=0 17=1 18=0"}, + // A bare `step_thresh 10` is microseconds: the kernel sends + // STEP_THRESH_US. + {"positive: dualpi2 step_thresh 10 with any_ect (ec-055, Q84)", func() string { return qopt("ec-055", TcKindDualpi2, 0) }, + " 1=5000 2=4000000 3=15000 4=16000 5=40 6=818 8=10 9=0 10=2 11=1 12=1 13=20 14=3 15=0"}, + {"positive: dualpi2 in time (ec-057, K40)", func() string { return qopt("ec-057", TcKindDualpi2, 0) }, + " 1=10000 2=30280000 3=10000 4=10000 5=101 6=1535 8=1000 9=0 10=2 11=1 12=0 13=10 14=1 15=1"}, + {"positive: skbprio, a bare struct (ec-060, K42)", func() string { return qopt("ec-060", TcKindSkbprio, 0) }, + "limit 100 true"}, + // Negative. + {"negative: red PARMS short", func() string { + return crafted(TcKindRed, rtattr(TcaRedParms, make([]byte, TcRedQoptSizeCst-1))) + }, "err " + ErrTcShort.Error()}, + {"negative: red without PARMS", func() string { return crafted(TcKindRed, rtattr(TcaRedMaxP, le32(1))) }, + "err " + ErrTcMissing.Error()}, + {"negative: red qevent block of 2 bytes", func() string { + return crafted(TcKindRed, red(rtattr(TcaRedEarlyDropBlock, le16(10)))) + }, "err " + ErrTcShort.Error()}, + {"negative: gred without DPS (Q67)", func() string { + return crafted(TcKindGred, rtattr(TcaGredParms, make([]byte, TcGredQoptSizeCst*GredMaxDPsCst))) + }, "err " + ErrTcMissing.Error()}, + {"negative: gred PARMS of 15 slots (Q72)", func() string { + return crafted(TcKindGred, cat(rtattr(TcaGredDps, make([]byte, TcGredSoptSizeCst)), + rtattr(TcaGredParms, make([]byte, TcGredQoptSizeCst*(GredMaxDPsCst-1))))) + }, "err " + ErrTcGredSmall.Error()}, + {"negative: gred VQ attribute of 2 bytes (Q69)", func() string { + return gredWith(rtattr(TcaGredVqDp, le32(1)), rtattr(TcaGredVqStatPackets, le16(7))) + }, "err " + ErrTcShort.Error()}, + {"negative: gred VQ entry with rta_len 2 (Q71)", func() string { + list := rtattr(TcaGredVqList, cat(le16(2), le16(TcaGredVqEntry), make([]byte, 4))) + return crafted(TcKindGred, gredOpts(4, 2, list)) + }, "err " + ErrTcShort.Error()}, + {"negative: sfb without PARMS", func() string { return crafted(TcKindSfb, []byte{}) }, "err " + ErrTcMissing.Error()}, + {"negative: skbprio of 3 bytes", func() string { return crafted(TcKindSkbprio, []byte{1, 2, 3}) }, + "err " + ErrTcShort.Error()}, + // Boundary. + {"boundary: gred VQ_DP 15 kept", func() string { + return gredWith(rtattr(TcaGredVqDp, le32(15)), rtattr(TcaGredVqStatPackets, le32(9))) + }, `over false info1 {FlagsPresent:false Bytes:0 BytesWire:0 HasBytesWire:false Packets:0 Backlog:0 ProbDrop:0 ProbMark:0 ForcedDrop:0 ForcedMark:0 Pdrop:0 Other:0 Flags:0} info15 9 warn []`}, + {"boundary: gred VQ_DP 16 skipped, not written past (Q68)", func() string { + return gredWith(rtattr(TcaGredVqDp, le32(16)), rtattr(TcaGredVqStatPackets, le32(9))) + }, `over true info1 {FlagsPresent:false Bytes:0 BytesWire:0 HasBytesWire:false Packets:0 Backlog:0 ProbDrop:0 ProbMark:0 ForcedDrop:0 ForcedMark:0 Pdrop:0 Other:0 Flags:0} info15 0 warn []`}, + {"boundary: gred VQ_STAT_BYTES 2^32+5 read as tc's u32 (Q70)", func() string { + return gredWith(rtattr(TcaGredVqDp, le32(1)), rtattr(TcaGredVqStatBytes, le64(1<<32+5)), rtattr(TcaGredVqFlags, le32(1))) + }, `over false info1 {FlagsPresent:true Bytes:5 BytesWire:4294967301 HasBytesWire:true Packets:0 Backlog:0 ProbDrop:0 ProbMark:0 ForcedDrop:0 ForcedMark:0 Pdrop:0 Other:0 Flags:1} info15 0 warn []`}, + {"boundary: gred LIMIT of 8 bytes and MAX_P of 15 are not read", func() string { + return crafted(TcKindGred, gredOpts(2, 0, rtattr(TcaGredLimit, le64(7)), rtattr(TcaGredMaxP, make([]byte, 60)))) + }, "vqs 2 def 0 grio 1 limit 0 false maxp false vq false over false warn 0"}, + {"boundary: dualpi2 u8 of 1 byte read, of 0 bytes skipped", func() string { + return crafted(TcKindDualpi2, cat(rtattr(TcaDualpi2Coupling, []byte{2}), rtattr(TcaDualpi2EcnMask, nil))) + }, " 10=2"}, + {"boundary: codel LIMIT of 3 bytes skipped, as tc does", func() string { + return crafted(TcKindCodel, rtattr(TcaCodelLimit, []byte{1, 2, 3})) + }, ""}, + // Corner. + {"corner: plug with no TCA_OPTIONS (ec-058, K41)", func() string { + ti := tcaqmMsgs(t, "ec-058", TcKindPlug, false)[0] + return fmt.Sprint(ti.HasOptions, " ", crafted(TcKindPlug, ti.Options)) + }, "false true"}, + {"corner: red FLAGS 0x1ff kept as its low byte", func() string { + return crafted(TcKindRed, red(rtattr(TcaRedFlags, cat(le32(0x1ff), le32(0x1ff))))) + }, "limit 400000 min 30000 max 90000 ewma 5 scell 15 flags 0xff p 0 early 0 false mark 0 false"}, + {"corner: sfb rehash 5000000 wraps tc's u32 (ec-021, Q73)", func() string { return qopt("ec-021", TcKindSfb, 0) }, + "rehash 5000000 db 5000000 (us 705032704) limit 100 max 25 target 20 inc 33 dec 3 rate 10 burst 20"}, + {"corner: gred VQ entries without ENTRY or DP warn and go on", func() string { + list := rtattr(TcaGredVqList, cat(rtattr(2, le32(0)), rtattr(TcaGredVqEntry, rtattr(TcaGredVqStatPackets, le32(1))))) + q, err := ParseTcQopt(TcKindGred, gredOpts(4, 2, list)) + return fmt.Sprintf("%q %v", q.Aqm.Gred.Warn, err) + }, `["ERROR: Virtual Queue without DP attribute" "ERROR: Virtual Queue without DP attribute"] `}, + } + for _, tt := range tests { + t.Run(tt.description, func(t *testing.T) { + if got := tt.input(); got != tt.expected { + t.Errorf("got %q, want %q", got, tt.expected) + } + }) + } +} + +func TestParseTcAqmXstats(t *testing.T) { + xs := func(row, kind string) (TcXstats, error) { + return ParseTcXstats(kind, tcschedXstats(t, tcaqmMsgs(t, row, kind, false)[0])) + } + cake := func(b []byte) string { + x, err := ParseTcXstats(TcKindCake, b) + if err != nil { + return "err " + aqmErr(err) + } + c := *x.Aqm.Cake + ti, tm := c.ShortTin(true) + ji, jm := c.ShortTin(false) + return fmt.Sprintf("tins %d gap %t text %d %#x json %d %#x", c.NTins, c.TinGap, ti, tm, ji, jm) + } + tin := cakeTin + tgt := rtattr(TcaCakeTinStatsTargetUs, le32(5000)) + pk := rtattr(TcaCakeTinStatsSentPackets, le32(1)) + tests := []struct { + description string + input func() string + expected string + }{ + {"positive: cake diffserv4 -s, idle (ec-041, K38)", func() string { + x, err := xs("ec-041", TcKindCake) + c := *x.Aqm.Cake + mn, _ := c.Stats.U32(TcaCakeStatsMinNetlen) + mx, _ := c.Stats.U32(TcaCakeStatsMaxNetlen) + th, _ := c.Tins[1].Get(TcaCakeTinStatsThresholdRate64) + return fmt.Sprint(x.Has, c.NTins, c.TinGap, mn, mx, th, err) + }, "true 4 false 65535 0 12500000 "}, + {"positive: codel, idle (ec-023)", func() string { + x, err := xs("ec-023", TcKindCodel) + return fmt.Sprintf("%t %+v %v", x.Has, x.Aqm.Codel, err) + }, "true {Maxpacket:0 Count:0 Lastcount:0 Ldelay:0 DropNext:0 DropOverlimit:0 EcnMark:0 Dropping:0 CeMark:0} "}, + {"positive: dualpi2 credit (ec-053, K40)", func() string { + x, err := xs("ec-053", TcKindDualpi2) + d := x.Aqm.Dualpi2 + return fmt.Sprint(x.Has, d.Credit, d.MemoryLimit, err) + }, "true -121120 30280000 "}, + {"positive: every -s kind decodes (red, choke, sfb, pie, fq_pie, hhf)", func() string { + s := "" + for _, c := range []struct{ row, kind string }{{"ec-006", TcKindRed}, {"ec-010", TcKindChoke}, + {"ec-020", TcKindSfb}, {"ec-026", TcKindPie}, {"ec-030", TcKindFqPie}, {"ec-033", TcKindHhf}} { + x, err := xs(c.row, c.kind) + s += fmt.Sprintf("%s %t %v; ", c.kind, x.Has, err) + } + return s + }, "red true ; choke true ; sfb true ; pie true ; fq_pie true ; hhf true ; "}, + {"negative: red xstats short", func() string { + _, err := ParseTcXstats(TcKindRed, make([]byte, TcRedXstatsSizeCst-1)) + return aqmErr(err) + }, ErrTcShort.Error()}, + {"negative: cake MEMORY_USED of 2 bytes beside MEMORY_LIMIT (Q77)", func() string { + return cake(cat(rtattr(TcaCakeStatsMemoryUsed, le16(1)), rtattr(TcaCakeStatsMemoryLimit, le32(4)))) + }, "err " + ErrTcShort.Error()}, + {"negative: cake tin 0 attribute short is read in both modes", func() string { + return cake(nest(TcaCakeStatsTinStats, tin(1, rtattr(TcaCakeTinStatsTargetUs, le16(1))))) + }, "tins 1 gap false text 0 0x2000 json 0 0x2000"}, + {"negative: cake tin 1 short where tin 0 has it is read in both modes", func() string { + return cake(nest(TcaCakeStatsTinStats, tin(1, tgt), tin(2, rtattr(TcaCakeTinStatsTargetUs, le16(1))))) + }, "tins 2 gap false text 1 0x2000 json 1 0x2000"}, + {"corner: cake tin 1 short where tin 0 lacks it is read by JSON only (PR 353 review)", func() string { + return cake(nest(TcaCakeStatsTinStats, tin(1), tin(2, rtattr(TcaCakeTinStatsTargetUs, []byte{1})))) + }, "tins 2 gap false text -1 0x0 json 1 0x2000"}, + {"corner: a short tin 0 attribute counts as present for the gap (Q78)", func() string { + return cake(nest(TcaCakeStatsTinStats, tin(1, rtattr(TcaCakeTinStatsTargetUs, le16(1))), tin(2, pk))) + }, "tins 2 gap true text 0 0x2000 json 0 0x2000"}, + {"boundary: cake tin 1 missing an attribute tin 0 has (Q78)", func() string { + return cake(nest(TcaCakeStatsTinStats, tin(1, tgt, pk), tin(2, pk))) + }, "tins 2 gap true text -1 0x0 json -1 0x0"}, + {"boundary: cake tins stop at the first gap in the numbering", func() string { + return cake(nest(TcaCakeStatsTinStats, tin(1, tgt), tin(3, tgt))) + }, "tins 1 gap false text -1 0x0 json -1 0x0"}, + {"boundary: pie xstats of exactly sizeof", func() string { + x, err := ParseTcXstats(TcKindPie, make([]byte, TcPieXstatsSizeCst)) + return fmt.Sprint(x.Has, err) + }, "true "}, + {"corner: codel drop_next INT_MIN, MIN-copied (Q74)", func() string { + x, err := ParseTcXstats(TcKindCodel, cat(make([]byte, 16), le32(0x80000000))) + return fmt.Sprint(x.Aqm.Codel.DropNext, err) + }, "-2147483648 "}, + {"corner: cake MEMORY_USED short alone is not read", func() string { + return cake(rtattr(TcaCakeStatsMemoryUsed, le16(1))) + }, "tins 0 gap false text -1 0x0 json -1 0x0"}, + {"corner: cake DROP_NEXT short under DROPPING 0 is not read", func() string { + return cake(cat(rtattr(TcaCakeStatsDropping, le32(0)), rtattr(TcaCakeStatsDropNextUs, le16(1)))) + }, "tins 0 gap false text -1 0x0 json -1 0x0"}, + {"corner: gred, plug and skbprio have no xstats", func() string { + s := "" + for _, k := range []string{TcKindGred, TcKindPlug, TcKindSkbprio} { + x, err := ParseTcXstats(k, []byte{1}) + s += fmt.Sprint(x.Has, err, " ") + } + return s + }, "false false false "}, + } + for _, tt := range tests { + t.Run(tt.description, func(t *testing.T) { + if got := tt.input(); got != tt.expected { + t.Errorf("got %q, want %q", got, tt.expected) + } + }) + } +} + +// TestParseTcAqmAllocs pins the decoders' allocations: the top-level +// attribute table where a kind has one. gred's VQ entries and cake's tins +// are parsed into stack tables. +func TestParseTcAqmAllocs(t *testing.T) { + qa := func(kind string, in []byte) float64 { + return testing.AllocsPerRun(100, func() { + if _, err := ParseTcQopt(kind, in); err != nil { + t.Fatal(err) + } + }) + } + xa := func(kind string, in []byte) float64 { + return testing.AllocsPerRun(100, func() { + if _, err := ParseTcXstats(kind, in); err != nil { + t.Fatal(err) + } + }) + } + vq4 := make([][]byte, 4) + for i := range vq4 { + vq4[i] = rtattr(TcaGredVqEntry, cat(rtattr(TcaGredVqDp, le32(uint32(i))), rtattr(TcaGredVqStatBytes, le64(1)), + rtattr(TcaGredVqStatPackets, le32(1)), rtattr(TcaGredVqFlags, le32(0)))) + } + tins := make([][]byte, CakeMaxTinsCst) + for i := range tins { + tins[i] = cakeTin(uint16(i+1), rtattr(TcaCakeTinStatsThresholdRate64, le64(1)), + rtattr(TcaCakeTinStatsTargetUs, le32(1)), rtattr(TcaCakeTinStatsSentPackets, le32(1))) + } + tests := []struct { + description string + input func() float64 + expected float64 + }{ + {"positive: skbprio, a bare struct", func() float64 { return qa(TcKindSkbprio, le32(100)) }, 0}, + {"positive: red, its table", func() float64 { + return qa(TcKindRed, rtattr(TcaRedParms, make([]byte, TcRedQoptSizeCst))) + }, 1}, + {"positive: cake, its table", func() float64 { return qa(TcKindCake, rtattr(TcaCakeRtt, le32(100000))) }, 1}, + {"positive: red xstats, a fixed struct", func() float64 { return xa(TcKindRed, make([]byte, TcRedXstatsSizeCst)) }, 0}, + {"boundary: gred with 4 VQs, its table and its TcGred", func() float64 { + return qa(TcKindGred, gredOpts(4, 4, rtattr(TcaGredVqList, cat(vq4...)))) + }, 2}, + {"boundary: cake xstats with 8 tins, its TcCakeXstats only", func() float64 { + return xa(TcKindCake, nest(TcaCakeStatsTinStats, tins...)) + }, 1}, + {"corner: plug, no options", func() float64 { return qa(TcKindPlug, nil) }, 0}, + } + for _, tt := range tests { + t.Run(tt.description, func(t *testing.T) { + if got := tt.input(); got != tt.expected { + t.Errorf("got %v allocations, want %v", got, tt.expected) + } + }) + } +} + +func BenchmarkParseTcAqm(b *testing.B) { + vq4 := make([][]byte, 4) + for i := range vq4 { + vq4[i] = rtattr(TcaGredVqEntry, cat(rtattr(TcaGredVqDp, le32(uint32(i))), rtattr(TcaGredVqStatBytes, le64(1)))) + } + for _, c := range []struct { + kind string + opt []byte + }{ + {TcKindRed, rtattr(TcaRedParms, make([]byte, TcRedQoptSizeCst))}, + {TcKindGred, gredOpts(4, 4, rtattr(TcaGredVqList, cat(vq4...)))}, + {TcKindSfb, rtattr(TcaSfbParms, make([]byte, TcSfbQoptSizeCst))}, + {TcKindCodel, cat(rtattr(TcaCodelTarget, le32(5000)), rtattr(TcaCodelLimit, le32(1000)))}, + {TcKindCake, cat(rtattr(TcaCakeBaseRate64, le64(0)), rtattr(TcaCakeRtt, le32(100000)), rtattr(TcaCakeRaw, nil))}, + {TcKindDualpi2, cat(rtattr(TcaDualpi2Limit, le32(10000)), rtattr(TcaDualpi2Coupling, []byte{2}))}, + {TcKindSkbprio, le32(100)}, + } { + b.Run(c.kind, func(b *testing.B) { + b.ReportAllocs() + for b.Loop() { + if _, err := ParseTcQopt(c.kind, c.opt); err != nil { + b.Fatal(err) + } + } + }) + } + tins := make([][]byte, CakeMaxTinsCst) + for i := range tins { + tins[i] = cakeTin(uint16(i+1), rtattr(TcaCakeTinStatsThresholdRate64, le64(1)), rtattr(TcaCakeTinStatsTargetUs, le32(1))) + } + for _, c := range []struct { + kind string + x []byte + }{ + {TcKindCake, nest(TcaCakeStatsTinStats, tins...)}, + {TcKindCodel, make([]byte, TcCodelXstatsSizeCst)}, + {TcKindDualpi2, make([]byte, TcDualpi2XstatsSizeCst)}, + } { + b.Run(c.kind+"-xstats", func(b *testing.B) { + b.ReportAllocs() + for b.Loop() { + if _, err := ParseTcXstats(c.kind, c.x); err != nil { + b.Fatal(err) + } + } + }) + } +} diff --git a/pkg/xtcpnl/xtcpnl_tc_kind.go b/pkg/xtcpnl/xtcpnl_tc_kind.go index 9b1de8e84..d5540a537 100644 --- a/pkg/xtcpnl/xtcpnl_tc_kind.go +++ b/pkg/xtcpnl/xtcpnl_tc_kind.go @@ -85,6 +85,7 @@ type TcQopt struct { HasNetemGe bool Sched TcSched // drr, qfq, hfsc, ets, mqprio, taprio, multiq, cbs, etf + Aqm TcAqm // red, gred, choke, sfb, codel, pie, fq_pie, hhf, cake, cake_mq, dualpi2, plug, skbprio } // ParseTcQopt decodes opt, a TCA_OPTIONS payload, for kind. A kind whose @@ -117,6 +118,9 @@ func ParseTcQopt(kind string, opt []byte) (TcQopt, error) { if ok, serr := q.parseSched(kind, opt, false); ok { return q, serr } + if ok, aerr := q.parseAqm(kind, opt); ok { + return q, aerr + } return q, fmt.Errorf("%w: %q", ErrTcKindUnknown, kind) } return q, err @@ -364,6 +368,8 @@ type TcXstats struct { HasTaprioWindowDrops bool TaprioTxOverruns uint64 HasTaprioTxOverruns bool + + Aqm TcAqmXstats } // ParseTcXstats decodes b for kind's print_xstats. fq_codel, fq and netem @@ -390,6 +396,9 @@ func ParseTcXstats(kind string, b []byte) (TcXstats, error) { if ok, serr := x.parseSchedXstats(kind, b); ok { return x, serr } + if ok, aerr := x.parseAqmXstats(kind, b); ok { + return x, aerr + } return x, fmt.Errorf("%w: %q", ErrTcKindUnknown, kind) } x.Has = err == nil diff --git a/pkg/xtcpnl/xtcpnl_tc_kind_test.go b/pkg/xtcpnl/xtcpnl_tc_kind_test.go index 17a3115b8..9f59644d8 100644 --- a/pkg/xtcpnl/xtcpnl_tc_kind_test.go +++ b/pkg/xtcpnl/xtcpnl_tc_kind_test.go @@ -306,7 +306,7 @@ func TestParseTcQopt(t *testing.T) { }, { description: "corner: an unknown kind is ErrTcKindUnknown", - kind: "cake", + kind: "nosuchkind", opt: rtattr(1, le32(1)), expectedErr: ErrTcKindUnknown, }, @@ -606,7 +606,7 @@ func TestParseTcXstats(t *testing.T) { }, { description: "corner: an unknown kind is ErrTcKindUnknown", - kind: "codel", in: le32(1), + kind: "nosuchkind", in: le32(1), expectedErr: ErrTcKindUnknown, }, } @@ -708,6 +708,8 @@ var wsTcSliceKinds = []string{ TcKindNetem, TcKindIngress, TcKindClsact, TcKindDrr, TcKindQfq, TcKindHfsc, TcKindEts, TcKindMqprio, TcKindTaprio, TcKindMultiq, TcKindCbs, TcKindEtf, + TcKindRed, TcKindGred, TcKindChoke, TcKindSfb, TcKindCodel, TcKindPie, TcKindFqPie, TcKindHhf, + TcKindCake, TcKindCakeMq, TcKindDualpi2, TcKindPlug, TcKindSkbprio, } // TestWsTcKinds decodes every qdisc and class the kernel sent in any diff --git a/pkg/xtcpnl/xtcpnl_tc_sched_test.go b/pkg/xtcpnl/xtcpnl_tc_sched_test.go index 8bc76809d..c9d3cd00d 100644 --- a/pkg/xtcpnl/xtcpnl_tc_sched_test.go +++ b/pkg/xtcpnl/xtcpnl_tc_sched_test.go @@ -283,7 +283,7 @@ func TestParseTcSched(t *testing.T) { {"negative: mqprio rate list with a foreign member", func() string { return schedSum(ParseTcQopt(TcKindMqprio, cat(schedMqprioQopt(2), rtattr(TcaMqprioMaxRate64, rtattr(TcaMqprioMinRate64, le64(1)))))) }, "err " + ErrTcSchedList.Error()}, - {"negative: an increment-16 kind", func() string { return schedSum(ParseTcQopt("red", nil)) }, "err " + ErrTcKindUnknown.Error()}, + {"negative: a kind no increment decodes", func() string { return schedSum(ParseTcQopt("nosuchkind", nil)) }, "err " + ErrTcKindUnknown.Error()}, // Boundary. {"boundary: ets nbands == nstrict, no QUANTA (ec-019, K25)", func() string { return qopt("ec-019", TcKindEts, 0) }, "bands 3 strict 3 true quanta false [] priomap [2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2] quantum 0 false"}, diff --git a/tools/nlcapgen/main.go b/tools/nlcapgen/main.go index 760e46cde..d687bfdf2 100644 --- a/tools/nlcapgen/main.go +++ b/tools/nlcapgen/main.go @@ -158,6 +158,7 @@ var families = map[string]func() []*space{ "tcaction2": func() []*space { return []*space{tcaction2Space()} }, "tcmonitor": func() []*space { return []*space{tcmonitorSpace()} }, "tcsched": func() []*space { return []*space{tcschedSpace()} }, + "tcaqm": func() []*space { return []*space{tcaqmSpace()} }, } // namedFamilies are families of named rows, written out as they are @@ -171,7 +172,7 @@ var namedFamilies = map[string]func() []row{ func runMatrix(args []string, stdout, stderr io.Writer) int { fs := flag.NewFlagSet("matrix", flag.ContinueOnError) fs.SetOutput(stderr) - family := fs.String("family", "", "the family to generate: route, rule, nexthop, addr, neigh, link, linkattr, routeget, fdb, mdb, ss, mpls, ethtool, devlink, vdpa, fou, mptcp, tipc, bridge, bridgex, bridgefdb, bridgemdb, tunnel, tuntap, tcqdisc, tcclass, tcfilter, tcflower, tcaction, tcaction2, tcmonitor, tcsched, kwlive, lwt, lwtx, lwtenc, nhstats, v730, v730ip720, stats") + family := fs.String("family", "", "the family to generate: route, rule, nexthop, addr, neigh, link, linkattr, routeget, fdb, mdb, ss, mpls, ethtool, devlink, vdpa, fou, mptcp, tipc, bridge, bridgex, bridgefdb, bridgemdb, tunnel, tuntap, tcqdisc, tcclass, tcfilter, tcflower, tcaction, tcaction2, tcmonitor, tcsched, tcaqm, kwlive, lwt, lwtx, lwtenc, nhstats, v730, v730ip720, stats") seed := fs.Uint64("seed", 1, "the random rows' seed, recorded in their ids") random := fs.Int("random", 0, "random rows per space") out := fs.String("out", "", "rows file to write") @@ -183,7 +184,7 @@ func runMatrix(args []string, stdout, stderr io.Writer) int { ok = true } if !ok || *out == "" || *random < 0 { - fmt.Fprintln(stderr, "nlcapgen matrix: -family (route, rule, nexthop, addr, neigh, link, linkattr, routeget, fdb, mdb, ss, mpls, ethtool, devlink, vdpa, fou, mptcp, tipc, bridge, bridgex, bridgefdb, bridgemdb, tunnel, tuntap, tcqdisc, tcclass, tcfilter, tcflower, tcaction, tcaction2, tcmonitor, tcsched, kwlive, lwt, lwtx, lwtenc, nhstats, v730, v730ip720, stats) and -out are required, -random must be >= 0") + fmt.Fprintln(stderr, "nlcapgen matrix: -family (route, rule, nexthop, addr, neigh, link, linkattr, routeget, fdb, mdb, ss, mpls, ethtool, devlink, vdpa, fou, mptcp, tipc, bridge, bridgex, bridgefdb, bridgemdb, tunnel, tuntap, tcqdisc, tcclass, tcfilter, tcflower, tcaction, tcaction2, tcmonitor, tcsched, tcaqm, kwlive, lwt, lwtx, lwtenc, nhstats, v730, v730ip720, stats) and -out are required, -random must be >= 0") return 2 } var rows []row diff --git a/tools/nlcapgen/matrix_tcaqm.go b/tools/nlcapgen/matrix_tcaqm.go new file mode 100644 index 000000000..7d8b840ad --- /dev/null +++ b/tools/nlcapgen/matrix_tcaqm.go @@ -0,0 +1,143 @@ +package main + +import "strings" + +// The AQM and leaf qdisc space (gotc 16C): `tc qdisc show` (and `tc class +// show` where the kind has classes) of the thirteen kinds increment 15 +// left (red, gred, choke, sfb, codel, pie, fq_pie, hhf, cake, cake_mq, +// dualpi2, plug, skbprio), each command plain and -j, in one corpus +// directory, ws/tcaqm. +// +// tc's side is tc/q_red.c, q_gred.c, q_choke.c, q_sfb.c, q_codel.c, +// q_pie.c, q_fq_pie.c, q_hhf.c, q_cake.c, q_dualpi2.c, q_plug.c and +// q_skbprio.c, with tc_red.c and tc_qevent.c, under tc_qdisc.c's and +// tc_class.c's frames. The kernel's side is each net/sched/sch_.c +// dump and dump_stats. +// +// The rows pin the plan's leads (docs/netlink/upstream/iproute2-tc-aqm.md): +// red's Scell_log with a qevent (Q66) and its flags (Q87); sfb's wrapped +// rehash and db (Q73); cake's hard newlines (Q79), ack-filter (Q80), rtt +// and fwmark (Q81) and every diffserv mode; dualpi2's keys (Q83), its +// split_gso (Q84) and its blank -s line (Q86). +// +// cake_mq needs a multi-queue device: a dummy with four tx queues. +// +// Determinism: explicit handles, fixed MACs, no packets, so every +// counter, delay and probability is idle. sfb's times are multiples of +// 4 ms (K34). Writes appear only as negatives. + +// tcAqmModules are the qdisc modules the fixtures use; cake_mq is in +// sch_cake. +var tcAqmModules = []string{ + "sch_cake", "sch_choke", "sch_codel", "sch_dualpi2", "sch_fq_pie", "sch_gred", "sch_hhf", "sch_pie", + "sch_plug", "sch_red", "sch_sfb", "sch_skbprio", +} + +// tcAqmFix is a dummy with one qdisc at the root. +func tcAqmFix(qdisc string) []string { + return []string{tcDummies("d0"), "tc qdisc add dev d0 root handle 1: " + qdisc} +} + +// tcAqmRed is red's common head. +const tcAqmRed = "red limit 400000 min 30000 max 90000 avpkt 1000 burst 55 bandwidth 10Mbit" + +var ( + aqmredFix = tcAqmFix(tcAqmRed) + aqmred2Fix = tcAqmFix(tcAqmRed + " ecn harddrop adaptive qevent early_drop block 10") // Q66, Q87 + aqmchokeFix = tcAqmFix("choke limit 1000 bandwidth 10Mbit ecn min 100 max 300 burst 200") + // gred: four VQs, two configured, with grio. + aqmgredFix = []string{ + tcDummies("d0"), + "tc qdisc add dev d0 root handle 1: gred setup vqs 4 default 0 grio", + "tc qdisc change dev d0 root handle 1: gred vq 0 prio 1 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.1", + "tc qdisc change dev d0 root handle 1: gred vq 1 prio 2 limit 60KB min 15KB max 45KB avpkt 1000 burst 20 bandwidth 10Mbit probability 0.2 ecn", + } + aqmgred0Fix = tcAqmFix("gred setup vqs 2 default 1") // no VQ configured + aqmsfbFix = tcAqmFix("sfb") + aqmsfb2Fix = tcAqmFix("sfb rehash 5000000 db 5000000 limit 100") // Q73 + aqmcodelFix = tcAqmFix("codel") + aqmcodel2Fix = tcAqmFix("codel limit 500 target 4ms interval 50ms ecn ce_threshold 2ms") + aqmpieFix = tcAqmFix("pie") + aqmpie2Fix = tcAqmFix("pie limit 500 target 10ms tupdate 20ms alpha 2 beta 20 bytemode ecn dq_rate_estimator") + aqmfqpieFix = tcAqmFix("fq_pie") + aqmfqpie2Fix = tcAqmFix("fq_pie limit 2048 flows 256 quantum 1514 memory_limit 16Mb ecn_prob 20 ecn bytemode dq_rate_estimator") + aqmhhfFix = tcAqmFix("hhf") + aqmhhf2Fix = tcAqmFix("hhf limit 500 quantum 1514 hh_limit 1024 reset_timeout 50ms admit_bytes 65536 evict_timeout 500ms non_hh_weight 4") + aqmcakeFix = tcAqmFix("cake") // diffserv3, raw (K38) + aqmcake2Fix = tcAqmFix("cake bandwidth 100Mbit diffserv4 dual-srchost nat wash ingress ack-filter rtt 20ms atm overhead 44 mpu 64 memlimit 4Mb fwmark 0xff no-split-gso") + aqmcake3Fix = tcAqmFix("cake autorate-ingress diffserv8 dual-dsthost ack-filter-aggressive") + aqmcake4Fix = tcAqmFix("cake besteffort flowblind") + aqmcake5Fix = tcAqmFix("cake bandwidth 10Mbit precedence triple-isolate docsis") + aqmcakemqFix = []string{tcDummies("d1/4"), "tc qdisc add dev d1 root handle 1: cake_mq bandwidth 100Mbit"} + aqmdpiFix = tcAqmFix("dualpi2") + aqmdpi2Fix = tcAqmFix("dualpi2 limit 5000 memlimit 4000000 step_thresh 10 drop_on_overload drop_enqueue any_ect no_split_gso classic_protection 20") + aqmdpi3Fix = tcAqmFix("dualpi2 step_thresh 1ms max_rtt 50ms typical_rtt 10ms") + aqmplugFix = tcAqmFix("plug limit 1000") + aqmskbprioFix = tcAqmFix("skbprio limit 100") +) + +// tcaqmSpace: `tc qdisc show` of the thirteen kinds, and `class show` +// where the kind has classes. +func tcaqmSpace() *space { + var cmds []value + // show adds `qdisc show` plus each extra form for a fixture. + show := func(kind brKind, fix string, pre []string, extra ...string) { + dev := "d0" + if fix == "aqmcakemq" { + dev = "d1" + } + cmds = append(cmds, bc(kind, fix, "qdisc show dev "+dev, pre)) + for _, e := range extra { + cmds = append(cmds, bc(brCorner, fix, strings.ReplaceAll(e, "DEV", dev), pre)) + } + } + full := []string{"-s qdisc show dev DEV", "-d qdisc show dev DEV", "-o qdisc show dev DEV"} + show(brPos, "aqmred", aqmredFix, full...) + show(brPos, "aqmred2", aqmred2Fix, full...) + show(brPos, "aqmchoke", aqmchokeFix, full...) + show(brPos, "aqmgred", aqmgredFix, full...) + show(brBoundary, "aqmgred0", aqmgred0Fix, "-s qdisc show dev DEV") + show(brPos, "aqmsfb", aqmsfbFix, "-s qdisc show dev DEV") + show(brBoundary, "aqmsfb2", aqmsfb2Fix) + show(brPos, "aqmcodel", aqmcodelFix, "-s qdisc show dev DEV") + show(brPos, "aqmcodel2", aqmcodel2Fix) + show(brPos, "aqmpie", aqmpieFix, "-s qdisc show dev DEV") + show(brPos, "aqmpie2", aqmpie2Fix, "-s qdisc show dev DEV") + show(brPos, "aqmfqpie", aqmfqpieFix, "-s qdisc show dev DEV") + show(brPos, "aqmfqpie2", aqmfqpie2Fix) + show(brPos, "aqmhhf", aqmhhfFix, "-s qdisc show dev DEV") + show(brPos, "aqmhhf2", aqmhhf2Fix) + show(brPos, "aqmcake", aqmcakeFix, "-s qdisc show dev DEV", "-d qdisc show dev DEV", "-s -o qdisc show dev DEV", "class show dev DEV") + show(brPos, "aqmcake2", aqmcake2Fix, "-s qdisc show dev DEV") + show(brPos, "aqmcake3", aqmcake3Fix, "-s qdisc show dev DEV") + show(brPos, "aqmcake4", aqmcake4Fix, "-s qdisc show dev DEV") + show(brPos, "aqmcake5", aqmcake5Fix, "-s qdisc show dev DEV") + show(brPos, "aqmcakemq", aqmcakemqFix, "qdisc show dev DEV root", "-s qdisc show dev DEV", "class show dev DEV") + show(brPos, "aqmdpi", aqmdpiFix, "-s qdisc show dev DEV", "-o qdisc show dev DEV") + show(brPos, "aqmdpi2", aqmdpi2Fix, "-s qdisc show dev DEV") + show(brPos, "aqmdpi3", aqmdpi3Fix) + show(brCorner, "aqmplug", aqmplugFix, "-s qdisc show dev DEV") + show(brPos, "aqmskbprio", aqmskbprioFix, "-s qdisc show dev DEV", "class show dev DEV") + cmds = append(cmds, + // Batch lines take no options; the batch's own apply to each line. + bb(brPos, "aqmcake", "qdisc-then-class", "-s", false, batchFile( + "qdisc show dev d0", + "class show dev d0", + "qdisc show dev d0"), aqmcakeFix), + bb(brCorner, "aqmred2", "red-twice", "-d", false, batchFile( + "qdisc show dev d0", + "qdisc show dev d0"), aqmred2Fix), + ) + bad := []badValue{ + brBad("aqmplug", "qdisc add dev d0 parent 1: handle 2: cake_mq", aqmplugFix, + expect{RC: intp(2), Errno: "ENOTSUP", RefusedBy: refKernel}, "cake_mq under a classless parent: \"Parent qdisc is not classful\", a write gotc refuses"), + brBad("aqmcakemq", "qdisc replace dev d1 root handle 1: cake_mq autorate-ingress", aqmcakemqFix, + expect{RC: intp(2), Errno: "ENOTSUP", RefusedBy: refKernel}, "cake_mq rejects autorate (K39)"), + brBad("aqmplug", "qdisc change dev d0 root handle 1: gred vq 0 limit 60KB min 15KB max 45KB avpkt 1000", aqmplugFix, + expect{RC: intp(2), Errno: "EINVAL", RefusedBy: refKernel}, "gred change on a qdisc that is not gred: the kernel rejects the kind"), + brBad("aqmred", "qdisc show dev nosuch", aqmredFix, tcNodev, "no such device: Cannot find device, rc 1"), + } + sp := tcSpace("tcaqm", cmds, bad) + sp.Build = func(vals []value) row { return tcBuildMods(tcAqmModules, vals) } + return sp +} diff --git a/tools/nlcapgen/matrix_tcaqm_test.go b/tools/nlcapgen/matrix_tcaqm_test.go new file mode 100644 index 000000000..0883161f7 --- /dev/null +++ b/tools/nlcapgen/matrix_tcaqm_test.go @@ -0,0 +1,170 @@ +package main + +import ( + "bytes" + "fmt" + "regexp" + "strings" + "testing" +) + +// TestTcAqmSpace pins the AQM and leaf qdisc rows (gotc 16C): `qdisc show` +// of red, gred, choke, sfb, codel, pie, fq_pie, hhf, cake, cake_mq, +// dualpi2, plug and skbprio over 26 fixtures, `class show` where a kind +// has classes, two batches and the refusals. Rows are keyed by command, +// fixture and batch file. +// +// go test ./tools/nlcapgen/ -run TestTcAqmSpace +func TestTcAqmSpace(t *testing.T) { + rows, err := matrixRows(families["tcaqm"](), matrixOpts{Seed: 1}) + if err != nil { + t.Fatal(err) + } + if err := checkRows(rows); err != nil { + t.Fatal(err) + } + if len(rows) != 132 { + t.Errorf("%d rows, want 132 (64 commands plain and -j, 4 negatives)", len(rows)) + } + byKey := map[string]row{} + key := func(r row) string { return r.Cmd + "|" + r.Axes["fix"] + "|" + r.Axes["batch"] } + for _, r := range rows { + if !strings.HasPrefix(r.ID, "tcaqm/") { + t.Errorf("%s: not in tcaqm/", r.ID) + } + if r.InitNS || r.Serial || r.Proto != "route" || strings.Join(r.Modules, ",") != strings.Join(tcAqmModules, ",") { + t.Errorf("%s: initns %t serial %t proto %q modules %v", r.ID, r.InitNS, r.Serial, r.Proto, r.Modules) + } + for _, m := range r.Modules { + if !tdcGuestModules[m] { + t.Errorf("%s: module %s is not one the guest has", r.ID, m) + } + } + if _, dup := byKey[key(r)]; dup { + t.Errorf("%s: %q twice", r.ID, key(r)) + } + byKey[key(r)] = r + } + + tests := []struct { + description string + key string // cmd|fix|batch + expected string // kind rc refused-by errno | pre count + }{ + // Positive. + {"positive: red", "tc qdisc show dev d0|aqmred|", "positive 0 none | 2"}, + {"positive: red flags in JSON (Q87)", "tc -j qdisc show dev d0|aqmred2|", "positive 0 none | 2"}, + {"positive: choke", "tc qdisc show dev d0|aqmchoke|", "positive 0 none | 2"}, + {"positive: gred with two VQs", "tc qdisc show dev d0|aqmgred|", "positive 0 none | 4"}, + {"positive: cake default (K38, Q80, Q81)", "tc -j qdisc show dev d0|aqmcake|", "positive 0 none | 2"}, + {"positive: cake_mq", "tc qdisc show dev d1|aqmcakemq|", "positive 0 none | 2"}, + {"positive: dualpi2 keys (Q83, Q84)", "tc -j qdisc show dev d0|aqmdpi2|", "positive 0 none | 2"}, + {"positive: skbprio", "tc qdisc show dev d0|aqmskbprio|", "positive 0 none | 2"}, + {"positive: a batch of cake shows under -s", "tc -s -batch b.txt|aqmcake|qdisc-then-class", "positive 0 none | 3"}, + // Negative. + {"negative: cake_mq under plug", "tc qdisc add dev d0 parent 1: handle 2: cake_mq|aqmplug|", "negative 2 kernel ENOTSUP | 2"}, + {"negative: cake_mq with autorate (K39)", "tc qdisc replace dev d1 root handle 1: cake_mq autorate-ingress|aqmcakemq|", + "negative 2 kernel ENOTSUP | 2"}, + {"negative: gred change over plug", "tc qdisc change dev d0 root handle 1: gred vq 0 limit 60KB min 15KB max 45KB avpkt 1000|aqmplug|", + "negative 2 kernel EINVAL | 2"}, + {"negative: no such device", "tc qdisc show dev nosuch|aqmred|", "negative 1 kernel ENODEV | 2"}, + // Boundary. + {"boundary: gred with no VQ configured", "tc qdisc show dev d0|aqmgred0|", "boundary 0 none | 2"}, + {"boundary: sfb rehash past 4294967 ms (Q73)", "tc qdisc show dev d0|aqmsfb2|", "boundary 0 none | 2"}, + // Corner. + {"corner: red -d with a qevent (Q66)", "tc -d qdisc show dev d0|aqmred2|", "corner 0 none | 2"}, + {"corner: cake -s -o (Q79)", "tc -s -o qdisc show dev d0|aqmcake|", "corner 0 none | 2"}, + {"corner: dualpi2 -s (Q86)", "tc -s qdisc show dev d0|aqmdpi|", "corner 0 none | 2"}, + {"corner: plug prints no options (K41)", "tc -j -s qdisc show dev d0|aqmplug|", "corner 0 none | 2"}, + {"corner: skbprio classes (K42)", "tc class show dev d0|aqmskbprio|", "corner 0 none | 2"}, + {"corner: red -d twice in a batch", "tc -d -batch b.txt|aqmred2|red-twice", "corner 0 none | 3"}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + r, ok := byKey[tc.key] + if !ok { + t.Fatalf("no row %q", tc.key) + } + kind, _, _ := strings.Cut(r.Desc, ":") + got := fmt.Sprintf("%s %d %s %s | %d", kind, *r.Expect.RC, r.Expect.RefusedBy, r.Expect.Errno, len(r.Pre)) + if got != tc.expected { + t.Errorf("got %q, want %q", got, tc.expected) + } + }) + } + + write := regexp.MustCompile(`\b(add|del|delete|change|replace|flush)\b`) + fixtures := map[string]bool{} + for k, r := range byKey { + fix := r.Axes["fix"] + fixtures[fix] = true + neg := strings.HasPrefix(r.Desc, "negative:") + if write.MatchString(r.Cmd) && !neg { + t.Errorf("%s: %q writes but is not a negative", r.ID, r.Cmd) + } + // cake_mq runs on the four-queue dummy only, apart from its + // negative. + for _, p := range r.Pre { + if strings.Contains(p.Cmd, "cake_mq") && fix != "aqmcakemq" { + t.Errorf("%s: %q outside the multi-queue fixture", r.ID, p.Cmd) + } + if fix == "aqmcakemq" && strings.HasPrefix(p.Cmd, "ip link add") && !strings.Contains(p.Cmd, "numtxqueues 4") { + t.Errorf("%s: %q is not a four-queue dummy", r.ID, p.Cmd) + } + } + if strings.Contains(r.Cmd, "cake_mq") && r.Axes["fix"] != "aqmcakemq" && !strings.Contains(r.Desc, "classless parent") { + t.Errorf("%s: %q: cake_mq off the multi-queue fixture", r.ID, r.Cmd) + } + // Every positive command runs plain and -j. + if neg || strings.HasPrefix(r.Cmd, "tc -j ") { + continue + } + cmd, rest, _ := strings.Cut(k, "|") + if _, ok := byKey[strings.Replace(cmd, "tc ", "tc -j ", 1)+"|"+rest]; !ok { + t.Errorf("%s: %q has no -j row", r.ID, cmd) + } + } + if len(fixtures) != 26 { + t.Errorf("%d fixtures, want 26", len(fixtures)) + } + all := new(strings.Builder) + for _, r := range rows { + all.WriteString(r.Cmd + "\n") + for _, p := range r.Pre { + all.WriteString(p.Cmd + "\n") + } + } + for _, kind := range []string{"red", "gred", "choke", "sfb", "codel", "pie", "fq_pie", "hhf", "cake", "cake_mq", + "dualpi2", "plug", "skbprio"} { + if !regexp.MustCompile(`qdisc add .*handle \w+: ` + kind + `( |$|\n)`).MatchString(all.String()) { + t.Errorf("no fixture adds %s", kind) + } + } + // Every cake diffserv mode: diffserv3 is the default. + for _, s := range []string{"cake\n", "diffserv4", "diffserv8", "besteffort", "precedence", + "qevent early_drop block 10", "rehash 5000000", "no_split_gso", "step_thresh 1ms", "ack-filter-aggressive", + "fwmark 0xff", "gred vq 1"} { + if !strings.Contains(all.String(), s) { + t.Errorf("no row or fixture has %q", s) + } + } + // No packets: the counters, delays and probabilities must not move. + if pk := regexp.MustCompile(`\b(ping|mausezahn|mz|nc|iperf3?|trafgen)\b`); pk.MatchString(all.String()) { + t.Errorf("a row sends packets: %q", pk.FindString(all.String())) + } + + // Determinism: the same seed writes the same bytes. + var a, b bytes.Buffer + for _, buf := range []*bytes.Buffer{&a, &b} { + rows, err := matrixRows(families["tcaqm"](), matrixOpts{Seed: 1}) + if err != nil { + t.Fatal(err) + } + if err := writeRows(buf, nil, rows); err != nil { + t.Fatal(err) + } + } + if !bytes.Equal(a.Bytes(), b.Bytes()) { + t.Error("two runs with seed 1 differ") + } +}