fix(yip-io): make io_uring loopback recycle tests robust on default rmem #113
No reviewers
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!113
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/uring-loopback-buffer-flake"
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?
Problem
Two io_uring tests fail deterministically on any box with a default UDP receive buffer:
uring_loopback_roundtrip_recycles_recv_buffersuring_in_flight_send_table_reuses_slots_after_completionsBoth blasted all datagrams into the socket before draining, then asserted more than 256 (
RING_BUFS/SEND_SLOTS) round-trip. That requires the kernel to buffer >256 datagrams at once, but the defaultnet.core.rmem_default(~208 KB) only holds ~230 small datagrams (per-skb truesize overhead). Result on a stock box:got 237, needed >256→ fail. It only passed where rmem was tuned up.Fix
Interleave send and drain with a bounded in-flight window (64), so the kernel receive buffer never has to hold more than 64 at once. Nothing is dropped, both counts reach
totalon any box.The test's intent is preserved: recycling of the fixed pool is still proven by round-tripping far more than the pool size through it, and a genuine leak still stalls at ≤ pool size and fails both asserts.
Verify
rmem_default = 212992.cargo testworkspace suite passes (pre-commit hook).