Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
cee1f77
docs: rocm-ernic verification round 2
randomizedcoder Nov 26, 2026
5471ea9
test(localnet): egress follows the lowest-metric route (red)
randomizedcoder Nov 26, 2026
8310ea6
fix(localnet): egress follows the lowest-metric route
randomizedcoder Nov 26, 2026
d8658bc
test(nicinfo): pin how uplinks relate to route metrics
randomizedcoder Nov 26, 2026
f24959f
test(ernic): run-many lets servers finish shutdown; --pcap rows (red)
randomizedcoder Nov 26, 2026
568dfa4
feat(ernic): run-many waits for each server's clean shutdown; --pcap
randomizedcoder Nov 26, 2026
4b72240
test(ernic): ernic-oracle table check (red)
randomizedcoder Nov 26, 2026
ed8beea
feat(ernic): ernic-oracle, guest NIC counters vs the emulator's counts
randomizedcoder Nov 26, 2026
f20ac73
test(tools): tcp_client/tcp_server -keepalive (red)
randomizedcoder Nov 26, 2026
e306c17
feat(tools): tcp_client/tcp_server -keepalive
randomizedcoder Nov 26, 2026
3a5fce8
feat(golden): keep the emulator's fault counts and check them after t…
randomizedcoder Nov 26, 2026
4d5601f
test(golden): egress over two default routes follows the lower metric
randomizedcoder Nov 26, 2026
466550f
test(ernic): frame accounting in ernic-oracle; no snooping on the fab…
randomizedcoder Nov 26, 2026
78e9ad5
feat(ernic): exact frame accounting against xtcp2's TCP counters
randomizedcoder Nov 26, 2026
4c96771
test(golden): segs counters, quiescent row, strict no_noise, netem drops
randomizedcoder Nov 26, 2026
2e628e1
style(nix): nixfmt mkGoldenCaptureRunner
randomizedcoder Nov 26, 2026
3aef5c8
test(goldenrec): golden-ernic-c and -d are fault namespaces (red)
randomizedcoder Nov 26, 2026
f29067c
feat(goldenrec): the sequence-pattern ernic flow's namespaces are fau…
randomizedcoder Nov 26, 2026
9bc0fda
feat(golden): one cubic flow through a fixed rocm-ernic drop sequence
randomizedcoder Nov 26, 2026
607f1dd
docs: rocm-ernic verification round 2 status, nix README, changelog
randomizedcoder Nov 26, 2026
c1316ec
test(golden): assert no RTO on the sequence flow (0 in six of six cap…
randomizedcoder Nov 26, 2026
1b5bcce
test(golden): recapture 7_3_1 with the second ionic pair and golden-m…
randomizedcoder Nov 26, 2026
1b84ee7
docs(ernic-tests): capture results and the keepalive-probe diff flake
randomizedcoder Nov 26, 2026
af7bbd1
test(golden): print the kernel's segs_out sum beside xtcp2's for ionic0
randomizedcoder Nov 26, 2026
dff6e3d
fix(golden): ernic clients wait 30 s to connect, so a dropped SYN is …
randomizedcoder Nov 26, 2026
cb0c83b
docs(ernic-tests): the dropped SYN, the netem loss_seen evidence, val…
randomizedcoder Nov 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@
- **Socket options on the traffic tools.** `tcp_client` and `tcp_server` take `-cong`, `-tos`, `-priority`, `-rcvbuf`, `-freebind`, `-transparent` and `-bindNoPort`, and `tcp_client` takes `-bulk`, `-close` and `-halfclose` (`tcp_server -holdEOF` holds the other end), so a test workload can give the collector sockets with a chosen congestion algorithm, TOS, class_id, window scale, sockopt bits and TCP state. The OCI image passes `TCP_CLIENT_ARGS` / `TCP_SERVER_ARGS` through ([integration testing](docs/integration-testing.md#tcp_server--tcp_client--socket-population)).
- **Golden records cover the fleet's columns.** The capture workload adds four netns pairs: one connection per congestion algorithm the kernel offers (IPv4 and IPv6; every `tcp_*` module is loaded), bulk transfers over netem loss and reordering, TOS/traffic class, priority, the sockopt bits and three window scales, and TIME_WAIT, SYN_SENT, FIN_WAIT2 and CLOSE_WAIT sockets in exact numbers. Three MTUs give three pmtu/MSS pairs. `coverage.json` requires the per-algorithm info structs, the loss counters, the new states and values, and every algorithm in the capture's `cong_available`. `ROW` lines on the VM console check each pair ([Golden records](nix/README.md#golden-records)).
- **Golden records cover NICs, locality and ASN.** The capture VM gains a second uplink (an emulated e1000e) and a 10000 Mb/s virtio NIC, and the collector enriches locality and ASN against an artifact built from documentation prefixes. A netns trio gives one connection per locality (self, subnet, remote over IPv4 and IPv6). `coverage.json` requires the uplink 2 columns, the NIC speeds, localities 1–3, the ASN, owner and egress columns, and the bound interface name.
- **Golden records check the emulated NICs against xtcp2.** After a capture, the runner stops the rocm-ernic servers cleanly and `ernic-oracle` (`checks.ernic-oracle`) compares their own fault counts with the guest's NIC counters. It also compares the frames each NIC sent or delivered with the `tcp_info_segs_out` and `segs_in` xtcp2 recorded, which must be exactly equal. A third and fourth ionic NIC carry one cubic flow through a fixed drop sequence (12 drops). The ernic transfers turn TCP keepalive off (new `-keepalive` flag on `tcp_client` and `tcp_server`), and the emulator's bridges turn multicast snooping off, so no frame outside the transfers reaches the counters. `ernic-run-many --pcap IFNAME` records a fabric interface ([design](docs/design-rocm-ernic-tests.md)).
- **Golden records on an emulated ionic NIC.** The capture VM's uplink 1 is now an AMD Pensando ionic NIC emulated by [rocm-ernic](https://github.com/ROCm/rocm-ernic) over vfio-user (PCI 1dd8:1002, 100000 Mb/s, firmware from an xtcp2 NIC profile); e1000e stays uplink 2 and virtio is kept for management. The `rocm-ernic` input now pins upstream `ROCm/rocm-ernic` by rev and narHash, recorded in `nix/upstream-pins.json` and checked by `checks.ernic-pin` and `checks.upstream-pins`. `nix/ernic/` describes NICs as data (`checks.ernic-nics`) and runs one server per NIC with `ernic-run-many` (`checks.ernic-run-many`). A second ionic NIC in netns `golden-ernic-b` carries one 4 MiB transfer per bulk algorithm with the emulator's deterministic drops (every 50th frame); `ROW` lines check the drop count exactly, and `xtcp2-golden diff` treats those rows like the netem pair's (`Options.FaultNetns`, `FaultEgress`). Listener drops, `rqueue` and receive memory are no longer compared on lossy rows ([design](docs/design-rocm-ernic-nics.md)).
- **Vulnerability check.** `checks.govulncheck` runs govulncheck against a pinned snapshot of the Go vulnerability database, with no tags and with every flavor tag, and fails on a reachable finding not in its accepted list. One is accepted: GO-2026-6859 in `net/http`, fixed in go1.27.4, until the toolchain moves. `nix run .#govulncheck-fresh` checks against the live database and runs `go mod verify`; `nix build .#sbom-<binary>` writes a CycloneDX SBOM for any binary package.

### Fixes

- **Egress follows the lowest route metric.** With two routes for the same prefix, `enrich_socket_dest_egress_ifname` named the one listed last, which the kernel lists by ascending metric, so it was the highest-metric route. That is the one the kernel uses last. The lowest metric now wins, and on a tie the first route listed, as in the kernel's lookup.
- **Congestion names are matched whole.** `inet_diag_cong_enum` came from the first three letters, so `dctcp-reno` (DCTCP's fallback when ECN isn't negotiated) read as DCTCP and any name starting `cub` as CUBIC. Names now match exactly: `dctcp-reno` and look-alikes are UNSPECIFIED with their name kept, `bbr1` is BBR1, and `prague` gets its enum. A 2-letter name (`nv`, `lp`) without NLA padding is accepted (the minimum was 4 bytes). The in-tree names are now constants, so decoding them no longer allocates.
- **`nsid` 0 is no longer ambiguous.** The kernel's first namespace id is 0, which read the same as "no id" and as `-populateNsid` off; Docker gives its containers ids 0, 1, 2… in creation order, so one container per host had the ambiguous 0. New column `nsid_assigned` (proto tag 33, a free slot, so no record epoch bump) is true exactly when `nsid` holds an assigned id: filter on it, not on `nsid != 0`. Existing ClickHouse deployments add it with `build/containers/clickhouse/sql/migrations/nsid-assigned.sql`; rows from older daemons read false. The CSV/TSV default columns gain it after `nsid`, shifting the later columns by one. Golden records compare `nsid` again, numbered like the other ids.
- **Socket addresses could belong to another socket.** The decoder kept the source and destination as slices of the netlink receive buffer. That buffer goes back to the pool once its packet is decoded and is reused for later packets, while the record waits for the poll's flush. So in any namespace whose dump took more than one packet, earlier records could carry later bytes. Records now own a copy. A recycled record reuses its copy; only a new record allocates, one 32-byte array. The microVM `tcp-families` check found it: `AF_INET` rows carried `AF_INET6` addresses.
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ See **[CONTRIBUTING.md](../CONTRIBUTING.md)** for the development environment, t
- [Fleet jitter & upload backoff](design-jitter-and-backoff.md) — thundering-herd avoidance: poll jitter, jittered S3 flush (size + time), and jittered proportional upload retry, for fleet-scale (5–10k machine) deployments.
- [The link monitor in xtcp2](design-linkmonitor-in-xtcp2.md) — go-link-monitor's features inside xtcp2, on by default: the persisted expected up-link count in `/var/lib/xtcp2`, the detail paths on the Prometheus listener, the lifecycle under xtcp2's context, SIGUSR1/reload, and the degrade-not-exit failure mode; progress in its [status doc](status-linkmonitor-in-xtcp2.md).
- [rocm-ernic NICs in the VMs](design-rocm-ernic-nics.md) — plan: pin the emulated ionic NIC to upstream rocm-ernic by rev and narHash, one data-driven nix layer for ernic NICs, and VMs with virtio, e1000e and ionic NICs together (the golden uplinks first).
- [rocm-ernic verification, round 2](design-rocm-ernic-tests.md) — plan: the emulator's fault counts as an exact witness for guest counters and xtcp2's TCP segment counters, the egress-by-metric fix, the two capture flakes, and the uplink corner cases.
- [Summary metrics](design-summary-metrics.md) — proposed 15-series `/metrics` (a self-computed `xtcp2_healthy` gauge plus throughput, delivery, error and resource counters, destination-generic) with full detail moved to `/metrics-all`, plus follow-ups found reviewing the fleet dashboard.
- [Namespace discovery & reconciliation](design-namespace-discovery-and-reconcile.md) — design history and discovery analysis; the [namespace guide](network-namespaces.md) describes current combined `/proc`/bind-mount discovery and pre-poll/background reconciliation.
- [Investigations](investigations/) — write-ups of production problems with evidence, hypotheses and reproduction plans; currently [records dropped after the poll-end flush](investigations/envelope-post-flush-drop.md) (~19% of prod records).
Expand Down
Loading