Skip to content

twamp: add timestamp diagnostic tool#3380

Draft
snormore wants to merge 2 commits intomainfrom
snor/twamp-debug
Draft

twamp: add timestamp diagnostic tool#3380
snormore wants to merge 2 commits intomainfrom
snor/twamp-debug

Conversation

@snormore
Copy link
Contributor

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.

Key files (click to expand)
  • tools/twamp/cmd/twamp-debug/main.go — standalone debug tool: capability probing via real sends, multi-source RTT comparison, statistics

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

Standalone tool for checking kernel timestamping support on Arista
switches by sending real TWAMP probes and verifying which timestamp
types are actually delivered (SO_TIMESTAMPNS, SO_TIMESTAMPING RX/TX
software/hardware/sched). Also reports RTT statistics comparing
userspace vs kernel timestamp sources.
@snormore snormore requested a review from ben-dz March 26, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant