Skip to content

mgd: swap sync bfd impl out for bfd-async#796

Open
jgallagher wants to merge 1 commit into
john/bfd-asyncfrom
john/bfd-async-wiring
Open

mgd: swap sync bfd impl out for bfd-async#796
jgallagher wants to merge 1 commit into
john/bfd-asyncfrom
john/bfd-async-wiring

Conversation

@jgallagher

Copy link
Copy Markdown
Contributor

This is staged on top of #795.

I left the bfd crate in place and removed now-dead code. This leaves the repo in a slightly weird state with a bfd crate that exists for packet parsing and some shared types and a bfd-async crate where all the implementations are, but it minimizes the git diff for easier reviewing. If we land this I can do a followup that merges the two crates.

@jgallagher jgallagher force-pushed the john/bfd-async-wiring branch from c9b17e6 to cee38fc Compare June 23, 2026 19:18
taspelund added a commit that referenced this pull request Jul 7, 2026
The condvar/Mutex<()>/dropped-flag scheme had lost-wakeup races (no
predicate under the mutex), which could delay reconciliation or
shutdown by a full poll interval, and split shutdown across two Drop
impls.

Use a sync_channel(1) instead: try_send wakes the monitor (a full
buffer coalesces rapid config changes), and the loop exits when the
channel disconnects. Drop for UnnumberedManager clears the
Option<SyncSender> to disconnect before ManagedThread joins the
thread; Drop bodies run before field drops, so the ordering is
structural. Disconnected at the wake site can only mean the monitor
panicked, so log it at crit. None means a test manager with no
monitor thread.

An async conversion of this subsystem is planned as a follow-up PR in
the style of the BFD conversion (#795/#796).

Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
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