io_uring busy-poll Phase B: UringDriver (status + remaining work) #7
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
femboy/yip#7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tracks the remaining half of the unified io_uring busy-poll data-loop milestone. Spec + plan (both phases) are on
main:docs/superpowers/specs/2026-06-30-io-uring-busy-poll-design.mddocs/superpowers/plans/2026-06-30-io-uring-busy-poll.mdWhere we are — Phase A is DONE and merged (#6,
0e373fa)Phase A delivered the single-thread lock-removal win without any io_uring:
DataPlane(bin/yipd/src/dataplane.rs) — all packet logic (seal/FEC/frame; deframe/decode/open; control-handler; ARQ; feedbacktick) as a mutex-free, I/O-free struct, unit-tested end to end (round-trip, control/ARQ, forged-packet rejection).PollDriver(crates/yip-io/src/poll.rs) — a single-threadedepollloop over the UDP+TUN fds driving aDispatchtrait (on_udp/on_tun/tick→DispatchOut); drop-tolerant on transient UDP send errors;unsafeconfined to yip-io with SAFETY comments.tunnel.rs::run(): ~637 → ~93 lines, no threads /Arc/Mutex/.join(). yipd stays#![forbid(unsafe_code)]. yip-device gainedTunTap::as_raw_fd()+set_nonblocking().What Phase B needs (plan tasks 5–8)
UringDriver(crates/yip-io/src/uring.rs) — ONEio_uringservicing both the UDP and TUN fds. Provided-buffer ring (RING_BUFS = 256 × MAX_WIRE_DATAGRAM = 512 KiB, < 1 MiB for the dev-boxRLIMIT_MEMLOCK). Multishot/pooledRECVon UDP +READon TUN;user_datademux; busy-poll loop →Dispatch→ submit sends → re-provide recv buffers. Loopback unit tests (skip-on-Err under memlock).UDP_SEGMENTsend; send buffers live in a bounded slot table keyed byuser_datauntil their CQE arrives (the buffer-lifetimeunsafecore); sendmmsg fallback if GSO rejected.uring_available()probe →UringDriverelsePollDriver;YIP_FORCE_POLL=1forces the fallback. Run the netns suite on both drivers.YIP_FORCE_POLL=1netns run to CI; record deltas.Constraints / risks
unsafeonly in yip-io; yipd stays#![forbid(unsafe_code)]; SAFETY comment per block. The hand-managed buffer lifetimes (provide/borrow/re-provide recvs; bounded in-flight send table) are the top risk.Resume
Fresh session →
superpowers:subagent-driven-developmentpointed at plan tasks 5–8, off a new branch frommain. Progress ledger scaffold:.superpowers/sdd/progress.md.