Repository navigation
feat(nix): rocm-ernic pinned upstream, nix/ernic layer, ionic NICs in the golden VM - #335
Merged
Merged
Conversation
How xtcp2 uses the emulated ionic NIC today, the plan to pin ROCm/rocm-ernic by rev and narHash, a data-driven nix layer for ernic NICs, and VMs carrying virtio, e1000e and ionic NICs together. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rows over the real files and edited copies: the input must be ROCm/rocm-ernic with one rev and one narHash in flake.nix, flake.lock and nix/upstream-pins.json. Red: nix/lib/ernic-pin.nix does not exist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- flake.nix declares github:ROCm/rocm-ernic at bd902345 with its narHash (was the fork's xtcp2-integration branch; every feature it carried is now upstream) - nix/ernic: one attrset (server, run, rdmaErrors, guestModule, profiles); the ionic checks take it instead of reaching into the input - nix/lib/ernic-pin.nix: flake.nix, flake.lock and upstream-pins.json must agree on rev and narHash and name ROCm/rocm-ernic; used by checks.ernic-pin and checks.upstream-pins - upstream-pins.json: rocm-ernic on develop, for check-upstream-pins Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rows for nix/ernic/nics.nix: the JSON vfio-user-pci device with a relative socket, server args in order, guest .link/.network by MAC, unique names/slots/MACs, ifname rules, empty and unmanaged NICs, and bridges. Red: nics.nix does not exist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
problems, qemuArgs (JSON vfio-user-pci with a relative socket, since microvm.nix escapes extraArgs), serverArgs, bridges and guestConfig (ionic driver, .link by permanent MAC, .network with no link-local, DHCP or LLDP so fault counters see only the workload). checks.ernic-nics is green. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rows: every socket before the command, exit status and cwd, early and late server exits, a stale socket, no NICs, TERM cleanup, and the command staying in the caller's netns. Red: run-many.nix does not exist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- run-many.nix: one rocm-ernic server per NIC around a command, in an unprivileged user+net namespace with TAPs, bridges and permanent neighbors when any NIC has a TAP; the command (QEMU) stays in the caller's namespace and runs in --dir, where the relative sockets are - fails on a server exit before its socket or during the command, and stops everything on EXIT/INT/TERM - profiles/golden-uplink.ini: fixed fw_version and 100G, 2 eth queues - nix/ernic exports nics, runMany and ownProfiles - the T2 fake now parses relative sockets, and its rows tolerate errexit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A NIC with network = null must get an Unmanaged .network, or NixOS's 99-ethernet-default-dhcp runs DHCP on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
checks.ernic-nics is green again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
uplink1_ionic (ionic0, ionic, 1dd8:1002, bus set), virtio_not_uplink, nic_speed now 100000/1000, and fw_from_profile. Red until the golden VM carries the rocm-ernic NIC. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A SYN retransmitted after netem drops the SYN-ACK reaches the pending request socket; tcp_check_req resends the SYN-ACK and the segment is counted as a drop on the listener (net/ipv4/tcp_ipv4.c tcp_v4_rcv, discard_and_relse). One of two captures showed it on golden-bulk-b. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One capture saw 3 of 4 bulk clients with retransmits; the row now names each client's algorithm and count so a repeat shows which one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ionic0 (golden-uplink.ini: 100000 Mb/s, fw xtcp2-golden-1.0) is uplink 1 at route metric 512; e1000e stays uplink 2 at 2048; virtio keeps SLiRP for management at 4096, so it is no longer an uplink. - ionic1 shares br-ernic with ionic0 in ernic-run-many's user + network namespace (unmanaged for now); QEMU stays in the caller's namespace. - The golden runner starts microvm-run under ernic-run-many-golden in $STAGE/ernic, so the relative vfio-user socket paths resolve there. - coverage.json: uplink1 ionic, 7640/4098, 100000 Mb/s, fw populated (scrubbed as host identity; the guest's fw_from_profile row checks the value). 7_3_1 recaptured; two captures diff clean, 28 ROWs PASS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ernic_loss, ernic_egress, fault_count and no_noise check a 4 MiB echo per BULK_CC algorithm from the root namespace to golden-ernic-b over ionic0, whose emulator drops every 50th transmitted frame (ionic1 every 64th received). The faults are in golden-ernic.nix; the workload is not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The golden capture saw ionic0 send 5 IGMP reports before any transfer: systemd-resolved joins 224.0.0.252 (LLMNR) on every link with an address, and the reports land on the emulator's fault counters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ionic1 moves into golden-ernic-b (10.0.4.16-17); one 4 MiB echo per BULK_CC algorithm runs from the root namespace over ionic0, whose emulator drops every 50th transmitted frame (ionic1 every 64th received). - Static neighbors, IPv6 off and segmentation offloads off on both ends, and IPv6 off in ernic-run-many's fabric namespace, so each drop is one MTU frame and nothing but the transfers reaches the fault counters. - ROW fixes: root rows are netns 'default'; the emulator's tx events are tx_packets + tx_dropped (290 of 14512 = every 50th, exactly); golden-ernic-b has an nsid since ionic1 moved there from the root. - The workload logs ionic0's counters and groups before it touches it (GOLDEN_ERNIC_BEFORE), which found the LLMNR IGMP reports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rows in golden-ernic-b, or out of ionic0, carry rocm-ernic's injected drops. Five captures show their retransmit and recovery counters flip between runs, as netem's do, plus the servers' retransmits (the drops are of ACKs, so a server retransmits only on an RTO). rqueue also moved on a netem and an ionic row: echoed bytes still unread at the poll. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rows in golden-ernic-b or out of ionic0 skip the lossyColumns plus the servers' retransmit counters (Options.FaultNetns/FaultEgress); rqueue and receive memory join lossyColumns. Captures 3-5 of five then diff clean pairwise; capture 2 differs only on a netem flow that saw no loss. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- timesyncd off in the golden VM with ernic: the default route is ionic0's, and its NTP polls (with the gateway ARP) landed on the fault counters in 3 of 5 captures. - no_noise requires ionic0's transmit site at 0 and reports ionic1's receive count: one capture in five saw one frame reach ionic1 from the fabric before the transfers. - golden-loc-a pings each hop before dialing: a SYN waiting on neighbor discovery at golden-loc-b was retransmitted in one capture. - loss_seen prints each client's state, segs_out and bytes_acked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three captures of the final tree: 32 ROWs PASS each, pairwise diff clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Implements
docs/design-rocm-ernic-nics.mdphases 0–4: rocm-ernic pinned to upstream, a modularnix/ernic/layer, and the golden-record VM carrying ionic NICs beside its virtio and e1000e NICs.Pin
rocm-ernicnow pins upstreamROCm/rocm-ernic@bd902345(develop, #600) by rev and narHash; every fork feature xtcp2 used is upstream.nix/upstream-pins.jsonrecords it;checks.ernic-pin(table test) andchecks.upstream-pinsrequire manifest,flake.nixandflake.lockto agree.vm-linkmonitor-ionic,-ionic-faultsandrdmapass unchanged on the upstream pin.nix/ernic/default.nix: one attrset (server, run, runMany, guestModule, profiles, nics) imported once innix/default.nix.nics.nix: NICs as data → QEMUvfio-user-pciargs (relative sockets), server args, guest.link/.network(no IPv6 RA, LLDP, LLMNR or mDNS).checks.ernic-nics.run-many.nix→ernic-run-many: one server per NIC, TAPs and a bridge in an unprivileged user + net namespace; the command stays in the caller's namespace.checks.ernic-run-manywith a fake server.profiles/golden-uplink.ini: 100000 Mb/s, fwxtcp2-golden-1.0, 2 eth queues.Golden VM (phase 3)
coverage.jsonrequires uplink1 ionic 7640/4098, 100000 Mb/s and fw populated;7_3_1recaptured.Deterministic loss over ionic (phase 4)
golden-ernic-b; one 4 MiB echo per bulk algorithm over ionic0, whose emulator drops every 50th transmitted frame (ionic1 every 64th received).ernic_loss,ernic_egress,fault_count(drops = (tx_packets + tx_dropped) / 50, exact in every capture),no_noise.lossyColumns; ionic rows are fault rows inxtcp2-golden diff(Options.FaultNetns/FaultEgress).Also
lossyColumnsgains listener drops (SYN retransmitted after netem drops the SYN-ACK;net/ipv4/tcp_ipv4.cdiscard_and_relse),rqueueand receive memory.Red first
checks.ernic-pin,ernic-nics,ernic-run-many: failed to evaluate before their implementations; the LLMNR row:attribute 'LLMNR' missing.uplink1_ionic FAIL ens4,virtio_net,6900,1,virtio_not_uplink FAIL 170 rows,nic_speed FAIL 10000,1000,fw_from_profile FAIL(empty); other 24 PASS.ernic_loss FAIL 0 of 4,ernic_egress FAIL 0:,fault_count FAIL tx_dropped 0,no_noise FAIL missing; other 28 PASS.TestLossyColumns/TestFaultColumns/TestDifffault rows: failed to compile beforediff.go.Verification
xtcp2-golden diffexit 0;xtcp2-golden checkpasses.go test ./...; checks gofmt, go-vet, nix-fmt, lint-baseline, golangci ×3, redteam-lint, golden-records, test-fuzz-all, ernic-pin, ernic-nics, ernic-run-many, upstream-pins: all pass.Open (in the doc's Status)
loss_seenoccasionally fails; seen before any ernic workload.loss_seennow prints per-client state/segments/bytes to chase it.no_noisereports it but requires only ionic0's transmit site.🤖 Generated with Claude Code