Skip to content

fix(build): apply netvsc leak fix and centralize dependency patches - #22

Merged
thweetkomputer merged 2 commits into
mainfrom
codex/netvsc-realloc-build-patch
Oct 25, 2026
Merged

thweetkomputer merged 2 commits into
mainfrom
codex/netvsc-realloc-build-patch

Conversation

@thweetkomputer

@thweetkomputer thweetkomputer commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

DPDK's netvsc event-buffer expansion leaks the old allocation when rte_realloc() fails. Vendor the fix under third_party/patches/dpdk/ and apply it before Bycorf configures and compiles DPDK, so source builds include the fix automatically.

Group dependency patches under third_party/patches/<dependency>/, moving the existing FreeBSD TCP patch unchanged into third_party/patches/freebsd/. Update the FreeBSD build helper and CMake dependency tracking to use its new location; it still patches a fresh build-directory copy and preserves imported source digests. Both directories use the shared patch-byte preservation attributes.

The patch helper checks the complete reverse patch to recognize an already-patched checkout. Otherwise it validates the forward patch before applying it, rejecting conflicts and partial applications. Patch changes trigger CMake reconfiguration. Preserve the supplied patch bytes and document that patching changes the DPDK submodule working tree; external BYCORF_DPDK_PREFIX installations must include the patch themselves.

Validation:

  • Verified the bundled patch is byte-for-byte identical to the supplied patch.
  • Applied the patch to pristine source fixtures, verified a repeated invocation makes no changes, and confirmed conflicting and partially patched fixtures fail without additional changes.
  • Built and installed DPDK with bus/vmbus,net/netvsc enabled through the production cmake/Dpdk.cmake module in an isolated CMake harness, including compilation of the patched hn_rxtx.c.
  • Verified a patch timestamp change makes cmake --build rerun configuration and recognize the already-applied patch.
  • Verified the relocated FreeBSD patch is unchanged, applies repeatedly to the generated copy without modifying imported source, and is resolved by the CMake dependency graph and build command.
  • git diff --cached --check passed.

Validation covers build integration and patch handling; no netvsc hardware allocation-failure test was run.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

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: c4732128-7a44-4085-9899-ba27a8c5423d
  • 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

Comment @coderabbitai help to get the list of available commands.

@thweetkomputer thweetkomputer changed the title fix(dpdk): apply netvsc realloc leak patch during builds fix(build): apply netvsc leak fix and centralize dependency patches Oct 25, 2026
@thweetkomputer
thweetkomputer merged commit 02b2dfd into main Oct 25, 2026
10 checks passed
@thweetkomputer
thweetkomputer deleted the codex/netvsc-realloc-build-patch branch October 25, 2026 02:20
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