Skip to content

Commit bdb6542

Browse files
authored
twamp: add timestamp diagnostic tool (#3380)
## Summary of Changes - Add `twamp-debug` CLI tool for diagnosing kernel timestamping support on Arista switches - Tests each SO_TIMESTAMPING mode (RX/TX software/hardware/sched) by sending real TWAMP probes and checking whether timestamps are actually delivered in cmsgs, rather than just checking setsockopt acceptance - Sends configurable probe runs comparing userspace, SO_TIMESTAMPNS, SO_TIMESTAMPING software, and hardware timestamp sources side-by-side with per-probe breakdown and aggregate statistics (min/max/mean/p50/p99/stddev/jitter) ## Diff Breakdown | Category | Files | Lines (+/-) | Net | |--------------|-------|-------------|------| | Core logic | 1 | +783 / -0 | +783 | Single-file diagnostic tool, no tests or scaffolding. <details> <summary>Key files (click to expand)</summary> - `tools/twamp/cmd/twamp-debug/main.go` — standalone debug tool: capability probing via real sends, multi-source RTT comparison, statistics </details> ## Testing Verification - Built and deployed to `chi-dn-dzd1`, verified against live TWAMP reflector on `172.16.0.3:862` over `sw1_11_2` - Confirmed capability detection correctly identifies TX_SCHED as delivered, TX_SOFTWARE/TX_HARDWARE/RX_HARDWARE as not delivered despite setsockopt accepting them - Verified 200-probe run produces consistent RTT statistics across userspace, kernel_ns, and software timestamp sources
1 parent 49cd0c9 commit bdb6542

2 files changed

Lines changed: 785 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ All notable changes to this project will be documented in this file.
1212
- Reset SIGPIPE to SIG_DFL at the start of main() in all 3 CLI binaries (doublezero, doublezero-geolocation, doublezero-admin) so the process exits silently like standard CLI tools
1313
- SDK
1414
- Add Go SDK for shred subscription program with read-only account deserialization (epoch state, seat assignments, pricing, settlement, validator client rewards), PDA derivation helpers, RPC fetchers, compatibility tests, and a fetch example CLI
15+
- Tools
16+
- Add `twamp-debug` diagnostic tool for testing kernel timestamping support on switches; sends real TWAMP probes to verify which SO_TIMESTAMPING modes (RX/TX software/hardware/sched) actually deliver timestamps, and reports RTT statistics comparing userspace vs kernel timestamp sources
1517

1618
## [v0.15.0](https://github.com/malbeclabs/doublezero/compare/client/v0.14.0...client/v0.15.0) - 2026-03-27
1719

0 commit comments

Comments
 (0)