Skip to content

fix: update Bycorf for reusable DPDK socket handles - #455

Merged
thweetkomputer merged 3 commits into
mainfrom
fix/dpdk-handle-reuse
Nov 7, 2026
Merged

thweetkomputer merged 3 commits into
mainfrom
fix/dpdk-handle-reuse

Conversation

@thweetkomputer

@thweetkomputer thweetkomputer commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Context

Long-running DPDK workers can exhaust their monotonically increasing socket handle namespace despite closing connections. Update Bycorf to recycle handles safely.

Uses the merged fix from eloqdata/bycorf#32, now on Bycorf main.

Behavior before and after

Previously, cumulative connection churn could permanently cause EMFILE on a worker. With this update, capacity limits simultaneously live or draining sockets. Closed handles become reusable after pending I/O and completion callbacks retire.

Lavik networking call sites and WriteAll/WriteAllV APIs remain unchanged.

Implementation

Update only the bycorf gitlink from 7c377436989d9219e2aef4b45638d1d53fd4673b to ad14f2508c9a98bc09de117368bc483ea387eadf.

Design decisions and alternatives

Bycorf uses worker-local slot pins and a free list. Waiting until old operations retire prevents reuse from redirecting stale I/O to a new socket, without a generation counter or cross-worker locks.

Documentation and comments

The Bycorf change updates networking architecture and socket lifecycle comments. This gitlink update changes no Lavik module boundaries or call flows.

Test plan

Run from the Bycorf checkout:

ctest --test-dir build-bypass -R 'DpdkSocketTableTest|DpdkHandleReuseDeathTest' --output-on-failure
ctest --test-dir build-bypass -R 'Connect|ConnectionStorage|Http|Tcp|Uring|DpdkAdaptive|FreeBsdLocal' --output-on-failure
ctest --test-dir build-asan -R 'DpdkSocketTableTest|Connect|ConnectionStorage|Http|Tcp|Uring' --output-on-failure

18 new tests and 34 existing networking regressions pass. Separately, 31 slot/kernel runtime tests pass under ASAN/UBSAN. The merged Bycorf commit has an identical source tree to the tested PR head, verified with git diff --exit-code 6f7ecbff95366967b86b56d245f848a8981445a6 ad14f2508c9a98bc09de117368bc483ea387eadf. Lavik itself was not rebuilt or end-to-end tested.

Risk assessment

DPDK tests use a virtual ring PMD with controlled send/connect readiness; physical NIC behavior was not tested. Sanitizers cover the slot table and kernel runtime, not the DPDK backend. Slot metadata retains peak concurrent capacity, without retaining closed transports or payload buffers.

Rollback plan

Revert this gitlink update to restore the previous Bycorf revision.

Reviewer guide

Review the lifecycle and regression tests in eloqdata/bycorf#32, then verify this PR changes only the submodule pointer.

Follow-up work

Validate with a physical NIC in the deployment environment.

DPDK handle capacity now limits concurrently live or draining sockets instead of cumulative connection churn. Pending operations retain the old identity until completion delivery; Lavik networking call sites remain unchanged.
@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 4 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 490eaf59-5f54-4bc6-979e-cdcfa0ccff0d
Commits

Reviewing files that changed from the base of the PR and between 5619097 and 7d0f57c.

Files selected for processing: 1

  • bycorf
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@thweetkomputer
thweetkomputer merged commit e9f2589 into main Nov 7, 2026
1 check passed
@thweetkomputer
thweetkomputer deleted the fix/dpdk-handle-reuse branch November 7, 2026 13:15
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