Commit bdb6542
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 sources1 parent 49cd0c9 commit bdb6542
2 files changed
Lines changed: 785 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
0 commit comments