Repository navigation
gotc: tc qdisc and class writes, dry-run (increment 17); tnlsys tracer split - #356
Merged
Merged
Conversation
…tc 17C) 125 rows: every add body of the increment-9 root kinds with change, replace, link and delete on each, ingress and clsact, the common frame (parent, estimator, stab, prefixes) and htb classes, each write with a tc -d qdisc/class show readback; 25 refusals pinned by errno and rc. The first batch corrected the expectations: sfq and htb have no kernel qdisc change op (EINVAL), htb offload needs hw-tc-offload (ENOTSUP), W2 and W9 are confirmed, and the unknown-kind rows end at rc 1 rather than at W5's or W8's message. Two batches on one boot agree on every row (V037). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…units (gotc 17P) pkg/xtcpnl: an Append per slice-kind tc struct (round-trips through its decoder), and under gotc_write BuildTcWriteRequest, which lays out a qdisc or class write in tc_qdisc_modify's and tc_class_modify's order and matches tc's captured requests byte for byte. The write gate admits RTM_NEW/DELQDISC and RTM_NEW/DELTCLASS. internal/gotc: tc's rate, size, time, rtable, size-table and estimator code, every expected value from iproute2's own C; cDoubleToU64 now converts as gcc does. New leads W10-W14. nix: gotc_write is opt-in only, scanned, linted, kept out of the daemons, and has a focused test (V038). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gotc 17W) tc_qdisc_modify and tc_class_modify behind gotc_write, with parse_estimator, parse_size_table, get_percent_rate and the parse_qopt/parse_copt of pfifo, bfifo, pfifo_head_drop, prio, fq_codel, fq, htb, tbf, sfq, netem, ingress and clsact. A replay matches each request byte for byte; the kernel socket carries only GETs and writes go to GOTC_WRITE_OUT. All 125 tcqwrite rows replay exactly; 173 tdc writes match and 237 are refused by kind (V039). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…4-K45 (gotc 17B) Not submitted to netdev. All present at HEAD 35033e4713fe (DOC010). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lint) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gotc_write's GOTC_WRITE_OUT requests equal tc's byte for byte on every tcqwrite row (ifindex aside); output matches wherever tc stops before the kernel (V040). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…os/exec internal/tnlsys's Trace took an *exec.Cmd, so every importer of tnlsys linked os/exec. goip imports tnlsys and xtcp2 links goip, so the no-write-encoders check's no_exec proof failed on main. Trace now lives in internal/tnlsys/trace, which only cmd/tnlsnap imports. The helpers it shares with Live (KnownReq, MaxArg, IfNameSize, SpillFill, SpillOf) are exported, and TestTrace moved with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cStrtod returned erange=false for a hex float that overflowed to +Inf, so get_time and get_rate64 let 0x1p1024 through where tc rejects it: fq_codel target, netem delay and rate, and fq timer_slack sent a request instead of tc's Illegal "..." and rc 1. hexFloat now reports the overflow and cStrtod returns it, as the decimal path does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tcqwritecapture space, 125 rows (verbs × increment-9 kinds, common options, W leads, negatives).BuildTcQdiscWrite/BuildTcClassWrite, structAppendencoders, tc units parsers ported from tc_util/tc_core/tc_stab.tc qdisc/tc classwrites for pfifo, bfifo, pfifo_head_drop, prio, pfifo_fast, fq_codel, fq, htb, tbf, sfq, netem, ingress, clsact. Dry-run only, behind thegotc_writetag: replay sources compare requests byte for byte,GOTC_WRITE_OUTcaptures them, and anything else getsErrWriteNotApplied. Kinds from increments 15/16 are refused by name.upstream/iproute2-tc-write.md, W1–W25 (W7 dropped) and K44–K45. Recorded only, not sent to netdev.Tracemoved tointernal/tnlsys/trace, so the daemons no longer link os/exec. This fixes theno-write-encoderscheck, which was failing on main.Results
internal/gotc: 85.3%. All 8 planned mutants are killed.Test plan
go test ./...nix build .#checks.x86_64-linux.test-go-race🤖 Generated with Claude Code