Skip to content

(06) dpdk: device configuration and lifecycle - #1878

Open
daniel-noland wants to merge 3 commits into
split/dpdk-core/04-rx-metadatafrom
split/dpdk-core/05-device
Open

daniel-noland wants to merge 3 commits into
split/dpdk-core/04-rx-metadatafrom
split/dpdk-core/05-device

Conversation

@daniel-noland

@daniel-noland daniel-noland commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

I know that the coverage report for this is empty.

Fixing that in a practical way requires n-vm. That is fine, it just arrives later in the stack. I may be able to pull those tests back here. Still working on that. That said, the logic itself is ready for review

daniel-noland and others added 3 commits October 2, 2026 22:58
Validate requested MTUs, use the advertised LRO limit, and adjust RX/TX
descriptor counts to driver limits.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Configure queues on Dev<Stopped> and access them on Dev<Started>. Failed
transitions return the device; Drop stops it only when running.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
@daniel-noland
daniel-noland requested a review from a team as a code owner October 3, 2026 05:32
@daniel-noland
daniel-noland requested review from sergeymatov and removed request for a team October 3, 2026 05:32
@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 6afa4861-d959-4325-adb8-ffd543528c43
📥 Commits

Reviewing files that changed from the base of the PR and between 113667a and 2533d80.

📒 Files selected for processing (3)
  • dpdk/src/dev.rs
  • dpdk/src/queue/rx.rs
  • dpdk/src/queue/tx.rs

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

Device configuration now supports MTU limits and advertised LRO sizing. Device lifecycle transitions use stopped and started typestates. RX and TX queue setup adjust descriptor counts through DPDK before configuring each queue.

Changes

Device configuration and lifecycle

Layer / File(s) Summary
Device configuration and capabilities
dpdk/src/dev.rs
DevConfig accepts an optional MTU, rejects explicit values outside a valid advertised range, and clamps the default MTU to that range. Device RX configuration uses the resolved MTU and advertised maximum LRO packet size. DevInfo exposes queue offload capabilities and MTU limits.
Typestate lifecycle transitions
dpdk/src/dev.rs
Dev uses Stopped and Started typestates. Start and stop consume the device and return it in its unchanged state on failure. Drop behavior depends on the device state.

Queue descriptor adjustment

Layer / File(s) Summary
Adjust descriptors before queue setup
dpdk/src/queue/rx.rs, dpdk/src/queue/tx.rs
RX and TX queue setup pass configured descriptor counts to DPDK for adjustment, then use the adjusted count. RX returns adjustment errors through ConfigFailure::check; TX maps allocation errors to NoMemory and other errors to Unexpected. Both configurations document that zero thresholds select PMD defaults.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 2533d

This change adds typed stopped and started states, MTU validation, LRO sizing from device limits, and descriptor-limit adjustment for DPDK devices. No concrete defects were identified, and the change appears ready to merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 3 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly describes the main changes to DPDK device configuration and lifecycle.
Description check ✅ Passed The description discusses test coverage and review status for the changeset, so it is related to the pull request.
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@codecov

codecov Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 112 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
dpdk/src/dev.rs 0.00% 86 Missing ⚠️
dpdk/src/queue/rx.rs 0.00% 13 Missing ⚠️
dpdk/src/queue/tx.rs 0.00% 13 Missing ⚠️

📢 Thoughts on this report? Let us know!

@daniel-noland
daniel-noland added this pull request to stack #1882 October 3, 2026 06:00
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