diff --git a/docs/netlink/gotc-status.md b/docs/netlink/gotc-status.md index 3e9971fd4..c97deaca4 100644 --- a/docs/netlink/gotc-status.md +++ b/docs/netlink/gotc-status.md @@ -229,6 +229,20 @@ never sent to a live kernel. - **17L (live diff): done.** All 125 tcqwrite rows on the workbench: gotc's `GOTC_WRITE_OUT` requests equal tc's byte for byte (ifindex aside), and stdout, stderr and rc match wherever tc stops before the kernel (V040). +**Increment 18: qdisc and class writes, the increment-15 kinds** (drr, qfq, hfsc, ets, mqprio, taprio, multiq, cbs, +etf; branch `gotc/qwrite2`, stacked on `gotc/qwrite`; plan leads W26+, K46+). Dry-run, as in 17. + +- **18C (captures): done.** `tcswrite`: 114 rows (69 writes, 45 refusals), each write with a `qdisc`/`class show` + readback. Two batches on one boot agree on every row (V042). +- **18P (encoders): done.** `Append` for the multiq, hfsc, mqprio, cbs and etf structs, plus `BeginNestData` for + mqprio's stretched TCA_OPTIONS; nine requests equal tc's captured bytes (V043). +- **18W (writes): done.** parse_qopt for the nine kinds and parse_copt for drr, qfq, hfsc and ets; all 114 tcswrite + rows replay byte for byte, and 100 of tdc's 101 rows for these kinds now match (the other is W26) (V044). +- **18B (write-up): done.** W26–W41 and K46 appended to [iproute2-tc-write.md](upstream/iproute2-tc-write.md); + every lead is present at HEAD (DOC011). +- **18L (live diff): done.** On the workbench, tc and the gotc_write build agree on all 114 tcswrite rows: every request + byte for byte, and stdout, stderr and rc wherever tc stops before the kernel (V045). + ## Ledger | id | task | what was verified | @@ -280,6 +294,11 @@ never sent to a live kernel. | V039 | 17W | **gotc writes.** `qwrite.go` (`gotc_write`; `qwrite_off.go` keeps refusing without it): do_qdisc's verbs (add EXCL\|CREATE, change 0, replace CREATE\|REPLACE, link REPLACE, delete) and do_class's (replace is CREATE alone), both argument loops with every lead kept as tc behaves (W1 help goes on, W2 ingress/clsact overwrite handle and break, W3 `handle 0: handle 1:`, W4 parser failure rc 1, W5 unreachable Garbage arm, W8 pfifo_fast's missing parse_qopt, W13 refused rather than hang, W14 silent stab), parse_noqopt for unknown kinds, and kinds of increments 15/16 refused by name. `sendWrite`: a replay compares and echoes the recorded ack (rtnl_talk, rc 2 on error); on the kernel socket the request is appended to `GOTC_WRITE_OUT`, else `ErrWriteNotApplied`; `LiveSource.Talk` refuses anything but RTM_GET*. Per-kind parsers in `qw_fifo.go`, `qw_fq.go`, `qw_htb.go`, `qw_tbf.go`, `qw_netem.go` (distribution tables from `TC_LIB_DIR`/`/usr/lib/tc`, copies in `testdata/tc-lib`), `qw_ingress.go`. **Corpus:** all 125 tcqwrite rows replay byte for byte (requests, stdout, stderr, rc), and tcqdisc/ng-018 and tcclass/ng-011 are now sent. **`TestGotcTdcWrites`:** of 410 tdc qdisc/class writes, 173 match exactly and 237 are refused by kind (pinned per kind). **`TestGotcQwrite`** (34 rows), `TestGotcPercentRate`, `TestGotcWriteOut`, `TestIsGetRequest`, plus per-kind tables (`TestParseFqQopts`, `TestParseHtb`, `TestParseTbfSfq`, `TestRedEval`, netem's). Coverage 85.3% (tagged). **New leads** for 17B: q_fq.c orphan_mask says `Illegal "initial_quantum"`; fq maxrate percent goes through 32-bit get_percent_rate; htb and tbf build rtables from the 32-bit-clamped rate beside RATE64; htb `debug` stops silently at a digit outside 0-3; tbf's `"limit" and "/latency"`; sfq `depth` says `Illegal "flows"` and `quantum` says `Illegal "limit"`; sfq red with avpkt 0 divides by zero (gotc refuses); netem `duplicate P C` drops the correlation (ec-062); netem's second `loss` message holds a newline inside the quotes; an empty `.dist` fails silently. | | V040 | 17L | **Live diff** on the workbench (kernel 7.3.1, tc 7.2.0 `/nix/store/x1pwsbz5cm23hk58b7fcpn3hhg9j7gwh-iproute2-7.2.0`): gotc built with `-tags gotc_write` at 17W (`/nix/store/4jqbwh9si1kacb7frig6hwxkalkfdgr1-gotc-write-17l`), with `GOTC_CONF_USR_DIR` and `TC_LIB_DIR` set to tc's `share/iproute2` and `lib/tc`. Each row of `tcqwrite.rows.jsonl` runs its pre steps in a fresh named namespace, then gotc with `GOTC_WRITE_OUT` (it sends only its link lookups), then tc, which applies the write. gotc's requests are compared with tc's from the corpus pcaps (seq and pid zeroed), and stdout, stderr and rc with the live tc's. **Result: 125/125.** Every request matches byte for byte, the batch rows' two included, with one masked field: the tcmsg ifindex, 2 live and 3 in the capture, because nlcapgen's nlmon device took index 2 in the capture namespace (tc in the live namespace also has d0 at 2). **Named exceptions** (request identical, output differs because gotc never hears the kernel): ec-092 (htb's quantum warning) and the 12 kernel refusals ng-001, 002, 003, 007, 012, 014, 020–025, where tc prints the extack and exits 2 and gotc exits 0. Everywhere tc stops before sending (ng-004–006, 008–011, 013, 015–019, help rows ec-088, ec-099), stdout, stderr and rc are identical. **tc against the corpus:** stdout, stderr and rc match `ws/tcqwrite` on all 125 rows, so nothing has drifted. **VM:** pre-checked (`free -g`, port 12061 held only by this session's boot, bracketed pgrep). This run loaded no module (17C's captures had already loaded all eight on this boot), and none were removed here. No namespace or extra link is left, there are no core files, `/tmp/t17l` is removed, and the VM is powered off (`nlcap-ws down`; port 12061 free). | | V041 | 17W | **Review fix (PR 356):** `cStrtod` dropped strtod's ERANGE on a hex float, so `0x1p1024` passed get_time and get_rate64 as an integer conversion of infinity: gotc sent where tc says `Illegal "target"` (fq_codel), `Illegal "latency"`/`"rate"` (netem) and `Illegal "timer_slack"` (fq), each rc 1. `hexFloat` now reports the overflow and `cStrtod` returns it, as the decimal path does. `inf` stays no ERANGE. Pinned by `TestCStrtod` (hex overflow ±, `0x1p1023` the largest power) and `TestGotcHexOverflow` (the four commands: rc 1, tc's stderr, no request). | +| V042 | 18C | **Captures** `tcswrite`: `tools/nlcapgen/matrix_tcswrite.go` (+ `TestTcSwriteSpace`), rows in `nix/microvms/workbench/tcswrite.rows.jsonl`, corpus in `pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/` (114 rows, 2.8M). Devices: d0 (one queue) and d1 (8 tx queues, for multiq, mqprio and taprio). **Rows:** every add body of the nine kinds (hfsc with and without `default`; ets bands/strict/quanta/priomap in four shapes; software mqprio; taprio with cycle-time and extension, txtime-assist flags and delay, H and R entries with `max-sdu 0 0`; cbs with `offload 0`; etf with delta, `skip_sock_check` and `deadline_mode`), then change, replace and delete on each; drr, qfq and hfsc classes (quantum, weight/maxpkt, rt/ls/sc/ul in the m1/d/m2 and umax/dmax/rate forms) with change, replace and delete; ets class change and replace; a three-line hfsc batch. **Leads pinned:** W27 (ets `priomap 256` is sent as band 0), W3 in ets, hfsc, cbs, etf and taprio, W39 (`umax 5000`), W40 (`umax 100000 dmax 1us rate 1kbit` is accepted), W41 (`rt ... sc ...` accepted; `rt m1 bogus` prints two errors). **Refusals (45):** drr, qfq, multiq, hfsc, ets and cbs parse errors (rc 1); W33 (`mqprio bogus` and W31's `hw 0 mode channel` exit 255 through invarg, against `num_tc x`'s rc 1); W30 (`queues` twice: the pair-count error); W31's `mode channel hw 0` sent and refused by the kernel (EINVAL); W32 (one `min_rate` for two classes sent, EINVAL: no offload); W34 (a bad `base-time` or `cycle-time` sends no entries: `There should be at least one entry`, EINVAL); W35 (`flags zz`: rc 1, no message; `taprio bogus`: a bare `Unknown argument`); W36 (no num_tc: map and queues dropped, `'mqprio' configuration is necessary`); W16 (hfsc `m2 40gbit`) and W9 (`10%` on a dummy); the kernel's drr quantum 0, ets strict-band quantum, mqprio hw default, taprio on a single-queue device (ENOTSUP), no clockid, max-sdu over the MTU (ERANGE), cbs and etf offload (ENOTSUP); and mqprio and etf change/replace (EINVAL, K31). **K46 (new):** a kind with no kernel change op fails only when the request carries `TCA_OPTIONS` (sch_api.c `qdisc_change`), so `qdisc change`/`replace` of an optionless drr or qfq succeeds (multiq's succeed because it has a change op, `multiq_tune`; corrected in 18B). Every expectation was first checked against the host's tc 7.2.0 in an unprivileged netns (kernel 7.3.3), twice, with identical output. **Gate:** pre-checked (`free -g`, port 12061 free, no workbench process), booted, two batches on one boot, 114/114 OK each, with stdout, stderr, rc and every readback identical. **VM:** the 15 modules the run added were removed with `modprobe -r` (lsmod back to the 86-module baseline); no namespace, no core files; powered off with `down`. | +| V043 | 18P | **Encoders**: `Append` on `TcMultiqQopt`, `TcHfscQopt`, `TcServiceCurve`, `TcMqprioQopt` (82 bytes), `TcCbsQopt` (offload then 3 pad bytes) and `TcEtfQopt` (`pkg/xtcpnl/xtcpnl_tc_qencode.go`, cited to pkt_sched.h), each round-tripped through its 15P decoder (`TestTcQencodeRoundTrip`). New `AttrBuilder.BeginNestData`: q_mqprio sets TCA_OPTIONS's rta_len from the aligned tail (q_mqprio.c:216,251), so the struct counts as 84 bytes and the MODE/SHAPER/TC_ENTRY/rate attributes sit inside it; not `addattr_nest_compat`, which adds an inner header. `TestBuildTcSchedWrite` (gotc_write) builds nine requests through `BuildTcWriteRequest` and compares them byte for byte with the tcswrite captures: drr (no options, ec-001), multiq (ec-009), hfsc without and with `default 10` (ec-013/014), ets with flagged TCA_OPTIONS/QUANTA/PRIOMAP nests, NBANDS as u8 and NSTRICT (ec-018), mqprio (ec-025, the 84-byte boundary), cbs PARMS in a nest (ec-034), etf with CLOCK_TAI and `skip_sock_check` = bit 2 (ec-040), and an hfsc class with RSC then FSC (ec-057). `TestBuildTcSchedWriteAllocs` pins 2 allocations; `BenchmarkBuildTcSchedWrite` runs at about 57 µs per request, the same cost as 17P's pfifo benchmark (the framework's request buffer dominates). | +| V044 | 18W | **Writes**: `internal/gotc/qw_sched.go` (drr, qfq, multiq, cbs, etf, and `get_clockid`), `qw_hfsc.go`, `qw_ets.go`, `qw_mqprio.go`, `qw_taprio.go` (with a base-10 `get_s64`), registered in `qoptParsers` and, for drr/qfq/hfsc/ets, `coptParsers`. Each follows its C parser at v7.2.0: messages, the `invarg` exit 255 (W33, W31's `hw 0 mode channel`), the W3 nonzero duplicate checks, W27 (an ets priomap band narrowed to u8 before the bound check), W30 (`queues` twice sums the pairs), W32 (too few rates pass when a word follows), W34 (a bad base-time/cycle-time breaks out silently and sends the rest unread), W35 (`flags zz`: no message; an unknown word: a bare `Unknown argument`), W39 (hfsc `umax*10^6` in 32 bits), W40 (the concave m1 converted as x86 does), W41 (sc1's message, then sc2's attempt, then `HFSC: Illegal "rt"`). **Refused by name** (`not implemented`): W26 (a 17th ets quantum: tc writes past `quanta[16]`), W28 (more than 16 mqprio fp entries: tc reads past `fp[16]`), W29 (the same for taprio's fp and max-sdu), W38 (an hfsc convex curve at rate 0: SIGFPE). **Corpus:** `TestGotcCorpus` now replays `tcswrite` (114 rows, gotc_write) and sends tcsched ng-001..004; 1181 tc rows pass with gotc_write, 1067 without (tcswrite and tcqwrite are replayed only by the write build). **tdc:** `tdcWritesSent` 173 → 273; the nine kinds leave `tdcWriteSkips`; `tdc/qdiscs/ets/65b6` (17 quanta, W26) is in `tdcWriteKnown`. **Tests:** `TestGotcSchedWrite` (34 rows: the leads, with bytes for W27 and W39, and each kind's edges), `TestGetClockid`, `TestGetS64Strtok`. **Mutants:** 8 of 8 killed, each run alone (`systemd-run --user --scope -p MemoryMax=6G`, `-timeout=180s`): priomap not narrowed (ec-066, W27 row), hfsc d in 64 bits (ec-072, W39 row), mqprio not stretched (ec-025, tcsched ng-001), ets nest unflagged (ec-018..020), a base-time message printed (ng-025/026, W34 row), invarg returning 1 (ng-016/018, W33 row), cbs credits unsigned (ec-034/035, tcsched ng-003), W26 not refused (W26 row). `internal/gotc` coverage 84.6% (gotc_write). | +| DOC011 | 18B | **Write-up**: W26–W41 and K46 appended to `upstream/iproute2-tc-write.md`, each with file:line at v7.2.0, its pinning row and gotc's behaviour. **HEAD:** checked with `gh api repos/iproute2/iproute2/commits?path=tc/` on 2026-11-27: `main` is `35033e4713fe`, and none of q_drr/qfq/hfsc/ets/mqprio/taprio/multiq/cbs/etf.c, tc_util.c or tc_core.c has a commit since v7.2.0, so every lead is present at HEAD. **Host checks** (tc 7.2.0, kernel 7.3.3, unprivileged netns): W38 dies with SIGFPE, rc 136, for both `rt rate 0` and `rt umax 0 dmax 10ms rate 0`; W26 (17 quanta), W28 (17 fp) and W29 (17 max-sdu) get past tc and are refused by the kernel. **Correction:** K46 as first written in V042 put multiq with drr and qfq; multiq has a qdisc change op (`multiq_tune`), so its change and replace succeed for that reason. Not submitted to netdev. | +| V045 | 18L | **Live diff** on the workbench (kernel 7.3.1, tc 7.2.0 `/nix/store/x1pwsbz5cm23hk58b7fcpn3hhg9j7gwh-iproute2-7.2.0`). gotc was built with `-tags gotc_write` at the 18W lint fixes (`/nix/store/f88nmr6y4yj6w75x8a9i5j8y64s85k7f-gotc-write-18l`), with `GOTC_CONF_USR_DIR` and `TC_LIB_DIR` set to tc's. V040's method: each row of `tcswrite.rows.jsonl` runs its pre steps in a fresh named namespace, then gotc with `GOTC_WRITE_OUT`, then tc. gotc's requests are compared with tc's from the corpus pcaps, with seq, pid and the tcmsg ifindex zeroed (gotc saw d0 at 2 and d1 at 3). **Result: 114/114.** Every request matches byte for byte, the hfsc batch row's three included. **Named exceptions:** 25 rows where the request is identical but the output differs, because gotc never hears the kernel. Six are taprio writes that succeed with the kernel's `Warning: sch_taprio: Size table not specified` (ec-027, 028, 030, 031, 032, 071). The other 19 are kernel refusals, where tc prints the extack and exits 2 while gotc exits 0: ng-002, 014, 015, 019, 021–026, 029–032, 034, 036–039. Wherever tc stops before sending (the 20 parse refusals, W33's and W31's rc 255 among them), stdout, stderr and rc are identical. **tc against the corpus:** stdout, stderr and rc match `ws/tcswrite` on all 114 rows, so nothing has drifted. **VM:** pre-checked (`free -g`: 62G available; port 12061 free; no workbench process), booted with `up`; the baseline was 86 modules, no namespace, no core files. The run loaded the 10 sch_* modules (sch_mqprio_lib among them) and removed them with `modprobe -r`, returning lsmod to 86. No namespace is left, there are no core files, and `/tmp/t18l` is removed. Powered off with `down`, 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. | | DOC010 | 17B | **Write-up:** `docs/netlink/upstream/iproute2-tc-write.md`: status header, reachability, contents, 25 summary rows, eight sections, K44–K45. Not submitted to netdev. **At HEAD** (GitHub mirror, `35033e4713fe`, 2026-11-27): no tc file in scope has a commit since v7.2.0; `lib/utils.c`'s one (`552d9842b1f4`, resolve_address's cache) touches none of it, so all are present. **Confirmed in the corpus:** W1 (ec-088, ec-099), W2 (ec-079, ng-011), W3 (ec-089), W4 (ng-004, ng-005, ng-019), W9 (ng-013), W17 (ec-092), W22 (ec-062). **Latent, with unit rows:** W5, W6, W8, W10–W16, W18–W21, W23–W25. **Dropped:** W7. **Kernel notes:** K44 (each verb's errno and extack, ng-001–003, 007, 014, 020–025), K45 (extack errors and warnings printed in place of RTNETLINK answers). **Bug classes:** candidates for the user: a wrong option named in a copied error message (W15, W20) and a divide by a user-given zero (W21). | | V033 | 16C | **Captures** `tcaqm`: `tools/nlcapgen/matrix_tcaqm.go` (+ `TestTcAqmSpace`), rows in `nix/microvms/workbench/tcaqm.rows.jsonl`, corpus in `pkg/xtcpnl/testdata/7_3_1/ws/tcaqm/` (132 rows, 2.7M). Modules: sch_cake (with cake_mq), sch_choke, sch_codel, sch_dualpi2, sch_fq_pie, sch_gred, sch_hhf, sch_pie, sch_plug, sch_red, sch_sfb, sch_skbprio. **Fixtures (26):** red default and `ecn harddrop adaptive qevent early_drop block 10`; choke with ecn; gred `setup vqs 4 default 0 grio` with VQs 0 and 1 changed in, and gred with no VQ configured; sfb default and `rehash 5000000 db 5000000` (Q73); codel, pie, fq_pie and hhf defaults plus an option variant each; cake default, plus four variants covering every diffserv mode, the flow modes, nat/wash/ingress, both ack-filters, no-split-gso, rtt, atm overhead mpu, memlimit, fwmark 0xff, autorate-ingress and docsis; cake_mq on a four-queue dummy; dualpi2 default, step_thresh in packets with drop_enqueue/drop_on_overload/any_ect/no_split_gso, and step_thresh in time; plug; skbprio (with `class show`). Each gets `qdisc show` plus `-s`/`-d`/`-o` forms; batches: cake `-s` qdisc/class/qdisc and red `-d` twice. **Refusals:** ng-001 cake_mq under plug (ENOTSUP, "Parent qdisc is not classful"), ng-002 cake_mq autorate-ingress (ENOTSUP, K39), ng-003 gred change over plug (EINVAL), ng-004 `show dev nosuch` (rc 1). **Notes:** batch lines take no options, so the batches pass `-s`/`-d` on tc's own command line; hhf's `admit_bytes 64Kb` is not accepted, so the fixture uses 65536. Q66 is confirmed live (`Scell_log 15qevent early_drop block 10`), and Q73 (sfb prints `rehash 705s`), Q80, Q81, Q83 and Q84 show in the captures. misspell flags dualpi2's `any_ect`; a scoped exclusion in both golangci configs covers the tcaqm and dualpi2 files. **Gate:** two batches on one boot, 132/132 OK, stdout, stderr and rc identical; `TestTcAqmSpace` pins 132 rows, 26 fixtures and 21 cases; no row sends packets. | diff --git a/docs/netlink/upstream/iproute2-tc-write.md b/docs/netlink/upstream/iproute2-tc-write.md index 243e7d960..7f04b8b22 100644 --- a/docs/netlink/upstream/iproute2-tc-write.md +++ b/docs/netlink/upstream/iproute2-tc-write.md @@ -1,6 +1,6 @@ # iproute2 tc qdisc and class writes: help that carries on, ingress that eats words, silent failures and copy-paste messages -**Status (2026-11-27, increment 17):** +**Status (2026-11-27, increments 17 and 18):** - **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. @@ -41,6 +41,8 @@ - [W15–W25. Kind parsers](#w15w25-kind-parsers) - [W7. Dropped](#w7-dropped) - [K44, K45. Kernel notes](#k44-k45-kernel-notes) +- [Increment 18: W26–W41, the increment-15 kinds](#increment-18-w26w41-the-increment-15-kinds) +- [K46. Kernel note](#k46-kernel-note) ## Summary @@ -157,3 +159,60 @@ it; `est_help` prints and does not exit, after which invarg fails the word. Corr flag must be on.` (ng-014). - **K45.** Extack comes back in the ack and tc prints it as `Error: ...` in place of `RTNETLINK answers`; a warning on success is printed too (ec-092: `Warning: sch_htb: quantum of class 10010 is big.`), rc 0. + +## Increment 18: W26–W41, the increment-15 kinds + +**Scope:** parse_qopt of drr, qfq, hfsc, ets, mqprio, taprio, multiq, cbs and etf, and parse_copt of drr, qfq, hfsc +and ets (tc/q_*.c at v7.2.0, with tc_util.c get_clockid). **At HEAD:** the GitHub mirror's `main` is still +`35033e4713fe` (2026-11-27), and none of these files has a commit since v7.2.0. The latest are q_hfsc.c +`3ebe6ec196b6` (JSON output), q_qfq.c `935b2aea0641` and q_multiq.c `4ac8d234f736` (all 2026-03-07), and +tc_core.c `6c1113633fde` (2025-12-07). **Every finding is present at HEAD.** **Corpus:** +`pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/` (114 rows, V042). "ec-N" and "ng-N" in this section are its rows. +**Reproduced** by gotc's port (V044), which replays all 114 rows byte for byte. **Checked** on the host's tc 7.2.0 +(kernel 7.3.3, unprivileged netns) for the crash leads: W38 dies with SIGFPE, rc 136, in both its forms; W26, W28 +and W29 get past tc's parse and are refused by the kernel. + +| lead | where (v7.2.0) | what | pinned by | gotc | +|---|---|---|---|---| +| W26 | q_ets.c:121 | `quanta[nquanta++]` has no bound: a 17th quantum is written past `quanta[16]`, and tc sends what the stack then holds (the kernel says `Invalid number of bands`) | tdc 65b6, unit | refused | +| W27 | q_ets.c:126,156 | a priomap band is a u32 stored in a `__u8` before the bound check: `priomap 256` is sent as band 0 | ec-066 | same | +| W28 | q_mqprio.c:118-127,226 | a repeated `fp` restarts idx but keeps summing `num_fp_entries`; past 16, add_tc_entries reads `fp[16..]` off the stack | unit | refused | +| W29 | q_taprio.c:212-235,93 | the same for taprio's `fp` and `max-sdu` | unit | refused | +| W30 | q_mqprio.c:99,209 | a repeated `queues` sums `cnt_off_pairs`: `queues 4@0 4@4 queues 4@0 4@4` with num_tc 2 fails `pair count 4 can not be higher than given num_tc 2` | ng-020 | same | +| W31 | q_mqprio.c:138,152 | `mode` and `shaper` are taken only after a nonzero `hw` (default 1), so `hw 0 mode channel` is invarg's `unknown argument` (rc 255) and `mode channel hw 0` is sent | ng-018, ng-019 | same | +| W32 | q_mqprio.c:171,186 | too few `min_rate`/`max_rate` values are an error only when no word follows | ng-022, ng-023 | same | +| W33 | q_mqprio.c:204 | an unknown word exits 255 through invarg, where every other error returns 1 | ng-016 (vs ng-017) | same | +| W34 | q_taprio.c:271-296 | a bad `base-time`, `cycle-time` or `cycle-time-extension` is `PREV_ARG; break`: no message, the rest of argv unread, the request sent (the kernel says `There should be at least one entry`) | ng-025, ng-026 | same | +| W35 | q_taprio.c:314-337 | a bad `flags` or `txtime-delay` returns -1 with no message; an unknown word prints a bare `Unknown argument` | ng-027, ng-028 | same | +| W36 | q_taprio.c:349 | with num_tc unset, `map` and `queues` are parsed and then dropped (the priomap goes only when num_tc > 0); the kernel says `'mqprio' configuration is necessary` | ng-029 | same | +| W37 | q_taprio.c:245-267 | sched entries are calloc'd and never freed, a leak per command under `-batch` | — | n/a | +| W38 | q_hfsc.c:396 | a convex curve at rate 0 (`rt rate 0`, `rt umax 0 dmax 10ms rate 0`) divides by zero: SIGFPE | unit, host | refused | +| W39 | q_hfsc.c:396 | `umax * TIME_UNITS_PER_SEC` is unsigned 32-bit: `umax 5000` wraps, giving the wrong convex d | ec-072 | same | +| W40 | q_hfsc.c:387 | the concave m1 is a double put into a u32 with no range check: `umax 100000 dmax 1us` is 10^11, sent as 1215752192 | ec-073 | same | +| W41 | q_hfsc.c:150-179, 299 | rt/ls/sc/ul have no duplicate check (the last wins; `rt ... sc ...` is accepted); a bad `m1` prints `Illegal "m1"`, then sc2 retries the same words, then `Illegal "rt"` | ec-074, ng-007 | same | + +Earlier leads that recur here: W3's nonzero duplicate check in ets `bands` (ec-067), hfsc `default` (ec-068), cbs +(ec-069), etf `delta` (ec-070) and taprio `cycle-time` (ec-071); W16's 32-bit rates in hfsc (`m2 40gbit`, ng-008); +W9's percent rate on a dummy (`ls m2 10%`, ng-009). + +**Notes:** + +- **W26.** tc survives the write on the host because `quanta[16]` lands in other locals. What is sent depends on + the compiler's stack layout. gotc refuses the 17th quantum by name, and the tdc row stays in `tdcWriteKnown`. +- **W28, W29.** add_tc_entries runs `tc < num_fp_entries` (or the max of both counts) with the arrays sized 16. Up + to 16 in total, a repeat overwrites from index 0 and the count is the sum: `fp E fp P` sends two entries, P then + 0. +- **W31.** The word order matters because `hw` is parsed in place. The check is on the value parsed so far, not on + the final one. +- **W34.** Unlike `flags` and `txtime-delay` (W35), which return -1, the three time words fall out of the loop, so + `base-time zz sched-entry ...` sends a schedule with no entries. +- **W39.** The correct d for ec-072 is 100000 - 5000*10^6/12500000 = 99600 us. tc computes (5000*10^6 mod 2^32) + / 12500000 = 56, and sends 99944. + +## K46. Kernel note + +- **K46.** A qdisc kind with no `change` op fails `qdisc change`/`replace` only when the request carries + TCA_OPTIONS (sch_api.c qdisc_change). drr and qfq have no qdisc change op and send no options, so their change + and replace succeed (ec-002/003, ec-006/007). mqprio and etf have none either but always send options, and get + EINVAL `Change operation not supported by specified qdisc.` (ng-036..039, as K31). multiq's succeed for another + reason: it has a change op, `multiq_tune` (sch_multiq.c:394 at v7.4-rc4) (ec-010/011). diff --git a/internal/gotc/corpus_test.go b/internal/gotc/corpus_test.go index a422fa946..43bbde047 100644 --- a/internal/gotc/corpus_test.go +++ b/internal/gotc/corpus_test.go @@ -38,8 +38,11 @@ var corpusRefused = map[string]string{ } // qwriteSent are the corpusWrites rows the gotc_write build sends and -// matches (17W). -var qwriteSent = map[string]bool{"tcqdisc/ng-018": true, "tcclass/ng-011": true} +// matches (17W, 18W). +var qwriteSent = map[string]bool{ + "tcqdisc/ng-018": true, "tcclass/ng-011": true, + "tcsched/ng-001": true, "tcsched/ng-002": true, "tcsched/ng-003": true, "tcsched/ng-004": true, +} var corpusWrites = map[string]bool{ "tcqdisc/ng-018": true, "tcclass/ng-011": true, "tcfilter/ng-024": true, "tcflower/ng-009": true, @@ -234,6 +237,8 @@ func TestGotcCorpus(t *testing.T) { if writesBuilt { spaces = append(spaces, "tcqwrite") corpusRows["tcqwrite"] = 125 + spaces = append(spaces, "tcswrite") + corpusRows["tcswrite"] = 114 } for _, sp := range spaces { more, err := filepath.Glob("../../pkg/xtcpnl/testdata/*/ws/" + sp) diff --git a/internal/gotc/qw_ets.go b/internal/gotc/qw_ets.go new file mode 100644 index 000000000..b839ca557 --- /dev/null +++ b/internal/gotc/qw_ets.go @@ -0,0 +1,244 @@ +//go:build gotc_write + +package gotc + +import ( + "fmt" + + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" + "golang.org/x/sys/unix" +) + +// tc/q_ets.c ets_parse_opt and ets_parse_copt at iproute2 v7.2.0. + +func (r *runner) etsExplain() { + r.errf("Usage: ... ets [bands NUMBER] [strict NUMBER] [quanta Q1 Q2...] [priomap P1 P2...]\n") +} + +// etsQuantum is parse_quantum: 0 is its failure, after the message. +func (r *runner) etsQuantum(a string) uint32 { + q, ok := getUnsigned(a, 10) + if !ok { + r.errf("Illegal \"quanta\" element\n") + return 0 + } + if q == 0 { + r.errf("\"quanta\" must be > 0\n") + } + return q +} + +// etsNbands is parse_nbands. +func (r *runner) etsNbands(a, what string) (uint8, bool) { + v, ok := getUnsigned(a, 10) + if !ok { + r.errf("Illegal \"%s\"\n", what) + return 0, false + } + if v > xtcpnl.TcqEtsMaxBandsCst { + r.errf("The number of \"%s\" must be <= %d\n", what, xtcpnl.TcqEtsMaxBandsCst) + return 0, false + } + return uint8(v), true +} + +// etsArgs is ets_parse_opt's locals. +type etsArgs struct { + nbands, nstrict uint8 + quantaMode, prioMode bool + quanta []uint32 + priomap []uint8 +} + +// etsWord is one turn of ets_parse_opt's loop on a word that is not a +// keyword (or follows quanta/priomap): a quantum or a priomap band. A +// band is a u32 stored in a __u8, so 256 passes the bound check as 0 +// (W27); a 17th quantum overruns tc's quanta[16] (W26): gotc refuses it. +func (r *runner) etsWord(e *etsArgs, a string) error { + switch { + case e.quantaMode: + q := r.etsQuantum(a) + if q == 0 { + return errKindParse + } + if len(e.quanta) == xtcpnl.TcqEtsMaxBandsCst { + return fmt.Errorf("%w: ets with more than %d quanta (tc writes past quanta[%d])", + errNotImplemented, xtcpnl.TcqEtsMaxBandsCst, xtcpnl.TcqEtsMaxBandsCst) + } + e.quanta = append(e.quanta, q) + case e.prioMode: + band, ok := getUnsigned(a, 10) + if !ok { + r.errf("Illegal \"priomap\" element\n") + return errKindParse + } + if len(e.priomap) > tcPrioMax { + r.errf("\"priomap\" index cannot be higher than %d\n", tcPrioMax) + return errKindParse + } + e.priomap = append(e.priomap, uint8(band&0xff)) + default: + r.errf("What is \"%s\"?\n", a) + r.etsExplain() + return errKindParse + } + return nil +} + +// parseEtsQopt is ets_parse_opt. The duplicate checks are on a nonzero +// count (W3). +func parseEtsQopt(r *runner, args []string, _ string) (func(*xtcpnl.AttrBuilder) error, error) { + var e etsArgs + for ; len(args) > 0; args = args[1:] { + a := args[0] + var err error + switch a { + case wordBands, "strict": + if (a == wordBands && e.nbands != 0) || (a == "strict" && e.nstrict != 0) { + r.errf("Duplicate \"%s\"\n", a) + return nil, errKindParse + } + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + v, ok := r.etsNbands(args[0], a) + if !ok { + return nil, errKindParse + } + if a == wordBands { + e.nbands = v + } else { + e.nstrict = v + } + e.prioMode, e.quantaMode = false, false + case wordQuanta, wordPriomap: + if (a == wordQuanta && len(e.quanta) != 0) || (a == wordPriomap && len(e.priomap) != 0) { + r.errf("Duplicate \"%s\"\n", a) + return nil, errKindParse + } + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + e.quantaMode, e.prioMode = a == wordQuanta, a == wordPriomap + err = r.etsWord(&e, args[0]) + case helpWord: + r.etsExplain() + return nil, errKindParse + default: + err = r.etsWord(&e, a) + } + if err != nil { + return nil, err + } + } + if e.nbands == 0 { + e.nbands = uint8(len(e.quanta)) + e.nstrict + } + if e.nbands == 0 { + r.errf("One of \"bands\", \"quanta\" or \"strict\" needs to be specified\n") + r.etsExplain() + return nil, errKindParse + } + if int(e.nstrict)+len(e.quanta) > int(e.nbands) { + r.errf("Not enough total bands to cover all the strict bands and quanta\n") + r.etsExplain() + return nil, errKindParse + } + for _, p := range e.priomap { + if p >= e.nbands { + r.errf("\"priomap\" element is out of bounds\n") + return nil, errKindParse + } + } + return e.attrs, nil +} + +// attrs is ets_parse_opt's TCA_OPTIONS: flagged nests (K30), NBANDS as a +// u8, NSTRICT only when nonzero. +func (e *etsArgs) attrs(ab *xtcpnl.AttrBuilder) error { + tail, err := ab.BeginNest(xtcpnl.TcaOptions | unix.NLA_F_NESTED) + if err != nil { + return err + } + if err := ab.PutU8(xtcpnl.TcaEtsNbands, e.nbands); err != nil { + return err + } + if e.nstrict != 0 { + if err := ab.PutU8(xtcpnl.TcaEtsNstrict, e.nstrict); err != nil { + return err + } + } + if len(e.quanta) != 0 { + nest, err := ab.BeginNest(xtcpnl.TcaEtsQuanta | unix.NLA_F_NESTED) + if err != nil { + return err + } + for _, q := range e.quanta { + if err := ab.PutU32(xtcpnl.TcaEtsQuantaBand, q); err != nil { + return err + } + } + if err := ab.EndNest(nest); err != nil { + return err + } + } + if len(e.priomap) != 0 { + nest, err := ab.BeginNest(xtcpnl.TcaEtsPriomap | unix.NLA_F_NESTED) + if err != nil { + return err + } + for _, p := range e.priomap { + if err := ab.PutU8(xtcpnl.TcaEtsPriomapBand, p); err != nil { + return err + } + } + if err := ab.EndNest(nest); err != nil { + return err + } + } + return ab.EndNest(tail) +} + +// parseEtsCopt is ets_parse_copt: a flagged TCA_OPTIONS, with +// TCA_ETS_QUANTA_BAND when a quantum is given. +func parseEtsCopt(r *runner, args []string, _ string) (func(*xtcpnl.AttrBuilder) error, error) { + cexplain := func() { r.errf("Usage: ... ets [quantum Q1]\n") } + var quantum uint32 + for ; len(args) > 0; args = args[1:] { + switch a := args[0]; a { + case wordQuantum: + if quantum != 0 { + r.errf("Duplicate \"quantum\"\n") + return nil, errKindParse + } + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + if quantum = r.etsQuantum(args[0]); quantum == 0 { + return nil, errKindParse + } + case helpWord: + cexplain() + return nil, errKindParse + default: + r.errf("What is \"%s\"?\n", a) + cexplain() + return nil, errKindParse + } + } + return func(ab *xtcpnl.AttrBuilder) error { + tail, err := ab.BeginNest(xtcpnl.TcaOptions | unix.NLA_F_NESTED) + if err != nil { + return err + } + if quantum != 0 { + if err := ab.PutU32(xtcpnl.TcaEtsQuantaBand, quantum); err != nil { + return err + } + } + return ab.EndNest(tail) + }, nil +} diff --git a/internal/gotc/qw_fifo.go b/internal/gotc/qw_fifo.go index 932da5afe..5275bfa53 100644 --- a/internal/gotc/qw_fifo.go +++ b/internal/gotc/qw_fifo.go @@ -76,7 +76,7 @@ func parsePrioQopt(r *runner, args []string, _ string) (func(*xtcpnl.AttrBuilder return nil, errKindParse } opt.Bands = v - case "priomap": + case wordPriomap: if pmap { r.errf("Error: duplicate priomap\n") return nil, errKindParse diff --git a/internal/gotc/qw_fq.go b/internal/gotc/qw_fq.go index c27249148..3a8327b3e 100644 --- a/internal/gotc/qw_fq.go +++ b/internal/gotc/qw_fq.go @@ -499,7 +499,7 @@ func fqPriomap(r *runner, args []string, prio *xtcpnl.TcPrioQopt, dup bool) ([]s return nil, r.incomplete() } args = args[1:] - if args[0] != "priomap" { + if args[0] != wordPriomap { r.errf("\"priomap\" expected\n") return nil, errKindParse } diff --git a/internal/gotc/qw_hfsc.go b/internal/gotc/qw_hfsc.go new file mode 100644 index 000000000..cd4727d1e --- /dev/null +++ b/internal/gotc/qw_hfsc.go @@ -0,0 +1,306 @@ +//go:build gotc_write + +package gotc + +import ( + "fmt" + "math" + "strings" + + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// tc/q_hfsc.c hfsc_parse_opt, hfsc_parse_class_opt and hfsc_get_sc at +// iproute2 v7.2.0. + +func (r *runner) hfscExplainQdisc() { + r.errf("Usage: ... hfsc [ default CLASSID ]\n" + + "\n" + + " default: default class for unclassified packets\n") +} + +func (r *runner) hfscExplainClass() { + r.errf("Usage: ... hfsc [ [ rt SC ] [ ls SC ] | [ sc SC ] ] [ ul SC ]\n" + + "\n" + + "SC := [ [ m1 BPS ] d SEC ] m2 BPS\n" + + "\n" + + " m1 : slope of first segment\n" + + " d : x-coordinate of intersection\n" + + " m2 : slope of second segment\n" + + "\n" + + "Alternative format:\n" + + "\n" + + "SC := [ [ umax BYTE ] dmax SEC ] rate BPS\n" + + "\n" + + " umax : maximum unit of work\n" + + " dmax : maximum delay\n" + + " rate : rate\n" + + "\n" + + "Remarks:\n" + + " - at least one of 'rt', 'ls' or 'sc' must be specified\n" + + " - 'ul' can only be specified with 'ls' or 'sc'\n" + + "\n") +} + +func (r *runner) hfscExplain1(arg string) { r.errf("HFSC: Illegal \"%s\"\n", arg) } + +// parseHfscQopt is hfsc_parse_opt: default is get_u16 base 16, its +// duplicate check on a nonzero value (W3). TCA_OPTIONS is always sent. +func parseHfscQopt(r *runner, args []string, _ string) (func(*xtcpnl.AttrBuilder) error, error) { + var q xtcpnl.TcHfscQopt + for ; len(args) > 0; args = args[1:] { + switch a := args[0]; { + case matches(a, "default"): + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + if q.Defcls != 0 { + r.errf("HFSC: Double \"default\"\n") + return nil, errKindParse + } + v, ok := getU16(args[0], 16) + if !ok { + r.hfscExplain1("default") + return nil, errKindParse + } + q.Defcls = v + case matches(a, helpWord): + r.hfscExplainQdisc() + return nil, errKindParse + default: + r.errf("HFSC: What is \"%s\" ?\n", a) + r.hfscExplainQdisc() + return nil, errKindParse + } + } + return func(ab *xtcpnl.AttrBuilder) error { + var b [xtcpnl.TcHfscQoptSizeCst]byte + return ab.PutBytes(xtcpnl.TcaOptions, q.Append(b[:0])) + }, nil +} + +// parseHfscCopt is hfsc_parse_class_opt. rt, ls, sc and ul may repeat, +// the last one winning (W41); sc sets both rt and ls. +func parseHfscCopt(r *runner, args []string, dev string) (func(*xtcpnl.AttrBuilder) error, error) { + var rsc, fsc, usc xtcpnl.TcServiceCurve + var rscOK, fscOK, uscOK bool + for ; len(args) > 0; args = args[1:] { + a := args[0] + var sc *xtcpnl.TcServiceCurve + var name string + switch { + case matches(a, "rt"): + sc, name = &rsc, "rt" + case matches(a, "ls"): + sc, name = &fsc, "ls" + case matches(a, "sc"): + sc, name = &rsc, "sc" + case matches(a, "ul"): + sc, name = &usc, "ul" + case matches(a, helpWord): + r.hfscExplainClass() + return nil, errKindParse + default: + r.errf("HFSC: What is \"%s\" ?\n", a) + r.hfscExplainClass() + return nil, errKindParse + } + if len(args) < 2 { + return nil, r.incomplete() + } + rest, err := r.hfscGetSc(args[1:], sc, dev) + if err != nil { + if err == errKindParse { + r.hfscExplain1(name) + } + return nil, err + } + args = rest + switch name { + case "rt": + rscOK = true + case "ls": + fscOK = true + case "sc": + fsc, rscOK, fscOK = rsc, true, true + default: + uscOK = true + } + } + if !rscOK && !fscOK && !uscOK { + r.errf("HFSC: no parameters given\n") + r.hfscExplainClass() + return nil, errKindParse + } + if uscOK && !fscOK { + r.errf("HFSC: Upper-limit Service Curve without Link-Share Service Curve\n") + r.hfscExplainClass() + return nil, errKindParse + } + return func(ab *xtcpnl.AttrBuilder) error { + m, err := ab.BeginNest(xtcpnl.TcaOptions) + if err != nil { + return err + } + for _, c := range []struct { + ok bool + t uint16 + sc xtcpnl.TcServiceCurve + }{{rscOK, xtcpnl.TcaHfscRsc, rsc}, {fscOK, xtcpnl.TcaHfscFsc, fsc}, {uscOK, xtcpnl.TcaHfscUsc, usc}} { + if !c.ok { + continue + } + var b [xtcpnl.TcServiceCurveSizeCst]byte + if err := ab.PutBytes(c.t, c.sc.Append(b[:0])); err != nil { + return err + } + } + return ab.EndNest(m) + }, nil +} + +// hfscGetSc is hfsc_get_sc: the m1/d/m2 form, else the umax/dmax/rate form +// from the same word, then the two-zero-slopes check. args[0] is the +// curve's first word; on success the returned args[0] is its last. +func (r *runner) hfscGetSc(args []string, sc *xtcpnl.TcServiceCurve, dev string) ([]string, error) { + rest, err := r.hfscGetSc1(args, sc, dev) + if err == errKindParse { + rest, err = r.hfscGetSc2(args, sc, dev) + } + if err != nil { + return nil, err + } + if sc.M1 == 0 && sc.M2 == 0 { + r.errf("HFSC: Service Curve has two zero slopes\n") + return nil, errKindParse + } + return rest, nil +} + +// hfscRate is the m1, m2 and rate values: a '%' is get_percent_rate. +func (r *runner) hfscRate(name, v, dev string) (uint32, bool) { + var rate uint32 + var ok bool + if strings.Contains(v, "%") { + rate, ok = r.getPercentRate(v, dev) + } else { + rate, ok = getRate(v) + } + if !ok { + r.hfscExplain1(name) + } + return rate, ok +} + +// time2ktime is tc_core.c tc_core_time2ktime: time * clock_factor, a +// double, into an unsigned int. +func (r *runner) time2ktime(t uint32) uint32 { return cDoubleToU32(float64(t) * r.core.clockFactor) } + +// hfscGetSc1 is hfsc_get_sc1. NEXT_ARG exits (incomplete) even when the +// other form would have parsed the words. +func (r *runner) hfscGetSc1(args []string, sc *xtcpnl.TcServiceCurve, dev string) ([]string, error) { + var m1, d, m2 uint32 + var ok bool + if matches(args[0], "m1") { + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + if m1, ok = r.hfscRate("m1", args[0], dev); !ok { + return nil, errKindParse + } + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + } + if matches(args[0], "d") { + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + if d, ok = getTime(args[0]); !ok { + r.hfscExplain1("d") + return nil, errKindParse + } + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + } + if !matches(args[0], "m2") { + return nil, errKindParse + } + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + if m2, ok = r.hfscRate("m2", args[0], dev); !ok { + return nil, errKindParse + } + *sc = xtcpnl.TcServiceCurve{M1: m1, D: r.time2ktime(d), M2: m2} + return args, nil +} + +// hfscGetSc2 is hfsc_get_sc2. Its arithmetic is C's: umax * +// TIME_UNITS_PER_SEC in 32 bits (W39), a concave m1 converted from a +// double with no range check (W40). A convex curve at rate 0 divides by +// zero (SIGFPE in tc, W38): gotc refuses it. +func (r *runner) hfscGetSc2(args []string, sc *xtcpnl.TcServiceCurve, dev string) ([]string, error) { + var umax, dmax, rate uint32 + var ok bool + if matches(args[0], "umax") { + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + if umax, ok = getSize(args[0]); !ok { + r.hfscExplain1("umax") + return nil, errKindParse + } + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + } + if matches(args[0], "dmax") { + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + if dmax, ok = getTime(args[0]); !ok { + r.hfscExplain1("dmax") + return nil, errKindParse + } + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + } + if !matches(args[0], wordRate) { + return nil, errKindParse + } + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + if rate, ok = r.hfscRate(wordRate, args[0], dev); !ok { + return nil, errKindParse + } + if umax != 0 && dmax == 0 { + r.errf("HFSC: umax given but dmax is zero.\n") + return nil, errKindParse + } + if dmax != 0 { + if m1 := math.Ceil(float64(umax) * timeUnitsPerSec / float64(dmax)); m1 > float64(rate) { + *sc = xtcpnl.TcServiceCurve{M1: cDoubleToU32(m1), D: r.time2ktime(dmax), M2: rate} + return args, nil + } + } + if rate == 0 { + return nil, fmt.Errorf("%w: hfsc convex curve at rate 0 (tc divides by it, SIGFPE)", errNotImplemented) + } + *sc = xtcpnl.TcServiceCurve{D: r.time2ktime(dmax - umax*timeUnitsPerSec/rate), M2: rate} + return args, nil +} diff --git a/internal/gotc/qw_mqprio.go b/internal/gotc/qw_mqprio.go new file mode 100644 index 000000000..b04de310a --- /dev/null +++ b/internal/gotc/qw_mqprio.go @@ -0,0 +1,343 @@ +//go:build gotc_write + +package gotc + +import ( + "fmt" + "strings" + + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" + "golang.org/x/sys/unix" +) + +// tc/q_mqprio.c mqprio_parse_opt at iproute2 v7.2.0. + +// pkt_sched.h's mqprio and frame-preemption values. +const ( + mqprioModeChannel = 1 // TC_MQPRIO_MODE_CHANNEL; TC_MQPRIO_MODE_DCB is 0 + mqprioShaperBwRate = 1 // TC_MQPRIO_SHAPER_BW_RATE; TC_MQPRIO_SHAPER_DCB is 0 + mqprioFMode = 0x1 + mqprioFShaper = 0x2 + mqprioFMinRate = 0x4 + mqprioFMaxRate = 0x8 + tcFpExpress = 1 + tcFpPreemptible = 2 +) + +func (r *runner) mqprioExplain() { + r.errf("Usage: ... mqprio\t[num_tc NUMBER] [map P0 P1 ...]\n" + + "\t\t\t[queues count1@offset1 count2@offset2 ...] " + + "[hw 1|0]\n" + + "\t\t\t[fp FP0 FP1 FP2 ...]\n" + + "\t\t\t[mode dcb|channel]\n" + + "\t\t\t[shaper bw_rlimit SHAPER_PARAMS]\n" + + "Where: SHAPER_PARAMS := { min_rate MIN_RATE1 MIN_RATE2 ...|\n" + + "\t\t\t max_rate MAX_RATE1 MAX_RATE2 ... }\n") +} + +// qoptState is what mqprio_parse_opt and taprio_parse_opt share: the +// tc_mqprio_qopt and the fp list. Only mqprio counts the queue pairs. +type qoptState struct { + opt xtcpnl.TcMqprioQopt + fp [xtcpnl.TcQoptMaxQueueCst]uint32 + numFp uint32 + haveTcEntries bool + cntOffPairs int +} + +// mqprioArgs is mqprio_parse_opt's locals. +type mqprioArgs struct { + qoptState + minRate, maxRate [xtcpnl.TcQoptMaxQueueCst]uint64 + shaper, mode uint16 + flags uint32 +} + +// strtokAt is strtok(s, "@") then strtok(NULL, "@"): the first two runs +// of non-'@' bytes; ok2 false is the second strtok's NULL. +func strtokAt(s string) (tok1 string, ok1 bool, tok2 string, ok2 bool) { + var toks []string + for _, t := range strings.Split(s, "@") { + if t != "" { + toks = append(toks, t) + } + } + switch len(toks) { + case 0: + return "", false, "", false + case 1: + return toks[0], true, "", false + } + return toks[0], true, toks[1], true +} + +// mqprioList is one of the inner loops (map, queues, fp, min_rate, +// max_rate): while idx < TC_QOPT_MAX_QUEUE and NEXT_ARG_OK, take the next +// word with take, which returns false for PREV_ARG and break. It returns +// the args left (args[0] the last word taken, or the keyword) and idx. +func mqprioList(args []string, take func(idx int, a string) bool) ([]string, int) { + idx := 0 + for idx < xtcpnl.TcQoptMaxQueueCst && len(args) > 1 { + if !take(idx, args[1]) { + break + } + args = args[1:] + idx++ + } + return args, idx +} + +// mqprioRates is min_rate and max_rate: the values, then too few of them +// is an error only when no word follows (W32). +func (r *runner) mqprioRateList(m *mqprioArgs, args []string, rates *[xtcpnl.TcQoptMaxQueueCst]uint64, what string) ([]string, error) { + args, idx := mqprioList(args, func(idx int, a string) bool { + v, ok := getRate64(a) + if ok { + rates[idx] = v + } + return ok + }) + if idx < int(m.opt.NumTc) && len(args) <= 1 { + r.errf("Incomplete arguments, %s values expected\n", what) + return nil, errKindParse + } + return args, nil +} + +// The list words mqprio and taprio share. +const ( + wordMap = "map" + wordQueues = "queues" + wordFp = "fp" +) + +// listWord is the map, queues and fp arms, the same in q_mqprio.c and +// q_taprio.c; ok false is a word that is none of them. A repeated queues +// or fp restarts idx but keeps counting (W30, W28, W29); a count parsed +// before a bad offset stays. +func (q *qoptState) listWord(args []string) (rest []string, ok bool) { + switch args[0] { + case wordMap: + var idx int + args, idx = mqprioList(args, func(idx int, a string) bool { + v, ok := getU8(a, 10) + if ok { + q.opt.PrioTcMap[idx] = v + } + return ok + }) + for ; idx < xtcpnl.TcQoptMaxQueueCst; idx++ { + q.opt.PrioTcMap[idx] = 0 + } + case wordQueues: + args, _ = mqprioList(args, func(idx int, a string) bool { + t1, ok1, t2, ok2 := strtokAt(a) + c, good := getU16(t1, 10) + if !ok1 || !good { + return false + } + q.opt.Count[idx] = c + o, good := getU16(t2, 10) + if !ok2 || !good { + return false + } + q.opt.Offset[idx] = o + q.cntOffPairs++ + return true + }) + case wordFp: + args, _ = mqprioList(args, func(idx int, a string) bool { + switch a { + case "E": + q.fp[idx] = tcFpExpress + case "P": + q.fp[idx] = tcFpPreemptible + default: + return false + } + q.numFp++ + return true + }) + q.haveTcEntries = true + default: + return nil, false + } + return args, true +} + +// mqprioWord is one turn of mqprio_parse_opt's loop; it returns the args +// left, args[0] the last word the turn took. +func (r *runner) mqprioWord(m *mqprioArgs, args []string) ([]string, error) { + if rest, ok := m.listWord(args); ok { + return rest, nil + } + if m.opt.Hw != 0 && (args[0] == "mode" || args[0] == "shaper") { // only after a nonzero hw (W31) + return r.mqprioHwWord(m, args) + } + next := func() error { + if len(args) < 2 { + return r.incomplete() + } + args = args[1:] + return nil + } + switch a := args[0]; { + case a == "num_tc", a == "hw": + if err := next(); err != nil { + return nil, err + } + v, ok := getU8(args[0], 10) + if !ok { + r.errf("Illegal \"%s\"\n", a) + return nil, errKindParse + } + if a == "hw" { + m.opt.Hw = v + } else { + m.opt.NumTc = v + } + case m.shaper == mqprioShaperBwRate && a == "min_rate": + var err error + if args, err = r.mqprioRateList(m, args, &m.minRate, "min_rate"); err != nil { + return nil, err + } + m.flags |= mqprioFMinRate + case m.shaper == mqprioShaperBwRate && a == "max_rate": + var err error + if args, err = r.mqprioRateList(m, args, &m.maxRate, "max_rate"); err != nil { + return nil, err + } + m.flags |= mqprioFMaxRate + case a == helpWord: + r.mqprioExplain() + return nil, errKindParse + default: + return nil, r.invarg("unknown argument", a) // exit 255 (W33) + } + return args, nil +} + +// mqprioHwWord is the mode and shaper arms, taken only after a nonzero +// hw (W31). +func (r *runner) mqprioHwWord(m *mqprioArgs, args []string) ([]string, error) { + if len(args) < 2 { + return nil, r.incomplete() + } + a := args[0] + args = args[1:] + switch a { + case "mode": + switch v := args[0]; { + case matches(v, "dcb"): + m.mode = 0 + case matches(v, "channel"): + m.mode = mqprioModeChannel + default: + r.errf("Illegal mode (%s)\n", v) + return nil, errKindParse + } + if m.mode != 0 { + m.flags |= mqprioFMode + } + case "shaper": + switch v := args[0]; { + case matches(v, "dcb"): + m.shaper = 0 + case matches(v, "bw_rlimit"): + m.shaper = mqprioShaperBwRate + if len(args) <= 1 { + r.errf("Incomplete shaper arguments\n") + return nil, errKindParse + } + default: + r.errf("Illegal shaper (%s)\n", v) + return nil, errKindParse + } + if m.shaper != 0 { + m.flags |= mqprioFShaper + } + } + return args, nil +} + +// parseMqprioQopt is mqprio_parse_opt. +func parseMqprioQopt(r *runner, args []string, _ string) (func(*xtcpnl.AttrBuilder) error, error) { + m := &mqprioArgs{qoptState: qoptState{opt: xtcpnl.TcMqprioQopt{ + NumTc: 8, + PrioTcMap: [16]uint8{0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 1, 1, 3, 3, 3, 3}, + Hw: 1, + }}} + for ; len(args) > 0; args = args[1:] { + var err error + if args, err = r.mqprioWord(m, args); err != nil { + return nil, err + } + } + if m.cntOffPairs > int(m.opt.NumTc) { + r.errf("queues count/offset pair count %d can not be higher than given num_tc %d\n", + m.cntOffPairs, m.opt.NumTc) + return nil, errKindParse + } + if m.haveTcEntries && m.numFp > xtcpnl.TcQoptMaxQueueCst { + return nil, fmt.Errorf("%w: mqprio with %d fp entries (tc reads past fp[%d])", + errNotImplemented, m.numFp, xtcpnl.TcQoptMaxQueueCst) + } + return m.attrs, nil +} + +// attrs is mqprio's TCA_OPTIONS: the struct, then MODE, SHAPER, the +// TC_ENTRY nests and the rate nests, all inside it (BeginNestData). +func (m *mqprioArgs) attrs(ab *xtcpnl.AttrBuilder) error { + var b [xtcpnl.TcMqprioQoptSizeCst]byte + tail, err := ab.BeginNestData(xtcpnl.TcaOptions, m.opt.Append(b[:0])) + if err != nil { + return err + } + if m.flags&mqprioFMode != 0 { + if err := ab.PutU16(xtcpnl.TcaMqprioMode, m.mode); err != nil { + return err + } + } + if m.flags&mqprioFShaper != 0 { + if err := ab.PutU16(xtcpnl.TcaMqprioShaper, m.shaper); err != nil { + return err + } + } + if m.haveTcEntries { + for tc := range m.numFp { + l, err := ab.BeginNest(xtcpnl.TcaMqprioTcEntry | unix.NLA_F_NESTED) + if err != nil { + return err + } + if err := putU32s(ab, []u32Attr{{xtcpnl.TcaMqprioTcEntryIndex, tc}, + {xtcpnl.TcaMqprioTcEntryFp, m.fp[tc]}}); err != nil { + return err + } + if err := ab.EndNest(l); err != nil { + return err + } + } + } + for _, rs := range []struct { + flag uint32 + t uint16 + rates *[xtcpnl.TcQoptMaxQueueCst]uint64 + }{{mqprioFMinRate, xtcpnl.TcaMqprioMinRate64, &m.minRate}, {mqprioFMaxRate, xtcpnl.TcaMqprioMaxRate64, &m.maxRate}} { + if m.flags&rs.flag == 0 { + continue + } + start, err := ab.BeginNest(rs.t | unix.NLA_F_NESTED) + if err != nil { + return err + } + for _, v := range rs.rates { + if err := putU64(ab, rs.t, v); err != nil { + return err + } + } + if err := ab.EndNest(start); err != nil { + return err + } + } + return ab.EndNest(tail) +} diff --git a/internal/gotc/qw_sched.go b/internal/gotc/qw_sched.go new file mode 100644 index 000000000..19cecbabe --- /dev/null +++ b/internal/gotc/qw_sched.go @@ -0,0 +1,309 @@ +//go:build gotc_write + +package gotc + +import ( + "strings" + + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// tc/q_drr.c, q_qfq.c, q_multiq.c, q_cbs.c and q_etf.c parse_opt and +// parse_class_opt at iproute2 v7.2.0, with tc_util.c get_clockid. + +// whatIs is the kinds' `What is "%s"?` for an unknown word. +func (r *runner) whatIs(a string) { r.errf("What is \"%s\"?\n", a) } + +// parseDrrQopt is drr_parse_opt: no options. +func parseDrrQopt(r *runner, args []string, _ string) (func(*xtcpnl.AttrBuilder) error, error) { + if len(args) > 0 { + if args[0] != helpWord { + r.whatIs(args[0]) + } + r.errf("Usage: ... drr\n") + return nil, errKindParse + } + return nil, nil +} + +// parseDrrCopt is drr_parse_class_opt: TCA_OPTIONS always, with one +// TCA_DRR_QUANTUM for each quantum given (a repeat is sent twice). +func parseDrrCopt(r *runner, args []string, _ string) (func(*xtcpnl.AttrBuilder) error, error) { + explain2 := func() { r.errf("Usage: ... drr quantum SIZE\n") } + var quanta []u32Attr + for ; len(args) > 0; args = args[1:] { + switch args[0] { + case wordQuantum: + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + v, ok := getSize(args[0]) + if !ok { + r.errf("Illegal \"quantum\"\n") + return nil, errKindParse + } + quanta = append(quanta, u32Attr{xtcpnl.TcaDrrQuantum, v}) + case helpWord: + explain2() + return nil, errKindParse + default: + r.whatIs(args[0]) + explain2() + return nil, errKindParse + } + } + return optionsNest(quanta), nil +} + +// optionsNest is addattr_nest(TCA_OPTIONS) around the u32 attributes. +func optionsNest(attrs []u32Attr) func(*xtcpnl.AttrBuilder) error { + return func(ab *xtcpnl.AttrBuilder) error { + m, err := ab.BeginNest(xtcpnl.TcaOptions) + if err != nil { + return err + } + if err := putU32s(ab, attrs); err != nil { + return err + } + return ab.EndNest(m) + } +} + +// parseQfqQopt is qfq_parse_opt: any word fails; one that is a prefix of +// "help" skips the "What is" line. +func parseQfqQopt(r *runner, args []string, _ string) (func(*xtcpnl.AttrBuilder) error, error) { + if len(args) > 0 { + if !matches(args[0], helpWord) { + r.whatIs(args[0]) + } + r.errf("Usage: ... qfq\n") + return nil, errKindParse + } + return nil, nil +} + +// parseQfqCopt is qfq_parse_class_opt: weight and maxpkt as get_u32 base +// 10, each sent as given, in argv order. +func parseQfqCopt(r *runner, args []string, _ string) (func(*xtcpnl.AttrBuilder) error, error) { + explain := func() { r.errf("Usage: ... qfq weight NUMBER maxpkt BYTES\n") } + var attrs []u32Attr + for ; len(args) > 0; args = args[1:] { + var t uint16 + var name string + switch a := args[0]; { + case matches(a, "weight"): + t, name = xtcpnl.TcaQfqWeight, "weight" + case matches(a, "maxpkt"): + t, name = xtcpnl.TcaQfqLmax, "maxpkt" + case a == helpWord: + explain() + return nil, errKindParse + default: + r.whatIs(a) + explain() + return nil, errKindParse + } + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + v, ok := getU32(args[0], 10) + if !ok { + r.errf("Illegal \"%s\"\n", name) + return nil, errKindParse + } + attrs = append(attrs, u32Attr{t, v}) + } + return optionsNest(attrs), nil +} + +// parseMultiqQopt is multiq_parse_opt: a zeroed tc_multiq_qopt. +func parseMultiqQopt(r *runner, args []string, _ string) (func(*xtcpnl.AttrBuilder) error, error) { + if len(args) > 0 { + if args[0] != helpWord { + r.whatIs(args[0]) + } + r.errf("Usage: ... multiq [help]\n") + return nil, errKindParse + } + return func(ab *xtcpnl.AttrBuilder) error { + var b [xtcpnl.TcMultiqQoptSizeCst]byte + return ab.PutBytes(xtcpnl.TcaOptions, xtcpnl.TcMultiqQopt{}.Append(b[:0])) + }, nil +} + +// parseCbsQopt is cbs_parse_opt. Each option's duplicate check is on a +// nonzero value (W3), so `hicredit 0 hicredit 5` passes. +func parseCbsQopt(r *runner, args []string, _ string) (func(*xtcpnl.AttrBuilder) error, error) { + explain := func() { + r.errf("Usage: ... cbs hicredit BYTES locredit BYTES sendslope BPS idleslope BPS\n" + + "\t [offload 0|1]\n") + } + var opt xtcpnl.TcCbsQopt + for ; len(args) > 0; args = args[1:] { + a := args[0] + var s32 *int32 + var name string + switch { + case matches(a, "offload"): + name = "offload" + case matches(a, "hicredit"): + s32, name = &opt.Hicredit, "hicredit" + case matches(a, "locredit"): + s32, name = &opt.Locredit, "locredit" + case matches(a, "sendslope"): + s32, name = &opt.Sendslope, "sendslope" + case matches(a, "idleslope"): + s32, name = &opt.Idleslope, "idleslope" + case a == helpWord: + explain() + return nil, errKindParse + default: + r.errf("cbs: unknown parameter \"%s\"\n", a) + explain() + return nil, errKindParse + } + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + if (s32 == nil && opt.Offload != 0) || (s32 != nil && *s32 != 0) { + r.errf("cbs: duplicate \"%s\" specification\n", name) + return nil, errKindParse + } + var ok bool + if s32 == nil { + opt.Offload, ok = getU8(args[0], 0) + } else { + *s32, ok = getS32(args[0], 0) + } + if !ok { + r.errf("cbs: illegal value for \"%s\": \"%s\"\n", name, args[0]) + return nil, errKindParse + } + } + return func(ab *xtcpnl.AttrBuilder) error { + m, err := ab.BeginNest(xtcpnl.TcaOptions) + if err != nil { + return err + } + var b [xtcpnl.TcCbsQoptSizeCst]byte + if err := ab.PutBytes(xtcpnl.TcaCbsParms, opt.Append(b[:0])); err != nil { + return err + } + return ab.EndNest(m) + }, nil +} + +// The tc_etf_qopt flags (pkt_sched.h:992-994). +const ( + etfDeadlineModeOn = 1 << 0 + etfOffloadOn = 1 << 1 + etfSkipSockCheck = 1 << 2 +) + +// clockNames is tc_util.c clockt_map: the clocks a qdisc can use. +var clockNames = []struct { + name string + id int32 +}{{"BOOTTIME", 7}, {"MONOTONIC", 1}, {"REALTIME", 0}, {"TAI", 11}} + +// getClockid is tc_util.c get_clockid: a "CLOCK_" anywhere in the word +// (strcasestr) drops the word's first six bytes, then the rest is matched +// without case. +func getClockid(s string) (int32, bool) { + if strings.Contains(strings.ToUpper(s), "CLOCK_") { + s = s[len("CLOCK_"):] + } + for _, c := range clockNames { + if strings.EqualFold(c.name, s) { + return c.id, true + } + } + return 0, false +} + +// parseEtfQopt is etf_parse_opt; delta's duplicate check is on a nonzero +// value (W3). TCA_OPTIONS is opened by hand (addattr_l with no data) and +// closed over TCA_ETF_PARMS: a plain nest's bytes. +func parseEtfQopt(r *runner, args []string, _ string) (func(*xtcpnl.AttrBuilder) error, error) { + explain := func() { + r.errf("Usage: ... etf delta NANOS clockid CLOCKID [offload] [deadline_mode]\n" + + "CLOCKID must be a valid SYS-V id (i.e. CLOCK_TAI)\n") + } + dup := func(name string) error { + r.errf("etf: duplicate \"%s\" specification\n", name) + return errKindParse + } + opt := xtcpnl.TcEtfQopt{Clockid: clockidInvalid} + flag := func(bit uint32, name string) error { + if opt.Flags&bit != 0 { + return dup(name) + } + opt.Flags |= bit + return nil + } + for ; len(args) > 0; args = args[1:] { + a := args[0] + var err error + switch { + case matches(a, "offload"): + err = flag(etfOffloadOn, "offload") + case matches(a, "deadline_mode"): + err = flag(etfDeadlineModeOn, "deadline_mode") + case matches(a, "delta"): + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + if opt.Delta != 0 { + return nil, dup("delta") + } + v, ok := getS32(args[0], 0) + if !ok { + r.errf("etf: illegal value for \"delta\": \"%s\"\n", args[0]) + return nil, errKindParse + } + opt.Delta = v + case matches(a, wordClockid): + if len(args) < 2 { + return nil, r.incomplete() + } + args = args[1:] + if opt.Clockid != clockidInvalid { + return nil, dup(wordClockid) + } + v, ok := getClockid(args[0]) + if !ok { + r.errf("etf: illegal value for \"clockid\": \"%s\".\n"+ + "It must be a valid SYS-V id (i.e. CLOCK_TAI)\n", args[0]) + return nil, errKindParse + } + opt.Clockid = v + case a == "skip_sock_check": + err = flag(etfSkipSockCheck, "skip_sock_check") + case a == helpWord: + explain() + return nil, errKindParse + default: + r.errf("etf: unknown parameter \"%s\"\n", a) + explain() + return nil, errKindParse + } + if err != nil { + return nil, err + } + } + return func(ab *xtcpnl.AttrBuilder) error { + m, err := ab.BeginNest(xtcpnl.TcaOptions) + if err != nil { + return err + } + var b [xtcpnl.TcEtfQoptSizeCst]byte + if err := ab.PutBytes(xtcpnl.TcaEtfParms, opt.Append(b[:0])); err != nil { + return err + } + return ab.EndNest(m) + }, nil +} diff --git a/internal/gotc/qw_sched_test.go b/internal/gotc/qw_sched_test.go new file mode 100644 index 000000000..924e97323 --- /dev/null +++ b/internal/gotc/qw_sched_test.go @@ -0,0 +1,204 @@ +//go:build gotc_write + +package gotc + +import ( + "bytes" + "encoding/hex" + "errors" + "strings" + "testing" + + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// How a kind parser ends. +const ( + outOK = "ok" // opts returned + outParse = "parse" // errKindParse: tc's return -1, rc 1 + outNotImpl = "notimpl" // refused by name: tc overruns memory or crashes + outExit = "exit" // invarg: exit 255 +) + +// TestGotcSchedWrite is the increment-15 kinds' parse_qopt and parse_copt +// on the leads (W26-W41) and their edges: how each ends, its message, and +// the attributes' length or bytes (the full requests are the tcswrite +// corpus's). +// +// go test -tags gotc_write ./internal/gotc/ -run TestGotcSchedWrite +func TestGotcSchedWrite(t *testing.T) { + type expected struct { + outcome string + stderr string // a substring; "" with outOK or outParse also means stderr is empty + attrs int // the opts' length when outOK; 0 skips + has string // hex the opts must contain, when outOK + } + sixteen := strings.Repeat("E ", 16) + tests := []struct { + description string + parse kindParser + args string + expected expected + }{ + {"positive: drr class quantum", parseDrrCopt, "quantum 1500", expected{outOK, "", 12, ""}}, + {"positive: qfq class weight and maxpkt", parseQfqCopt, "weight 10 maxpkt 2000", expected{outOK, "", 20, ""}}, + {"negative: qfq qdisc takes nothing", parseQfqQopt, "x", expected{outParse, "What is \"x\"?\nUsage: ... qfq\n", 0, ""}}, + {"corner: qfq qdisc h is help, no What is", parseQfqQopt, "h", expected{outParse, "Usage: ... qfq\n", 0, ""}}, + {"negative: multiq takes nothing", parseMultiqQopt, "x", expected{outParse, "Usage: ... multiq [help]", 0, ""}}, + {"positive: cbs credits and slopes", parseCbsQopt, "hicredit 30 locredit -1470 sendslope -980000 idleslope 20000", + expected{outOK, "", 28, "1800010000000000" + "1e000000" + "42faffff"}}, + {"corner: cbs duplicate check is on nonzero (W3)", parseCbsQopt, "hicredit 0 hicredit 5", expected{outOK, "", 28, ""}}, + {"negative: cbs duplicate", parseCbsQopt, "idleslope 1 idleslope 2", expected{outParse, "cbs: duplicate \"idleslope\"", 0, ""}}, + {"positive: etf clock_tai without case", parseEtfQopt, "clockid clock_tai delta 300000 skip_sock_check", + expected{outOK, "", 20, "e09304000b00000004000000"}}, + {"negative: etf offload twice", parseEtfQopt, "offload offload", expected{outParse, "etf: duplicate \"offload\"", 0, ""}}, + {"negative: etf bad clockid", parseEtfQopt, "clockid FOO", expected{outParse, "It must be a valid SYS-V id", 0, ""}}, + {"positive: hfsc sc sets rt and ls", parseHfscCopt, "sc rate 1mbit", expected{outOK, "", 36, ""}}, + // umax 5000 dmax 1s rate 1mbit is convex: d = 1000000 - (5000*10^6 + // mod 2^32)/125000 = 994360, not 960000. + {"boundary: hfsc umax 5000 wraps in 32 bits (W39)", parseHfscCopt, "rt umax 5000 dmax 1s rate 1mbit", + expected{outOK, "", 20, "10000100" + "00000000" + "382c0f00" + "48e80100"}}, + {"negative: hfsc rt rate 0 is tc's SIGFPE (W38)", parseHfscCopt, "rt rate 0", expected{outNotImpl, "", 0, ""}}, + {"corner: hfsc a bad m1 prints two errors (W41)", parseHfscCopt, "rt m1 bogus m2 1mbit", + expected{outParse, "HFSC: Illegal \"m1\"\nHFSC: Illegal \"rt\"\n", 0, ""}}, + {"negative: hfsc ul without ls", parseHfscCopt, "ul m2 1mbit", expected{outParse, "Upper-limit Service Curve", 0, ""}}, + {"negative: hfsc two zero slopes", parseHfscCopt, "rt m2 0", expected{outParse, "two zero slopes", 0, ""}}, + {"boundary: ets priomap 256 is band 0 (W27)", parseEtsQopt, "bands 2 priomap 256 1", + expected{outOK, "", 32, "0500060000000000" + "0500060001000000"}}, + {"negative: ets 17 quanta overrun tc's quanta[16] (W26)", parseEtsQopt, + "quanta 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17", expected{outNotImpl, "", 0, ""}}, + {"boundary: ets 16 quanta", parseEtsQopt, "quanta 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16", expected{outOK, "", 0, ""}}, + {"negative: ets nothing", parseEtsQopt, "", expected{outParse, "One of \"bands\", \"quanta\" or \"strict\"", 0, ""}}, + {"negative: ets quanta 0", parseEtsQopt, "quanta 0", expected{outParse, "\"quanta\" must be > 0", 0, ""}}, + {"positive: ets class quantum", parseEtsCopt, "quantum 1500", expected{outOK, "", 12, "08000400dc050000"}}, + {"positive: mqprio header in the stretched nest", parseMqprioQopt, "num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0", + expected{outOK, "", 88, "58000200"}}, + {"negative: mqprio unknown word is invarg (W33)", parseMqprioQopt, "bogus", expected{outExit, "is wrong: unknown argument", 0, ""}}, + {"corner: mqprio mode after hw 0 is unknown (W31)", parseMqprioQopt, "hw 0 mode channel", + expected{outExit, "argument \"mode\" is wrong", 0, ""}}, + {"negative: mqprio queues twice sums the pairs (W30)", parseMqprioQopt, "num_tc 2 queues 1@0 1@1 queues 1@0", + expected{outParse, "pair count 3 can not be higher than given num_tc 2", 0, ""}}, + {"negative: mqprio 17 fp entries read past fp[16] (W28)", parseMqprioQopt, "fp " + sixteen + "fp E", + expected{outNotImpl, "", 0, ""}}, + {"positive: taprio two entries and base-time", parseTaprioQopt, + "clockid TAI base-time 1000 sched-entry S 1 300000 sched-entry S 2 200000", expected{outOK, "", 0, ""}}, + {"corner: taprio bad base-time sends the rest unread (W34)", parseTaprioQopt, + "clockid TAI base-time x sched-entry S 1 1000", expected{outOK, "", 16, ""}}, + {"negative: taprio bad flags says nothing (W35)", parseTaprioQopt, "flags zz", expected{outParse, "", 0, ""}}, + {"negative: taprio unknown word is unnamed (W35)", parseTaprioQopt, "bogus", expected{outParse, "Unknown argument\n", 0, ""}}, + {"negative: taprio 17 max-sdu read past index 16 (W29)", parseTaprioQopt, + "max-sdu " + strings.Repeat("0 ", 16) + "max-sdu 0", expected{outNotImpl, "", 0, ""}}, + {"negative: taprio duplicate cycle-time", parseTaprioQopt, "cycle-time 5 cycle-time 6", + expected{outParse, "duplicate \"cycle-time\"", 0, ""}}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + var errb bytes.Buffer + r := &runner{stderr: &errb, core: tcCore{clockFactor: 1, tickInUsec: 1}} + opts, err := tc.parse(r, strings.Fields(tc.args), "d0") + var ec exitCode + got := outOK + switch { + case err == nil: + case errors.Is(err, errKindParse): + got = outParse + case errors.Is(err, errNotImplemented): + got = outNotImpl + case errors.As(err, &ec) && ec == -1: + got = outExit + default: + t.Fatalf("unexpected err %v", err) + } + if got != tc.expected.outcome { + t.Fatalf("outcome %s (%v), want %s; stderr %q", got, err, tc.expected.outcome, errb.String()) + } + if !strings.Contains(errb.String(), tc.expected.stderr) { + t.Errorf("stderr %q lacks %q", errb.String(), tc.expected.stderr) + } + if tc.expected.stderr == "" && got != outNotImpl && errb.Len() != 0 { + t.Errorf("stderr %q, want none", errb.String()) + } + if got != outOK || opts == nil { + return + } + ab := xtcpnl.NewAttrBuilder(make([]byte, 8192)) + if err := opts(&ab); err != nil { + t.Fatal(err) + } + if tc.expected.attrs != 0 && ab.Len() != tc.expected.attrs { + t.Errorf("attrs %d bytes, want %d: %x", ab.Len(), tc.expected.attrs, ab.Bytes()) + } + if h := hex.EncodeToString(ab.Bytes()); !strings.Contains(h, tc.expected.has) { + t.Errorf("attrs %s lack %s", h, tc.expected.has) + } + }) + } +} + +// TestGetClockid is tc_util.c get_clockid: a CLOCK_ anywhere drops the +// first six bytes. +func TestGetClockid(t *testing.T) { + tests := []struct { + description string + in string + expected int32 + ok bool + }{ + {"positive: TAI", "TAI", 11, true}, + {"positive: CLOCK_ prefix, any case", "clock_monotonic", 1, true}, + {"negative: unknown clock", "CLOCK_PROCESS", 0, false}, + {"corner: CLOCK_ not at the start drops the wrong bytes", "xCLOCK_TAI", 0, false}, + {"boundary: empty", "", 0, false}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + got, ok := getClockid(tc.in) + if got != tc.expected || ok != tc.ok { + t.Errorf("getClockid(%q) = %d, %t; want %d, %t", tc.in, got, ok, tc.expected, tc.ok) + } + }) + } +} + +// TestGetS64Strtok is lib/utils.c get_s64 in base 10 and strtok on '@'. +func TestGetS64Strtok(t *testing.T) { + s64 := []struct { + description string + in string + expected int64 + ok bool + }{ + {"positive: negative number", "-5", -5, true}, + {"negative: hex is not base 10", "0x10", 0, false}, + {"boundary: LLONG_MAX is ERANGE's value", "9223372036854775807", 0, false}, + {"boundary: one below LLONG_MAX", "9223372036854775806", 9223372036854775806, true}, + {"corner: empty", "", 0, false}, + } + for _, tc := range s64 { + t.Run(tc.description, func(t *testing.T) { + got, ok := getS64(tc.in, 10) + if got != tc.expected || ok != tc.ok { + t.Errorf("getS64(%q) = %d, %t; want %d, %t", tc.in, got, ok, tc.expected, tc.ok) + } + }) + } + toks := []struct { + description string + in string + expected [2]string + ok [2]bool + }{ + {"positive: count@offset", "4@0", [2]string{"4", "0"}, [2]bool{true, true}}, + {"corner: leading and doubled @ are skipped", "@@4@@0", [2]string{"4", "0"}, [2]bool{true, true}}, + {"negative: no offset", "4@", [2]string{"4", ""}, [2]bool{true, false}}, + {"boundary: only @", "@", [2]string{"", ""}, [2]bool{false, false}}, + } + for _, tc := range toks { + t.Run(tc.description, func(t *testing.T) { + t1, ok1, t2, ok2 := strtokAt(tc.in) + if [2]string{t1, t2} != tc.expected || [2]bool{ok1, ok2} != tc.ok { + t.Errorf("strtokAt(%q) = %q %t %q %t", tc.in, t1, ok1, t2, ok2) + } + }) + } +} diff --git a/internal/gotc/qw_taprio.go b/internal/gotc/qw_taprio.go new file mode 100644 index 000000000..cd22bccf9 --- /dev/null +++ b/internal/gotc/qw_taprio.go @@ -0,0 +1,365 @@ +//go:build gotc_write + +package gotc + +import ( + "fmt" + "math" + "strings" + + "github.com/randomizedcoder/xtcp2/pkg/cint" + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" + "golang.org/x/sys/unix" +) + +// tc/q_taprio.c taprio_parse_opt at iproute2 v7.2.0. + +// taprioSchedEntry is TCA_TAPRIO_SCHED_ENTRY, a member of the entry list. +const taprioSchedEntry = 1 + +func (r *runner) taprioExplain() { + r.errf("Usage: ... taprio clockid CLOCKID\n" + + "\t\t[num_tc NUMBER] [map P0 P1 ...]\n" + + "\t\t[queues COUNT@OFFSET COUNT@OFFSET COUNT@OFFSET ...]\n" + + "\t\t[ [sched-entry index cmd gate-mask interval] ... ]\n" + + "\t\t[base-time time] [txtime-delay delay]\n" + + "\t\t[fp FP0 FP1 FP2 ...]\n" + + "\n" + + "CLOCKID must be a valid SYS-V id (i.e. CLOCK_TAI)\n") +} + +// getS64 is lib/utils.c get_s64: strtoll in base, all of it, no ERANGE. +func getS64(s string, base uint64) (int64, bool) { + t := strings.TrimLeft(s, " \t\n\v\f\r") + neg := false + if t != "" && (t[0] == '+' || t[0] == '-') { + neg, t = t[0] == '-', t[1:] + } + if t == "" || t[0] == '+' || t[0] == '-' || cIsSpace(t[0]) { + return 0, false + } + mag, rest, ok, over := strtoulOver(t, base) + if !ok || rest != "" || over { + return 0, false + } + if neg { + if mag >= 1<<63 { + return 0, false // LLONG_MIN, and beyond, is ERANGE + } + n, _ := cint.NegInt64(mag) + return n, true + } + if mag >= math.MaxInt64 { + return 0, false + } + return cint.LongLong(mag), true +} + +// taprioSchedItem is a struct sched_entry. +type taprioSchedItem struct { + cmd uint8 + mask, interval uint32 +} + +// taprioArgs is taprio_parse_opt's locals. +type taprioArgs struct { + qoptState + maxSdu [xtcpnl.TcQoptMaxQueueCst]uint32 + clockid int32 + cycleTimeExt, cycleTime, base int64 + entries []taprioSchedItem + numMaxSdu uint32 + flags, txtimeDelay uint32 +} + +// The words taprio_parse_opt takes more than twice. +const ( + wordBaseTime = "base-time" + wordCycleTime = "cycle-time" + wordCycleTimeExt = "cycle-time-extension" + wordFlags = "flags" + wordTxtimeDelay = "txtime-delay" +) + +// The words etf, taprio, prio, fq and ets share. +const ( + wordClockid = "clockid" + wordPriomap = "priomap" + wordQuanta = "quanta" +) + +// taprioEntryCmd is str_to_entry_cmd: S, H and R. +func taprioEntryCmd(s string) (uint8, bool) { + switch s { + case "S": + return 0, true // TC_TAPRIO_CMD_SET_GATES + case "H": + return 1, true // TC_TAPRIO_CMD_SET_AND_HOLD + case "R": + return 2, true // TC_TAPRIO_CMD_SET_AND_RELEASE + } + return 0, false +} + +// errTaprioStop is a bad base-time, cycle-time or cycle-time-extension: +// PREV_ARG and break, so the request goes with what was parsed and the +// rest of argv unread, and no message (W34). +var errTaprioStop = fmt.Errorf("gotc: taprio stops parsing") + +// taprioWord is one turn of taprio_parse_opt's loop; it returns the args +// left, args[0] the last word the turn took. +func (r *runner) taprioWord(t *taprioArgs, args []string) ([]string, error) { + if rest, ok := t.listWord(args); ok { + return rest, nil + } + if rest, ok, err := r.taprioScalarWord(t, args); ok { + return rest, err + } + next := func() error { + if len(args) < 2 { + return r.incomplete() + } + args = args[1:] + return nil + } + switch a := args[0]; a { + case "num_tc": + if err := next(); err != nil { + return nil, err + } + v, ok := getU8(args[0], 10) + if !ok { + r.errf("Illegal \"num_tc\"\n") + return nil, errKindParse + } + t.opt.NumTc = v + case "max-sdu": + args, _ = mqprioList(args, func(idx int, a string) bool { + v, ok := getU32(a, 10) + if ok { + t.maxSdu[idx] = v + t.numMaxSdu++ + } + return ok + }) + t.haveTcEntries = true + case "sched-entry": + explain := func() { r.errf("Usage: ... taprio ... sched-entry \n") } + if err := next(); err != nil { + return nil, err + } + cmd, ok := taprioEntryCmd(args[0]) + if !ok { + explain() + return nil, errKindParse + } + if err := next(); err != nil { + return nil, err + } + mask, ok := getU32(args[0], 16) + if !ok { + explain() + return nil, errKindParse + } + if err := next(); err != nil { + return nil, err + } + interval, ok := getU32(args[0], 0) + if !ok { + explain() + return nil, errKindParse + } + t.entries = append(t.entries, taprioSchedItem{cmd, mask, interval}) + case helpWord: + r.taprioExplain() + return nil, errKindParse + default: + r.errf("Unknown argument\n") // the word unnamed (W35) + return nil, errKindParse + } + return args, nil +} + +// taprioScalarWord is the base-time, cycle-time, cycle-time-extension, +// clockid, flags and txtime-delay arms; ok false is a word that is none of +// them. +func (r *runner) taprioScalarWord(t *taprioArgs, args []string) (rest []string, ok bool, err error) { + switch args[0] { + case wordBaseTime, wordCycleTime, wordCycleTimeExt, wordClockid, wordFlags, wordTxtimeDelay: + default: + return nil, false, nil + } + next := func() error { + if len(args) < 2 { + return r.incomplete() + } + args = args[1:] + return nil + } + dup := func(name string) error { + r.errf("taprio: duplicate \"%s\" specification\n", name) + return errKindParse + } + switch a := args[0]; a { + case wordBaseTime, wordCycleTime, wordCycleTimeExt: + if err := next(); err != nil { + return nil, true, err + } + v := map[string]*int64{wordBaseTime: &t.base, wordCycleTime: &t.cycleTime, wordCycleTimeExt: &t.cycleTimeExt}[a] + if a != wordBaseTime && *v != 0 { + return nil, true, dup(a) + } + s, ok := getS64(args[0], 10) + if !ok { + return nil, true, errTaprioStop + } + *v = s + case wordClockid: + if err := next(); err != nil { + return nil, true, err + } + if t.clockid != clockidInvalid { + return nil, true, dup(wordClockid) + } + v, ok := getClockid(args[0]) + if !ok { + r.errf("taprio: illegal value for \"clockid\": \"%s\".\n", args[0]) + r.errf("It must be a valid SYS-V id (i.e. CLOCK_TAI)\n") + return nil, true, errKindParse + } + t.clockid = v + case wordFlags, wordTxtimeDelay: + if err := next(); err != nil { + return nil, true, err + } + v := &t.flags + if a == wordTxtimeDelay { + v = &t.txtimeDelay + } + if *v != 0 { + return nil, true, dup(a) + } + u, ok := getU32(args[0], 0) + if !ok { + return nil, true, errKindParse // no message (W35) + } + *v = u + } + return args, true, nil +} + +// parseTaprioQopt is taprio_parse_opt. +func parseTaprioQopt(r *runner, args []string, _ string) (func(*xtcpnl.AttrBuilder) error, error) { + t := &taprioArgs{clockid: clockidInvalid} + for ; len(args) > 0; args = args[1:] { + var err error + args, err = r.taprioWord(t, args) + if err == errTaprioStop { + break + } + if err != nil { + return nil, err + } + } + if t.haveTcEntries && max(t.numMaxSdu, t.numFp) > xtcpnl.TcQoptMaxQueueCst { + return nil, fmt.Errorf("%w: taprio with %d max-sdu or fp entries (tc reads past index %d)", + errNotImplemented, max(t.numMaxSdu, t.numFp), xtcpnl.TcQoptMaxQueueCst) + } + return t.attrs, nil +} + +// attrs is taprio's TCA_OPTIONS, a plain nest opened by hand: the scalar +// attributes when set, the TC_ENTRY nests, then the flagged entry list, +// sent even when empty. +func (t *taprioArgs) attrs(ab *xtcpnl.AttrBuilder) error { + tail, err := ab.BeginNest(xtcpnl.TcaOptions) + if err != nil { + return err + } + if t.clockid != clockidInvalid { + if err := ab.PutS32(xtcpnl.TcaTaprioAttrSchedClockid, t.clockid); err != nil { + return err + } + } + if t.flags != 0 { + if err := ab.PutU32(xtcpnl.TcaTaprioAttrFlags, t.flags); err != nil { + return err + } + } + if t.opt.NumTc > 0 { + var b [xtcpnl.TcMqprioQoptSizeCst]byte + if err := ab.PutBytes(xtcpnl.TcaTaprioAttrPriomap, t.opt.Append(b[:0])); err != nil { + return err + } + } + if t.txtimeDelay != 0 { + if err := ab.PutU32(xtcpnl.TcaTaprioAttrTxtimeDelay, t.txtimeDelay); err != nil { + return err + } + } + for _, s := range []struct { + t uint16 + v int64 + }{{xtcpnl.TcaTaprioAttrSchedBaseTime, t.base}, {xtcpnl.TcaTaprioAttrSchedCycleTime, t.cycleTime}, + {xtcpnl.TcaTaprioAttrSchedCycleTimeExtension, t.cycleTimeExt}} { + if s.v != 0 { + if err := putU64(ab, s.t, cint.U64Bits(s.v)); err != nil { + return err + } + } + } + if t.haveTcEntries { + if err := t.tcEntries(ab); err != nil { + return err + } + } + l, err := ab.BeginNest(xtcpnl.TcaTaprioAttrSchedEntryList | unix.NLA_F_NESTED) + if err != nil { + return err + } + for _, e := range t.entries { + a, err := ab.BeginNest(taprioSchedEntry) + if err != nil { + return err + } + if err := ab.PutU8(xtcpnl.TcaTaprioSchedEntryCmd, e.cmd); err != nil { + return err + } + if err := putU32s(ab, []u32Attr{{xtcpnl.TcaTaprioSchedEntryGateMask, e.mask}, + {xtcpnl.TcaTaprioSchedEntryInterval, e.interval}}); err != nil { + return err + } + if err := ab.EndNest(a); err != nil { + return err + } + } + if err := ab.EndNest(l); err != nil { + return err + } + return ab.EndNest(tail) +} + +// tcEntries is add_tc_entries: max(entries) flagged TC_ENTRY nests, each +// with MAX_SDU and FP for the indices that have them. +func (t *taprioArgs) tcEntries(ab *xtcpnl.AttrBuilder) error { + for tc := range max(t.numMaxSdu, t.numFp) { + l, err := ab.BeginNest(xtcpnl.TcaTaprioAttrTcEntry | unix.NLA_F_NESTED) + if err != nil { + return err + } + attrs := []u32Attr{{xtcpnl.TcaTaprioTcEntryIndex, tc}} + if tc < t.numMaxSdu { + attrs = append(attrs, u32Attr{xtcpnl.TcaTaprioTcEntryMaxSdu, t.maxSdu[tc]}) + } + if tc < t.numFp { + attrs = append(attrs, u32Attr{xtcpnl.TcaTaprioTcEntryFp, t.fp[tc]}) + } + if err := putU32s(ab, attrs); err != nil { + return err + } + if err := ab.EndNest(l); err != nil { + return err + } + } + return nil +} diff --git a/internal/gotc/qwrite.go b/internal/gotc/qwrite.go index b1de7b9c6..89bdb0719 100644 --- a/internal/gotc/qwrite.go +++ b/internal/gotc/qwrite.go @@ -63,12 +63,25 @@ var qoptParsers = map[string]kindParser{ xtcpnl.TcKindNetem: parseNetemQopt, xtcpnl.TcKindIngress: parseIngressQopt, xtcpnl.TcKindClsact: parseClsactQopt, + xtcpnl.TcKindDrr: parseDrrQopt, + xtcpnl.TcKindQfq: parseQfqQopt, + xtcpnl.TcKindMultiq: parseMultiqQopt, + xtcpnl.TcKindCbs: parseCbsQopt, + xtcpnl.TcKindEtf: parseEtfQopt, + xtcpnl.TcKindHfsc: parseHfscQopt, + xtcpnl.TcKindEts: parseEtsQopt, + xtcpnl.TcKindMqprio: parseMqprioQopt, + xtcpnl.TcKindTaprio: parseTaprioQopt, } // coptParsers are the parse_copts gotc clones. A kind whose qdisc_util has // a parse_copt (printCopt stands for it) but is not here is refused. var coptParsers = map[string]kindParser{ - xtcpnl.TcKindHtb: parseHtbCopt, + xtcpnl.TcKindHtb: parseHtbCopt, + xtcpnl.TcKindDrr: parseDrrCopt, + xtcpnl.TcKindQfq: parseQfqCopt, + xtcpnl.TcKindHfsc: parseHfscCopt, + xtcpnl.TcKindEts: parseEtsCopt, } // Words the kind parsers take more than twice. diff --git a/internal/gotc/qwrite_tdc_test.go b/internal/gotc/qwrite_tdc_test.go index 945c3d7d1..9e9872c84 100644 --- a/internal/gotc/qwrite_tdc_test.go +++ b/internal/gotc/qwrite_tdc_test.go @@ -22,16 +22,20 @@ import ( // tdcWriteSkips pins the refusals by kind. var tdcWriteSkips = map[string]int{ - "cake": 21, "cake_mq": 22, "cbs": 11, "choke": 7, "codel": 13, "drr": 3, "dualpi2": 12, "etf": 4, "ets": 49, - "fq_pie": 2, "gred": 7, "hfsc": 9, "hhf": 16, "mqprio": 4, "multiq": 4, "pie": 2, "plug": 9, "qfq": 10, "red": 9, - "sfb": 12, "skbprio": 4, "taprio": 7, + "cake": 21, "cake_mq": 22, "choke": 7, "codel": 13, "dualpi2": 12, + "fq_pie": 2, "gred": 7, "hhf": 16, "pie": 2, "plug": 9, "red": 9, + "sfb": 12, "skbprio": 4, } // tdcWriteKnown are the rows gotc cannot match, each with why. -var tdcWriteKnown = map[string]string{} +var tdcWriteKnown = map[string]string{ + // W26: tc writes the 17th quantum past quanta[16] and sends what the + // stack holds; gotc refuses the 17th by name. + "tdc/qdiscs/ets/65b6": "W26: 17 ets quanta", +} // tdcWritesSent pins how many tdc writes gotc sends exactly. -const tdcWritesSent = 173 +const tdcWritesSent = 273 var writeKindRefused = regexp.MustCompile(`not implemented: tc (?:qdisc|class) write of kind (\S+)`) diff --git a/internal/gotc/qwrite_test.go b/internal/gotc/qwrite_test.go index a27d571f3..a27289911 100644 --- a/internal/gotc/qwrite_test.go +++ b/internal/gotc/qwrite_test.go @@ -90,8 +90,6 @@ func TestGotcQwrite(t *testing.T) { []Reply{rep(nlErr(unix.EEXIST))}, "RTNETLINK answers: File exists\n", 2, 1, nil}, {"negative: a write of a deferred kind is refused by name", []string{"qdisc", "add", "root", "red"}, nil, notImpl + "tc qdisc write of kind red\n", 255, 0, nil}, - {"negative: a class write of a deferred classful kind is refused", []string{"class", "add", "classid", "1:1", "drr"}, nil, - notImpl + "tc class write of kind drr\n", 255, 0, nil}, {"negative: an unknown kind with options is parse_noqopt's, rc 1", []string{"qdisc", "add", "root", "nosuch", "x"}, nil, "Unknown qdisc \"nosuch\", hence option \"x\" is unparsable\n", 1, 0, nil}, {"negative: pfifo_fast takes no options, rc 255 (W8)", []string{"qdisc", "add", "root", "pfifo_fast", "x"}, nil, diff --git a/nix/microvms/workbench/tcswrite.rows.jsonl b/nix/microvms/workbench/tcswrite.rows.jsonl new file mode 100644 index 000000000..e946764f7 --- /dev/null +++ b/nix/microvms/workbench/tcswrite.rows.jsonl @@ -0,0 +1,117 @@ +# Generated by `nlcapgen matrix -family tcswrite -seed 1 -random 0`. +# Do not edit; regenerate. tools/nlcapgen/matrix.go explains the strategies. +# 114 rows. +{"id":"tcswrite/ec-001","desc":"positive: opt=plain cmd=drr0:qdisc_add_dev_d0_root_handle_1:_drr","cmd":"tc qdisc add dev d0 root handle 1: drr","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"drr0","json":"0","words":"qdisc add dev d0 root handle 1: drr"}} +{"id":"tcswrite/ec-002","desc":"positive: opt=plain cmd=drr-change:qdisc_change_dev_d0_root_handle_1:_drr","cmd":"tc qdisc change dev d0 root handle 1: drr","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: drr"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"drr-change","json":"0","words":"qdisc change dev d0 root handle 1: drr"}} +{"id":"tcswrite/ec-003","desc":"positive: opt=plain cmd=drr-replace:qdisc_replace_dev_d0_root_handle_1:_drr","cmd":"tc qdisc replace dev d0 root handle 1: drr","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: drr"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"drr-replace","json":"0","words":"qdisc replace dev d0 root handle 1: drr"}} +{"id":"tcswrite/ec-004","desc":"positive: opt=plain cmd=drr-delete:qdisc_delete_dev_d0_root","cmd":"tc qdisc delete dev d0 root","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: drr"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"drr-delete","json":"0","words":"qdisc delete dev d0 root"}} +{"id":"tcswrite/ec-005","desc":"positive: opt=plain cmd=qfq0:qdisc_add_dev_d0_root_handle_1:_qfq","cmd":"tc qdisc add dev d0 root handle 1: qfq","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"qfq0","json":"0","words":"qdisc add dev d0 root handle 1: qfq"}} +{"id":"tcswrite/ec-006","desc":"positive: opt=plain cmd=qfq-change:qdisc_change_dev_d0_root_handle_1:_qfq","cmd":"tc qdisc change dev d0 root handle 1: qfq","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: qfq"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"qfq-change","json":"0","words":"qdisc change dev d0 root handle 1: qfq"}} +{"id":"tcswrite/ec-007","desc":"positive: opt=plain cmd=qfq-replace:qdisc_replace_dev_d0_root_handle_1:_qfq","cmd":"tc qdisc replace dev d0 root handle 1: qfq","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: qfq"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"qfq-replace","json":"0","words":"qdisc replace dev d0 root handle 1: qfq"}} +{"id":"tcswrite/ec-008","desc":"positive: opt=plain cmd=qfq-delete:qdisc_delete_dev_d0_root","cmd":"tc qdisc delete dev d0 root","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: qfq"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"qfq-delete","json":"0","words":"qdisc delete dev d0 root"}} +{"id":"tcswrite/ec-009","desc":"positive: opt=plain cmd=multiq0:qdisc_add_dev_d1_root_handle_1:_multiq","cmd":"tc qdisc add dev d1 root handle 1: multiq","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d1"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"multiq0","json":"0","words":"qdisc add dev d1 root handle 1: multiq"}} +{"id":"tcswrite/ec-010","desc":"positive: opt=plain cmd=multiq-change:qdisc_change_dev_d1_root_handle_1:_multiq","cmd":"tc qdisc change dev d1 root handle 1: multiq","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: multiq"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d1"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"multiq-change","json":"0","words":"qdisc change dev d1 root handle 1: multiq"}} +{"id":"tcswrite/ec-011","desc":"positive: opt=plain cmd=multiq-replace:qdisc_replace_dev_d1_root_handle_1:_multiq","cmd":"tc qdisc replace dev d1 root handle 1: multiq","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: multiq"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d1"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"multiq-replace","json":"0","words":"qdisc replace dev d1 root handle 1: multiq"}} +{"id":"tcswrite/ec-012","desc":"positive: opt=plain cmd=multiq-delete:qdisc_delete_dev_d1_root","cmd":"tc qdisc delete dev d1 root","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: multiq"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d1"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"multiq-delete","json":"0","words":"qdisc delete dev d1 root"}} +{"id":"tcswrite/ec-013","desc":"positive: opt=plain cmd=hfsc0:qdisc_add_dev_d0_root_handle_1:_hfsc","cmd":"tc qdisc add dev d0 root handle 1: hfsc","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"hfsc0","json":"0","words":"qdisc add dev d0 root handle 1: hfsc"}} +{"id":"tcswrite/ec-014","desc":"positive: opt=plain cmd=hfsc1:qdisc_add_dev_d0_root_handle_1:_hfsc_default_10","cmd":"tc qdisc add dev d0 root handle 1: hfsc default 10","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"hfsc1","json":"0","words":"qdisc add dev d0 root handle 1: hfsc default 10"}} +{"id":"tcswrite/ec-015","desc":"positive: opt=plain cmd=hfsc-change:qdisc_change_dev_d0_root_handle_1:_hfsc_default_10","cmd":"tc qdisc change dev d0 root handle 1: hfsc default 10","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: hfsc"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"hfsc-change","json":"0","words":"qdisc change dev d0 root handle 1: hfsc default 10"}} +{"id":"tcswrite/ec-016","desc":"positive: opt=plain cmd=hfsc-replace:qdisc_replace_dev_d0_root_handle_1:_hfsc_default_10","cmd":"tc qdisc replace dev d0 root handle 1: hfsc default 10","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: hfsc"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"hfsc-replace","json":"0","words":"qdisc replace dev d0 root handle 1: hfsc default 10"}} +{"id":"tcswrite/ec-017","desc":"positive: opt=plain cmd=hfsc-delete:qdisc_delete_dev_d0_root","cmd":"tc qdisc delete dev d0 root","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: hfsc"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"hfsc-delete","json":"0","words":"qdisc delete dev d0 root"}} +{"id":"tcswrite/ec-018","desc":"positive: opt=plain cmd=ets0:qdisc_add_dev_d0_root_handle_1:_ets_bands_3_strict_1_quanta_1500_3000_priomap_2_1_0","cmd":"tc qdisc add dev d0 root handle 1: ets bands 3 strict 1 quanta 1500 3000 priomap 2 1 0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"ets0","json":"0","words":"qdisc add dev d0 root handle 1: ets bands 3 strict 1 quanta 1500 3000 priomap 2 1 0"}} +{"id":"tcswrite/ec-019","desc":"positive: opt=plain cmd=ets1:qdisc_add_dev_d0_root_handle_1:_ets_strict_3","cmd":"tc qdisc add dev d0 root handle 1: ets strict 3","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"ets1","json":"0","words":"qdisc add dev d0 root handle 1: ets strict 3"}} +{"id":"tcswrite/ec-020","desc":"positive: opt=plain cmd=ets2:qdisc_add_dev_d0_root_handle_1:_ets_quanta_1000_2000","cmd":"tc qdisc add dev d0 root handle 1: ets quanta 1000 2000","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"ets2","json":"0","words":"qdisc add dev d0 root handle 1: ets quanta 1000 2000"}} +{"id":"tcswrite/ec-021","desc":"positive: opt=plain cmd=ets3:qdisc_add_dev_d0_root_handle_1:_ets_bands_4_strict_2_priomap_3_2_1_0_3_2_1_0_3_2_1_0_3_2_1_0","cmd":"tc qdisc add dev d0 root handle 1: ets bands 4 strict 2 priomap 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"ets3","json":"0","words":"qdisc add dev d0 root handle 1: ets bands 4 strict 2 priomap 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0"}} +{"id":"tcswrite/ec-022","desc":"positive: opt=plain cmd=ets-change:qdisc_change_dev_d0_root_handle_1:_ets_bands_4_strict_2_priomap_3_2_1_0_3_2_1_0_3_2_1_0_3_2_1_0","cmd":"tc qdisc change dev d0 root handle 1: ets bands 4 strict 2 priomap 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: ets bands 3 strict 1 quanta 1500 3000 priomap 2 1 0"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"ets-change","json":"0","words":"qdisc change dev d0 root handle 1: ets bands 4 strict 2 priomap 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0"}} +{"id":"tcswrite/ec-023","desc":"positive: opt=plain cmd=ets-replace:qdisc_replace_dev_d0_root_handle_1:_ets_bands_4_strict_2_priomap_3_2_1_0_3_2_1_0_3_2_1_0_3_2_1_0","cmd":"tc qdisc replace dev d0 root handle 1: ets bands 4 strict 2 priomap 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: ets bands 3 strict 1 quanta 1500 3000 priomap 2 1 0"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"ets-replace","json":"0","words":"qdisc replace dev d0 root handle 1: ets bands 4 strict 2 priomap 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0"}} +{"id":"tcswrite/ec-024","desc":"positive: opt=plain cmd=ets-delete:qdisc_delete_dev_d0_root","cmd":"tc qdisc delete dev d0 root","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: ets bands 3 strict 1 quanta 1500 3000 priomap 2 1 0"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"ets-delete","json":"0","words":"qdisc delete dev d0 root"}} +{"id":"tcswrite/ec-025","desc":"positive: opt=plain cmd=mqprio0:qdisc_add_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_hw_0","cmd":"tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d1"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"mqprio0","json":"0","words":"qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0"}} +{"id":"tcswrite/ec-026","desc":"positive: opt=plain cmd=mqprio-delete:qdisc_delete_dev_d1_root","cmd":"tc qdisc delete dev d1 root","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d1"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"mqprio-delete","json":"0","words":"qdisc delete dev d1 root"}} +{"id":"tcswrite/ec-027","desc":"positive: opt=plain cmd=taprio0:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_base-time_1000000000_sched-entry_S_01_300000_sched-entry_S_02_200000_clockid_CLOCK_TAI","cmd":"tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 clockid CLOCK_TAI","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d1"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"taprio0","json":"0","words":"qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 clockid CLOCK_TAI"}} +{"id":"tcswrite/ec-028","desc":"positive: opt=plain cmd=taprio1:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_base-time_1000000000_sched-entry_S_01_300000_sched-entry_S_02_200000_cycle-time_600000_cycle-time-extension_1000_clockid_CLOCK_TAI","cmd":"tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 cycle-time 600000 cycle-time-extension 1000 clockid CLOCK_TAI","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d1"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"taprio1","json":"0","words":"qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 cycle-time 600000 cycle-time-extension 1000 clockid CLOCK_TAI"}} +{"id":"tcswrite/ec-029","desc":"positive: opt=plain cmd=taprio2:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_base-time_1000000000_sched-entry_S_01_300000_flags_0x1_txtime-delay_200000_clockid_CLOCK_TAI","cmd":"tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 flags 0x1 txtime-delay 200000 clockid CLOCK_TAI","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d1"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"taprio2","json":"0","words":"qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 flags 0x1 txtime-delay 200000 clockid CLOCK_TAI"}} +{"id":"tcswrite/ec-030","desc":"positive: opt=plain cmd=taprio3:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_base-time_1000000000_sched-entry_H_01_300000_sched-entry_R_02_200000_max-sdu_0_0_clockid_CLOCK_TAI","cmd":"tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry H 01 300000 sched-entry R 02 200000 max-sdu 0 0 clockid CLOCK_TAI","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d1"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"taprio3","json":"0","words":"qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry H 01 300000 sched-entry R 02 200000 max-sdu 0 0 clockid CLOCK_TAI"}} +{"id":"tcswrite/ec-031","desc":"positive: opt=plain cmd=taprio-change:qdisc_change_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_base-time_1000000000_sched-entry_H_01_300000_sched-entry_R_02_200000_max-sdu_0_0_clockid_CLOCK_TAI","cmd":"tc qdisc change dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry H 01 300000 sched-entry R 02 200000 max-sdu 0 0 clockid CLOCK_TAI","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 clockid CLOCK_TAI"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d1"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"taprio-change","json":"0","words":"qdisc change dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry H 01 300000 sched-entry R 02 200000 max-sdu 0 0 clockid CLOCK_TAI"}} +{"id":"tcswrite/ec-032","desc":"positive: opt=plain cmd=taprio-replace:qdisc_replace_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_base-time_1000000000_sched-entry_H_01_300000_sched-entry_R_02_200000_max-sdu_0_0_clockid_CLOCK_TAI","cmd":"tc qdisc replace dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry H 01 300000 sched-entry R 02 200000 max-sdu 0 0 clockid CLOCK_TAI","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 clockid CLOCK_TAI"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d1"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"taprio-replace","json":"0","words":"qdisc replace dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry H 01 300000 sched-entry R 02 200000 max-sdu 0 0 clockid CLOCK_TAI"}} +{"id":"tcswrite/ec-033","desc":"positive: opt=plain cmd=taprio-delete:qdisc_delete_dev_d1_root","cmd":"tc qdisc delete dev d1 root","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 clockid CLOCK_TAI"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d1"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"taprio-delete","json":"0","words":"qdisc delete dev d1 root"}} +{"id":"tcswrite/ec-034","desc":"positive: opt=plain cmd=cbs0:qdisc_add_dev_d0_root_handle_1:_cbs_idleslope_20000_sendslope_-980000_hicredit_30_locredit_-1470","cmd":"tc qdisc add dev d0 root handle 1: cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cbs0","json":"0","words":"qdisc add dev d0 root handle 1: cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470"}} +{"id":"tcswrite/ec-035","desc":"positive: opt=plain cmd=cbs1:qdisc_add_dev_d0_root_handle_1:_cbs_idleslope_1000_sendslope_-999000_hicredit_10_locredit_-20_offload_0","cmd":"tc qdisc add dev d0 root handle 1: cbs idleslope 1000 sendslope -999000 hicredit 10 locredit -20 offload 0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cbs1","json":"0","words":"qdisc add dev d0 root handle 1: cbs idleslope 1000 sendslope -999000 hicredit 10 locredit -20 offload 0"}} +{"id":"tcswrite/ec-036","desc":"positive: opt=plain cmd=cbs-change:qdisc_change_dev_d0_root_handle_1:_cbs_idleslope_1000_sendslope_-999000_hicredit_10_locredit_-20_offload_0","cmd":"tc qdisc change dev d0 root handle 1: cbs idleslope 1000 sendslope -999000 hicredit 10 locredit -20 offload 0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cbs-change","json":"0","words":"qdisc change dev d0 root handle 1: cbs idleslope 1000 sendslope -999000 hicredit 10 locredit -20 offload 0"}} +{"id":"tcswrite/ec-037","desc":"positive: opt=plain cmd=cbs-replace:qdisc_replace_dev_d0_root_handle_1:_cbs_idleslope_1000_sendslope_-999000_hicredit_10_locredit_-20_offload_0","cmd":"tc qdisc replace dev d0 root handle 1: cbs idleslope 1000 sendslope -999000 hicredit 10 locredit -20 offload 0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cbs-replace","json":"0","words":"qdisc replace dev d0 root handle 1: cbs idleslope 1000 sendslope -999000 hicredit 10 locredit -20 offload 0"}} +{"id":"tcswrite/ec-038","desc":"positive: opt=plain cmd=cbs-delete:qdisc_delete_dev_d0_root","cmd":"tc qdisc delete dev d0 root","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"cbs-delete","json":"0","words":"qdisc delete dev d0 root"}} +{"id":"tcswrite/ec-039","desc":"positive: opt=plain cmd=etf0:qdisc_add_dev_d0_root_handle_1:_etf_clockid_CLOCK_TAI","cmd":"tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"etf0","json":"0","words":"qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI"}} +{"id":"tcswrite/ec-040","desc":"positive: opt=plain cmd=etf1:qdisc_add_dev_d0_root_handle_1:_etf_clockid_CLOCK_TAI_delta_300000_skip_sock_check","cmd":"tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI delta 300000 skip_sock_check","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"etf1","json":"0","words":"qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI delta 300000 skip_sock_check"}} +{"id":"tcswrite/ec-041","desc":"positive: opt=plain cmd=etf2:qdisc_add_dev_d0_root_handle_1:_etf_clockid_CLOCK_TAI_delta_300000_deadline_mode","cmd":"tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI delta 300000 deadline_mode","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"etf2","json":"0","words":"qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI delta 300000 deadline_mode"}} +{"id":"tcswrite/ec-042","desc":"positive: opt=plain cmd=etf3:qdisc_add_dev_d0_root_handle_1:_etf_clockid_CLOCK_TAI_delta_200000_deadline_mode_skip_sock_check","cmd":"tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI delta 200000 deadline_mode skip_sock_check","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"etf3","json":"0","words":"qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI delta 200000 deadline_mode skip_sock_check"}} +{"id":"tcswrite/ec-043","desc":"positive: opt=plain cmd=etf-delete:qdisc_delete_dev_d0_root","cmd":"tc qdisc delete dev d0 root","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"etf-delete","json":"0","words":"qdisc delete dev d0 root"}} +{"id":"tcswrite/ec-044","desc":"positive: opt=plain cmd=drr-class0:class_add_dev_d0_parent_1:_classid_1:10_drr","cmd":"tc class add dev d0 parent 1: classid 1:10 drr","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: drr"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"drr-class0","json":"0","words":"class add dev d0 parent 1: classid 1:10 drr"}} +{"id":"tcswrite/ec-045","desc":"positive: opt=plain cmd=drr-class1:class_add_dev_d0_parent_1:_classid_1:10_drr_quantum_1514","cmd":"tc class add dev d0 parent 1: classid 1:10 drr quantum 1514","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: drr"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"drr-class1","json":"0","words":"class add dev d0 parent 1: classid 1:10 drr quantum 1514"}} +{"id":"tcswrite/ec-046","desc":"positive: opt=plain cmd=drr-class2:class_add_dev_d0_parent_1:_classid_1:10_drr_quantum_9k","cmd":"tc class add dev d0 parent 1: classid 1:10 drr quantum 9k","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: drr"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"drr-class2","json":"0","words":"class add dev d0 parent 1: classid 1:10 drr quantum 9k"}} +{"id":"tcswrite/ec-047","desc":"positive: opt=plain cmd=drr-class-change:class_change_dev_d0_parent_1:_classid_1:10_drr_quantum_9k","cmd":"tc class change dev d0 parent 1: classid 1:10 drr quantum 9k","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: drr","tc class add dev d0 parent 1: classid 1:10 drr"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"drr-class-change","json":"0","words":"class change dev d0 parent 1: classid 1:10 drr quantum 9k"}} +{"id":"tcswrite/ec-048","desc":"positive: opt=plain cmd=drr-class-replace:class_replace_dev_d0_parent_1:_classid_1:10_drr_quantum_9k","cmd":"tc class replace dev d0 parent 1: classid 1:10 drr quantum 9k","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: drr","tc class add dev d0 parent 1: classid 1:10 drr"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"drr-class-replace","json":"0","words":"class replace dev d0 parent 1: classid 1:10 drr quantum 9k"}} +{"id":"tcswrite/ec-049","desc":"positive: opt=plain cmd=drr-class-delete:class_delete_dev_d0_classid_1:10","cmd":"tc class delete dev d0 classid 1:10","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: drr","tc class add dev d0 parent 1: classid 1:10 drr"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"drr-class-delete","json":"0","words":"class delete dev d0 classid 1:10"}} +{"id":"tcswrite/ec-050","desc":"positive: opt=plain cmd=qfq-class0:class_add_dev_d0_parent_1:_classid_1:10_qfq","cmd":"tc class add dev d0 parent 1: classid 1:10 qfq","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: qfq"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"qfq-class0","json":"0","words":"class add dev d0 parent 1: classid 1:10 qfq"}} +{"id":"tcswrite/ec-051","desc":"positive: opt=plain cmd=qfq-class1:class_add_dev_d0_parent_1:_classid_1:10_qfq_weight_30_maxpkt_9000","cmd":"tc class add dev d0 parent 1: classid 1:10 qfq weight 30 maxpkt 9000","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: qfq"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"qfq-class1","json":"0","words":"class add dev d0 parent 1: classid 1:10 qfq weight 30 maxpkt 9000"}} +{"id":"tcswrite/ec-052","desc":"positive: opt=plain cmd=qfq-class2:class_add_dev_d0_parent_1:_classid_1:10_qfq_weight_1","cmd":"tc class add dev d0 parent 1: classid 1:10 qfq weight 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: qfq"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"qfq-class2","json":"0","words":"class add dev d0 parent 1: classid 1:10 qfq weight 1"}} +{"id":"tcswrite/ec-053","desc":"positive: opt=plain cmd=qfq-class-change:class_change_dev_d0_parent_1:_classid_1:10_qfq_weight_1","cmd":"tc class change dev d0 parent 1: classid 1:10 qfq weight 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: qfq","tc class add dev d0 parent 1: classid 1:10 qfq"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"qfq-class-change","json":"0","words":"class change dev d0 parent 1: classid 1:10 qfq weight 1"}} +{"id":"tcswrite/ec-054","desc":"positive: opt=plain cmd=qfq-class-replace:class_replace_dev_d0_parent_1:_classid_1:10_qfq_weight_1","cmd":"tc class replace dev d0 parent 1: classid 1:10 qfq weight 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: qfq","tc class add dev d0 parent 1: classid 1:10 qfq"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"qfq-class-replace","json":"0","words":"class replace dev d0 parent 1: classid 1:10 qfq weight 1"}} +{"id":"tcswrite/ec-055","desc":"positive: opt=plain cmd=qfq-class-delete:class_delete_dev_d0_classid_1:10","cmd":"tc class delete dev d0 classid 1:10","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: qfq","tc class add dev d0 parent 1: classid 1:10 qfq"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"qfq-class-delete","json":"0","words":"class delete dev d0 classid 1:10"}} +{"id":"tcswrite/ec-056","desc":"positive: opt=plain cmd=hfsc-class0:class_add_dev_d0_parent_1:_classid_1:10_hfsc_sc_rate_10mbit_ul_rate_20mbit","cmd":"tc class add dev d0 parent 1: classid 1:10 hfsc sc rate 10mbit ul rate 20mbit","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: hfsc default 10"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"hfsc-class0","json":"0","words":"class add dev d0 parent 1: classid 1:10 hfsc sc rate 10mbit ul rate 20mbit"}} +{"id":"tcswrite/ec-057","desc":"positive: opt=plain cmd=hfsc-class1:class_add_dev_d0_parent_1:_classid_1:10_hfsc_rt_m1_2mbit_d_10ms_m2_1mbit_ls_m2_3mbit","cmd":"tc class add dev d0 parent 1: classid 1:10 hfsc rt m1 2mbit d 10ms m2 1mbit ls m2 3mbit","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: hfsc default 10"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"hfsc-class1","json":"0","words":"class add dev d0 parent 1: classid 1:10 hfsc rt m1 2mbit d 10ms m2 1mbit ls m2 3mbit"}} +{"id":"tcswrite/ec-058","desc":"positive: opt=plain cmd=hfsc-class2:class_add_dev_d0_parent_1:_classid_1:10_hfsc_sc_umax_1500_dmax_10ms_rate_1mbit","cmd":"tc class add dev d0 parent 1: classid 1:10 hfsc sc umax 1500 dmax 10ms rate 1mbit","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: hfsc default 10"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"hfsc-class2","json":"0","words":"class add dev d0 parent 1: classid 1:10 hfsc sc umax 1500 dmax 10ms rate 1mbit"}} +{"id":"tcswrite/ec-059","desc":"positive: opt=plain cmd=hfsc-class3:class_add_dev_d0_parent_1:_classid_1:10_hfsc_rt_umax_1500_dmax_50ms_rate_10mbit","cmd":"tc class add dev d0 parent 1: classid 1:10 hfsc rt umax 1500 dmax 50ms rate 10mbit","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: hfsc default 10"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"hfsc-class3","json":"0","words":"class add dev d0 parent 1: classid 1:10 hfsc rt umax 1500 dmax 50ms rate 10mbit"}} +{"id":"tcswrite/ec-060","desc":"positive: opt=plain cmd=hfsc-class4:class_add_dev_d0_parent_1:_classid_1:10_hfsc_ls_m1_0_d_5ms_m2_2mbit_ul_m2_4mbit","cmd":"tc class add dev d0 parent 1: classid 1:10 hfsc ls m1 0 d 5ms m2 2mbit ul m2 4mbit","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: hfsc default 10"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"hfsc-class4","json":"0","words":"class add dev d0 parent 1: classid 1:10 hfsc ls m1 0 d 5ms m2 2mbit ul m2 4mbit"}} +{"id":"tcswrite/ec-061","desc":"positive: opt=plain cmd=hfsc-class-change:class_change_dev_d0_parent_1:_classid_1:10_hfsc_ls_m1_0_d_5ms_m2_2mbit_ul_m2_4mbit","cmd":"tc class change dev d0 parent 1: classid 1:10 hfsc ls m1 0 d 5ms m2 2mbit ul m2 4mbit","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: hfsc default 10","tc class add dev d0 parent 1: classid 1:10 hfsc sc rate 10mbit ul rate 20mbit"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"hfsc-class-change","json":"0","words":"class change dev d0 parent 1: classid 1:10 hfsc ls m1 0 d 5ms m2 2mbit ul m2 4mbit"}} +{"id":"tcswrite/ec-062","desc":"positive: opt=plain cmd=hfsc-class-replace:class_replace_dev_d0_parent_1:_classid_1:10_hfsc_ls_m1_0_d_5ms_m2_2mbit_ul_m2_4mbit","cmd":"tc class replace dev d0 parent 1: classid 1:10 hfsc ls m1 0 d 5ms m2 2mbit ul m2 4mbit","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: hfsc default 10","tc class add dev d0 parent 1: classid 1:10 hfsc sc rate 10mbit ul rate 20mbit"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"hfsc-class-replace","json":"0","words":"class replace dev d0 parent 1: classid 1:10 hfsc ls m1 0 d 5ms m2 2mbit ul m2 4mbit"}} +{"id":"tcswrite/ec-063","desc":"positive: opt=plain cmd=hfsc-class-delete:class_delete_dev_d0_classid_1:10","cmd":"tc class delete dev d0 classid 1:10","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: hfsc default 10","tc class add dev d0 parent 1: classid 1:10 hfsc sc rate 10mbit ul rate 20mbit"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"hfsc-class-delete","json":"0","words":"class delete dev d0 classid 1:10"}} +{"id":"tcswrite/ec-064","desc":"positive: opt=plain cmd=ets-class-change:class_change_dev_d0_classid_1:3_ets_quantum_2000","cmd":"tc class change dev d0 classid 1:3 ets quantum 2000","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: ets bands 3 strict 1"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"ets-class-change","json":"0","words":"class change dev d0 classid 1:3 ets quantum 2000"}} +{"id":"tcswrite/ec-065","desc":"positive: opt=plain cmd=ets-class-replace:class_replace_dev_d0_classid_1:2_ets_quantum_3000","cmd":"tc class replace dev d0 classid 1:2 ets quantum 3000","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: ets bands 3 strict 1"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"ets-class-replace","json":"0","words":"class replace dev d0 classid 1:2 ets quantum 3000"}} +{"id":"tcswrite/ec-066","desc":"boundary: opt=plain cmd=w27-priomap:qdisc_add_dev_d0_root_handle_1:_ets_bands_3_priomap_256_1_2","cmd":"tc qdisc add dev d0 root handle 1: ets bands 3 priomap 256 1 2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w27-priomap","json":"0","words":"qdisc add dev d0 root handle 1: ets bands 3 priomap 256 1 2"}} +{"id":"tcswrite/ec-067","desc":"corner: opt=plain cmd=w3-ets:qdisc_add_dev_d0_root_handle_1:_ets_bands_0_bands_3","cmd":"tc qdisc add dev d0 root handle 1: ets bands 0 bands 3","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w3-ets","json":"0","words":"qdisc add dev d0 root handle 1: ets bands 0 bands 3"}} +{"id":"tcswrite/ec-068","desc":"corner: opt=plain cmd=w3-hfsc:qdisc_add_dev_d0_root_handle_1:_hfsc_default_0_default_5","cmd":"tc qdisc add dev d0 root handle 1: hfsc default 0 default 5","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w3-hfsc","json":"0","words":"qdisc add dev d0 root handle 1: hfsc default 0 default 5"}} +{"id":"tcswrite/ec-069","desc":"corner: opt=plain cmd=w3-cbs:qdisc_add_dev_d0_root_handle_1:_cbs_hicredit_0_hicredit_5","cmd":"tc qdisc add dev d0 root handle 1: cbs hicredit 0 hicredit 5","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w3-cbs","json":"0","words":"qdisc add dev d0 root handle 1: cbs hicredit 0 hicredit 5"}} +{"id":"tcswrite/ec-070","desc":"corner: opt=plain cmd=w3-etf:qdisc_add_dev_d0_root_handle_1:_etf_clockid_CLOCK_TAI_delta_0_delta_5","cmd":"tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI delta 0 delta 5","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w3-etf","json":"0","words":"qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI delta 0 delta 5"}} +{"id":"tcswrite/ec-071","desc":"corner: opt=plain cmd=w3-taprio:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_sched-entry_S_01_300000_cycle-time_0_cycle-time_600000_clockid_CLOCK_TAI","cmd":"tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 sched-entry S 01 300000 cycle-time 0 cycle-time 600000 clockid CLOCK_TAI","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d1"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w3-taprio","json":"0","words":"qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 sched-entry S 01 300000 cycle-time 0 cycle-time 600000 clockid CLOCK_TAI"}} +{"id":"tcswrite/ec-072","desc":"boundary: opt=plain cmd=w39-umax:class_add_dev_d0_parent_1:_classid_1:10_hfsc_sc_umax_5000_dmax_100ms_rate_100mbit","cmd":"tc class add dev d0 parent 1: classid 1:10 hfsc sc umax 5000 dmax 100ms rate 100mbit","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: hfsc"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w39-umax","json":"0","words":"class add dev d0 parent 1: classid 1:10 hfsc sc umax 5000 dmax 100ms rate 100mbit"}} +{"id":"tcswrite/ec-073","desc":"boundary: opt=plain cmd=w40-m1:class_add_dev_d0_parent_1:_classid_1:10_hfsc_rt_umax_100000_dmax_1us_rate_1kbit","cmd":"tc class add dev d0 parent 1: classid 1:10 hfsc rt umax 100000 dmax 1us rate 1kbit","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: hfsc"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w40-m1","json":"0","words":"class add dev d0 parent 1: classid 1:10 hfsc rt umax 100000 dmax 1us rate 1kbit"}} +{"id":"tcswrite/ec-074","desc":"corner: opt=plain cmd=w41-repeat:class_add_dev_d0_parent_1:_classid_1:10_hfsc_rt_m2_1mbit_sc_m2_2mbit","cmd":"tc class add dev d0 parent 1: classid 1:10 hfsc rt m2 1mbit sc m2 2mbit","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: hfsc"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"w41-repeat","json":"0","words":"class add dev d0 parent 1: classid 1:10 hfsc rt m2 1mbit sc m2 2mbit"}} +{"id":"tcswrite/ec-075","desc":"positive: opt=plain cmd=batch:batch:hfsc","cmd":"tc -batch b.txt","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","printf '%s\\n' 'qdisc add dev d0 root handle 1: hfsc default 10' 'class add dev d0 parent 1: classid 1:1 hfsc sc rate 10mbit ul rate 20mbit' 'class add dev d0 parent 1:1 classid 1:10 hfsc rt m2 1mbit ls m2 1mbit' > b.txt"],"readback":[{"name":"dump","cmd":"tc -d qdisc show dev d0"},{"name":"class","cmd":"tc -d class show dev d0"}],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"batch":"hfsc","fix":"batch","json":"0","words":"-batch b.txt"}} +{"id":"tcswrite/ng-001","desc":"negative: opt=plain cmd=ng:drr-bogus:qdisc_add_dev_d0_root_handle_1:_drr_bogus: What is \"bogus\"?, rc 1 (W4)","cmd":"tc qdisc add dev d0 root handle 1: drr bogus","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":1,"refused_by":"iproute2"},"axes":{"fix":"drr-bogus","json":"0","words":"qdisc add dev d0 root handle 1: drr bogus"}} +{"id":"tcswrite/ng-002","desc":"negative: opt=plain cmd=ng:drr-q0:class_add_dev_d0_parent_1:_classid_1:10_drr_quantum_0: the kernel refuses a zero quantum","cmd":"tc class add dev d0 parent 1: classid 1:10 drr quantum 0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: drr"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"drr-q0","json":"0","words":"class add dev d0 parent 1: classid 1:10 drr quantum 0"}} +{"id":"tcswrite/ng-003","desc":"negative: opt=plain cmd=ng:drr-cbogus:class_add_dev_d0_parent_1:_classid_1:10_drr_bogus: class usage, rc 1","cmd":"tc class add dev d0 parent 1: classid 1:10 drr bogus","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: drr"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":1,"refused_by":"iproute2"},"axes":{"fix":"drr-cbogus","json":"0","words":"class add dev d0 parent 1: classid 1:10 drr bogus"}} +{"id":"tcswrite/ng-004","desc":"negative: opt=plain cmd=ng:qfq-weight:class_add_dev_d0_parent_1:_classid_1:10_qfq_weight_zz: Illegal \"weight\", rc 1","cmd":"tc class add dev d0 parent 1: classid 1:10 qfq weight zz","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: qfq"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":1,"refused_by":"iproute2"},"axes":{"fix":"qfq-weight","json":"0","words":"class add dev d0 parent 1: classid 1:10 qfq weight zz"}} +{"id":"tcswrite/ng-005","desc":"negative: opt=plain cmd=ng:multiq-bands:qdisc_add_dev_d1_root_handle_1:_multiq_bands_4: multiq takes no options (K27), rc 1","cmd":"tc qdisc add dev d1 root handle 1: multiq bands 4","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":1,"refused_by":"iproute2"},"axes":{"fix":"multiq-bands","json":"0","words":"qdisc add dev d1 root handle 1: multiq bands 4"}} +{"id":"tcswrite/ng-006","desc":"negative: opt=plain cmd=ng:multiq-class:class_add_dev_d1_parent_1:_classid_1:1_multiq: multiq is classless, rc 1","cmd":"tc class add dev d1 parent 1: classid 1:1 multiq","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: multiq"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":1,"refused_by":"iproute2"},"axes":{"fix":"multiq-class","json":"0","words":"class add dev d1 parent 1: classid 1:1 multiq"}} +{"id":"tcswrite/ng-007","desc":"negative: opt=plain cmd=ng:w41-twoerr:class_add_dev_d0_parent_1:_classid_1:10_hfsc_rt_m1_bogus_m2_1mbit: a failed sc1 is retried as sc2: two errors (W41)","cmd":"tc class add dev d0 parent 1: classid 1:10 hfsc rt m1 bogus m2 1mbit","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: hfsc"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":1,"refused_by":"iproute2"},"axes":{"fix":"w41-twoerr","json":"0","words":"class add dev d0 parent 1: classid 1:10 hfsc rt m1 bogus m2 1mbit"}} +{"id":"tcswrite/ng-008","desc":"negative: opt=plain cmd=ng:w16-m2:class_add_dev_d0_parent_1:_classid_1:10_hfsc_rt_m2_40gbit: hfsc rates are 32-bit (W16)","cmd":"tc class add dev d0 parent 1: classid 1:10 hfsc rt m2 40gbit","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: hfsc"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":1,"refused_by":"iproute2"},"axes":{"fix":"w16-m2","json":"0","words":"class add dev d0 parent 1: classid 1:10 hfsc rt m2 40gbit"}} +{"id":"tcswrite/ng-009","desc":"negative: opt=plain cmd=ng:w9-pct:class_add_dev_d0_parent_1:_classid_1:10_hfsc_ls_m2_10%: a percent rate on a dummy with no speed (W9)","cmd":"tc class add dev d0 parent 1: classid 1:10 hfsc ls m2 10%","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: hfsc"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":1,"refused_by":"iproute2"},"axes":{"fix":"w9-pct","json":"0","words":"class add dev d0 parent 1: classid 1:10 hfsc ls m2 10%"}} +{"id":"tcswrite/ng-010","desc":"negative: opt=plain cmd=ng:hfsc-bogus:class_add_dev_d0_parent_1:_classid_1:10_hfsc_bogus: hfsc usage, rc 1","cmd":"tc class add dev d0 parent 1: classid 1:10 hfsc bogus","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: hfsc"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":1,"refused_by":"iproute2"},"axes":{"fix":"hfsc-bogus","json":"0","words":"class add dev d0 parent 1: classid 1:10 hfsc bogus"}} +{"id":"tcswrite/ng-011","desc":"negative: opt=plain cmd=ng:ets-cover:qdisc_add_dev_d0_root_handle_1:_ets_bands_2_quanta_1_2_3: not enough bands for the quanta","cmd":"tc qdisc add dev d0 root handle 1: ets bands 2 quanta 1 2 3","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":1,"refused_by":"iproute2"},"axes":{"fix":"ets-cover","json":"0","words":"qdisc add dev d0 root handle 1: ets bands 2 quanta 1 2 3"}} +{"id":"tcswrite/ng-012","desc":"negative: opt=plain cmd=ng:ets-oob:qdisc_add_dev_d0_root_handle_1:_ets_bands_2_priomap_2: a priomap band out of bounds","cmd":"tc qdisc add dev d0 root handle 1: ets bands 2 priomap 2","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":1,"refused_by":"iproute2"},"axes":{"fix":"ets-oob","json":"0","words":"qdisc add dev d0 root handle 1: ets bands 2 priomap 2"}} +{"id":"tcswrite/ng-013","desc":"negative: opt=plain cmd=ng:ets-none:qdisc_add_dev_d0_root_handle_1:_ets: no bands, quanta or strict","cmd":"tc qdisc add dev d0 root handle 1: ets","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":1,"refused_by":"iproute2"},"axes":{"fix":"ets-none","json":"0","words":"qdisc add dev d0 root handle 1: ets"}} +{"id":"tcswrite/ng-014","desc":"negative: opt=plain cmd=ng:ets-strictq:class_change_dev_d0_classid_1:1_ets_quantum_2000: a strict band has no quantum","cmd":"tc class change dev d0 classid 1:1 ets quantum 2000","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: ets bands 3 strict 1"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"ets-strictq","json":"0","words":"class change dev d0 classid 1:1 ets quantum 2000"}} +{"id":"tcswrite/ng-015","desc":"negative: opt=plain cmd=ng:mq-nohw:qdisc_add_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4: hw defaults to 1: a dummy has no offload","cmd":"tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"mq-nohw","json":"0","words":"qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4"}} +{"id":"tcswrite/ng-016","desc":"negative: opt=plain cmd=ng:w33-bogus:qdisc_add_dev_d1_root_handle_1:_mqprio_bogus: an unknown word goes to invarg: rc 255 (W33)","cmd":"tc qdisc add dev d1 root handle 1: mqprio bogus","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w33-bogus","json":"0","words":"qdisc add dev d1 root handle 1: mqprio bogus"}} +{"id":"tcswrite/ng-017","desc":"negative: opt=plain cmd=ng:mq-numtc:qdisc_add_dev_d1_root_handle_1:_mqprio_num_tc_x: Illegal \"num_tc\", rc 1 (W33's contrast)","cmd":"tc qdisc add dev d1 root handle 1: mqprio num_tc x","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":1,"refused_by":"iproute2"},"axes":{"fix":"mq-numtc","json":"0","words":"qdisc add dev d1 root handle 1: mqprio num_tc x"}} +{"id":"tcswrite/ng-018","desc":"negative: opt=plain cmd=ng:w31-hw-first:qdisc_add_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_hw_0_mode_channel: mode after hw 0 is unknown: rc 255 (W31)","cmd":"tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0 mode channel","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"w31-hw-first","json":"0","words":"qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0 mode channel"}} +{"id":"tcswrite/ng-019","desc":"negative: opt=plain cmd=ng:w31-mode-first:qdisc_add_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_mode_channel_hw_0: mode before hw 0 is sent: the kernel's EINVAL (W31)","cmd":"tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 mode channel hw 0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"w31-mode-first","json":"0","words":"qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 mode channel hw 0"}} +{"id":"tcswrite/ng-020","desc":"negative: opt=plain cmd=ng:w30-queues:qdisc_add_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_queues_4@0_4@4_hw_0: queues twice sums the pair count (W30)","cmd":"tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 queues 4@0 4@4 hw 0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":1,"refused_by":"iproute2"},"axes":{"fix":"w30-queues","json":"0","words":"qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 queues 4@0 4@4 hw 0"}} +{"id":"tcswrite/ng-021","desc":"negative: opt=plain cmd=ng:mq-fp:qdisc_add_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_fp_E_P_hw_0: fp needs hardware mode","cmd":"tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 fp E P hw 0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"mq-fp","json":"0","words":"qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 fp E P hw 0"}} +{"id":"tcswrite/ng-022","desc":"negative: opt=plain cmd=ng:w32-rates:qdisc_add_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_mode_channel_shaper_bw_rlimit_min_rate_1mbit_hw_1: one min_rate for two classes is sent (W32)","cmd":"tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 mode channel shaper bw_rlimit min_rate 1mbit hw 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"w32-rates","json":"0","words":"qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 mode channel shaper bw_rlimit min_rate 1mbit hw 1"}} +{"id":"tcswrite/ng-023","desc":"negative: opt=plain cmd=ng:mq-rates:qdisc_add_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_mode_channel_shaper_bw_rlimit_min_rate_1mbit_2mbit_max_rate_5mbit_6mbit_hw_1: rates need hardware offload","cmd":"tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 mode channel shaper bw_rlimit min_rate 1mbit 2mbit max_rate 5mbit 6mbit hw 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"mq-rates","json":"0","words":"qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 mode channel shaper bw_rlimit min_rate 1mbit 2mbit max_rate 5mbit 6mbit hw 1"}} +{"id":"tcswrite/ng-024","desc":"negative: opt=plain cmd=ng:taprio-sq:qdisc_add_dev_d0_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_1@0_1@0_base-time_1000000000_sched-entry_S_01_300000_sched-entry_S_02_200000_clockid_CLOCK_TAI: taprio needs a multiqueue device","cmd":"tc qdisc add dev d0 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 1@0 1@0 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 clockid CLOCK_TAI","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"ENOTSUP","refused_by":"kernel"},"axes":{"fix":"taprio-sq","json":"0","words":"qdisc add dev d0 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 1@0 1@0 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 clockid CLOCK_TAI"}} +{"id":"tcswrite/ng-025","desc":"negative: opt=plain cmd=ng:w34-basetime:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_base-time_zz_sched-entry_S_01_300000_clockid_CLOCK_TAI: a bad base-time ends the parse silently: no entries sent (W34)","cmd":"tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time zz sched-entry S 01 300000 clockid CLOCK_TAI","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"w34-basetime","json":"0","words":"qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time zz sched-entry S 01 300000 clockid CLOCK_TAI"}} +{"id":"tcswrite/ng-026","desc":"negative: opt=plain cmd=ng:w34-cycle:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_cycle-time_zz_sched-entry_S_01_300000_clockid_CLOCK_TAI: a bad cycle-time ends the parse silently (W34)","cmd":"tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 cycle-time zz sched-entry S 01 300000 clockid CLOCK_TAI","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"w34-cycle","json":"0","words":"qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 cycle-time zz sched-entry S 01 300000 clockid CLOCK_TAI"}} +{"id":"tcswrite/ng-027","desc":"negative: opt=plain cmd=ng:w35-flags:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_sched-entry_S_01_300000_flags_zz_clockid_CLOCK_TAI: a bad flags value: rc 1, no message (W35)","cmd":"tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 sched-entry S 01 300000 flags zz clockid CLOCK_TAI","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":1,"refused_by":"iproute2"},"axes":{"fix":"w35-flags","json":"0","words":"qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 sched-entry S 01 300000 flags zz clockid CLOCK_TAI"}} +{"id":"tcswrite/ng-028","desc":"negative: opt=plain cmd=ng:w35-unknown:qdisc_add_dev_d1_root_handle_1:_taprio_bogus: a bare \"Unknown argument\" (W35)","cmd":"tc qdisc add dev d1 root handle 1: taprio bogus","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":1,"refused_by":"iproute2"},"axes":{"fix":"w35-unknown","json":"0","words":"qdisc add dev d1 root handle 1: taprio bogus"}} +{"id":"tcswrite/ng-029","desc":"negative: opt=plain cmd=ng:w36-nonumtc:qdisc_add_dev_d1_root_handle_1:_taprio_map_0_1_queues_1@0_sched-entry_S_01_300000_clockid_CLOCK_TAI: map and queues dropped with no num_tc (W36)","cmd":"tc qdisc add dev d1 root handle 1: taprio map 0 1 queues 1@0 sched-entry S 01 300000 clockid CLOCK_TAI","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"w36-nonumtc","json":"0","words":"qdisc add dev d1 root handle 1: taprio map 0 1 queues 1@0 sched-entry S 01 300000 clockid CLOCK_TAI"}} +{"id":"tcswrite/ng-030","desc":"negative: opt=plain cmd=ng:taprio-noclock:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_sched-entry_S_01_300000: clockid is mandatory","cmd":"tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 sched-entry S 01 300000","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"taprio-noclock","json":"0","words":"qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 sched-entry S 01 300000"}} +{"id":"tcswrite/ng-031","desc":"negative: opt=plain cmd=ng:taprio-sdu:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_base-time_1000000000_sched-entry_S_01_300000_sched-entry_S_02_200000_max-sdu_1500_0_clockid_CLOCK_TAI: max-sdu over the MTU","cmd":"tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 max-sdu 1500 0 clockid CLOCK_TAI","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"ERANGE","refused_by":"kernel"},"axes":{"fix":"taprio-sdu","json":"0","words":"qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 max-sdu 1500 0 clockid CLOCK_TAI"}} +{"id":"tcswrite/ng-032","desc":"negative: opt=plain cmd=ng:cbs-offload:qdisc_add_dev_d0_root_handle_1:_cbs_idleslope_20000_sendslope_-980000_hicredit_30_locredit_-1470_offload_1: cbs offload on a dummy","cmd":"tc qdisc add dev d0 root handle 1: cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470 offload 1","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"ENOTSUP","refused_by":"kernel"},"axes":{"fix":"cbs-offload","json":"0","words":"qdisc add dev d0 root handle 1: cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470 offload 1"}} +{"id":"tcswrite/ng-033","desc":"negative: opt=plain cmd=ng:cbs-bogus:qdisc_add_dev_d0_root_handle_1:_cbs_bogus: cbs: unknown parameter, rc 1","cmd":"tc qdisc add dev d0 root handle 1: cbs bogus","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":1,"refused_by":"iproute2"},"axes":{"fix":"cbs-bogus","json":"0","words":"qdisc add dev d0 root handle 1: cbs bogus"}} +{"id":"tcswrite/ng-034","desc":"negative: opt=plain cmd=ng:etf-offload:qdisc_add_dev_d0_root_handle_1:_etf_clockid_CLOCK_TAI_offload: etf offload on a dummy","cmd":"tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI offload","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"ENOTSUP","refused_by":"kernel"},"axes":{"fix":"etf-offload","json":"0","words":"qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI offload"}} +{"id":"tcswrite/ng-035","desc":"negative: opt=plain cmd=ng:etf-clock:qdisc_add_dev_d0_root_handle_1:_etf_clockid_BOGUS: a bad clockid, rc 1","cmd":"tc qdisc add dev d0 root handle 1: etf clockid BOGUS","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":1,"refused_by":"iproute2"},"axes":{"fix":"etf-clock","json":"0","words":"qdisc add dev d0 root handle 1: etf clockid BOGUS"}} +{"id":"tcswrite/ng-036","desc":"negative: opt=plain cmd=ng:mqprio-change:qdisc_change_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_hw_0: mqprio has no change op: EINVAL, rc 2 (K31)","cmd":"tc qdisc change dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"mqprio-change","json":"0","words":"qdisc change dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0"}} +{"id":"tcswrite/ng-037","desc":"negative: opt=plain cmd=ng:mqprio-replace:qdisc_replace_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_hw_0: mqprio has no change op: EINVAL, rc 2 (K31)","cmd":"tc qdisc replace dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"mqprio-replace","json":"0","words":"qdisc replace dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0"}} +{"id":"tcswrite/ng-038","desc":"negative: opt=plain cmd=ng:etf-change:qdisc_change_dev_d0_root_handle_1:_etf_clockid_CLOCK_TAI_delta_200000_deadline_mode_skip_sock_check: etf has no change op: EINVAL, rc 2 (K31)","cmd":"tc qdisc change dev d0 root handle 1: etf clockid CLOCK_TAI delta 200000 deadline_mode skip_sock_check","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"etf-change","json":"0","words":"qdisc change dev d0 root handle 1: etf clockid CLOCK_TAI delta 200000 deadline_mode skip_sock_check"}} +{"id":"tcswrite/ng-039","desc":"negative: opt=plain cmd=ng:etf-replace:qdisc_replace_dev_d0_root_handle_1:_etf_clockid_CLOCK_TAI_delta_200000_deadline_mode_skip_sock_check: etf has no change op: EINVAL, rc 2 (K31)","cmd":"tc qdisc replace dev d0 root handle 1: etf clockid CLOCK_TAI delta 200000 deadline_mode skip_sock_check","pre":["ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up","tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI"],"modules":["sch_cbs","sch_drr","sch_etf","sch_ets","sch_hfsc","sch_mqprio","sch_multiq","sch_qfq","sch_taprio"],"proto":"route","expect":{"rc":2,"errno":"EINVAL","refused_by":"kernel"},"axes":{"fix":"etf-replace","json":"0","words":"qdisc replace dev d0 root handle 1: etf clockid CLOCK_TAI delta 200000 deadline_mode skip_sock_check"}} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/cmd.json new file mode 100644 index 000000000..496102fef --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "drr0", + "json": "0", + "words": "qdisc add dev d0 root handle 1: drr" + }, + "cmd": "tc qdisc add dev d0 root handle 1: drr", + "desc": "positive: opt=plain cmd=drr0:qdisc_add_dev_d0_root_handle_1:_drr", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-001", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/dump.out new file mode 100644 index 000000000..1b5f2613c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/dump.out @@ -0,0 +1 @@ +qdisc drr 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/ip.pcap new file mode 100644 index 000000000..4db563021 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/netlink_route_dump.pcap new file mode 100644 index 000000000..d711c25f8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-001/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/cmd.json new file mode 100644 index 000000000..614457404 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "drr-change", + "json": "0", + "words": "qdisc change dev d0 root handle 1: drr" + }, + "cmd": "tc qdisc change dev d0 root handle 1: drr", + "desc": "positive: opt=plain cmd=drr-change:qdisc_change_dev_d0_root_handle_1:_drr", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-002", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: drr" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: drr", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/dump.out new file mode 100644 index 000000000..1b5f2613c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/dump.out @@ -0,0 +1 @@ +qdisc drr 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/ip.pcap new file mode 100644 index 000000000..c3ddaead3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/netlink_route_dump.pcap new file mode 100644 index 000000000..433270a6f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-002/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/cmd.json new file mode 100644 index 000000000..a971bdf6c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "drr-replace", + "json": "0", + "words": "qdisc replace dev d0 root handle 1: drr" + }, + "cmd": "tc qdisc replace dev d0 root handle 1: drr", + "desc": "positive: opt=plain cmd=drr-replace:qdisc_replace_dev_d0_root_handle_1:_drr", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-003", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: drr" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: drr", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/dump.out new file mode 100644 index 000000000..1b5f2613c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/dump.out @@ -0,0 +1 @@ +qdisc drr 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/ip.pcap new file mode 100644 index 000000000..418a35f3e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/netlink_route_dump.pcap new file mode 100644 index 000000000..60ba1164e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-003/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/cmd.json new file mode 100644 index 000000000..605ca39a2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "drr-delete", + "json": "0", + "words": "qdisc delete dev d0 root" + }, + "cmd": "tc qdisc delete dev d0 root", + "desc": "positive: opt=plain cmd=drr-delete:qdisc_delete_dev_d0_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": "tcswrite/ec-004", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: drr" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: drr", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/dump.out new file mode 100644 index 000000000..f3b1a3c16 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/dump.out @@ -0,0 +1 @@ +qdisc noqueue 0: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/ip.pcap new file mode 100644 index 000000000..efce60cbe Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/netlink_route_dump.pcap new file mode 100644 index 000000000..20c1cf100 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-004/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/cmd.json new file mode 100644 index 000000000..5de3d1d0f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "qfq0", + "json": "0", + "words": "qdisc add dev d0 root handle 1: qfq" + }, + "cmd": "tc qdisc add dev d0 root handle 1: qfq", + "desc": "positive: opt=plain cmd=qfq0:qdisc_add_dev_d0_root_handle_1:_qfq", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-005", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/dump.out new file mode 100644 index 000000000..a45cbbae9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/dump.out @@ -0,0 +1 @@ +qdisc qfq 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/ip.pcap new file mode 100644 index 000000000..5a9efe18a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/netlink_route_dump.pcap new file mode 100644 index 000000000..8db37ae54 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-005/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/cmd.json new file mode 100644 index 000000000..adb7ab780 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "qfq-change", + "json": "0", + "words": "qdisc change dev d0 root handle 1: qfq" + }, + "cmd": "tc qdisc change dev d0 root handle 1: qfq", + "desc": "positive: opt=plain cmd=qfq-change:qdisc_change_dev_d0_root_handle_1:_qfq", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-006", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: qfq" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: qfq", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/dump.out new file mode 100644 index 000000000..a45cbbae9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/dump.out @@ -0,0 +1 @@ +qdisc qfq 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/ip.pcap new file mode 100644 index 000000000..887105f64 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/netlink_route_dump.pcap new file mode 100644 index 000000000..d58cbb85d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-006/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/cmd.json new file mode 100644 index 000000000..d1949e009 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "qfq-replace", + "json": "0", + "words": "qdisc replace dev d0 root handle 1: qfq" + }, + "cmd": "tc qdisc replace dev d0 root handle 1: qfq", + "desc": "positive: opt=plain cmd=qfq-replace:qdisc_replace_dev_d0_root_handle_1:_qfq", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-007", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: qfq" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: qfq", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/dump.out new file mode 100644 index 000000000..a45cbbae9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/dump.out @@ -0,0 +1 @@ +qdisc qfq 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/ip.pcap new file mode 100644 index 000000000..073e8dda0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/netlink_route_dump.pcap new file mode 100644 index 000000000..f30644daf Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-007/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/cmd.json new file mode 100644 index 000000000..133401703 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "qfq-delete", + "json": "0", + "words": "qdisc delete dev d0 root" + }, + "cmd": "tc qdisc delete dev d0 root", + "desc": "positive: opt=plain cmd=qfq-delete:qdisc_delete_dev_d0_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": "tcswrite/ec-008", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: qfq" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: qfq", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/dump.out new file mode 100644 index 000000000..f3b1a3c16 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/dump.out @@ -0,0 +1 @@ +qdisc noqueue 0: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/ip.pcap new file mode 100644 index 000000000..02ff35c3d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/netlink_route_dump.pcap new file mode 100644 index 000000000..b8a5e8eff Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-008/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/cmd.json new file mode 100644 index 000000000..c4bf24a68 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "multiq0", + "json": "0", + "words": "qdisc add dev d1 root handle 1: multiq" + }, + "cmd": "tc qdisc add dev d1 root handle 1: multiq", + "desc": "positive: opt=plain cmd=multiq0:qdisc_add_dev_d1_root_handle_1:_multiq", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-009", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d1", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/dump.out new file mode 100644 index 000000000..69cf01906 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/dump.out @@ -0,0 +1 @@ +qdisc multiq 1: root refcnt 9 bands 8/8 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/ip.pcap new file mode 100644 index 000000000..a5d973a45 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/netlink_route_dump.pcap new file mode 100644 index 000000000..6865fa158 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-009/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/cmd.json new file mode 100644 index 000000000..97895c3fa --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "multiq-change", + "json": "0", + "words": "qdisc change dev d1 root handle 1: multiq" + }, + "cmd": "tc qdisc change dev d1 root handle 1: multiq", + "desc": "positive: opt=plain cmd=multiq-change:qdisc_change_dev_d1_root_handle_1:_multiq", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-010", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: multiq" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d1", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: multiq", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/dump.out new file mode 100644 index 000000000..69cf01906 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/dump.out @@ -0,0 +1 @@ +qdisc multiq 1: root refcnt 9 bands 8/8 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/ip.pcap new file mode 100644 index 000000000..ba5976b83 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/netlink_route_dump.pcap new file mode 100644 index 000000000..6c6e766bc Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-010/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/cmd.json new file mode 100644 index 000000000..0294b7d81 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "multiq-replace", + "json": "0", + "words": "qdisc replace dev d1 root handle 1: multiq" + }, + "cmd": "tc qdisc replace dev d1 root handle 1: multiq", + "desc": "positive: opt=plain cmd=multiq-replace:qdisc_replace_dev_d1_root_handle_1:_multiq", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-011", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: multiq" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d1", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: multiq", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/dump.out new file mode 100644 index 000000000..69cf01906 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/dump.out @@ -0,0 +1 @@ +qdisc multiq 1: root refcnt 9 bands 8/8 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/ip.pcap new file mode 100644 index 000000000..f249194af Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/netlink_route_dump.pcap new file mode 100644 index 000000000..0f64e3707 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-011/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/cmd.json new file mode 100644 index 000000000..67d4b3573 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "multiq-delete", + "json": "0", + "words": "qdisc delete dev d1 root" + }, + "cmd": "tc qdisc delete dev d1 root", + "desc": "positive: opt=plain cmd=multiq-delete:qdisc_delete_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": "tcswrite/ec-012", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: multiq" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d1", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: multiq", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/dump.out new file mode 100644 index 000000000..f3b1a3c16 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/dump.out @@ -0,0 +1 @@ +qdisc noqueue 0: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/ip.pcap new file mode 100644 index 000000000..df8b3a1cc Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/netlink_route_dump.pcap new file mode 100644 index 000000000..abfc252cc Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-012/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/cmd.json new file mode 100644 index 000000000..5749fcad7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "hfsc0", + "json": "0", + "words": "qdisc add dev d0 root handle 1: hfsc" + }, + "cmd": "tc qdisc add dev d0 root handle 1: hfsc", + "desc": "positive: opt=plain cmd=hfsc0:qdisc_add_dev_d0_root_handle_1:_hfsc", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-013", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/dump.out new file mode 100644 index 000000000..a3b60c951 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/dump.out @@ -0,0 +1 @@ +qdisc hfsc 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/ip.pcap new file mode 100644 index 000000000..0369bfdba Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/netlink_route_dump.pcap new file mode 100644 index 000000000..88aab36a5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-013/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/cmd.json new file mode 100644 index 000000000..bc5e919e0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "hfsc1", + "json": "0", + "words": "qdisc add dev d0 root handle 1: hfsc default 10" + }, + "cmd": "tc qdisc add dev d0 root handle 1: hfsc default 10", + "desc": "positive: opt=plain cmd=hfsc1:qdisc_add_dev_d0_root_handle_1:_hfsc_default_10", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-014", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/dump.out new file mode 100644 index 000000000..d450b60a3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/dump.out @@ -0,0 +1 @@ +qdisc hfsc 1: root refcnt 2 default 0x10 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/ip.pcap new file mode 100644 index 000000000..88f0c06b7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/netlink_route_dump.pcap new file mode 100644 index 000000000..642490173 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-014/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/cmd.json new file mode 100644 index 000000000..9fe1abc42 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "hfsc-change", + "json": "0", + "words": "qdisc change dev d0 root handle 1: hfsc default 10" + }, + "cmd": "tc qdisc change dev d0 root handle 1: hfsc default 10", + "desc": "positive: opt=plain cmd=hfsc-change:qdisc_change_dev_d0_root_handle_1:_hfsc_default_10", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-015", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: hfsc" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hfsc", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/dump.out new file mode 100644 index 000000000..d450b60a3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/dump.out @@ -0,0 +1 @@ +qdisc hfsc 1: root refcnt 2 default 0x10 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/ip.pcap new file mode 100644 index 000000000..8d29c6146 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/netlink_route_dump.pcap new file mode 100644 index 000000000..b707f3617 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-015/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/cmd.json new file mode 100644 index 000000000..f659de5e0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "hfsc-replace", + "json": "0", + "words": "qdisc replace dev d0 root handle 1: hfsc default 10" + }, + "cmd": "tc qdisc replace dev d0 root handle 1: hfsc default 10", + "desc": "positive: opt=plain cmd=hfsc-replace:qdisc_replace_dev_d0_root_handle_1:_hfsc_default_10", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-016", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: hfsc" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hfsc", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/dump.out new file mode 100644 index 000000000..d450b60a3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/dump.out @@ -0,0 +1 @@ +qdisc hfsc 1: root refcnt 2 default 0x10 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/ip.pcap new file mode 100644 index 000000000..c20a1d40b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/netlink_route_dump.pcap new file mode 100644 index 000000000..21322e52a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-016/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/cmd.json new file mode 100644 index 000000000..9e0defc49 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "hfsc-delete", + "json": "0", + "words": "qdisc delete dev d0 root" + }, + "cmd": "tc qdisc delete dev d0 root", + "desc": "positive: opt=plain cmd=hfsc-delete:qdisc_delete_dev_d0_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": "tcswrite/ec-017", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: hfsc" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hfsc", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/dump.out new file mode 100644 index 000000000..f3b1a3c16 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/dump.out @@ -0,0 +1 @@ +qdisc noqueue 0: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/ip.pcap new file mode 100644 index 000000000..8e07485d8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/netlink_route_dump.pcap new file mode 100644 index 000000000..a6ce7dd53 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-017/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/cmd.json new file mode 100644 index 000000000..4f512a71d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "ets0", + "json": "0", + "words": "qdisc add dev d0 root handle 1: ets bands 3 strict 1 quanta 1500 3000 priomap 2 1 0" + }, + "cmd": "tc qdisc add dev d0 root handle 1: ets bands 3 strict 1 quanta 1500 3000 priomap 2 1 0", + "desc": "positive: opt=plain cmd=ets0:qdisc_add_dev_d0_root_handle_1:_ets_bands_3_strict_1_quanta_1500_3000_priomap_2_1_0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-018", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/dump.out new file mode 100644 index 000000000..8a010b3e7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/dump.out @@ -0,0 +1 @@ +qdisc ets 1: root refcnt 2 bands 3 strict 1 quanta 1500 3000 priomap 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/ip.pcap new file mode 100644 index 000000000..09ae53f2e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/netlink_route_dump.pcap new file mode 100644 index 000000000..5d45e1f98 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-018/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/cmd.json new file mode 100644 index 000000000..9c8741845 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "ets1", + "json": "0", + "words": "qdisc add dev d0 root handle 1: ets strict 3" + }, + "cmd": "tc qdisc add dev d0 root handle 1: ets strict 3", + "desc": "positive: opt=plain cmd=ets1:qdisc_add_dev_d0_root_handle_1:_ets_strict_3", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-019", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/dump.out new file mode 100644 index 000000000..c47a9e483 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/dump.out @@ -0,0 +1 @@ +qdisc ets 1: root refcnt 2 bands 3 strict 3 priomap 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/ip.pcap new file mode 100644 index 000000000..c86d517ba Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/netlink_route_dump.pcap new file mode 100644 index 000000000..109ddc5e1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-019/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/cmd.json new file mode 100644 index 000000000..5fa978ad5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "ets2", + "json": "0", + "words": "qdisc add dev d0 root handle 1: ets quanta 1000 2000" + }, + "cmd": "tc qdisc add dev d0 root handle 1: ets quanta 1000 2000", + "desc": "positive: opt=plain cmd=ets2:qdisc_add_dev_d0_root_handle_1:_ets_quanta_1000_2000", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-020", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/dump.out new file mode 100644 index 000000000..7a497645f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/dump.out @@ -0,0 +1 @@ +qdisc ets 1: root refcnt 2 bands 2 quanta 1000 2000 priomap 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/ip.pcap new file mode 100644 index 000000000..e5c072dde Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/netlink_route_dump.pcap new file mode 100644 index 000000000..890827608 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-020/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/cmd.json new file mode 100644 index 000000000..d6f775db7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "ets3", + "json": "0", + "words": "qdisc add dev d0 root handle 1: ets bands 4 strict 2 priomap 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0" + }, + "cmd": "tc qdisc add dev d0 root handle 1: ets bands 4 strict 2 priomap 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0", + "desc": "positive: opt=plain cmd=ets3:qdisc_add_dev_d0_root_handle_1:_ets_bands_4_strict_2_priomap_3_2_1_0_3_2_1_0_3_2_1_0_3_2_1_0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-021", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/dump.out new file mode 100644 index 000000000..1276c50df --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/dump.out @@ -0,0 +1 @@ +qdisc ets 1: root refcnt 2 bands 4 strict 2 quanta 1514 1514 priomap 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/ip.pcap new file mode 100644 index 000000000..281369ca9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/netlink_route_dump.pcap new file mode 100644 index 000000000..93724e5ae Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-021/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/cmd.json new file mode 100644 index 000000000..46144e6f8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "ets-change", + "json": "0", + "words": "qdisc change dev d0 root handle 1: ets bands 4 strict 2 priomap 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0" + }, + "cmd": "tc qdisc change dev d0 root handle 1: ets bands 4 strict 2 priomap 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0", + "desc": "positive: opt=plain cmd=ets-change:qdisc_change_dev_d0_root_handle_1:_ets_bands_4_strict_2_priomap_3_2_1_0_3_2_1_0_3_2_1_0_3_2_1_0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-022", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: ets bands 3 strict 1 quanta 1500 3000 priomap 2 1 0" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: ets bands 3 strict 1 quanta 1500 3000 priomap 2 1 0", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/dump.out new file mode 100644 index 000000000..1276c50df --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/dump.out @@ -0,0 +1 @@ +qdisc ets 1: root refcnt 2 bands 4 strict 2 quanta 1514 1514 priomap 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/ip.pcap new file mode 100644 index 000000000..2b7e80187 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/netlink_route_dump.pcap new file mode 100644 index 000000000..200a67390 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-022/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/cmd.json new file mode 100644 index 000000000..16aa2fbe2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "ets-replace", + "json": "0", + "words": "qdisc replace dev d0 root handle 1: ets bands 4 strict 2 priomap 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0" + }, + "cmd": "tc qdisc replace dev d0 root handle 1: ets bands 4 strict 2 priomap 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0", + "desc": "positive: opt=plain cmd=ets-replace:qdisc_replace_dev_d0_root_handle_1:_ets_bands_4_strict_2_priomap_3_2_1_0_3_2_1_0_3_2_1_0_3_2_1_0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-023", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: ets bands 3 strict 1 quanta 1500 3000 priomap 2 1 0" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: ets bands 3 strict 1 quanta 1500 3000 priomap 2 1 0", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/dump.out new file mode 100644 index 000000000..1276c50df --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/dump.out @@ -0,0 +1 @@ +qdisc ets 1: root refcnt 2 bands 4 strict 2 quanta 1514 1514 priomap 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/ip.pcap new file mode 100644 index 000000000..f3c28d849 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/netlink_route_dump.pcap new file mode 100644 index 000000000..0a82960ee Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-023/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/cmd.json new file mode 100644 index 000000000..989cc4567 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "ets-delete", + "json": "0", + "words": "qdisc delete dev d0 root" + }, + "cmd": "tc qdisc delete dev d0 root", + "desc": "positive: opt=plain cmd=ets-delete:qdisc_delete_dev_d0_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": "tcswrite/ec-024", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: ets bands 3 strict 1 quanta 1500 3000 priomap 2 1 0" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: ets bands 3 strict 1 quanta 1500 3000 priomap 2 1 0", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/dump.out new file mode 100644 index 000000000..f3b1a3c16 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/dump.out @@ -0,0 +1 @@ +qdisc noqueue 0: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/ip.pcap new file mode 100644 index 000000000..ba7e58f12 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/netlink_route_dump.pcap new file mode 100644 index 000000000..c7c911b13 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-024/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/cmd.json new file mode 100644 index 000000000..320eb5ff0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "mqprio0", + "json": "0", + "words": "qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0" + }, + "cmd": "tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0", + "desc": "positive: opt=plain cmd=mqprio0:qdisc_add_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_hw_0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-025", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d1", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/dump.out new file mode 100644 index 000000000..4129c5239 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/dump.out @@ -0,0 +1,14 @@ +qdisc mqprio 1: root tc 2 map 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 + queues:(0:3) (4:7) + mode:dcb + shaper:dcb + fp: E E E E E E E E E E E E E E E E + +qdisc fq_codel 0: parent 1:8 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 +qdisc fq_codel 0: parent 1:7 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 +qdisc fq_codel 0: parent 1:6 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 +qdisc fq_codel 0: parent 1:5 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 +qdisc fq_codel 0: parent 1:4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 +qdisc fq_codel 0: parent 1:3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 +qdisc fq_codel 0: parent 1:2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 +qdisc fq_codel 0: parent 1:1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/ip.pcap new file mode 100644 index 000000000..a7d08c79c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/netlink_route_dump.pcap new file mode 100644 index 000000000..19dc71fbb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-025/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/cmd.json new file mode 100644 index 000000000..f833e172b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "mqprio-delete", + "json": "0", + "words": "qdisc delete dev d1 root" + }, + "cmd": "tc qdisc delete dev d1 root", + "desc": "positive: opt=plain cmd=mqprio-delete:qdisc_delete_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": "tcswrite/ec-026", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d1", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/dump.out new file mode 100644 index 000000000..f3b1a3c16 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/dump.out @@ -0,0 +1 @@ +qdisc noqueue 0: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/ip.pcap new file mode 100644 index 000000000..d5922eb33 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/netlink_route_dump.pcap new file mode 100644 index 000000000..da61af661 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-026/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/cmd.json new file mode 100644 index 000000000..369db4e32 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "taprio0", + "json": "0", + "words": "qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 clockid CLOCK_TAI" + }, + "cmd": "tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 clockid CLOCK_TAI", + "desc": "positive: opt=plain cmd=taprio0:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_base-time_1000000000_sched-entry_S_01_300000_sched-entry_S_02_200000_clockid_CLOCK_TAI", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-027", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d1", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/dump.out new file mode 100644 index 000000000..90da2081b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/dump.out @@ -0,0 +1,16 @@ +qdisc taprio 1: root refcnt 9 tc 2 map 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 +queues offset 0 count 4 offset 4 count 4 +clockid TAI base-time 1000000000 cycle-time 500000 cycle-time-extension 0 + index 0 cmd S gatemask 0x1 interval 300000 + index 1 cmd S gatemask 0x2 interval 200000 +max-sdu 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +fp E E E E E E E E E E E E E E E E + +qdisc pfifo 0: parent 1:8 limit 1000p +qdisc pfifo 0: parent 1:7 limit 1000p +qdisc pfifo 0: parent 1:6 limit 1000p +qdisc pfifo 0: parent 1:5 limit 1000p +qdisc pfifo 0: parent 1:4 limit 1000p +qdisc pfifo 0: parent 1:3 limit 1000p +qdisc pfifo 0: parent 1:2 limit 1000p +qdisc pfifo 0: parent 1:1 limit 1000p diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/ip.err new file mode 100644 index 000000000..90081ad3c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/ip.err @@ -0,0 +1 @@ +Warning: sch_taprio: Size table not specified, frame length estimations may be inaccurate. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/ip.pcap new file mode 100644 index 000000000..9202b1e98 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/netlink_route_dump.pcap new file mode 100644 index 000000000..bcd2fc4ef Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-027/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/cmd.json new file mode 100644 index 000000000..fc4510b60 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "taprio1", + "json": "0", + "words": "qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 cycle-time 600000 cycle-time-extension 1000 clockid CLOCK_TAI" + }, + "cmd": "tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 cycle-time 600000 cycle-time-extension 1000 clockid CLOCK_TAI", + "desc": "positive: opt=plain cmd=taprio1:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_base-time_1000000000_sched-entry_S_01_300000_sched-entry_S_02_200000_cycle-time_600000_cycle-time-extension_1000_clockid_CLOCK_TAI", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-028", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d1", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/dump.out new file mode 100644 index 000000000..caf5fd45e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/dump.out @@ -0,0 +1,16 @@ +qdisc taprio 1: root refcnt 9 tc 2 map 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 +queues offset 0 count 4 offset 4 count 4 +clockid TAI base-time 1000000000 cycle-time 600000 cycle-time-extension 1000 + index 0 cmd S gatemask 0x1 interval 300000 + index 1 cmd S gatemask 0x2 interval 200000 +max-sdu 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +fp E E E E E E E E E E E E E E E E + +qdisc pfifo 0: parent 1:8 limit 1000p +qdisc pfifo 0: parent 1:7 limit 1000p +qdisc pfifo 0: parent 1:6 limit 1000p +qdisc pfifo 0: parent 1:5 limit 1000p +qdisc pfifo 0: parent 1:4 limit 1000p +qdisc pfifo 0: parent 1:3 limit 1000p +qdisc pfifo 0: parent 1:2 limit 1000p +qdisc pfifo 0: parent 1:1 limit 1000p diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/ip.err new file mode 100644 index 000000000..90081ad3c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/ip.err @@ -0,0 +1 @@ +Warning: sch_taprio: Size table not specified, frame length estimations may be inaccurate. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/ip.pcap new file mode 100644 index 000000000..7631fd538 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/netlink_route_dump.pcap new file mode 100644 index 000000000..b97bb1943 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-028/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/cmd.json new file mode 100644 index 000000000..4943aae8c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "taprio2", + "json": "0", + "words": "qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 flags 0x1 txtime-delay 200000 clockid CLOCK_TAI" + }, + "cmd": "tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 flags 0x1 txtime-delay 200000 clockid CLOCK_TAI", + "desc": "positive: opt=plain cmd=taprio2:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_base-time_1000000000_sched-entry_S_01_300000_flags_0x1_txtime-delay_200000_clockid_CLOCK_TAI", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-029", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d1", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/dump.out new file mode 100644 index 000000000..c50ac893d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/dump.out @@ -0,0 +1,15 @@ +qdisc taprio 1: root refcnt 9 tc 2 map 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 +queues offset 0 count 4 offset 4 count 4 +clockid TAI flags 0x1 txtime delay 200000 base-time 1000000000 cycle-time 300000 cycle-time-extension 0 + index 0 cmd S gatemask 0x1 interval 300000 +max-sdu 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +fp E E E E E E E E E E E E E E E E + +qdisc pfifo 0: parent 1:8 limit 1000p +qdisc pfifo 0: parent 1:7 limit 1000p +qdisc pfifo 0: parent 1:6 limit 1000p +qdisc pfifo 0: parent 1:5 limit 1000p +qdisc pfifo 0: parent 1:4 limit 1000p +qdisc pfifo 0: parent 1:3 limit 1000p +qdisc pfifo 0: parent 1:2 limit 1000p +qdisc pfifo 0: parent 1:1 limit 1000p diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/ip.pcap new file mode 100644 index 000000000..3607ad89f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/netlink_route_dump.pcap new file mode 100644 index 000000000..83689ac95 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-029/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/cmd.json new file mode 100644 index 000000000..f6c939171 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "taprio3", + "json": "0", + "words": "qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry H 01 300000 sched-entry R 02 200000 max-sdu 0 0 clockid CLOCK_TAI" + }, + "cmd": "tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry H 01 300000 sched-entry R 02 200000 max-sdu 0 0 clockid CLOCK_TAI", + "desc": "positive: opt=plain cmd=taprio3:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_base-time_1000000000_sched-entry_H_01_300000_sched-entry_R_02_200000_max-sdu_0_0_clockid_CLOCK_TAI", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-030", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d1", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/dump.out new file mode 100644 index 000000000..00f234d43 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/dump.out @@ -0,0 +1,16 @@ +qdisc taprio 1: root refcnt 9 tc 2 map 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 +queues offset 0 count 4 offset 4 count 4 +clockid TAI base-time 1000000000 cycle-time 500000 cycle-time-extension 0 + index 0 cmd H gatemask 0x1 interval 300000 + index 1 cmd R gatemask 0x2 interval 200000 +max-sdu 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +fp E E E E E E E E E E E E E E E E + +qdisc pfifo 0: parent 1:8 limit 1000p +qdisc pfifo 0: parent 1:7 limit 1000p +qdisc pfifo 0: parent 1:6 limit 1000p +qdisc pfifo 0: parent 1:5 limit 1000p +qdisc pfifo 0: parent 1:4 limit 1000p +qdisc pfifo 0: parent 1:3 limit 1000p +qdisc pfifo 0: parent 1:2 limit 1000p +qdisc pfifo 0: parent 1:1 limit 1000p diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/ip.err new file mode 100644 index 000000000..90081ad3c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/ip.err @@ -0,0 +1 @@ +Warning: sch_taprio: Size table not specified, frame length estimations may be inaccurate. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/ip.pcap new file mode 100644 index 000000000..493e4138f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/netlink_route_dump.pcap new file mode 100644 index 000000000..8448f798a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-030/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/cmd.json new file mode 100644 index 000000000..e8991cb3e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "taprio-change", + "json": "0", + "words": "qdisc change dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry H 01 300000 sched-entry R 02 200000 max-sdu 0 0 clockid CLOCK_TAI" + }, + "cmd": "tc qdisc change dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry H 01 300000 sched-entry R 02 200000 max-sdu 0 0 clockid CLOCK_TAI", + "desc": "positive: opt=plain cmd=taprio-change:qdisc_change_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_base-time_1000000000_sched-entry_H_01_300000_sched-entry_R_02_200000_max-sdu_0_0_clockid_CLOCK_TAI", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-031", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 clockid CLOCK_TAI" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d1", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 clockid CLOCK_TAI", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/dump.out new file mode 100644 index 000000000..00f234d43 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/dump.out @@ -0,0 +1,16 @@ +qdisc taprio 1: root refcnt 9 tc 2 map 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 +queues offset 0 count 4 offset 4 count 4 +clockid TAI base-time 1000000000 cycle-time 500000 cycle-time-extension 0 + index 0 cmd H gatemask 0x1 interval 300000 + index 1 cmd R gatemask 0x2 interval 200000 +max-sdu 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +fp E E E E E E E E E E E E E E E E + +qdisc pfifo 0: parent 1:8 limit 1000p +qdisc pfifo 0: parent 1:7 limit 1000p +qdisc pfifo 0: parent 1:6 limit 1000p +qdisc pfifo 0: parent 1:5 limit 1000p +qdisc pfifo 0: parent 1:4 limit 1000p +qdisc pfifo 0: parent 1:3 limit 1000p +qdisc pfifo 0: parent 1:2 limit 1000p +qdisc pfifo 0: parent 1:1 limit 1000p diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/ip.err new file mode 100644 index 000000000..90081ad3c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/ip.err @@ -0,0 +1 @@ +Warning: sch_taprio: Size table not specified, frame length estimations may be inaccurate. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/ip.pcap new file mode 100644 index 000000000..ed83ef8fb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/netlink_route_dump.pcap new file mode 100644 index 000000000..e3da68da9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-031/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/cmd.json new file mode 100644 index 000000000..fffa5d141 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "taprio-replace", + "json": "0", + "words": "qdisc replace dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry H 01 300000 sched-entry R 02 200000 max-sdu 0 0 clockid CLOCK_TAI" + }, + "cmd": "tc qdisc replace dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry H 01 300000 sched-entry R 02 200000 max-sdu 0 0 clockid CLOCK_TAI", + "desc": "positive: opt=plain cmd=taprio-replace:qdisc_replace_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_base-time_1000000000_sched-entry_H_01_300000_sched-entry_R_02_200000_max-sdu_0_0_clockid_CLOCK_TAI", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-032", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 clockid CLOCK_TAI" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d1", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 clockid CLOCK_TAI", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/dump.out new file mode 100644 index 000000000..00f234d43 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/dump.out @@ -0,0 +1,16 @@ +qdisc taprio 1: root refcnt 9 tc 2 map 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 +queues offset 0 count 4 offset 4 count 4 +clockid TAI base-time 1000000000 cycle-time 500000 cycle-time-extension 0 + index 0 cmd H gatemask 0x1 interval 300000 + index 1 cmd R gatemask 0x2 interval 200000 +max-sdu 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +fp E E E E E E E E E E E E E E E E + +qdisc pfifo 0: parent 1:8 limit 1000p +qdisc pfifo 0: parent 1:7 limit 1000p +qdisc pfifo 0: parent 1:6 limit 1000p +qdisc pfifo 0: parent 1:5 limit 1000p +qdisc pfifo 0: parent 1:4 limit 1000p +qdisc pfifo 0: parent 1:3 limit 1000p +qdisc pfifo 0: parent 1:2 limit 1000p +qdisc pfifo 0: parent 1:1 limit 1000p diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/ip.err new file mode 100644 index 000000000..90081ad3c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/ip.err @@ -0,0 +1 @@ +Warning: sch_taprio: Size table not specified, frame length estimations may be inaccurate. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/ip.pcap new file mode 100644 index 000000000..0f2d833c0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/netlink_route_dump.pcap new file mode 100644 index 000000000..b9ef62c59 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-032/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/cmd.json new file mode 100644 index 000000000..76c4cdb4d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "taprio-delete", + "json": "0", + "words": "qdisc delete dev d1 root" + }, + "cmd": "tc qdisc delete dev d1 root", + "desc": "positive: opt=plain cmd=taprio-delete:qdisc_delete_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": "tcswrite/ec-033", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 clockid CLOCK_TAI" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d1", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 clockid CLOCK_TAI", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/dump.out new file mode 100644 index 000000000..f3b1a3c16 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/dump.out @@ -0,0 +1 @@ +qdisc noqueue 0: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/ip.pcap new file mode 100644 index 000000000..106d569a4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/netlink_route_dump.pcap new file mode 100644 index 000000000..77b45d826 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-033/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/cmd.json new file mode 100644 index 000000000..702f7661e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "cbs0", + "json": "0", + "words": "qdisc add dev d0 root handle 1: cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470" + }, + "cmd": "tc qdisc add dev d0 root handle 1: cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470", + "desc": "positive: opt=plain cmd=cbs0:qdisc_add_dev_d0_root_handle_1:_cbs_idleslope_20000_sendslope_-980000_hicredit_30_locredit_-1470", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-034", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/dump.out new file mode 100644 index 000000000..b0e776932 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/dump.out @@ -0,0 +1,2 @@ +qdisc cbs 1: root refcnt 2 hicredit 30 locredit -1470 sendslope -980000 idleslope 20000 offload 0 +qdisc pfifo 0: parent 1: limit 1000p diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/ip.pcap new file mode 100644 index 000000000..2dafbd05a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/netlink_route_dump.pcap new file mode 100644 index 000000000..5f0aa7704 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-034/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/cmd.json new file mode 100644 index 000000000..c96f802da --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "cbs1", + "json": "0", + "words": "qdisc add dev d0 root handle 1: cbs idleslope 1000 sendslope -999000 hicredit 10 locredit -20 offload 0" + }, + "cmd": "tc qdisc add dev d0 root handle 1: cbs idleslope 1000 sendslope -999000 hicredit 10 locredit -20 offload 0", + "desc": "positive: opt=plain cmd=cbs1:qdisc_add_dev_d0_root_handle_1:_cbs_idleslope_1000_sendslope_-999000_hicredit_10_locredit_-20_offload_0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-035", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/dump.out new file mode 100644 index 000000000..8d2b5c520 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/dump.out @@ -0,0 +1,2 @@ +qdisc cbs 1: root refcnt 2 hicredit 10 locredit -20 sendslope -999000 idleslope 1000 offload 0 +qdisc pfifo 0: parent 1: limit 1000p diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/ip.pcap new file mode 100644 index 000000000..fa5382e4a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/netlink_route_dump.pcap new file mode 100644 index 000000000..64c2a8383 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-035/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/cmd.json new file mode 100644 index 000000000..d7f2b8d7b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "cbs-change", + "json": "0", + "words": "qdisc change dev d0 root handle 1: cbs idleslope 1000 sendslope -999000 hicredit 10 locredit -20 offload 0" + }, + "cmd": "tc qdisc change dev d0 root handle 1: cbs idleslope 1000 sendslope -999000 hicredit 10 locredit -20 offload 0", + "desc": "positive: opt=plain cmd=cbs-change:qdisc_change_dev_d0_root_handle_1:_cbs_idleslope_1000_sendslope_-999000_hicredit_10_locredit_-20_offload_0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-036", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/dump.out new file mode 100644 index 000000000..8d2b5c520 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/dump.out @@ -0,0 +1,2 @@ +qdisc cbs 1: root refcnt 2 hicredit 10 locredit -20 sendslope -999000 idleslope 1000 offload 0 +qdisc pfifo 0: parent 1: limit 1000p diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/ip.pcap new file mode 100644 index 000000000..a17a495ca Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/netlink_route_dump.pcap new file mode 100644 index 000000000..2bf38fc3a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-036/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/cmd.json new file mode 100644 index 000000000..c89d40b3f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "cbs-replace", + "json": "0", + "words": "qdisc replace dev d0 root handle 1: cbs idleslope 1000 sendslope -999000 hicredit 10 locredit -20 offload 0" + }, + "cmd": "tc qdisc replace dev d0 root handle 1: cbs idleslope 1000 sendslope -999000 hicredit 10 locredit -20 offload 0", + "desc": "positive: opt=plain cmd=cbs-replace:qdisc_replace_dev_d0_root_handle_1:_cbs_idleslope_1000_sendslope_-999000_hicredit_10_locredit_-20_offload_0", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-037", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/dump.out new file mode 100644 index 000000000..8d2b5c520 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/dump.out @@ -0,0 +1,2 @@ +qdisc cbs 1: root refcnt 2 hicredit 10 locredit -20 sendslope -999000 idleslope 1000 offload 0 +qdisc pfifo 0: parent 1: limit 1000p diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/ip.pcap new file mode 100644 index 000000000..63136eeda Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/netlink_route_dump.pcap new file mode 100644 index 000000000..0a13f6d24 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-037/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/cmd.json new file mode 100644 index 000000000..1135c9d88 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "cbs-delete", + "json": "0", + "words": "qdisc delete dev d0 root" + }, + "cmd": "tc qdisc delete dev d0 root", + "desc": "positive: opt=plain cmd=cbs-delete:qdisc_delete_dev_d0_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": "tcswrite/ec-038", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/dump.out new file mode 100644 index 000000000..f3b1a3c16 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/dump.out @@ -0,0 +1 @@ +qdisc noqueue 0: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/ip.pcap new file mode 100644 index 000000000..2f84de97a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/netlink_route_dump.pcap new file mode 100644 index 000000000..bdd6c14d4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-038/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/cmd.json new file mode 100644 index 000000000..bf446acce --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "etf0", + "json": "0", + "words": "qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI" + }, + "cmd": "tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI", + "desc": "positive: opt=plain cmd=etf0:qdisc_add_dev_d0_root_handle_1:_etf_clockid_CLOCK_TAI", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-039", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/dump.out new file mode 100644 index 000000000..6d16fa9c3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/dump.out @@ -0,0 +1 @@ +qdisc etf 1: root refcnt 2 clockid TAI delta 0 offload off deadline_mode off skip_sock_check off diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/ip.pcap new file mode 100644 index 000000000..d86a98fac Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/netlink_route_dump.pcap new file mode 100644 index 000000000..3b928b58f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-039/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/cmd.json new file mode 100644 index 000000000..29e270f67 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "etf1", + "json": "0", + "words": "qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI delta 300000 skip_sock_check" + }, + "cmd": "tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI delta 300000 skip_sock_check", + "desc": "positive: opt=plain cmd=etf1:qdisc_add_dev_d0_root_handle_1:_etf_clockid_CLOCK_TAI_delta_300000_skip_sock_check", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-040", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/dump.out new file mode 100644 index 000000000..e1196e802 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/dump.out @@ -0,0 +1 @@ +qdisc etf 1: root refcnt 2 clockid TAI delta 300000 offload off deadline_mode off skip_sock_check on diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/ip.pcap new file mode 100644 index 000000000..d061b0bf0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/netlink_route_dump.pcap new file mode 100644 index 000000000..b0899b4f3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-040/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/cmd.json new file mode 100644 index 000000000..bf2ac945c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "etf2", + "json": "0", + "words": "qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI delta 300000 deadline_mode" + }, + "cmd": "tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI delta 300000 deadline_mode", + "desc": "positive: opt=plain cmd=etf2:qdisc_add_dev_d0_root_handle_1:_etf_clockid_CLOCK_TAI_delta_300000_deadline_mode", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-041", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/dump.out new file mode 100644 index 000000000..d0fdd54bb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/dump.out @@ -0,0 +1 @@ +qdisc etf 1: root refcnt 2 clockid TAI delta 300000 offload off deadline_mode on skip_sock_check off diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/ip.pcap new file mode 100644 index 000000000..c0821adea Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/netlink_route_dump.pcap new file mode 100644 index 000000000..a5981f7f7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-041/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/cmd.json new file mode 100644 index 000000000..da404c81b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "etf3", + "json": "0", + "words": "qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI delta 200000 deadline_mode skip_sock_check" + }, + "cmd": "tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI delta 200000 deadline_mode skip_sock_check", + "desc": "positive: opt=plain cmd=etf3:qdisc_add_dev_d0_root_handle_1:_etf_clockid_CLOCK_TAI_delta_200000_deadline_mode_skip_sock_check", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-042", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/dump.out new file mode 100644 index 000000000..bc093d499 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/dump.out @@ -0,0 +1 @@ +qdisc etf 1: root refcnt 2 clockid TAI delta 200000 offload off deadline_mode on skip_sock_check on diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/ip.pcap new file mode 100644 index 000000000..eec98f4a3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/netlink_route_dump.pcap new file mode 100644 index 000000000..fdbea7269 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-042/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/cmd.json new file mode 100644 index 000000000..6a822e2d8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/cmd.json @@ -0,0 +1,61 @@ +{ + "axes": { + "fix": "etf-delete", + "json": "0", + "words": "qdisc delete dev d0 root" + }, + "cmd": "tc qdisc delete dev d0 root", + "desc": "positive: opt=plain cmd=etf-delete:qdisc_delete_dev_d0_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": "tcswrite/ec-043", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/dump.out new file mode 100644 index 000000000..f3b1a3c16 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/dump.out @@ -0,0 +1 @@ +qdisc noqueue 0: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/ip.pcap new file mode 100644 index 000000000..2eb598164 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/netlink_route_dump.pcap new file mode 100644 index 000000000..3c71aa3f7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-043/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/class.out new file mode 100644 index 000000000..842f4c9da --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/class.out @@ -0,0 +1 @@ +class drr 1:10 root quantum 1514b diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/cmd.json new file mode 100644 index 000000000..f061cf906 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "drr-class0", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 drr" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 drr", + "desc": "positive: opt=plain cmd=drr-class0:class_add_dev_d0_parent_1:_classid_1:10_drr", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-044", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: drr" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: drr", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/dump.out new file mode 100644 index 000000000..1b5f2613c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/dump.out @@ -0,0 +1 @@ +qdisc drr 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/ip.pcap new file mode 100644 index 000000000..df1d75f20 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/netlink_route_class.pcap new file mode 100644 index 000000000..b14dd47e2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/netlink_route_dump.pcap new file mode 100644 index 000000000..6a253678c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-044/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/class.out new file mode 100644 index 000000000..842f4c9da --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/class.out @@ -0,0 +1 @@ +class drr 1:10 root quantum 1514b diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/cmd.json new file mode 100644 index 000000000..d23eafd12 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "drr-class1", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 drr quantum 1514" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 drr quantum 1514", + "desc": "positive: opt=plain cmd=drr-class1:class_add_dev_d0_parent_1:_classid_1:10_drr_quantum_1514", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-045", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: drr" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: drr", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/dump.out new file mode 100644 index 000000000..1b5f2613c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/dump.out @@ -0,0 +1 @@ +qdisc drr 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/ip.pcap new file mode 100644 index 000000000..f8b7cee16 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/netlink_route_class.pcap new file mode 100644 index 000000000..d1229fca0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/netlink_route_dump.pcap new file mode 100644 index 000000000..b80427115 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-045/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/class.out new file mode 100644 index 000000000..38ac54192 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/class.out @@ -0,0 +1 @@ +class drr 1:10 root quantum 9Kb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/cmd.json new file mode 100644 index 000000000..f3d3e44c1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "drr-class2", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 drr quantum 9k" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 drr quantum 9k", + "desc": "positive: opt=plain cmd=drr-class2:class_add_dev_d0_parent_1:_classid_1:10_drr_quantum_9k", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-046", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: drr" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: drr", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/dump.out new file mode 100644 index 000000000..1b5f2613c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/dump.out @@ -0,0 +1 @@ +qdisc drr 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/ip.pcap new file mode 100644 index 000000000..9beba5037 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/netlink_route_class.pcap new file mode 100644 index 000000000..922d6710c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/netlink_route_dump.pcap new file mode 100644 index 000000000..83ee91b5e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-046/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/class.out new file mode 100644 index 000000000..38ac54192 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/class.out @@ -0,0 +1 @@ +class drr 1:10 root quantum 9Kb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/cmd.json new file mode 100644 index 000000000..d4191f76e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/cmd.json @@ -0,0 +1,70 @@ +{ + "axes": { + "fix": "drr-class-change", + "json": "0", + "words": "class change dev d0 parent 1: classid 1:10 drr quantum 9k" + }, + "cmd": "tc class change dev d0 parent 1: classid 1:10 drr quantum 9k", + "desc": "positive: opt=plain cmd=drr-class-change:class_change_dev_d0_parent_1:_classid_1:10_drr_quantum_9k", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-047", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: drr", + "tc class add dev d0 parent 1: classid 1:10 drr" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: drr", + "rc": 0 + }, + { + "cmd": "tc class add dev d0 parent 1: classid 1:10 drr", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/dump.out new file mode 100644 index 000000000..1b5f2613c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/dump.out @@ -0,0 +1 @@ +qdisc drr 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/ip.pcap new file mode 100644 index 000000000..3f79d531f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/netlink_route_class.pcap new file mode 100644 index 000000000..4ab0b08d7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/netlink_route_dump.pcap new file mode 100644 index 000000000..c17774046 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-047/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/class.out new file mode 100644 index 000000000..38ac54192 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/class.out @@ -0,0 +1 @@ +class drr 1:10 root quantum 9Kb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/cmd.json new file mode 100644 index 000000000..b5ab281d4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/cmd.json @@ -0,0 +1,70 @@ +{ + "axes": { + "fix": "drr-class-replace", + "json": "0", + "words": "class replace dev d0 parent 1: classid 1:10 drr quantum 9k" + }, + "cmd": "tc class replace dev d0 parent 1: classid 1:10 drr quantum 9k", + "desc": "positive: opt=plain cmd=drr-class-replace:class_replace_dev_d0_parent_1:_classid_1:10_drr_quantum_9k", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-048", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: drr", + "tc class add dev d0 parent 1: classid 1:10 drr" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: drr", + "rc": 0 + }, + { + "cmd": "tc class add dev d0 parent 1: classid 1:10 drr", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/dump.out new file mode 100644 index 000000000..1b5f2613c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/dump.out @@ -0,0 +1 @@ +qdisc drr 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/ip.pcap new file mode 100644 index 000000000..eccc748ad Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/netlink_route_class.pcap new file mode 100644 index 000000000..337b8f654 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/netlink_route_dump.pcap new file mode 100644 index 000000000..5816a90d3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-048/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/class.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/cmd.json new file mode 100644 index 000000000..8000548cd --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/cmd.json @@ -0,0 +1,70 @@ +{ + "axes": { + "fix": "drr-class-delete", + "json": "0", + "words": "class delete dev d0 classid 1:10" + }, + "cmd": "tc class delete dev d0 classid 1:10", + "desc": "positive: opt=plain cmd=drr-class-delete:class_delete_dev_d0_classid_1:10", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-049", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: drr", + "tc class add dev d0 parent 1: classid 1:10 drr" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: drr", + "rc": 0 + }, + { + "cmd": "tc class add dev d0 parent 1: classid 1:10 drr", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/dump.out new file mode 100644 index 000000000..1b5f2613c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/dump.out @@ -0,0 +1 @@ +qdisc drr 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/ip.pcap new file mode 100644 index 000000000..120d0c5be Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/netlink_route_class.pcap new file mode 100644 index 000000000..f06d72859 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/netlink_route_dump.pcap new file mode 100644 index 000000000..6952b4c2b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-049/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/class.out new file mode 100644 index 000000000..3525ee493 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/class.out @@ -0,0 +1 @@ +class qfq 1:10 root weight 1 maxpkt 1514 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/cmd.json new file mode 100644 index 000000000..6b957ee5c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "qfq-class0", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 qfq" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 qfq", + "desc": "positive: opt=plain cmd=qfq-class0:class_add_dev_d0_parent_1:_classid_1:10_qfq", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-050", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: qfq" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: qfq", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/dump.out new file mode 100644 index 000000000..a45cbbae9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/dump.out @@ -0,0 +1 @@ +qdisc qfq 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/ip.pcap new file mode 100644 index 000000000..f9745816f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/netlink_route_class.pcap new file mode 100644 index 000000000..05c4c4095 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/netlink_route_dump.pcap new file mode 100644 index 000000000..fd453ef70 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-050/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/class.out new file mode 100644 index 000000000..225287324 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/class.out @@ -0,0 +1 @@ +class qfq 1:10 root weight 30 maxpkt 9000 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/cmd.json new file mode 100644 index 000000000..503243946 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "qfq-class1", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 qfq weight 30 maxpkt 9000" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 qfq weight 30 maxpkt 9000", + "desc": "positive: opt=plain cmd=qfq-class1:class_add_dev_d0_parent_1:_classid_1:10_qfq_weight_30_maxpkt_9000", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-051", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: qfq" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: qfq", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/dump.out new file mode 100644 index 000000000..a45cbbae9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/dump.out @@ -0,0 +1 @@ +qdisc qfq 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/ip.pcap new file mode 100644 index 000000000..75c6d1df8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/netlink_route_class.pcap new file mode 100644 index 000000000..9c8cac1be Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/netlink_route_dump.pcap new file mode 100644 index 000000000..29ab5e2d3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-051/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/class.out new file mode 100644 index 000000000..3525ee493 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/class.out @@ -0,0 +1 @@ +class qfq 1:10 root weight 1 maxpkt 1514 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/cmd.json new file mode 100644 index 000000000..a7dd0407b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "qfq-class2", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 qfq weight 1" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 qfq weight 1", + "desc": "positive: opt=plain cmd=qfq-class2:class_add_dev_d0_parent_1:_classid_1:10_qfq_weight_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-052", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: qfq" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: qfq", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/dump.out new file mode 100644 index 000000000..a45cbbae9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/dump.out @@ -0,0 +1 @@ +qdisc qfq 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/ip.pcap new file mode 100644 index 000000000..5e5124948 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/netlink_route_class.pcap new file mode 100644 index 000000000..f891d5088 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/netlink_route_dump.pcap new file mode 100644 index 000000000..0baec303b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-052/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/class.out new file mode 100644 index 000000000..3525ee493 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/class.out @@ -0,0 +1 @@ +class qfq 1:10 root weight 1 maxpkt 1514 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/cmd.json new file mode 100644 index 000000000..47125ed33 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/cmd.json @@ -0,0 +1,70 @@ +{ + "axes": { + "fix": "qfq-class-change", + "json": "0", + "words": "class change dev d0 parent 1: classid 1:10 qfq weight 1" + }, + "cmd": "tc class change dev d0 parent 1: classid 1:10 qfq weight 1", + "desc": "positive: opt=plain cmd=qfq-class-change:class_change_dev_d0_parent_1:_classid_1:10_qfq_weight_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-053", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: qfq", + "tc class add dev d0 parent 1: classid 1:10 qfq" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: qfq", + "rc": 0 + }, + { + "cmd": "tc class add dev d0 parent 1: classid 1:10 qfq", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/dump.out new file mode 100644 index 000000000..a45cbbae9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/dump.out @@ -0,0 +1 @@ +qdisc qfq 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/ip.pcap new file mode 100644 index 000000000..f7f89e498 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/netlink_route_class.pcap new file mode 100644 index 000000000..9e381a3e7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/netlink_route_dump.pcap new file mode 100644 index 000000000..959825a5d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-053/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/class.out new file mode 100644 index 000000000..3525ee493 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/class.out @@ -0,0 +1 @@ +class qfq 1:10 root weight 1 maxpkt 1514 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/cmd.json new file mode 100644 index 000000000..c628b463e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/cmd.json @@ -0,0 +1,70 @@ +{ + "axes": { + "fix": "qfq-class-replace", + "json": "0", + "words": "class replace dev d0 parent 1: classid 1:10 qfq weight 1" + }, + "cmd": "tc class replace dev d0 parent 1: classid 1:10 qfq weight 1", + "desc": "positive: opt=plain cmd=qfq-class-replace:class_replace_dev_d0_parent_1:_classid_1:10_qfq_weight_1", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-054", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: qfq", + "tc class add dev d0 parent 1: classid 1:10 qfq" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: qfq", + "rc": 0 + }, + { + "cmd": "tc class add dev d0 parent 1: classid 1:10 qfq", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/dump.out new file mode 100644 index 000000000..a45cbbae9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/dump.out @@ -0,0 +1 @@ +qdisc qfq 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/ip.pcap new file mode 100644 index 000000000..acb2a6d2e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/netlink_route_class.pcap new file mode 100644 index 000000000..ce8cd05d0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/netlink_route_dump.pcap new file mode 100644 index 000000000..7aa119c77 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-054/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/class.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/cmd.json new file mode 100644 index 000000000..8cf8b7120 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/cmd.json @@ -0,0 +1,70 @@ +{ + "axes": { + "fix": "qfq-class-delete", + "json": "0", + "words": "class delete dev d0 classid 1:10" + }, + "cmd": "tc class delete dev d0 classid 1:10", + "desc": "positive: opt=plain cmd=qfq-class-delete:class_delete_dev_d0_classid_1:10", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-055", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: qfq", + "tc class add dev d0 parent 1: classid 1:10 qfq" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: qfq", + "rc": 0 + }, + { + "cmd": "tc class add dev d0 parent 1: classid 1:10 qfq", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/dump.out new file mode 100644 index 000000000..a45cbbae9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/dump.out @@ -0,0 +1 @@ +qdisc qfq 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/ip.pcap new file mode 100644 index 000000000..8dea1e824 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/netlink_route_class.pcap new file mode 100644 index 000000000..ee6cd068f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/netlink_route_dump.pcap new file mode 100644 index 000000000..0bd522207 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-055/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/class.out new file mode 100644 index 000000000..fabf9ac46 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/class.out @@ -0,0 +1,2 @@ +class hfsc 1: root +class hfsc 1:10 parent 1: sc m1 0bit d 0us m2 10Mbit ul m1 0bit d 0us m2 20Mbit diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/cmd.json new file mode 100644 index 000000000..76c76638d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "hfsc-class0", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 hfsc sc rate 10mbit ul rate 20mbit" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 hfsc sc rate 10mbit ul rate 20mbit", + "desc": "positive: opt=plain cmd=hfsc-class0:class_add_dev_d0_parent_1:_classid_1:10_hfsc_sc_rate_10mbit_ul_rate_20mbit", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-056", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: hfsc default 10" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hfsc default 10", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/dump.out new file mode 100644 index 000000000..d450b60a3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/dump.out @@ -0,0 +1 @@ +qdisc hfsc 1: root refcnt 2 default 0x10 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/ip.pcap new file mode 100644 index 000000000..9a958c586 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/netlink_route_class.pcap new file mode 100644 index 000000000..9de0a032e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/netlink_route_dump.pcap new file mode 100644 index 000000000..d900da927 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-056/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/class.out new file mode 100644 index 000000000..0e1d407f7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/class.out @@ -0,0 +1,2 @@ +class hfsc 1: root +class hfsc 1:10 parent 1: rt m1 2Mbit d 10ms m2 1Mbit ls m1 0bit d 0us m2 3Mbit diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/cmd.json new file mode 100644 index 000000000..53d4ef291 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "hfsc-class1", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 hfsc rt m1 2mbit d 10ms m2 1mbit ls m2 3mbit" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 hfsc rt m1 2mbit d 10ms m2 1mbit ls m2 3mbit", + "desc": "positive: opt=plain cmd=hfsc-class1:class_add_dev_d0_parent_1:_classid_1:10_hfsc_rt_m1_2mbit_d_10ms_m2_1mbit_ls_m2_3mbit", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-057", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: hfsc default 10" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hfsc default 10", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/dump.out new file mode 100644 index 000000000..d450b60a3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/dump.out @@ -0,0 +1 @@ +qdisc hfsc 1: root refcnt 2 default 0x10 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/ip.pcap new file mode 100644 index 000000000..32f58b8a7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/netlink_route_class.pcap new file mode 100644 index 000000000..cb6b3eb06 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/netlink_route_dump.pcap new file mode 100644 index 000000000..aa16b5554 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-057/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/class.out new file mode 100644 index 000000000..93ce0bcd9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/class.out @@ -0,0 +1,2 @@ +class hfsc 1: root +class hfsc 1:10 parent 1: sc m1 1200Kbit d 10ms m2 1Mbit diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/cmd.json new file mode 100644 index 000000000..28310365a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "hfsc-class2", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 hfsc sc umax 1500 dmax 10ms rate 1mbit" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 hfsc sc umax 1500 dmax 10ms rate 1mbit", + "desc": "positive: opt=plain cmd=hfsc-class2:class_add_dev_d0_parent_1:_classid_1:10_hfsc_sc_umax_1500_dmax_10ms_rate_1mbit", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-058", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: hfsc default 10" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hfsc default 10", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/dump.out new file mode 100644 index 000000000..d450b60a3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/dump.out @@ -0,0 +1 @@ +qdisc hfsc 1: root refcnt 2 default 0x10 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/ip.pcap new file mode 100644 index 000000000..807d74ae0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/netlink_route_class.pcap new file mode 100644 index 000000000..802e9892e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/netlink_route_dump.pcap new file mode 100644 index 000000000..b17480da1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-058/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/class.out new file mode 100644 index 000000000..da9668a47 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/class.out @@ -0,0 +1,2 @@ +class hfsc 1: root +class hfsc 1:10 parent 1: rt m1 0bit d 48.8ms m2 10Mbit diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/cmd.json new file mode 100644 index 000000000..16090d82f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "hfsc-class3", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 hfsc rt umax 1500 dmax 50ms rate 10mbit" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 hfsc rt umax 1500 dmax 50ms rate 10mbit", + "desc": "positive: opt=plain cmd=hfsc-class3:class_add_dev_d0_parent_1:_classid_1:10_hfsc_rt_umax_1500_dmax_50ms_rate_10mbit", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-059", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: hfsc default 10" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hfsc default 10", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/dump.out new file mode 100644 index 000000000..d450b60a3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/dump.out @@ -0,0 +1 @@ +qdisc hfsc 1: root refcnt 2 default 0x10 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/ip.pcap new file mode 100644 index 000000000..38b5a9c51 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/netlink_route_class.pcap new file mode 100644 index 000000000..c2de8443b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/netlink_route_dump.pcap new file mode 100644 index 000000000..958f782e7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-059/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/class.out new file mode 100644 index 000000000..325fff687 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/class.out @@ -0,0 +1,2 @@ +class hfsc 1: root +class hfsc 1:10 parent 1: ls m1 0bit d 5ms m2 2Mbit ul m1 0bit d 0us m2 4Mbit diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/cmd.json new file mode 100644 index 000000000..fc0f4f951 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "hfsc-class4", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 hfsc ls m1 0 d 5ms m2 2mbit ul m2 4mbit" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 hfsc ls m1 0 d 5ms m2 2mbit ul m2 4mbit", + "desc": "positive: opt=plain cmd=hfsc-class4:class_add_dev_d0_parent_1:_classid_1:10_hfsc_ls_m1_0_d_5ms_m2_2mbit_ul_m2_4mbit", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-060", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: hfsc default 10" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hfsc default 10", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/dump.out new file mode 100644 index 000000000..d450b60a3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/dump.out @@ -0,0 +1 @@ +qdisc hfsc 1: root refcnt 2 default 0x10 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/ip.pcap new file mode 100644 index 000000000..493f1f831 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/netlink_route_class.pcap new file mode 100644 index 000000000..69ffc997e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/netlink_route_dump.pcap new file mode 100644 index 000000000..759ddd0ba Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-060/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/class.out new file mode 100644 index 000000000..efa42e9d2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/class.out @@ -0,0 +1,2 @@ +class hfsc 1: root +class hfsc 1:10 parent 1: rt m1 0bit d 0us m2 10Mbit ls m1 0bit d 5ms m2 2Mbit ul m1 0bit d 0us m2 4Mbit diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/cmd.json new file mode 100644 index 000000000..1d7be7aee --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/cmd.json @@ -0,0 +1,70 @@ +{ + "axes": { + "fix": "hfsc-class-change", + "json": "0", + "words": "class change dev d0 parent 1: classid 1:10 hfsc ls m1 0 d 5ms m2 2mbit ul m2 4mbit" + }, + "cmd": "tc class change dev d0 parent 1: classid 1:10 hfsc ls m1 0 d 5ms m2 2mbit ul m2 4mbit", + "desc": "positive: opt=plain cmd=hfsc-class-change:class_change_dev_d0_parent_1:_classid_1:10_hfsc_ls_m1_0_d_5ms_m2_2mbit_ul_m2_4mbit", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-061", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: hfsc default 10", + "tc class add dev d0 parent 1: classid 1:10 hfsc sc rate 10mbit ul rate 20mbit" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hfsc default 10", + "rc": 0 + }, + { + "cmd": "tc class add dev d0 parent 1: classid 1:10 hfsc sc rate 10mbit ul rate 20mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/dump.out new file mode 100644 index 000000000..d450b60a3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/dump.out @@ -0,0 +1 @@ +qdisc hfsc 1: root refcnt 2 default 0x10 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/ip.pcap new file mode 100644 index 000000000..0ab06225d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/netlink_route_class.pcap new file mode 100644 index 000000000..ad01c77a2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/netlink_route_dump.pcap new file mode 100644 index 000000000..f9e22e071 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-061/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/class.out new file mode 100644 index 000000000..efa42e9d2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/class.out @@ -0,0 +1,2 @@ +class hfsc 1: root +class hfsc 1:10 parent 1: rt m1 0bit d 0us m2 10Mbit ls m1 0bit d 5ms m2 2Mbit ul m1 0bit d 0us m2 4Mbit diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/cmd.json new file mode 100644 index 000000000..636d68c81 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/cmd.json @@ -0,0 +1,70 @@ +{ + "axes": { + "fix": "hfsc-class-replace", + "json": "0", + "words": "class replace dev d0 parent 1: classid 1:10 hfsc ls m1 0 d 5ms m2 2mbit ul m2 4mbit" + }, + "cmd": "tc class replace dev d0 parent 1: classid 1:10 hfsc ls m1 0 d 5ms m2 2mbit ul m2 4mbit", + "desc": "positive: opt=plain cmd=hfsc-class-replace:class_replace_dev_d0_parent_1:_classid_1:10_hfsc_ls_m1_0_d_5ms_m2_2mbit_ul_m2_4mbit", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-062", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: hfsc default 10", + "tc class add dev d0 parent 1: classid 1:10 hfsc sc rate 10mbit ul rate 20mbit" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hfsc default 10", + "rc": 0 + }, + { + "cmd": "tc class add dev d0 parent 1: classid 1:10 hfsc sc rate 10mbit ul rate 20mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/dump.out new file mode 100644 index 000000000..d450b60a3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/dump.out @@ -0,0 +1 @@ +qdisc hfsc 1: root refcnt 2 default 0x10 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/ip.pcap new file mode 100644 index 000000000..237c40daa Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/netlink_route_class.pcap new file mode 100644 index 000000000..2175cbbf6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/netlink_route_dump.pcap new file mode 100644 index 000000000..648b7c4e0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-062/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/class.out new file mode 100644 index 000000000..2061f2f2b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/class.out @@ -0,0 +1 @@ +class hfsc 1: root diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/cmd.json new file mode 100644 index 000000000..e872e59fe --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/cmd.json @@ -0,0 +1,70 @@ +{ + "axes": { + "fix": "hfsc-class-delete", + "json": "0", + "words": "class delete dev d0 classid 1:10" + }, + "cmd": "tc class delete dev d0 classid 1:10", + "desc": "positive: opt=plain cmd=hfsc-class-delete:class_delete_dev_d0_classid_1:10", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-063", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: hfsc default 10", + "tc class add dev d0 parent 1: classid 1:10 hfsc sc rate 10mbit ul rate 20mbit" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hfsc default 10", + "rc": 0 + }, + { + "cmd": "tc class add dev d0 parent 1: classid 1:10 hfsc sc rate 10mbit ul rate 20mbit", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/dump.out new file mode 100644 index 000000000..d450b60a3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/dump.out @@ -0,0 +1 @@ +qdisc hfsc 1: root refcnt 2 default 0x10 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/ip.pcap new file mode 100644 index 000000000..0de9970a5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/netlink_route_class.pcap new file mode 100644 index 000000000..d3fc3ef26 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/netlink_route_dump.pcap new file mode 100644 index 000000000..3f04e81bb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-063/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/class.out new file mode 100644 index 000000000..595f5b9d0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/class.out @@ -0,0 +1,3 @@ +class ets 1:1 root +class ets 1:2 root quantum 1514 +class ets 1:3 root quantum 2000 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/cmd.json new file mode 100644 index 000000000..39eabf0a2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "ets-class-change", + "json": "0", + "words": "class change dev d0 classid 1:3 ets quantum 2000" + }, + "cmd": "tc class change dev d0 classid 1:3 ets quantum 2000", + "desc": "positive: opt=plain cmd=ets-class-change:class_change_dev_d0_classid_1:3_ets_quantum_2000", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-064", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: ets bands 3 strict 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: ets bands 3 strict 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/dump.out new file mode 100644 index 000000000..2b81a7358 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/dump.out @@ -0,0 +1 @@ +qdisc ets 1: root refcnt 2 bands 3 strict 1 quanta 1514 2000 priomap 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/ip.pcap new file mode 100644 index 000000000..1cef7ec24 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/netlink_route_class.pcap new file mode 100644 index 000000000..697389080 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/netlink_route_dump.pcap new file mode 100644 index 000000000..8a202851f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-064/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/class.out new file mode 100644 index 000000000..e3a07d21d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/class.out @@ -0,0 +1,3 @@ +class ets 1:1 root +class ets 1:2 root quantum 3000 +class ets 1:3 root quantum 1514 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/cmd.json new file mode 100644 index 000000000..e13975840 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "ets-class-replace", + "json": "0", + "words": "class replace dev d0 classid 1:2 ets quantum 3000" + }, + "cmd": "tc class replace dev d0 classid 1:2 ets quantum 3000", + "desc": "positive: opt=plain cmd=ets-class-replace:class_replace_dev_d0_classid_1:2_ets_quantum_3000", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-065", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: ets bands 3 strict 1" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: ets bands 3 strict 1", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/dump.out new file mode 100644 index 000000000..f71c79a5b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/dump.out @@ -0,0 +1 @@ +qdisc ets 1: root refcnt 2 bands 3 strict 1 quanta 3000 1514 priomap 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/ip.pcap new file mode 100644 index 000000000..999db3fcf Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/netlink_route_class.pcap new file mode 100644 index 000000000..6fa0c089f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/netlink_route_dump.pcap new file mode 100644 index 000000000..611fa8f3b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-065/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/cmd.json new file mode 100644 index 000000000..31c3cab3f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "w27-priomap", + "json": "0", + "words": "qdisc add dev d0 root handle 1: ets bands 3 priomap 256 1 2" + }, + "cmd": "tc qdisc add dev d0 root handle 1: ets bands 3 priomap 256 1 2", + "desc": "boundary: opt=plain cmd=w27-priomap:qdisc_add_dev_d0_root_handle_1:_ets_bands_3_priomap_256_1_2", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-066", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/dump.out new file mode 100644 index 000000000..41921ec9b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/dump.out @@ -0,0 +1 @@ +qdisc ets 1: root refcnt 2 bands 3 quanta 1514 1514 1514 priomap 0 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/ip.pcap new file mode 100644 index 000000000..a4ebc82eb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/netlink_route_dump.pcap new file mode 100644 index 000000000..5ccdd38cd Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-066/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/cmd.json new file mode 100644 index 000000000..987ab0b39 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "w3-ets", + "json": "0", + "words": "qdisc add dev d0 root handle 1: ets bands 0 bands 3" + }, + "cmd": "tc qdisc add dev d0 root handle 1: ets bands 0 bands 3", + "desc": "corner: opt=plain cmd=w3-ets:qdisc_add_dev_d0_root_handle_1:_ets_bands_0_bands_3", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-067", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/dump.out new file mode 100644 index 000000000..92b3e8ec9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/dump.out @@ -0,0 +1 @@ +qdisc ets 1: root refcnt 2 bands 3 quanta 1514 1514 1514 priomap 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/ip.pcap new file mode 100644 index 000000000..b72f08640 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/netlink_route_dump.pcap new file mode 100644 index 000000000..dd9480077 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-067/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/cmd.json new file mode 100644 index 000000000..e88223c78 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "w3-hfsc", + "json": "0", + "words": "qdisc add dev d0 root handle 1: hfsc default 0 default 5" + }, + "cmd": "tc qdisc add dev d0 root handle 1: hfsc default 0 default 5", + "desc": "corner: opt=plain cmd=w3-hfsc:qdisc_add_dev_d0_root_handle_1:_hfsc_default_0_default_5", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-068", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/dump.out new file mode 100644 index 000000000..b8b09d195 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/dump.out @@ -0,0 +1 @@ +qdisc hfsc 1: root refcnt 2 default 0x5 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/ip.pcap new file mode 100644 index 000000000..2db98c93d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/netlink_route_dump.pcap new file mode 100644 index 000000000..92041d84e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-068/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/cmd.json new file mode 100644 index 000000000..f7ccf25a5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "w3-cbs", + "json": "0", + "words": "qdisc add dev d0 root handle 1: cbs hicredit 0 hicredit 5" + }, + "cmd": "tc qdisc add dev d0 root handle 1: cbs hicredit 0 hicredit 5", + "desc": "corner: opt=plain cmd=w3-cbs:qdisc_add_dev_d0_root_handle_1:_cbs_hicredit_0_hicredit_5", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-069", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/dump.out new file mode 100644 index 000000000..af0e15ef4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/dump.out @@ -0,0 +1,2 @@ +qdisc cbs 1: root refcnt 2 hicredit 5 locredit 0 sendslope 0 idleslope 0 offload 0 +qdisc pfifo 0: parent 1: limit 1000p diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/ip.pcap new file mode 100644 index 000000000..abae735ce Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/netlink_route_dump.pcap new file mode 100644 index 000000000..a35bd6be2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-069/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/cmd.json new file mode 100644 index 000000000..bd007a459 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "w3-etf", + "json": "0", + "words": "qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI delta 0 delta 5" + }, + "cmd": "tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI delta 0 delta 5", + "desc": "corner: opt=plain cmd=w3-etf:qdisc_add_dev_d0_root_handle_1:_etf_clockid_CLOCK_TAI_delta_0_delta_5", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-070", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/dump.out new file mode 100644 index 000000000..a4747ade4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/dump.out @@ -0,0 +1 @@ +qdisc etf 1: root refcnt 2 clockid TAI delta 5 offload off deadline_mode off skip_sock_check off diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/ip.pcap new file mode 100644 index 000000000..b5393df04 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/netlink_route_dump.pcap new file mode 100644 index 000000000..fd76b8ce7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-070/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/cmd.json new file mode 100644 index 000000000..a7889a89d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "w3-taprio", + "json": "0", + "words": "qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 sched-entry S 01 300000 cycle-time 0 cycle-time 600000 clockid CLOCK_TAI" + }, + "cmd": "tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 sched-entry S 01 300000 cycle-time 0 cycle-time 600000 clockid CLOCK_TAI", + "desc": "corner: opt=plain cmd=w3-taprio:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_sched-entry_S_01_300000_cycle-time_0_cycle-time_600000_clockid_CLOCK_TAI", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-071", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d1", + "name": "dump" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/dump.out new file mode 100644 index 000000000..595e15345 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/dump.out @@ -0,0 +1,15 @@ +qdisc taprio 1: root refcnt 9 tc 2 map 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 +queues offset 0 count 4 offset 4 count 4 +clockid TAI base-time 0 cycle-time 600000 cycle-time-extension 0 + index 0 cmd S gatemask 0x1 interval 300000 +max-sdu 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +fp E E E E E E E E E E E E E E E E + +qdisc pfifo 0: parent 1:8 limit 1000p +qdisc pfifo 0: parent 1:7 limit 1000p +qdisc pfifo 0: parent 1:6 limit 1000p +qdisc pfifo 0: parent 1:5 limit 1000p +qdisc pfifo 0: parent 1:4 limit 1000p +qdisc pfifo 0: parent 1:3 limit 1000p +qdisc pfifo 0: parent 1:2 limit 1000p +qdisc pfifo 0: parent 1:1 limit 1000p diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/ip.err new file mode 100644 index 000000000..90081ad3c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/ip.err @@ -0,0 +1 @@ +Warning: sch_taprio: Size table not specified, frame length estimations may be inaccurate. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/ip.pcap new file mode 100644 index 000000000..4f26868f6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/netlink_route_dump.pcap new file mode 100644 index 000000000..1d03b551d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-071/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/class.out new file mode 100644 index 000000000..abd866854 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/class.out @@ -0,0 +1,2 @@ +class hfsc 1: root +class hfsc 1:10 parent 1: sc m1 0bit d 99.9ms m2 100Mbit diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/cmd.json new file mode 100644 index 000000000..9ba5eaff4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "w39-umax", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 hfsc sc umax 5000 dmax 100ms rate 100mbit" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 hfsc sc umax 5000 dmax 100ms rate 100mbit", + "desc": "boundary: opt=plain cmd=w39-umax:class_add_dev_d0_parent_1:_classid_1:10_hfsc_sc_umax_5000_dmax_100ms_rate_100mbit", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-072", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: hfsc" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hfsc", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/dump.out new file mode 100644 index 000000000..a3b60c951 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/dump.out @@ -0,0 +1 @@ +qdisc hfsc 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/ip.pcap new file mode 100644 index 000000000..3ed6e64d3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/netlink_route_class.pcap new file mode 100644 index 000000000..ac2d45439 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/netlink_route_dump.pcap new file mode 100644 index 000000000..6a7c8acbf Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-072/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/class.out new file mode 100644 index 000000000..e20eadf94 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/class.out @@ -0,0 +1,2 @@ +class hfsc 1: root +class hfsc 1:10 parent 1: rt m1 9726Mbit d 1us m2 1Kbit diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/cmd.json new file mode 100644 index 000000000..85d98035c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "w40-m1", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 hfsc rt umax 100000 dmax 1us rate 1kbit" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 hfsc rt umax 100000 dmax 1us rate 1kbit", + "desc": "boundary: opt=plain cmd=w40-m1:class_add_dev_d0_parent_1:_classid_1:10_hfsc_rt_umax_100000_dmax_1us_rate_1kbit", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-073", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: hfsc" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hfsc", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/dump.out new file mode 100644 index 000000000..a3b60c951 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/dump.out @@ -0,0 +1 @@ +qdisc hfsc 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/ip.pcap new file mode 100644 index 000000000..6e5cc6551 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/netlink_route_class.pcap new file mode 100644 index 000000000..ea442c1f3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/netlink_route_dump.pcap new file mode 100644 index 000000000..620d698ef Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-073/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/class.out new file mode 100644 index 000000000..1b1ec5eb4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/class.out @@ -0,0 +1,2 @@ +class hfsc 1: root +class hfsc 1:10 parent 1: sc m1 0bit d 0us m2 2Mbit diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/cmd.json new file mode 100644 index 000000000..8daafa027 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "w41-repeat", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 hfsc rt m2 1mbit sc m2 2mbit" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 hfsc rt m2 1mbit sc m2 2mbit", + "desc": "corner: opt=plain cmd=w41-repeat:class_add_dev_d0_parent_1:_classid_1:10_hfsc_rt_m2_1mbit_sc_m2_2mbit", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-074", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: hfsc" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hfsc", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/dump.out new file mode 100644 index 000000000..a3b60c951 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/dump.out @@ -0,0 +1 @@ +qdisc hfsc 1: root refcnt 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/ip.pcap new file mode 100644 index 000000000..d64791773 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/netlink_route_class.pcap new file mode 100644 index 000000000..f88b8cae6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/netlink_route_dump.pcap new file mode 100644 index 000000000..35ebc80d0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-074/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/b.txt b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/b.txt new file mode 100644 index 000000000..7d29c1732 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/b.txt @@ -0,0 +1,3 @@ +qdisc add dev d0 root handle 1: hfsc default 10 +class add dev d0 parent 1: classid 1:1 hfsc sc rate 10mbit ul rate 20mbit +class add dev d0 parent 1:1 classid 1:10 hfsc rt m2 1mbit ls m2 1mbit diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/class.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/class.out new file mode 100644 index 000000000..7b503513c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/class.out @@ -0,0 +1,3 @@ +class hfsc 1: root +class hfsc 1:10 parent 1:1 sc m1 0bit d 0us m2 1Mbit +class hfsc 1:1 parent 1: sc m1 0bit d 0us m2 10Mbit ul m1 0bit d 0us m2 20Mbit diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/cmd.json new file mode 100644 index 000000000..592a29ed9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/cmd.json @@ -0,0 +1,66 @@ +{ + "axes": { + "batch": "hfsc", + "fix": "batch", + "json": "0", + "words": "-batch b.txt" + }, + "cmd": "tc -batch b.txt", + "desc": "positive: opt=plain cmd=batch:batch:hfsc", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "tcswrite/ec-075", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "printf '%s\\n' 'qdisc add dev d0 root handle 1: hfsc default 10' 'class add dev d0 parent 1: classid 1:1 hfsc sc rate 10mbit ul rate 20mbit' 'class add dev d0 parent 1:1 classid 1:10 hfsc rt m2 1mbit ls m2 1mbit' > b.txt" + ], + "proto": "route", + "readback": [ + { + "cmd": "tc -d qdisc show dev d0", + "name": "dump" + }, + { + "cmd": "tc -d class show dev d0", + "name": "class" + } + ], + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "printf '%s\\n' 'qdisc add dev d0 root handle 1: hfsc default 10' 'class add dev d0 parent 1: classid 1:1 hfsc sc rate 10mbit ul rate 20mbit' 'class add dev d0 parent 1:1 classid 1:10 hfsc rt m2 1mbit ls m2 1mbit' > b.txt", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/dump.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/dump.out new file mode 100644 index 000000000..d450b60a3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/dump.out @@ -0,0 +1 @@ +qdisc hfsc 1: root refcnt 2 default 0x10 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/ip.pcap new file mode 100644 index 000000000..eca489e32 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/netlink_route_class.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/netlink_route_class.pcap new file mode 100644 index 000000000..7119fda61 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/netlink_route_class.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/netlink_route_dump.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/netlink_route_dump.pcap new file mode 100644 index 000000000..d2e16f567 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ec-075/netlink_route_dump.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-001/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-001/cmd.json new file mode 100644 index 000000000..486523a2e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-001/cmd.json @@ -0,0 +1,50 @@ +{ + "axes": { + "fix": "drr-bogus", + "json": "0", + "words": "qdisc add dev d0 root handle 1: drr bogus" + }, + "cmd": "tc qdisc add dev d0 root handle 1: drr bogus", + "desc": "negative: opt=plain cmd=ng:drr-bogus:qdisc_add_dev_d0_root_handle_1:_drr_bogus: What is \"bogus\"?, rc 1 (W4)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 1, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-001", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-001/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-001/ip.err new file mode 100644 index 000000000..c40e431b2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-001/ip.err @@ -0,0 +1,2 @@ +What is "bogus"? +Usage: ... drr diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-001/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-001/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-001/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-001/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-001/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-001/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-001/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-001/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-002/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-002/cmd.json new file mode 100644 index 000000000..01e11fa83 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-002/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "drr-q0", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 drr quantum 0" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 drr quantum 0", + "desc": "negative: opt=plain cmd=ng:drr-q0:class_add_dev_d0_parent_1:_classid_1:10_drr_quantum_0: the kernel refuses a zero quantum", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "tcswrite/ng-002", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: drr" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: drr", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-002/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-002/ip.err new file mode 100644 index 000000000..14bffacc2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-002/ip.err @@ -0,0 +1 @@ +Error: Specified DRR quantum cannot be zero. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-002/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-002/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-002/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-002/ip.pcap new file mode 100644 index 000000000..990da021a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-002/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-002/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-002/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-002/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-003/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-003/cmd.json new file mode 100644 index 000000000..119804d59 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-003/cmd.json @@ -0,0 +1,55 @@ +{ + "axes": { + "fix": "drr-cbogus", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 drr bogus" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 drr bogus", + "desc": "negative: opt=plain cmd=ng:drr-cbogus:class_add_dev_d0_parent_1:_classid_1:10_drr_bogus: class usage, 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": { + "rc": 1, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-003", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: drr" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: drr", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-003/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-003/ip.err new file mode 100644 index 000000000..f07579ae7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-003/ip.err @@ -0,0 +1,2 @@ +What is "bogus"? +Usage: ... drr quantum SIZE diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-003/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-003/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-003/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-003/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-003/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-003/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-003/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-003/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-004/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-004/cmd.json new file mode 100644 index 000000000..eded9ade9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-004/cmd.json @@ -0,0 +1,55 @@ +{ + "axes": { + "fix": "qfq-weight", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 qfq weight zz" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 qfq weight zz", + "desc": "negative: opt=plain cmd=ng:qfq-weight:class_add_dev_d0_parent_1:_classid_1:10_qfq_weight_zz: Illegal \"weight\", 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": { + "rc": 1, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-004", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: qfq" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: qfq", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-004/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-004/ip.err new file mode 100644 index 000000000..29b0c42cf --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-004/ip.err @@ -0,0 +1 @@ +Illegal "weight" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-004/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-004/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-004/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-004/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-004/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-004/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-004/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-004/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-005/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-005/cmd.json new file mode 100644 index 000000000..2e09580ba --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-005/cmd.json @@ -0,0 +1,50 @@ +{ + "axes": { + "fix": "multiq-bands", + "json": "0", + "words": "qdisc add dev d1 root handle 1: multiq bands 4" + }, + "cmd": "tc qdisc add dev d1 root handle 1: multiq bands 4", + "desc": "negative: opt=plain cmd=ng:multiq-bands:qdisc_add_dev_d1_root_handle_1:_multiq_bands_4: multiq takes no options (K27), 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": { + "rc": 1, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-005", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-005/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-005/ip.err new file mode 100644 index 000000000..513e4793e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-005/ip.err @@ -0,0 +1,2 @@ +What is "bands"? +Usage: ... multiq [help] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-005/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-005/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-005/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-005/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-005/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-005/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-005/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-005/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-006/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-006/cmd.json new file mode 100644 index 000000000..2904cf810 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-006/cmd.json @@ -0,0 +1,55 @@ +{ + "axes": { + "fix": "multiq-class", + "json": "0", + "words": "class add dev d1 parent 1: classid 1:1 multiq" + }, + "cmd": "tc class add dev d1 parent 1: classid 1:1 multiq", + "desc": "negative: opt=plain cmd=ng:multiq-class:class_add_dev_d1_parent_1:_classid_1:1_multiq: multiq is classless, 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": { + "rc": 1, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-006", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: multiq" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: multiq", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-006/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-006/ip.err new file mode 100644 index 000000000..b9da5cda6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-006/ip.err @@ -0,0 +1 @@ +Error: Qdisc "multiq" is classless. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-006/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-006/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-006/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-006/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-006/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-006/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-006/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-006/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-007/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-007/cmd.json new file mode 100644 index 000000000..db3fc892c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-007/cmd.json @@ -0,0 +1,55 @@ +{ + "axes": { + "fix": "w41-twoerr", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 hfsc rt m1 bogus m2 1mbit" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 hfsc rt m1 bogus m2 1mbit", + "desc": "negative: opt=plain cmd=ng:w41-twoerr:class_add_dev_d0_parent_1:_classid_1:10_hfsc_rt_m1_bogus_m2_1mbit: a failed sc1 is retried as sc2: two errors (W41)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 1, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-007", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: hfsc" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hfsc", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-007/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-007/ip.err new file mode 100644 index 000000000..f8c58ef83 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-007/ip.err @@ -0,0 +1,2 @@ +HFSC: Illegal "m1" +HFSC: Illegal "rt" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-007/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-007/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-007/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-007/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-007/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-007/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-007/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-007/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-008/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-008/cmd.json new file mode 100644 index 000000000..4f3c520cf --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-008/cmd.json @@ -0,0 +1,55 @@ +{ + "axes": { + "fix": "w16-m2", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 hfsc rt m2 40gbit" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 hfsc rt m2 40gbit", + "desc": "negative: opt=plain cmd=ng:w16-m2:class_add_dev_d0_parent_1:_classid_1:10_hfsc_rt_m2_40gbit: hfsc rates are 32-bit (W16)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 1, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-008", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: hfsc" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hfsc", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-008/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-008/ip.err new file mode 100644 index 000000000..f7b3e6fc1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-008/ip.err @@ -0,0 +1,2 @@ +HFSC: Illegal "m2" +HFSC: Illegal "rt" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-008/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-008/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-008/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-008/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-008/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-008/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-008/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-008/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-009/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-009/cmd.json new file mode 100644 index 000000000..64ec302bf --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-009/cmd.json @@ -0,0 +1,55 @@ +{ + "axes": { + "fix": "w9-pct", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 hfsc ls m2 10%" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 hfsc ls m2 10%", + "desc": "negative: opt=plain cmd=ng:w9-pct:class_add_dev_d0_parent_1:_classid_1:10_hfsc_ls_m2_10%: a percent rate on a dummy with no speed (W9)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 1, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-009", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: hfsc" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hfsc", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-009/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-009/ip.err new file mode 100644 index 000000000..7a995f3ff --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-009/ip.err @@ -0,0 +1,4 @@ +property "speed" in file /sys/class/net/d0/speed is currently unknown +Failed to parse /sys/class/net/d0/speed +HFSC: Illegal "m2" +HFSC: Illegal "ls" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-009/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-009/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-009/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-009/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-009/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-009/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-009/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-009/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-010/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-010/cmd.json new file mode 100644 index 000000000..70835eaa6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-010/cmd.json @@ -0,0 +1,55 @@ +{ + "axes": { + "fix": "hfsc-bogus", + "json": "0", + "words": "class add dev d0 parent 1: classid 1:10 hfsc bogus" + }, + "cmd": "tc class add dev d0 parent 1: classid 1:10 hfsc bogus", + "desc": "negative: opt=plain cmd=ng:hfsc-bogus:class_add_dev_d0_parent_1:_classid_1:10_hfsc_bogus: hfsc usage, 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": { + "rc": 1, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-010", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: hfsc" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: hfsc", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-010/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-010/ip.err new file mode 100644 index 000000000..78bcfabab --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-010/ip.err @@ -0,0 +1,21 @@ +HFSC: What is "bogus" ? +Usage: ... hfsc [ [ rt SC ] [ ls SC ] | [ sc SC ] ] [ ul SC ] + +SC := [ [ m1 BPS ] d SEC ] m2 BPS + + m1 : slope of first segment + d : x-coordinate of intersection + m2 : slope of second segment + +Alternative format: + +SC := [ [ umax BYTE ] dmax SEC ] rate BPS + + umax : maximum unit of work + dmax : maximum delay + rate : rate + +Remarks: + - at least one of 'rt', 'ls' or 'sc' must be specified + - 'ul' can only be specified with 'ls' or 'sc' + diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-010/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-010/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-010/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-010/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-010/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-010/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-010/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-010/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-011/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-011/cmd.json new file mode 100644 index 000000000..178a4f43c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-011/cmd.json @@ -0,0 +1,50 @@ +{ + "axes": { + "fix": "ets-cover", + "json": "0", + "words": "qdisc add dev d0 root handle 1: ets bands 2 quanta 1 2 3" + }, + "cmd": "tc qdisc add dev d0 root handle 1: ets bands 2 quanta 1 2 3", + "desc": "negative: opt=plain cmd=ng:ets-cover:qdisc_add_dev_d0_root_handle_1:_ets_bands_2_quanta_1_2_3: not enough bands for the quanta", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 1, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-011", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-011/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-011/ip.err new file mode 100644 index 000000000..316b9ec0d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-011/ip.err @@ -0,0 +1,2 @@ +Not enough total bands to cover all the strict bands and quanta +Usage: ... ets [bands NUMBER] [strict NUMBER] [quanta Q1 Q2...] [priomap P1 P2...] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-011/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-011/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-011/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-011/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-011/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-011/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-011/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-011/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-012/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-012/cmd.json new file mode 100644 index 000000000..ca9fdb756 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-012/cmd.json @@ -0,0 +1,50 @@ +{ + "axes": { + "fix": "ets-oob", + "json": "0", + "words": "qdisc add dev d0 root handle 1: ets bands 2 priomap 2" + }, + "cmd": "tc qdisc add dev d0 root handle 1: ets bands 2 priomap 2", + "desc": "negative: opt=plain cmd=ng:ets-oob:qdisc_add_dev_d0_root_handle_1:_ets_bands_2_priomap_2: a priomap band out of bounds", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 1, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-012", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-012/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-012/ip.err new file mode 100644 index 000000000..84f451a0a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-012/ip.err @@ -0,0 +1 @@ +"priomap" element is out of bounds diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-012/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-012/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-012/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-012/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-012/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-012/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-012/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-012/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-013/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-013/cmd.json new file mode 100644 index 000000000..6c20fbedf --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-013/cmd.json @@ -0,0 +1,50 @@ +{ + "axes": { + "fix": "ets-none", + "json": "0", + "words": "qdisc add dev d0 root handle 1: ets" + }, + "cmd": "tc qdisc add dev d0 root handle 1: ets", + "desc": "negative: opt=plain cmd=ng:ets-none:qdisc_add_dev_d0_root_handle_1:_ets: no bands, quanta or strict", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 1, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-013", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-013/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-013/ip.err new file mode 100644 index 000000000..6c60a55d6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-013/ip.err @@ -0,0 +1,2 @@ +One of "bands", "quanta" or "strict" needs to be specified +Usage: ... ets [bands NUMBER] [strict NUMBER] [quanta Q1 Q2...] [priomap P1 P2...] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-013/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-013/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-013/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-013/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-013/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-013/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-013/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-013/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-014/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-014/cmd.json new file mode 100644 index 000000000..4f5b1874c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-014/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "ets-strictq", + "json": "0", + "words": "class change dev d0 classid 1:1 ets quantum 2000" + }, + "cmd": "tc class change dev d0 classid 1:1 ets quantum 2000", + "desc": "negative: opt=plain cmd=ng:ets-strictq:class_change_dev_d0_classid_1:1_ets_quantum_2000: a strict band has no quantum", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "tcswrite/ng-014", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: ets bands 3 strict 1" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: ets bands 3 strict 1", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-014/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-014/ip.err new file mode 100644 index 000000000..bf8b63556 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-014/ip.err @@ -0,0 +1 @@ +Error: Strict bands do not have a configurable quantum. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-014/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-014/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-014/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-014/ip.pcap new file mode 100644 index 000000000..7018d8cd2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-014/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-014/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-014/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-014/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-015/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-015/cmd.json new file mode 100644 index 000000000..626cc5c0c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-015/cmd.json @@ -0,0 +1,51 @@ +{ + "axes": { + "fix": "mq-nohw", + "json": "0", + "words": "qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4" + }, + "cmd": "tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4", + "desc": "negative: opt=plain cmd=ng:mq-nohw:qdisc_add_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4: hw defaults to 1: a dummy has no offload", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "tcswrite/ng-015", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-015/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-015/ip.err new file mode 100644 index 000000000..4202048c0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-015/ip.err @@ -0,0 +1 @@ +Error: Device does not support hardware offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-015/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-015/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-015/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-015/ip.pcap new file mode 100644 index 000000000..ab9bc2a9c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-015/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-015/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-015/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-015/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-016/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-016/cmd.json new file mode 100644 index 000000000..c296d9498 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-016/cmd.json @@ -0,0 +1,50 @@ +{ + "axes": { + "fix": "w33-bogus", + "json": "0", + "words": "qdisc add dev d1 root handle 1: mqprio bogus" + }, + "cmd": "tc qdisc add dev d1 root handle 1: mqprio bogus", + "desc": "negative: opt=plain cmd=ng:w33-bogus:qdisc_add_dev_d1_root_handle_1:_mqprio_bogus: an unknown word goes to invarg: rc 255 (W33)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-016", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-016/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-016/ip.err new file mode 100644 index 000000000..f30c6c64f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-016/ip.err @@ -0,0 +1 @@ +Error: argument "bogus" is wrong: unknown argument diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-016/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-016/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-016/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-016/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-016/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-016/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-016/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-016/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-017/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-017/cmd.json new file mode 100644 index 000000000..d148b95a7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-017/cmd.json @@ -0,0 +1,50 @@ +{ + "axes": { + "fix": "mq-numtc", + "json": "0", + "words": "qdisc add dev d1 root handle 1: mqprio num_tc x" + }, + "cmd": "tc qdisc add dev d1 root handle 1: mqprio num_tc x", + "desc": "negative: opt=plain cmd=ng:mq-numtc:qdisc_add_dev_d1_root_handle_1:_mqprio_num_tc_x: Illegal \"num_tc\", rc 1 (W33's contrast)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 1, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-017", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-017/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-017/ip.err new file mode 100644 index 000000000..8fa54552d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-017/ip.err @@ -0,0 +1 @@ +Illegal "num_tc" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-017/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-017/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-017/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-017/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-017/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-017/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-017/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-017/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-018/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-018/cmd.json new file mode 100644 index 000000000..2385609ee --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-018/cmd.json @@ -0,0 +1,50 @@ +{ + "axes": { + "fix": "w31-hw-first", + "json": "0", + "words": "qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0 mode channel" + }, + "cmd": "tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0 mode channel", + "desc": "negative: opt=plain cmd=ng:w31-hw-first:qdisc_add_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_hw_0_mode_channel: mode after hw 0 is unknown: rc 255 (W31)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-018", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-018/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-018/ip.err new file mode 100644 index 000000000..defc1b919 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-018/ip.err @@ -0,0 +1 @@ +Error: argument "mode" is wrong: unknown argument diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-018/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-018/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-018/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-018/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-018/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-018/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-018/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-018/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-019/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-019/cmd.json new file mode 100644 index 000000000..fe3948044 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-019/cmd.json @@ -0,0 +1,51 @@ +{ + "axes": { + "fix": "w31-mode-first", + "json": "0", + "words": "qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 mode channel hw 0" + }, + "cmd": "tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 mode channel hw 0", + "desc": "negative: opt=plain cmd=ng:w31-mode-first:qdisc_add_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_mode_channel_hw_0: mode before hw 0 is sent: the kernel's EINVAL (W31)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "tcswrite/ng-019", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-019/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-019/ip.err new file mode 100644 index 000000000..6ad48ef93 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-019/ip.err @@ -0,0 +1 @@ +Error: mqprio TCA_OPTIONS can only contain netlink attributes in hardware mode. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-019/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-019/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-019/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-019/ip.pcap new file mode 100644 index 000000000..2f0285f46 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-019/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-019/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-019/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-019/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-020/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-020/cmd.json new file mode 100644 index 000000000..4dba71e14 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-020/cmd.json @@ -0,0 +1,50 @@ +{ + "axes": { + "fix": "w30-queues", + "json": "0", + "words": "qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 queues 4@0 4@4 hw 0" + }, + "cmd": "tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 queues 4@0 4@4 hw 0", + "desc": "negative: opt=plain cmd=ng:w30-queues:qdisc_add_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_queues_4@0_4@4_hw_0: queues twice sums the pair count (W30)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 1, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-020", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-020/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-020/ip.err new file mode 100644 index 000000000..eb7a31a33 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-020/ip.err @@ -0,0 +1 @@ +queues count/offset pair count 4 can not be higher than given num_tc 2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-020/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-020/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-020/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-020/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-020/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-020/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-020/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-020/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-021/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-021/cmd.json new file mode 100644 index 000000000..2feeb6152 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-021/cmd.json @@ -0,0 +1,51 @@ +{ + "axes": { + "fix": "mq-fp", + "json": "0", + "words": "qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 fp E P hw 0" + }, + "cmd": "tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 fp E P hw 0", + "desc": "negative: opt=plain cmd=ng:mq-fp:qdisc_add_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_fp_E_P_hw_0: fp needs hardware mode", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "tcswrite/ng-021", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-021/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-021/ip.err new file mode 100644 index 000000000..6ad48ef93 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-021/ip.err @@ -0,0 +1 @@ +Error: mqprio TCA_OPTIONS can only contain netlink attributes in hardware mode. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-021/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-021/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-021/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-021/ip.pcap new file mode 100644 index 000000000..1e95085f1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-021/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-021/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-021/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-021/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-022/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-022/cmd.json new file mode 100644 index 000000000..592a9928a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-022/cmd.json @@ -0,0 +1,51 @@ +{ + "axes": { + "fix": "w32-rates", + "json": "0", + "words": "qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 mode channel shaper bw_rlimit min_rate 1mbit hw 1" + }, + "cmd": "tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 mode channel shaper bw_rlimit min_rate 1mbit hw 1", + "desc": "negative: opt=plain cmd=ng:w32-rates:qdisc_add_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_mode_channel_shaper_bw_rlimit_min_rate_1mbit_hw_1: one min_rate for two classes is sent (W32)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "tcswrite/ng-022", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-022/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-022/ip.err new file mode 100644 index 000000000..4202048c0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-022/ip.err @@ -0,0 +1 @@ +Error: Device does not support hardware offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-022/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-022/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-022/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-022/ip.pcap new file mode 100644 index 000000000..d1e26864e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-022/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-022/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-022/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-022/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-023/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-023/cmd.json new file mode 100644 index 000000000..4950d6bf2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-023/cmd.json @@ -0,0 +1,51 @@ +{ + "axes": { + "fix": "mq-rates", + "json": "0", + "words": "qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 mode channel shaper bw_rlimit min_rate 1mbit 2mbit max_rate 5mbit 6mbit hw 1" + }, + "cmd": "tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 mode channel shaper bw_rlimit min_rate 1mbit 2mbit max_rate 5mbit 6mbit hw 1", + "desc": "negative: opt=plain cmd=ng:mq-rates:qdisc_add_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_mode_channel_shaper_bw_rlimit_min_rate_1mbit_2mbit_max_rate_5mbit_6mbit_hw_1: rates need hardware offload", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "tcswrite/ng-023", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-023/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-023/ip.err new file mode 100644 index 000000000..4202048c0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-023/ip.err @@ -0,0 +1 @@ +Error: Device does not support hardware offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-023/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-023/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-023/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-023/ip.pcap new file mode 100644 index 000000000..f47ee1dd9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-023/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-023/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-023/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-023/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-024/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-024/cmd.json new file mode 100644 index 000000000..71124c515 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-024/cmd.json @@ -0,0 +1,51 @@ +{ + "axes": { + "fix": "taprio-sq", + "json": "0", + "words": "qdisc add dev d0 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 1@0 1@0 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 clockid CLOCK_TAI" + }, + "cmd": "tc qdisc add dev d0 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 1@0 1@0 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 clockid CLOCK_TAI", + "desc": "negative: opt=plain cmd=ng:taprio-sq:qdisc_add_dev_d0_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_1@0_1@0_base-time_1000000000_sched-entry_S_01_300000_sched-entry_S_02_200000_clockid_CLOCK_TAI: taprio needs a multiqueue device", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "tcswrite/ng-024", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-024/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-024/ip.err new file mode 100644 index 000000000..f68e63bda --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-024/ip.err @@ -0,0 +1 @@ +Error: sch_taprio: Multi-queue device is required. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-024/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-024/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-024/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-024/ip.pcap new file mode 100644 index 000000000..bdde585a1 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-024/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-024/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-024/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-024/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-025/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-025/cmd.json new file mode 100644 index 000000000..d9969caaf --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-025/cmd.json @@ -0,0 +1,51 @@ +{ + "axes": { + "fix": "w34-basetime", + "json": "0", + "words": "qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time zz sched-entry S 01 300000 clockid CLOCK_TAI" + }, + "cmd": "tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time zz sched-entry S 01 300000 clockid CLOCK_TAI", + "desc": "negative: opt=plain cmd=ng:w34-basetime:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_base-time_zz_sched-entry_S_01_300000_clockid_CLOCK_TAI: a bad base-time ends the parse silently: no entries sent (W34)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "tcswrite/ng-025", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-025/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-025/ip.err new file mode 100644 index 000000000..fb7c36d2f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-025/ip.err @@ -0,0 +1 @@ +Error: There should be at least one entry in the schedule. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-025/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-025/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-025/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-025/ip.pcap new file mode 100644 index 000000000..93a2bdaf6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-025/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-025/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-025/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-025/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-026/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-026/cmd.json new file mode 100644 index 000000000..8dec3751e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-026/cmd.json @@ -0,0 +1,51 @@ +{ + "axes": { + "fix": "w34-cycle", + "json": "0", + "words": "qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 cycle-time zz sched-entry S 01 300000 clockid CLOCK_TAI" + }, + "cmd": "tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 cycle-time zz sched-entry S 01 300000 clockid CLOCK_TAI", + "desc": "negative: opt=plain cmd=ng:w34-cycle:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_cycle-time_zz_sched-entry_S_01_300000_clockid_CLOCK_TAI: a bad cycle-time ends the parse silently (W34)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "tcswrite/ng-026", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-026/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-026/ip.err new file mode 100644 index 000000000..fb7c36d2f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-026/ip.err @@ -0,0 +1 @@ +Error: There should be at least one entry in the schedule. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-026/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-026/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-026/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-026/ip.pcap new file mode 100644 index 000000000..22410d80e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-026/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-026/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-026/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-026/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-027/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-027/cmd.json new file mode 100644 index 000000000..26cd25e37 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-027/cmd.json @@ -0,0 +1,50 @@ +{ + "axes": { + "fix": "w35-flags", + "json": "0", + "words": "qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 sched-entry S 01 300000 flags zz clockid CLOCK_TAI" + }, + "cmd": "tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 sched-entry S 01 300000 flags zz clockid CLOCK_TAI", + "desc": "negative: opt=plain cmd=ng:w35-flags:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_sched-entry_S_01_300000_flags_zz_clockid_CLOCK_TAI: a bad flags value: rc 1, no message (W35)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 1, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-027", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-027/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-027/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-027/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-027/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-027/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-027/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-027/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-027/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-027/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-027/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-028/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-028/cmd.json new file mode 100644 index 000000000..fe7c8d37c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-028/cmd.json @@ -0,0 +1,50 @@ +{ + "axes": { + "fix": "w35-unknown", + "json": "0", + "words": "qdisc add dev d1 root handle 1: taprio bogus" + }, + "cmd": "tc qdisc add dev d1 root handle 1: taprio bogus", + "desc": "negative: opt=plain cmd=ng:w35-unknown:qdisc_add_dev_d1_root_handle_1:_taprio_bogus: a bare \"Unknown argument\" (W35)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 1, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-028", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-028/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-028/ip.err new file mode 100644 index 000000000..ee5054a64 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-028/ip.err @@ -0,0 +1 @@ +Unknown argument diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-028/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-028/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-028/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-028/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-028/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-028/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-028/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-028/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-029/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-029/cmd.json new file mode 100644 index 000000000..5caf58962 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-029/cmd.json @@ -0,0 +1,51 @@ +{ + "axes": { + "fix": "w36-nonumtc", + "json": "0", + "words": "qdisc add dev d1 root handle 1: taprio map 0 1 queues 1@0 sched-entry S 01 300000 clockid CLOCK_TAI" + }, + "cmd": "tc qdisc add dev d1 root handle 1: taprio map 0 1 queues 1@0 sched-entry S 01 300000 clockid CLOCK_TAI", + "desc": "negative: opt=plain cmd=ng:w36-nonumtc:qdisc_add_dev_d1_root_handle_1:_taprio_map_0_1_queues_1@0_sched-entry_S_01_300000_clockid_CLOCK_TAI: map and queues dropped with no num_tc (W36)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "tcswrite/ng-029", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-029/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-029/ip.err new file mode 100644 index 000000000..a1ed077db --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-029/ip.err @@ -0,0 +1 @@ +Error: 'mqprio' configuration is necessary. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-029/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-029/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-029/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-029/ip.pcap new file mode 100644 index 000000000..1d6ebccb5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-029/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-029/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-029/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-029/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-030/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-030/cmd.json new file mode 100644 index 000000000..d31f63951 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-030/cmd.json @@ -0,0 +1,51 @@ +{ + "axes": { + "fix": "taprio-noclock", + "json": "0", + "words": "qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 sched-entry S 01 300000" + }, + "cmd": "tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 sched-entry S 01 300000", + "desc": "negative: opt=plain cmd=ng:taprio-noclock:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_sched-entry_S_01_300000: clockid is mandatory", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "tcswrite/ng-030", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-030/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-030/ip.err new file mode 100644 index 000000000..7af630bd6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-030/ip.err @@ -0,0 +1 @@ +Error: Specifying a 'clockid' is mandatory. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-030/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-030/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-030/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-030/ip.pcap new file mode 100644 index 000000000..548237a1b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-030/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-030/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-030/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-030/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-031/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-031/cmd.json new file mode 100644 index 000000000..b8cdbb814 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-031/cmd.json @@ -0,0 +1,51 @@ +{ + "axes": { + "fix": "taprio-sdu", + "json": "0", + "words": "qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 max-sdu 1500 0 clockid CLOCK_TAI" + }, + "cmd": "tc qdisc add dev d1 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000 max-sdu 1500 0 clockid CLOCK_TAI", + "desc": "negative: opt=plain cmd=ng:taprio-sdu:qdisc_add_dev_d1_root_handle_1:_taprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_base-time_1000000000_sched-entry_S_01_300000_sched-entry_S_02_200000_max-sdu_1500_0_clockid_CLOCK_TAI: max-sdu over the MTU", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "ERANGE", + "rc": 2, + "refused_by": "kernel" + }, + "id": "tcswrite/ng-031", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-031/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-031/ip.err new file mode 100644 index 000000000..ae5522c90 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-031/ip.err @@ -0,0 +1 @@ +Error: sch_taprio: TC max SDU exceeds device max MTU. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-031/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-031/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-031/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-031/ip.pcap new file mode 100644 index 000000000..24ae6a627 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-031/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-031/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-031/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-031/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-032/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-032/cmd.json new file mode 100644 index 000000000..7edcc31e4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-032/cmd.json @@ -0,0 +1,51 @@ +{ + "axes": { + "fix": "cbs-offload", + "json": "0", + "words": "qdisc add dev d0 root handle 1: cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470 offload 1" + }, + "cmd": "tc qdisc add dev d0 root handle 1: cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470 offload 1", + "desc": "negative: opt=plain cmd=ng:cbs-offload:qdisc_add_dev_d0_root_handle_1:_cbs_idleslope_20000_sendslope_-980000_hicredit_30_locredit_-1470_offload_1: cbs offload on a dummy", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "tcswrite/ng-032", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-032/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-032/ip.err new file mode 100644 index 000000000..92b5b8a7b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-032/ip.err @@ -0,0 +1 @@ +Error: Specified device does not support cbs offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-032/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-032/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-032/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-032/ip.pcap new file mode 100644 index 000000000..589ccb104 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-032/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-032/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-032/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-032/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-033/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-033/cmd.json new file mode 100644 index 000000000..f3c4cf0fe --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-033/cmd.json @@ -0,0 +1,50 @@ +{ + "axes": { + "fix": "cbs-bogus", + "json": "0", + "words": "qdisc add dev d0 root handle 1: cbs bogus" + }, + "cmd": "tc qdisc add dev d0 root handle 1: cbs bogus", + "desc": "negative: opt=plain cmd=ng:cbs-bogus:qdisc_add_dev_d0_root_handle_1:_cbs_bogus: cbs: unknown parameter, 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": { + "rc": 1, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-033", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-033/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-033/ip.err new file mode 100644 index 000000000..ad580e66c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-033/ip.err @@ -0,0 +1,3 @@ +cbs: unknown parameter "bogus" +Usage: ... cbs hicredit BYTES locredit BYTES sendslope BPS idleslope BPS + [offload 0|1] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-033/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-033/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-033/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-033/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-033/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-033/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-033/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-033/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-034/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-034/cmd.json new file mode 100644 index 000000000..39d3a3c56 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-034/cmd.json @@ -0,0 +1,51 @@ +{ + "axes": { + "fix": "etf-offload", + "json": "0", + "words": "qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI offload" + }, + "cmd": "tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI offload", + "desc": "negative: opt=plain cmd=ng:etf-offload:qdisc_add_dev_d0_root_handle_1:_etf_clockid_CLOCK_TAI_offload: etf offload on a dummy", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "tcswrite/ng-034", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-034/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-034/ip.err new file mode 100644 index 000000000..e13b1d45e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-034/ip.err @@ -0,0 +1 @@ +Error: Specified device does not support ETF offload. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-034/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-034/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-034/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-034/ip.pcap new file mode 100644 index 000000000..37dab97a2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-034/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-034/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-034/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-034/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-035/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-035/cmd.json new file mode 100644 index 000000000..18ff05d1a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-035/cmd.json @@ -0,0 +1,50 @@ +{ + "axes": { + "fix": "etf-clock", + "json": "0", + "words": "qdisc add dev d0 root handle 1: etf clockid BOGUS" + }, + "cmd": "tc qdisc add dev d0 root handle 1: etf clockid BOGUS", + "desc": "negative: opt=plain cmd=ng:etf-clock:qdisc_add_dev_d0_root_handle_1:_etf_clockid_BOGUS: a bad clockid, 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": { + "rc": 1, + "refused_by": "iproute2" + }, + "id": "tcswrite/ng-035", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-035/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-035/ip.err new file mode 100644 index 000000000..1d8eb0f05 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-035/ip.err @@ -0,0 +1,2 @@ +etf: illegal value for "clockid": "BOGUS". +It must be a valid SYS-V id (i.e. CLOCK_TAI) diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-035/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-035/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-035/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-035/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-035/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-035/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-035/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-035/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-036/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-036/cmd.json new file mode 100644 index 000000000..f1af7a2e8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-036/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "mqprio-change", + "json": "0", + "words": "qdisc change dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0" + }, + "cmd": "tc qdisc change dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0", + "desc": "negative: opt=plain cmd=ng:mqprio-change:qdisc_change_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_hw_0: mqprio has no change op: EINVAL, rc 2 (K31)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "tcswrite/ng-036", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-036/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-036/ip.err new file mode 100644 index 000000000..79d8203ad --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-036/ip.err @@ -0,0 +1 @@ +Error: Change operation not supported by specified qdisc. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-036/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-036/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-036/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-036/ip.pcap new file mode 100644 index 000000000..6acd07f5c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-036/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-036/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-036/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-036/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-037/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-037/cmd.json new file mode 100644 index 000000000..bd0bef922 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-037/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "mqprio-replace", + "json": "0", + "words": "qdisc replace dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0" + }, + "cmd": "tc qdisc replace dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0", + "desc": "negative: opt=plain cmd=ng:mqprio-replace:qdisc_replace_dev_d1_root_handle_1:_mqprio_num_tc_2_map_0_0_1_1_queues_4@0_4@4_hw_0: mqprio has no change op: EINVAL, rc 2 (K31)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "tcswrite/ng-037", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d1 root handle 1: mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4 hw 0", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-037/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-037/ip.err new file mode 100644 index 000000000..79d8203ad --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-037/ip.err @@ -0,0 +1 @@ +Error: Change operation not supported by specified qdisc. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-037/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-037/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-037/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-037/ip.pcap new file mode 100644 index 000000000..bdbec0da9 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-037/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-037/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-037/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-037/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-038/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-038/cmd.json new file mode 100644 index 000000000..d8c1e20d6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-038/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "etf-change", + "json": "0", + "words": "qdisc change dev d0 root handle 1: etf clockid CLOCK_TAI delta 200000 deadline_mode skip_sock_check" + }, + "cmd": "tc qdisc change dev d0 root handle 1: etf clockid CLOCK_TAI delta 200000 deadline_mode skip_sock_check", + "desc": "negative: opt=plain cmd=ng:etf-change:qdisc_change_dev_d0_root_handle_1:_etf_clockid_CLOCK_TAI_delta_200000_deadline_mode_skip_sock_check: etf has no change op: EINVAL, rc 2 (K31)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "tcswrite/ng-038", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-038/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-038/ip.err new file mode 100644 index 000000000..79d8203ad --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-038/ip.err @@ -0,0 +1 @@ +Error: Change operation not supported by specified qdisc. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-038/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-038/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-038/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-038/ip.pcap new file mode 100644 index 000000000..ccb0fa213 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-038/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-038/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-038/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-038/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-039/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-039/cmd.json new file mode 100644 index 000000000..ec5a53af5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-039/cmd.json @@ -0,0 +1,56 @@ +{ + "axes": { + "fix": "etf-replace", + "json": "0", + "words": "qdisc replace dev d0 root handle 1: etf clockid CLOCK_TAI delta 200000 deadline_mode skip_sock_check" + }, + "cmd": "tc qdisc replace dev d0 root handle 1: etf clockid CLOCK_TAI delta 200000 deadline_mode skip_sock_check", + "desc": "negative: opt=plain cmd=ng:etf-replace:qdisc_replace_dev_d0_root_handle_1:_etf_clockid_CLOCK_TAI_delta_200000_deadline_mode_skip_sock_check: etf has no change op: EINVAL, rc 2 (K31)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_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": "tcswrite/ng-039", + "modules": [ + "sch_cbs", + "sch_drr", + "sch_etf", + "sch_ets", + "sch_hfsc", + "sch_mqprio", + "sch_multiq", + "sch_qfq", + "sch_taprio" + ], + "pre": [ + "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d0 address 02:00:00:00:02:00 type dummy && ip link set d0 addrgenmode none && ip link set d0 up && ip link add d1 address 02:00:00:00:02:01 numtxqueues 8 type dummy && ip link set d1 addrgenmode none && ip link set d1 up", + "rc": 0 + }, + { + "cmd": "tc qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI", + "rc": 0 + } + ], + "rc": 2, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-039/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-039/ip.err new file mode 100644 index 000000000..79d8203ad --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-039/ip.err @@ -0,0 +1 @@ +Error: Change operation not supported by specified qdisc. diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-039/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-039/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-039/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-039/ip.pcap new file mode 100644 index 000000000..c38a17fd8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-039/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-039/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-039/ip.rc new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/tcswrite/ng-039/ip.rc @@ -0,0 +1 @@ +2 diff --git a/pkg/xtcpnl/xtcpnl_tc_qencode.go b/pkg/xtcpnl/xtcpnl_tc_qencode.go index 3aa9530f0..cac0065d7 100644 --- a/pkg/xtcpnl/xtcpnl_tc_qencode.go +++ b/pkg/xtcpnl/xtcpnl_tc_qencode.go @@ -191,3 +191,57 @@ func (g TcNetemGemodel) Append(b []byte) []byte { } return b } + +// The increment-15 kinds (gotc 18P): the fixed structs their parse_qopt +// and parse_copt send (tc/q_{multiq,hfsc,mqprio,cbs,etf}.c at v7.2.0). +// drr, qfq, ets and taprio send only scalar attributes and nests, which +// gotc lays out with an AttrBuilder. + +// Append lays out q, struct tc_multiq_qopt (pkt_sched.h:155). multiq's +// parse_qopt sends it zeroed; the kernel writes bands back (K27). +func (q TcMultiqQopt) Append(b []byte) []byte { + b = appendU16(b, q.Bands) + return appendU16(b, q.MaxBands) +} + +// Append lays out q, struct tc_hfsc_qopt (pkt_sched.h:453). +func (q TcHfscQopt) Append(b []byte) []byte { return appendU16(b, q.Defcls) } + +// Append lays out c, struct tc_service_curve (pkt_sched.h:457). +func (c TcServiceCurve) Append(b []byte) []byte { + b = appendU32(b, c.M1) + b = appendU32(b, c.D) + return appendU32(b, c.M2) +} + +// Append lays out q, struct tc_mqprio_qopt (pkt_sched.h:629): 82 bytes, +// which the attribute holding it pads to 84 (RTA_ALIGN). +func (q TcMqprioQopt) Append(b []byte) []byte { + b = append(b, q.NumTc) + b = append(b, q.PrioTcMap[:]...) + b = append(b, q.Hw) + for _, c := range q.Count { + b = appendU16(b, c) + } + for _, o := range q.Offset { + b = appendU16(b, o) + } + return b +} + +// Append lays out q, struct tc_cbs_qopt (pkt_sched.h:969): offload, three +// pad bytes (zero, as tc's memset leaves them), then the four s32s. +func (q TcCbsQopt) Append(b []byte) []byte { + b = append(b, q.Offload, 0, 0, 0) + b = appendS32(b, q.Hicredit) + b = appendS32(b, q.Locredit) + b = appendS32(b, q.Idleslope) + return appendS32(b, q.Sendslope) +} + +// Append lays out q, struct tc_etf_qopt (pkt_sched.h:988). +func (q TcEtfQopt) Append(b []byte) []byte { + b = appendS32(b, q.Delta) + b = appendS32(b, q.Clockid) + return appendU32(b, q.Flags) +} diff --git a/pkg/xtcpnl/xtcpnl_tc_qencode_test.go b/pkg/xtcpnl/xtcpnl_tc_qencode_test.go index 1f4a78c71..d85b45645 100644 --- a/pkg/xtcpnl/xtcpnl_tc_qencode_test.go +++ b/pkg/xtcpnl/xtcpnl_tc_qencode_test.go @@ -55,6 +55,19 @@ func TestTcQencodeRoundTrip(t *testing.T) { {"positive: tc_netem_slot", TcNetemSlot{MinDelay: 800000, MaxDelay: 1000000, MaxPackets: 10, MaxBytes: 3000, DistDelay: -1, DistJitter: math.MinInt64}, TcNetemSlotSizeCst, func(b []byte) (any, error) { return DecodeTcNetemSlot(b) }}, + {"positive: tc_multiq_qopt", TcMultiqQopt{Bands: 8, MaxBands: 8}, TcMultiqQoptSizeCst, + func(b []byte) (any, error) { return DecodeTcMultiqQopt(b) }}, + {"positive: tc_hfsc_qopt", TcHfscQopt{Defcls: 0x10}, TcHfscQoptSizeCst, + func(b []byte) (any, error) { return DecodeTcHfscQopt(b) }}, + {"boundary: tc_service_curve at the u32 maxima", TcServiceCurve{M1: math.MaxUint32, D: math.MaxUint32, M2: 1}, + TcServiceCurveSizeCst, func(b []byte) (any, error) { return DecodeTcServiceCurve(b) }}, + {"positive: tc_mqprio_qopt", TcMqprioQopt{NumTc: 2, PrioTcMap: [16]uint8{0, 0, 1, 1}, Hw: 1, + Count: [16]uint16{4, 4}, Offset: [16]uint16{0, 4}}, TcMqprioQoptSizeCst, + func(b []byte) (any, error) { return DecodeTcMqprioQopt(b) }}, + {"corner: tc_cbs_qopt with negative credits and slope", TcCbsQopt{Offload: 1, Hicredit: 30, Locredit: math.MinInt32, + Idleslope: 20000, Sendslope: -980000}, TcCbsQoptSizeCst, func(b []byte) (any, error) { return DecodeTcCbsQopt(b) }}, + {"corner: tc_etf_qopt with a negative delta", TcEtfQopt{Delta: -1, Clockid: 11, Flags: 3}, TcEtfQoptSizeCst, + func(b []byte) (any, error) { return DecodeTcEtfQopt(b) }}, {"positive: tc_netem_gimodel", TcNetemGimodel{1, 2, 3, 4, 5}, TcNetemGimodelSizeCst, func(b []byte) (any, error) { return DecodeTcNetemGimodel(b) }}, {"positive: tc_netem_gemodel", TcNetemGemodel{1, 2, 3, 4}, TcNetemGemodelSizeCst, diff --git a/pkg/xtcpnl/xtcpnl_tc_swrite_test.go b/pkg/xtcpnl/xtcpnl_tc_swrite_test.go new file mode 100644 index 000000000..5f5c5d7d9 --- /dev/null +++ b/pkg/xtcpnl/xtcpnl_tc_swrite_test.go @@ -0,0 +1,174 @@ +//go:build gotc_write + +package xtcpnl + +import ( + "encoding/binary" + "encoding/hex" + "testing" + + "golang.org/x/sys/unix" +) + +const tdTcswrite = "testdata/7_3_1/ws/tcswrite/" + +// tcSwriteCaptured is the first qdisc or class write in a tcswrite row's +// capture. +func tcSwriteCaptured(t testing.TB, id string) []byte { + t.Helper() + for _, m := range pcapNlMsgs(t, tdTcswrite+id+"/ip.pcap") { + if m.h.Flags&unix.NLM_F_REQUEST == 0 || !IsAdmittedWriteType(m.h.Type) { + continue + } + b := make([]byte, NlMsgHdrSizeCst, NlMsgHdrSizeCst+len(m.body)) + binary.LittleEndian.PutUint32(b[0:], uint32(NlMsgHdrSizeCst+len(m.body))) + binary.LittleEndian.PutUint16(b[4:], m.h.Type) + binary.LittleEndian.PutUint16(b[6:], m.h.Flags) + return append(b, m.body...) + } + t.Fatalf("%s: no tc write in the capture", id) + return nil +} + +// tcNest is a TCA_OPTIONS-style nest of type atype around fill. +func tcNest(atype uint16, fill func(*AttrBuilder) error) func(*AttrBuilder) error { + return func(ab *AttrBuilder) error { + m, err := ab.BeginNest(atype) + if err != nil { + return err + } + if err := fill(ab); err != nil { + return err + } + return ab.EndNest(m) + } +} + +// TestBuildTcSchedWrite is the increment-15 kinds' structs and nests, +// through BuildTcWriteRequest, against the requests tc sent for tcswrite +// rows (gotc 18P): each struct's Append and each nest's layout as tc's +// parser writes it (tc/q_{multiq,hfsc,ets,mqprio,cbs,etf}.c at v7.2.0). +// +// go test -tags gotc_write ./pkg/xtcpnl/ -run TestBuildTcSchedWrite +func TestBuildTcSchedWrite(t *testing.T) { + q := func(kind string, opts func(*AttrBuilder) error) TcWrite { + return TcWrite{MsgType: unix.RTM_NEWQDISC, Flags: tcAdd, Handle: 0x10000, Parent: tcRoot, Kind: kind, Opts: opts} + } + // hfsc class (ec-057): rt m1 2mbit d 10ms m2 1mbit, ls m2 3mbit; rates + // in bytes/s, d in us, RSC before FSC (q_hfsc.c:150-179). + hc := TcWrite{MsgType: unix.RTM_NEWTCLASS, Flags: tcAdd, Handle: 0x10010, Parent: 0x10000, Kind: "hfsc", Opts: tcHfscCurves} + mq := TcMqprioQopt{NumTc: 2, PrioTcMap: [16]uint8{0, 0, 1, 1}, Count: [16]uint16{4, 4}, Offset: [16]uint16{0, 4}} + tests := []struct { + description string + id string + w TcWrite + }{ + {"positive: drr qdisc sends no TCA_OPTIONS", "ec-001", q("drr", nil)}, + {"positive: multiq sends a zeroed tc_multiq_qopt", "ec-009", q("multiq", tcOpts(TcMultiqQopt{}.Append(nil)))}, + {"positive: hfsc qdisc with no default", "ec-013", q("hfsc", tcOpts(TcHfscQopt{}.Append(nil)))}, + {"positive: hfsc default 10", "ec-014", q("hfsc", tcOpts(TcHfscQopt{Defcls: 0x10}.Append(nil)))}, + // ets: TCA_OPTIONS and its lists carry NLA_F_NESTED (K30); bands as a + // u8, the strict count only when nonzero. + {"corner: ets nests are flagged", "ec-018", q("ets", tcNest(TcaOptions|unix.NLA_F_NESTED, func(ab *AttrBuilder) error { + if err := ab.PutU8(TcaEtsNbands, 3); err != nil { + return err + } + if err := ab.PutU8(TcaEtsNstrict, 1); err != nil { + return err + } + if err := tcNest(TcaEtsQuanta|unix.NLA_F_NESTED, func(ab *AttrBuilder) error { + for _, v := range []uint32{1500, 3000} { + if err := ab.PutU32(TcaEtsQuantaBand, v); err != nil { + return err + } + } + return nil + })(ab); err != nil { + return err + } + return tcNest(TcaEtsPriomap|unix.NLA_F_NESTED, func(ab *AttrBuilder) error { + for _, v := range []uint8{2, 1, 0} { + if err := ab.PutU8(TcaEtsPriomapBand, v); err != nil { + return err + } + } + return nil + })(ab) + }))}, + // mqprio: TCA_OPTIONS is a compat nest; tc sets its rta_len from the + // aligned tail (q_mqprio.c:251), so the 82-byte header counts as 84. + {"boundary: mqprio header padded to RTA_ALIGN", "ec-025", q("mqprio", func(ab *AttrBuilder) error { + m, err := ab.BeginNestData(TcaOptions, mq.Append(nil)) + if err != nil { + return err + } + return ab.EndNest(m) + })}, + {"positive: cbs PARMS in a plain nest", "ec-034", q("cbs", tcNest(TcaOptions, func(ab *AttrBuilder) error { + return ab.PutBytes(TcaCbsParms, TcCbsQopt{Hicredit: 30, Locredit: -1470, Idleslope: 20000, Sendslope: -980000}.Append(nil)) + }))}, + // etf: CLOCK_TAI is 11; skip_sock_check is TC_ETF_SKIP_SOCK_CHECK (bit 2). + {"positive: etf PARMS in a hand-made nest", "ec-040", q("etf", tcNest(TcaOptions, func(ab *AttrBuilder) error { + return ab.PutBytes(TcaEtfParms, TcEtfQopt{Delta: 300000, Clockid: unix.CLOCK_TAI, Flags: 4}.Append(nil)) + }))}, + {"positive: hfsc class curves in a plain nest", "ec-057", hc}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + want := tcSwriteCaptured(t, tc.id) + w := tc.w + w.Ifindex = tcCapturedIfindex(want) + got, err := BuildTcWriteRequest(&w, 0) + if err != nil { + t.Fatal(err) + } + if !tcSameRequest(got, want) { + t.Errorf("request differs\n got %s\nwant %s", hex.EncodeToString(got), hex.EncodeToString(want)) + } + }) + } +} + +// tcHfscCurves is ec-057's TCA_OPTIONS: RSC then FSC. +func tcHfscCurves(ab *AttrBuilder) error { + m, err := ab.BeginNest(TcaOptions) + if err != nil { + return err + } + if err := ab.PutBytes(TcaHfscRsc, TcServiceCurve{M1: 250000, D: 10000, M2: 125000}.Append(nil)); err != nil { + return err + } + if err := ab.PutBytes(TcaHfscFsc, TcServiceCurve{M2: 375000}.Append(nil)); err != nil { + return err + } + return ab.EndNest(m) +} + +// TestBuildTcSchedWriteAllocs pins an hfsc class request's allocations: +// the attribute buffer and the laid-out message, as for pfifo. +func TestBuildTcSchedWriteAllocs(t *testing.T) { + w := TcWrite{MsgType: unix.RTM_NEWTCLASS, Flags: tcAdd, Ifindex: 2, Handle: 0x10010, Parent: 0x10000, + Kind: "hfsc", Opts: tcHfscCurves} + n := testing.AllocsPerRun(100, func() { + if _, err := BuildTcWriteRequest(&w, 1); err != nil { + t.Fatal(err) + } + }) + if n > 2 { + t.Errorf("%v allocations per request, want at most 2", n) + } +} + +// BenchmarkBuildTcSchedWrite is ec-057's hfsc class add. +// +// go test -tags gotc_write ./pkg/xtcpnl/ -run '^$' -bench BuildTcSchedWrite -benchmem +func BenchmarkBuildTcSchedWrite(b *testing.B) { + w := TcWrite{MsgType: unix.RTM_NEWTCLASS, Flags: tcAdd, Ifindex: 2, Handle: 0x10010, Parent: 0x10000, + Kind: "hfsc", Opts: tcHfscCurves} + b.ReportAllocs() + for b.Loop() { + if _, err := BuildTcWriteRequest(&w, 1); err != nil { + b.Fatal(err) + } + } +} diff --git a/pkg/xtcpnl/xtcpnl_tc_write.go b/pkg/xtcpnl/xtcpnl_tc_write.go index 1f02d4eb6..ff7b25dbd 100644 --- a/pkg/xtcpnl/xtcpnl_tc_write.go +++ b/pkg/xtcpnl/xtcpnl_tc_write.go @@ -217,6 +217,19 @@ func (w *TcWrite) putStab(ab *AttrBuilder) error { return ab.EndNest(m) } +// BeginNestData is an attribute carrying data whose rta_len EndNest later +// stretches over every attribute after it, to the cursor. q_mqprio sends +// TCA_OPTIONS this way: addattr_l of tc_mqprio_qopt, then +// tail->rta_len = NLMSG_TAIL(n) - tail (tc/q_mqprio.c:216,251), so the +// 82-byte struct counts as its aligned 84 even with nothing after it. +func (a *AttrBuilder) BeginNestData(atype uint16, data []byte) (NestMark, error) { + start := a.n + if err := a.PutBytes(atype, data); err != nil { + return NestMark{}, err + } + return NestMark{off: start}, nil +} + // NestCompat is an open addattr_nest_compat: the outer attribute holding a // struct, and the empty nest after it. type NestCompat struct { diff --git a/tools/nlcapgen/main.go b/tools/nlcapgen/main.go index 8ba3e6ef9..d51496abf 100644 --- a/tools/nlcapgen/main.go +++ b/tools/nlcapgen/main.go @@ -160,6 +160,7 @@ var families = map[string]func() []*space{ "tcsched": func() []*space { return []*space{tcschedSpace()} }, "tcaqm": func() []*space { return []*space{tcaqmSpace()} }, "tcqwrite": func() []*space { return []*space{tcqwriteSpace()} }, + "tcswrite": func() []*space { return []*space{tcswriteSpace()} }, } // namedFamilies are families of named rows, written out as they are diff --git a/tools/nlcapgen/matrix_tcswrite.go b/tools/nlcapgen/matrix_tcswrite.go new file mode 100644 index 000000000..19f2c16fa --- /dev/null +++ b/tools/nlcapgen/matrix_tcswrite.go @@ -0,0 +1,275 @@ +package main + +import ( + "slices" + "strings" +) + +// The scheduler write space (gotc 18C): `tc qdisc add|change|replace| +// delete` and `tc class add|change|replace|delete` of increment 15's nine +// kinds (drr, qfq, hfsc, ets, mqprio, taprio, multiq, cbs, etf), in one +// corpus directory, ws/tcswrite. +// +// tc's side is each kind's parse_qopt/parse_copt in tc/q_.c at +// v7.2.0, through 17's tc_qdisc_modify and tc_class_modify. The kernel's +// side is each net/sched/sch_.c init, change and class change. +// +// Each write is the captured command, its setup in Pre, and a readback +// (`tc -d qdisc show`, plus `tc -d class show` for classes) records what +// the kernel kept. The rows pin the plan's leads +// (docs/netlink/upstream/iproute2-tc-write.md, W27-W41): the ets priomap +// narrowed to u8 (W27), mqprio's summed queue pairs (W30), mode only after +// a nonzero hw (W31), invarg's rc 255 (W33), taprio's silent base-time +// break (W34), its messageless flags error (W35), map and queues dropped +// with no num_tc (W36), hfsc's 32-bit convex d (W39) and unchecked concave +// m1 (W40), and its unchecked curve repeats and double error (W41). The +// leads where tc overruns memory or crashes (W26, W28, W29, W38) are unit +// rows only: their captures would hold stack bytes or a core. +// +// multiq, mqprio and taprio need a multiqueue device: d1 has 8 tx queues. +// taprio's base-time is fixed in the past, so its schedule is the same on +// every run. Writes are plain only. Determinism: explicit handles, fixed +// MACs, no packets. + +// tcSwriteModules are the qdisc modules the rows use. +var tcSwriteModules = []string{ + "sch_cbs", "sch_drr", "sch_etf", "sch_ets", "sch_hfsc", "sch_mqprio", "sch_multiq", "sch_qfq", "sch_taprio", +} + +// tcSwriteDevs are the dummies every row has: d0 with one queue, d1 with 8. +var tcSwriteDevs = []string{tcDummies("d0", "d1/8")} + +// tcSwritePre is the dummies plus setup lines. +func tcSwritePre(lines ...string) []string { + return append(append([]string{}, tcSwriteDevs...), lines...) +} + +// tcSwriteTaprio is the head of every taprio add on d1. +const tcSwriteTaprio = "taprio num_tc 2 map 0 0 1 1 queues 4@0 4@4" + +// tcSwriteMq is mqprio's head, in software mode unless a row says hw 1. +const tcSwriteMq = "mqprio num_tc 2 map 0 0 1 1 queues 4@0 4@4" + +// tcSwriteSched is taprio's fixed schedule: a past base-time, two entries. +const tcSwriteSched = "base-time 1000000000 sched-entry S 01 300000 sched-entry S 02 200000" + +// tcSwriteQdisc is one qdisc kind's add bodies (after "root handle 1:") +// on its device, and whether change and replace succeed. A kind with no +// kernel change op (mqprio, etf) refuses them only when options are sent +// (K46): drr, qfq and multiq send none, so theirs succeed. +type tcSwriteQdisc struct { + name string + dev string + body []string + change bool +} + +// tcSwriteKinds are each kind's add bodies, each documented option at +// least once. +var tcSwriteKinds = []tcSwriteQdisc{ + {"drr", "d0", []string{"drr"}, true}, + {"qfq", "d0", []string{"qfq"}, true}, + {"multiq", "d1", []string{"multiq"}, true}, + {"hfsc", "d0", []string{"hfsc", "hfsc default 10"}, true}, + {"ets", "d0", []string{ + "ets bands 3 strict 1 quanta 1500 3000 priomap 2 1 0", + "ets strict 3", + "ets quanta 1000 2000", + "ets bands 4 strict 2 priomap 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0", + }, true}, + {"mqprio", "d1", []string{tcSwriteMq + " hw 0"}, false}, + {"taprio", "d1", []string{ + tcSwriteTaprio + " " + tcSwriteSched + " clockid CLOCK_TAI", + tcSwriteTaprio + " " + tcSwriteSched + " cycle-time 600000 cycle-time-extension 1000 clockid CLOCK_TAI", + tcSwriteTaprio + " base-time 1000000000 sched-entry S 01 300000 flags 0x1 txtime-delay 200000 clockid CLOCK_TAI", + tcSwriteTaprio + " base-time 1000000000 sched-entry H 01 300000 sched-entry R 02 200000 max-sdu 0 0 clockid CLOCK_TAI", + }, true}, + {"cbs", "d0", []string{ + "cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470", + "cbs idleslope 1000 sendslope -999000 hicredit 10 locredit -20 offload 0", + }, true}, + {"etf", "d0", []string{ + "etf clockid CLOCK_TAI", + "etf clockid CLOCK_TAI delta 300000 skip_sock_check", + "etf clockid CLOCK_TAI delta 300000 deadline_mode", + "etf clockid CLOCK_TAI delta 200000 deadline_mode skip_sock_check", + }, false}, +} + +// tcSwriteClass is a classful kind's class bodies (after the kind word's +// classid), under its qdisc on d0. +var tcSwriteClasses = []struct { + name string + qdisc string + body []string +}{ + {"drr", "drr", []string{"drr", "drr quantum 1514", "drr quantum 9k"}}, + {"qfq", "qfq", []string{"qfq", "qfq weight 30 maxpkt 9000", "qfq weight 1"}}, + {"hfsc", "hfsc default 10", []string{ + "hfsc sc rate 10mbit ul rate 20mbit", + "hfsc rt m1 2mbit d 10ms m2 1mbit ls m2 3mbit", + "hfsc sc umax 1500 dmax 10ms rate 1mbit", + "hfsc rt umax 1500 dmax 50ms rate 10mbit", + "hfsc ls m1 0 d 5ms m2 2mbit ul m2 4mbit", + }}, +} + +// tcswriteSpace: the qdisc and class writes of the increment-15 kinds. +func tcswriteSpace() *space { + var cmds []value + rb := map[string][]readback{} + add := func(kind brKind, name, dev, words string, pre []string, class bool) { + val := bc(kind, name, words, pre) + cmds = append(cmds, val) + r := []readback{{Name: "dump", Cmd: "tc -d qdisc show dev " + dev}} + if class { + r = append(r, readback{Name: "class", Cmd: "tc -d class show dev " + dev}) + } + rb[val.Name] = r + } + // A kind with no kernel change op gives EINVAL on a change or replace + // that carries options (K31, K46). + var verbBad []badValue + noChange := expect{RC: intp(2), Errno: "EINVAL", RefusedBy: refKernel} + for _, k := range tcSwriteKinds { + root := "dev " + k.dev + " root handle 1: " + for i, body := range k.body { + add(brPos, k.name+string(rune('0'+i)), k.dev, "qdisc add "+root+body, tcSwriteDevs, false) + } + pre := tcSwritePre("tc qdisc add " + root + k.body[0]) + last := k.body[len(k.body)-1] + for _, verb := range []string{"change", "replace"} { + words := "qdisc " + verb + " " + root + last + if !k.change { + verbBad = append(verbBad, brBad(k.name+"-"+verb, words, pre, noChange, + k.name+" has no change op: EINVAL, rc 2 (K31)")) + continue + } + add(brPos, k.name+"-"+verb, k.dev, words, pre, false) + } + add(brPos, k.name+"-delete", k.dev, "qdisc delete dev "+k.dev+" root", pre, false) + } + // Classes: each body added, then change, replace and delete of the first. + for _, c := range tcSwriteClasses { + qpre := tcSwritePre("tc qdisc add dev d0 root handle 1: " + c.qdisc) + for i, body := range c.body { + add(brPos, c.name+"-class"+string(rune('0'+i)), "d0", + "class add dev d0 parent 1: classid 1:10 "+body, qpre, true) + } + cpre := append(slices.Clone(qpre), "tc class add dev d0 parent 1: classid 1:10 "+c.body[0]) + last := c.body[len(c.body)-1] + add(brPos, c.name+"-class-change", "d0", "class change dev d0 parent 1: classid 1:10 "+last, cpre, true) + add(brPos, c.name+"-class-replace", "d0", "class replace dev d0 parent 1: classid 1:10 "+last, cpre, true) + add(brPos, c.name+"-class-delete", "d0", "class delete dev d0 classid 1:10", cpre, true) + } + etsPre := tcSwritePre("tc qdisc add dev d0 root handle 1: ets bands 3 strict 1") + add(brPos, "ets-class-change", "d0", "class change dev d0 classid 1:3 ets quantum 2000", etsPre, true) + add(brPos, "ets-class-replace", "d0", "class replace dev d0 classid 1:2 ets quantum 3000", etsPre, true) + // The plan's leads. + add(brBoundary, "w27-priomap", "d0", "qdisc add dev d0 root handle 1: ets bands 3 priomap 256 1 2", tcSwriteDevs, false) + add(brCorner, "w3-ets", "d0", "qdisc add dev d0 root handle 1: ets bands 0 bands 3", tcSwriteDevs, false) + add(brCorner, "w3-hfsc", "d0", "qdisc add dev d0 root handle 1: hfsc default 0 default 5", tcSwriteDevs, false) + add(brCorner, "w3-cbs", "d0", "qdisc add dev d0 root handle 1: cbs hicredit 0 hicredit 5", tcSwriteDevs, false) + add(brCorner, "w3-etf", "d0", "qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI delta 0 delta 5", tcSwriteDevs, false) + add(brCorner, "w3-taprio", "d1", + "qdisc add dev d1 root handle 1: "+tcSwriteTaprio+" sched-entry S 01 300000 cycle-time 0 cycle-time 600000 clockid CLOCK_TAI", + tcSwriteDevs, false) + hfscPre := tcSwritePre("tc qdisc add dev d0 root handle 1: hfsc") + add(brBoundary, "w39-umax", "d0", "class add dev d0 parent 1: classid 1:10 hfsc sc umax 5000 dmax 100ms rate 100mbit", hfscPre, true) + add(brBoundary, "w40-m1", "d0", "class add dev d0 parent 1: classid 1:10 hfsc rt umax 100000 dmax 1us rate 1kbit", hfscPre, true) + add(brCorner, "w41-repeat", "d0", "class add dev d0 parent 1: classid 1:10 hfsc rt m2 1mbit sc m2 2mbit", hfscPre, true) + // A batch: a qdisc and two classes. + cmds = append(cmds, + bb(brPos, "batch", "hfsc", "", false, batchFile( + "qdisc add dev d0 root handle 1: hfsc default 10", + "class add dev d0 parent 1: classid 1:1 hfsc sc rate 10mbit ul rate 20mbit", + "class add dev d0 parent 1:1 classid 1:10 hfsc rt m2 1mbit ls m2 1mbit"), tcSwriteDevs), + ) + rb[cmds[len(cmds)-1].Name] = []readback{{Name: "dump", Cmd: "tc -d qdisc show dev d0"}, {Name: "class", Cmd: "tc -d class show dev d0"}} + + tool1 := expect{RC: intp(1), RefusedBy: refIproute2} + invarg := expect{RC: intp(255), RefusedBy: refIproute2} + kEINVAL := expect{RC: intp(2), Errno: "EINVAL", RefusedBy: refKernel} + drrPre := tcSwritePre("tc qdisc add dev d0 root handle 1: drr") + bad := slices.Concat([]badValue{ + brBad("drr-bogus", "qdisc add dev d0 root handle 1: drr bogus", tcSwriteDevs, tool1, "What is \"bogus\"?, rc 1 (W4)"), + brBad("drr-q0", "class add dev d0 parent 1: classid 1:10 drr quantum 0", drrPre, kEINVAL, + "the kernel refuses a zero quantum"), + brBad("drr-cbogus", "class add dev d0 parent 1: classid 1:10 drr bogus", drrPre, tool1, "class usage, rc 1"), + brBad("qfq-weight", "class add dev d0 parent 1: classid 1:10 qfq weight zz", + tcSwritePre("tc qdisc add dev d0 root handle 1: qfq"), tool1, "Illegal \"weight\", rc 1"), + brBad("multiq-bands", "qdisc add dev d1 root handle 1: multiq bands 4", tcSwriteDevs, tool1, + "multiq takes no options (K27), rc 1"), + brBad("multiq-class", "class add dev d1 parent 1: classid 1:1 multiq", + tcSwritePre("tc qdisc add dev d1 root handle 1: multiq"), tool1, "multiq is classless, rc 1"), + brBad("w41-twoerr", "class add dev d0 parent 1: classid 1:10 hfsc rt m1 bogus m2 1mbit", hfscPre, tool1, + "a failed sc1 is retried as sc2: two errors (W41)"), + brBad("w16-m2", "class add dev d0 parent 1: classid 1:10 hfsc rt m2 40gbit", hfscPre, tool1, + "hfsc rates are 32-bit (W16)"), + brBad("w9-pct", "class add dev d0 parent 1: classid 1:10 hfsc ls m2 10%", hfscPre, tool1, + "a percent rate on a dummy with no speed (W9)"), + brBad("hfsc-bogus", "class add dev d0 parent 1: classid 1:10 hfsc bogus", hfscPre, tool1, "hfsc usage, rc 1"), + brBad("ets-cover", "qdisc add dev d0 root handle 1: ets bands 2 quanta 1 2 3", tcSwriteDevs, tool1, + "not enough bands for the quanta"), + brBad("ets-oob", "qdisc add dev d0 root handle 1: ets bands 2 priomap 2", tcSwriteDevs, tool1, + "a priomap band out of bounds"), + brBad("ets-none", "qdisc add dev d0 root handle 1: ets", tcSwriteDevs, tool1, "no bands, quanta or strict"), + brBad("ets-strictq", "class change dev d0 classid 1:1 ets quantum 2000", etsPre, kEINVAL, + "a strict band has no quantum"), + brBad("mq-nohw", "qdisc add dev d1 root handle 1: "+tcSwriteMq, tcSwriteDevs, kEINVAL, + "hw defaults to 1: a dummy has no offload"), + brBad("w33-bogus", "qdisc add dev d1 root handle 1: mqprio bogus", tcSwriteDevs, invarg, + "an unknown word goes to invarg: rc 255 (W33)"), + brBad("mq-numtc", "qdisc add dev d1 root handle 1: mqprio num_tc x", tcSwriteDevs, tool1, + "Illegal \"num_tc\", rc 1 (W33's contrast)"), + brBad("w31-hw-first", "qdisc add dev d1 root handle 1: "+tcSwriteMq+" hw 0 mode channel", tcSwriteDevs, invarg, + "mode after hw 0 is unknown: rc 255 (W31)"), + brBad("w31-mode-first", "qdisc add dev d1 root handle 1: "+tcSwriteMq+" mode channel hw 0", tcSwriteDevs, kEINVAL, + "mode before hw 0 is sent: the kernel's EINVAL (W31)"), + brBad("w30-queues", "qdisc add dev d1 root handle 1: "+tcSwriteMq+" queues 4@0 4@4 hw 0", tcSwriteDevs, tool1, + "queues twice sums the pair count (W30)"), + brBad("mq-fp", "qdisc add dev d1 root handle 1: "+tcSwriteMq+" fp E P hw 0", tcSwriteDevs, kEINVAL, + "fp needs hardware mode"), + brBad("w32-rates", "qdisc add dev d1 root handle 1: "+tcSwriteMq+" mode channel shaper bw_rlimit min_rate 1mbit hw 1", + tcSwriteDevs, kEINVAL, "one min_rate for two classes is sent (W32)"), + brBad("mq-rates", "qdisc add dev d1 root handle 1: "+tcSwriteMq+" mode channel shaper bw_rlimit min_rate 1mbit 2mbit max_rate 5mbit 6mbit hw 1", + tcSwriteDevs, kEINVAL, "rates need hardware offload"), + brBad("taprio-sq", "qdisc add dev d0 root handle 1: taprio num_tc 2 map 0 0 1 1 queues 1@0 1@0 "+tcSwriteSched+" clockid CLOCK_TAI", + tcSwriteDevs, expect{RC: intp(2), Errno: "ENOTSUP", RefusedBy: refKernel}, "taprio needs a multiqueue device"), + brBad("w34-basetime", "qdisc add dev d1 root handle 1: "+tcSwriteTaprio+" base-time zz sched-entry S 01 300000 clockid CLOCK_TAI", + tcSwriteDevs, kEINVAL, "a bad base-time ends the parse silently: no entries sent (W34)"), + brBad("w34-cycle", "qdisc add dev d1 root handle 1: "+tcSwriteTaprio+" cycle-time zz sched-entry S 01 300000 clockid CLOCK_TAI", + tcSwriteDevs, kEINVAL, "a bad cycle-time ends the parse silently (W34)"), + brBad("w35-flags", "qdisc add dev d1 root handle 1: "+tcSwriteTaprio+" sched-entry S 01 300000 flags zz clockid CLOCK_TAI", + tcSwriteDevs, tool1, "a bad flags value: rc 1, no message (W35)"), + brBad("w35-unknown", "qdisc add dev d1 root handle 1: taprio bogus", tcSwriteDevs, tool1, + "a bare \"Unknown argument\" (W35)"), + brBad("w36-nonumtc", "qdisc add dev d1 root handle 1: taprio map 0 1 queues 1@0 sched-entry S 01 300000 clockid CLOCK_TAI", + tcSwriteDevs, kEINVAL, "map and queues dropped with no num_tc (W36)"), + brBad("taprio-noclock", "qdisc add dev d1 root handle 1: "+tcSwriteTaprio+" sched-entry S 01 300000", tcSwriteDevs, kEINVAL, + "clockid is mandatory"), + brBad("taprio-sdu", "qdisc add dev d1 root handle 1: "+tcSwriteTaprio+" "+tcSwriteSched+" max-sdu 1500 0 clockid CLOCK_TAI", + tcSwriteDevs, expect{RC: intp(2), Errno: "ERANGE", RefusedBy: refKernel}, "max-sdu over the MTU"), + brBad("cbs-offload", "qdisc add dev d0 root handle 1: cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470 offload 1", + tcSwriteDevs, expect{RC: intp(2), Errno: "ENOTSUP", RefusedBy: refKernel}, "cbs offload on a dummy"), + brBad("cbs-bogus", "qdisc add dev d0 root handle 1: cbs bogus", tcSwriteDevs, tool1, "cbs: unknown parameter, rc 1"), + brBad("etf-offload", "qdisc add dev d0 root handle 1: etf clockid CLOCK_TAI offload", tcSwriteDevs, + expect{RC: intp(2), Errno: "ENOTSUP", RefusedBy: refKernel}, "etf offload on a dummy"), + brBad("etf-clock", "qdisc add dev d0 root handle 1: etf clockid BOGUS", tcSwriteDevs, tool1, "a bad clockid, rc 1"), + }, verbBad) + sp := &space{ + Name: "tcswrite", + Axes: []axis{{Name: "opt", Values: []value{v("plain", "", f("json", "0"))}}, {Name: "cmd", Values: cmds}}, + Bad: bad, + } + sp.NegBase = func([]value) bool { return true } + sp.Build = func(vals []value) row { + r := tcBuildMods(tcSwriteModules, vals) + r.Readback = rb[vals[len(vals)-1].Name] + return r + } + return sp +} + +// tcSwriteWords is a write row's words, for tests. +func tcSwriteWords(r row) string { return strings.TrimPrefix(r.Cmd, "tc ") } diff --git a/tools/nlcapgen/matrix_tcswrite_test.go b/tools/nlcapgen/matrix_tcswrite_test.go new file mode 100644 index 000000000..0523af908 --- /dev/null +++ b/tools/nlcapgen/matrix_tcswrite_test.go @@ -0,0 +1,136 @@ +package main + +import ( + "bytes" + "strings" + "testing" +) + +// TestTcSwriteSpace pins the scheduler write rows (gotc 18C): every +// increment-15 kind's add bodies, change, replace and delete on each, the +// classful kinds' classes, the leads, a batch and the refusals. +// +// go test ./tools/nlcapgen/ -run TestTcSwriteSpace +func TestTcSwriteSpace(t *testing.T) { + rows, err := matrixRows(families["tcswrite"](), matrixOpts{Seed: 1}) + if err != nil { + t.Fatal(err) + } + if err := checkRows(rows); err != nil { + t.Fatal(err) + } + if len(rows) != 114 { + t.Errorf("%d rows, want 114 (69 commands plain, 45 negatives)", len(rows)) + } + byCmd := map[string]row{} + for _, r := range rows { + if !strings.HasPrefix(r.ID, "tcswrite/") { + t.Errorf("%s: not in tcswrite/", r.ID) + } + if r.InitNS || r.Serial || r.Proto != "route" { + t.Errorf("%s: initns %t serial %t proto %q", r.ID, r.InitNS, r.Serial, r.Proto) + } + for _, m := range r.Modules { + if !tdcGuestModules[m] { + t.Errorf("%s: module %s is not one the guest has", r.ID, m) + } + } + // Every write targets d0 or d1, made in the row's own namespace. + if w := tcSwriteWords(r); strings.Contains(w, "dev lo") || strings.Contains(r.Cmd, "-netns") { + t.Errorf("%s: writes outside its dummies: %q", r.ID, r.Cmd) + } + if r.Expect.RefusedBy == refNone && len(r.Readback) == 0 { + t.Errorf("%s: a positive write with no readback", r.ID) + } + k := r.Cmd + "|" + r.Axes["fix"] + if _, dup := byCmd[k]; dup { + t.Errorf("%s: %q twice", r.ID, k) + } + byCmd[k] = r + } + has := func(sub string) bool { + for _, r := range rows { + if strings.Contains(r.Cmd, sub) { + return true + } + } + return false + } + + tests := []struct { + description string + sub string // a substring some row's command holds + expected bool + }{ + {"positive: drr class quantum", "drr quantum 1514", true}, + {"positive: qfq class weight and maxpkt", "qfq weight 30 maxpkt 9000", true}, + {"positive: multiq", "root handle 1: multiq", true}, + {"positive: hfsc default", "root handle 1: hfsc default 10", true}, + {"positive: hfsc m1 d m2", "rt m1 2mbit d 10ms m2 1mbit", true}, + {"positive: hfsc umax dmax rate", "sc umax 1500 dmax 10ms rate 1mbit", true}, + {"positive: ets quanta and priomap", "ets bands 3 strict 1 quanta 1500 3000 priomap 2 1 0", true}, + {"positive: ets class quantum", "ets quantum 2000", true}, + {"positive: mqprio software", "queues 4@0 4@4 hw 0", true}, + {"positive: taprio cycle-time-extension", "cycle-time-extension 1000", true}, + {"positive: taprio txtime-assist", "flags 0x1 txtime-delay 200000", true}, + {"positive: taprio H and R entries", "sched-entry H 01 300000 sched-entry R 02", true}, + {"positive: cbs", "cbs idleslope 20000 sendslope -980000", true}, + {"positive: etf deadline_mode", "deadline_mode", true}, + {"positive: delete", "qdisc delete dev d1 root", true}, + {"positive: class delete", "class delete dev d0 classid 1:10", true}, + {"lead: W27 priomap 256", "priomap 256 1 2", true}, + {"lead: W30 queues twice", "queues 4@0 4@4 queues 4@0 4@4", true}, + {"lead: W31 hw before mode", "hw 0 mode channel", true}, + {"lead: W31 mode before hw", "mode channel hw 0", true}, + {"lead: W32 one min_rate", "min_rate 1mbit hw 1", true}, + {"lead: W33 invarg", "mqprio bogus", true}, + {"lead: W34 base-time", "base-time zz", true}, + {"lead: W35 flags", "flags zz", true}, + {"lead: W36 no num_tc", "taprio map 0 1 queues 1@0", true}, + {"lead: W39 umax wrap", "umax 5000 dmax 100ms", true}, + {"lead: W40 concave m1", "umax 100000 dmax 1us", true}, + {"lead: W41 two errors", "rt m1 bogus m2 1mbit", true}, + {"lead: W41 curve repeat", "rt m2 1mbit sc m2 2mbit", true}, + {"lead: W3 ets bands 0", "ets bands 0 bands 3", true}, + {"boundary: hfsc 32-bit rate", "rt m2 40gbit", true}, + {"corner: K46 drr change without options", "qdisc change dev d0 root handle 1: drr", true}, + {"negative: W26 17 quanta are not captured", "quanta 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1", false}, + {"negative: W38 hfsc rate 0 is not captured", "rate 0", false}, + {"negative: no show command is captured", "qdisc show", false}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + if got := has(tc.sub); got != tc.expected { + t.Errorf("a row with %q: %t, want %t", tc.sub, got, tc.expected) + } + }) + } + + // Every kind has add, change, replace and delete. + fixes := map[string]bool{} + for _, r := range rows { + fixes[r.Axes["fix"]] = true + } + for _, k := range tcSwriteKinds { + for _, verb := range []string{"0", "-change", "-replace", "-delete"} { + if !fixes[k.name+verb] { + t.Errorf("%s has no %s row", k.name, verb) + } + } + } + + // Generation is deterministic. + var a, b bytes.Buffer + for i, buf := range []*bytes.Buffer{&a, &b} { + rs, err := matrixRows(families["tcswrite"](), matrixOpts{Seed: 1}) + if err != nil { + t.Fatalf("run %d: %v", i, err) + } + if err := writeRows(buf, nil, rs); err != nil { + t.Fatal(err) + } + } + if !bytes.Equal(a.Bytes(), b.Bytes()) { + t.Error("two generations differ") + } +}