You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bfd(echo): Phase B.1+B.2 outstanding ring + echo detection
Adds per-session echo loss tracking and the echo-mode detection
timer so the echo transport landed in Phase A becomes a real
liveness channel. Without this commit, echo packets flowing with
no detection would be a passive RTT probe only.
Phase B.1 -- outstanding-ID ring (session/session.go + timers.go):
- Fixed 16-slot echoOutstanding ring per Machine tracks every
echo TX by (sequence, sentAt). RegisterEchoTx inserts in the
first empty slot or overwrites the oldest live slot when the
ring is full (an overwrite is equivalent to a lost echo from
the detection standpoint). MatchEchoRx scans for the returning
echo's sequence, clears the slot, and returns the monotonic
RTT. ClearEchoSchedule wipes the ring on session-down so a
flap-back-up starts with a clean detection window.
Phase B.2 -- detection-time switchover (engine/echo.go):
- echoTickLocked now calls EchoDetectionExpired(now) before the
TX pass. EchoDetectionExpired walks the ring and returns true
when any outstanding entry is older than DetectMult *
EchoInterval (the echo-mode detection time per RFC 5880
Section 6.8.4). On true, the engine calls Machine.EchoFail
which transitions the session to Down with DiagEchoFailed (2),
fires the notify callback with the correct diagnostic, and
clears the ring.
- recordEchoRTTLocked now uses MatchEchoRx for the authoritative
RTT (monotonic, immune to wall-clock jumps) and falls back to
the ZEEC envelope TimestampMs when the ring entry was evicted.
New TestEchoDetectionSwitchover drives the full detection path
via a dropEchoTransport that swallows every outbound echo and
asserts a Down+DiagEchoFailed transition within 2 s. Race-clean
under -race -count=10.
Also fixes pre-existing goconst lint in cmd/ze/iface: promote
"bridge" literal in internal/component/iface/migrate_linux.go to
the existing zeTypeBridge constant, add nolint:goconst to CLI
dispatch strings in create.go, main.go, migrate.go, scan.go.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments