Skip to content

feat(net): check DPDK startup memory headroom - #23

Merged
thweetkomputer merged 1 commit into
mainfrom
codex/dpdk-startup-memory-budget
Oct 26, 2026
Merged

thweetkomputer merged 1 commit into
mainfrom
codex/dpdk-startup-memory-budget

Conversation

@thweetkomputer

Copy link
Copy Markdown
Contributor

Add a startup check for DPDK memory remaining after application allocations, including SPDK when enabled. Applications call DpdkBackend::CheckMemoryBudget() before publishing readiness.

The check budgets netvsc VMBus growth/RNDIS scratch and mlx5 lookup-cache growth, plus allocator headroom. Each populated NUMA heap must satisfy the remaining-byte and largest-block requirements. Failures report the deficit; host hugepage counts are logged separately and never counted as acquired capacity. Kernel networking skips the check.

This is a conservative admission check for the fixed topology, not a memory reservation or a guarantee for hotplug or arbitrary fragmentation. DPDK sources are unchanged.

Validation

  • 26 tests passed: budget/sysfs tests, real ring-PMD startup checks with injected heap failures, and existing adaptive-network regressions.
    ctest --test-dir /tmp/bycorf-dpdk-budget-build -R 'DpdkMemory|HostHugepage|DpdkAdaptive' --output-on-failure
  • Formatting and whitespace checks passed.
  • No physical NIC/NVMe integration test.

Estimate remaining netvsc event/RNDIS and mlx5 cache allocations from the fixed topology. Check each populated EAL heap and its largest free block, and report host hugepages separately for diagnostics. The startup API does not initialize EAL or reserve runtime memory.

Validation: 10 budget/sysfs tests, 8 startup scenarios using a real ring PMD with heap fault injection, and 8 existing adaptive network tests pass. No physical NIC test.
@coderabbitai

coderabbitai Bot commented Oct 26, 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: d52e3ca4-48ed-43d3-a87a-9c12621b6847
  • 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 merged commit edb5804 into main Oct 26, 2026
10 checks passed
@thweetkomputer
thweetkomputer deleted the codex/dpdk-startup-memory-budget branch October 26, 2026 14:45
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