Skip to content

(14) dpdk: RX metadata - #1877

Open
daniel-noland wants to merge 1 commit into
pr/daniel-noland/dataplane-perffrom
split/dpdk-core/04-rx-metadata
Open

daniel-noland wants to merge 1 commit into
pr/daniel-noland/dataplane-perffrom
split/dpdk-core/04-rx-metadata

Conversation

@daniel-noland

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

Copy link
Copy Markdown
Collaborator

I know that (some of) the coverage report for this is empty.

Fixing that in a practical way requires n-vm or (in some cases) hardware. That is fine, it just arrives later in the stack (minus the hardware bit). 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
daniel-noland requested a review from a team as a code owner October 3, 2026 05:32
@daniel-noland
daniel-noland requested review from Fredi-raspall 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: 8b8fd3f7-be76-4604-b02f-d0df4b35e2b7
📥 Commits

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

📒 Files selected for processing (1)
  • dpdk/src/mem.rs

Included review availability: This review used your included allowance. 0 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

Mbuf gains public accessors for receive offload flags, RSS hashes, flow marks, and dynamic metadata. RSS hashes, flow marks, and metadata are returned only when their respective validity conditions are met.

Changes

Mbuf receive accessors

Layer / File(s) Summary
Receive flag and metadata accessors
dpdk/src/mem.rs
Adds ol_flags and accessors for RSS hashes, flow marks, and dynamic metadata. The value accessors return None when their validity conditions are not met.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 11366

This PR adds read-only accessors for receive flags, RSS hashes, flow marks and flow metadata on Mbuf. Each accessor returns a value only when its validity condition is met. No merge-blocking risk was found.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 1 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 identifies the DPDK RX metadata change, which matches the added receive metadata accessors.
Description check ✅ Passed The description discusses test coverage and review readiness for the RX metadata changes.
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Comment thread dpdk/src/mem.rs
Comment on lines +502 to +505
pub fn ol_flags(&self) -> u64 {
// SAFETY: `self.raw` is a live mbuf for the lifetime of `&self`.
unsafe { self.raw.as_ref() }.ol_flags
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should likely return a stronger type. A bitfield enum or some such

@codecov

codecov Bot commented Oct 3, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
dpdk/src/mem.rs 0.00% 29 Missing ⚠️

📢 Thoughts on this report? Let us know!

@daniel-noland
daniel-noland added this pull request to stack #1882 October 3, 2026 06:00
@daniel-noland daniel-noland self-assigned this Oct 3, 2026
@daniel-noland daniel-noland added the area/dpdk Related to DPDK (interface with or usage of the library) label Oct 3, 2026
@daniel-noland
daniel-noland force-pushed the split/dpdk-core/03-buffers branch from bc9de15 to 56039b8 Compare October 3, 2026 20:12
@daniel-noland
daniel-noland removed this pull request from stack #1882 October 3, 2026 21:41
@daniel-noland
daniel-noland force-pushed the split/dpdk-core/03-buffers branch from 56039b8 to 996c9bc Compare October 3, 2026 21:45
@daniel-noland
daniel-noland force-pushed the split/dpdk-core/04-rx-metadata branch from 113667a to 2163a66 Compare October 3, 2026 23:39
@daniel-noland
daniel-noland changed the base branch from split/dpdk-core/03-buffers to split/dpdk-core/03b-segments October 3, 2026 23:39
`Mbuf::ol_flags`, `rss_hash`, `rx_mark` and `rx_meta` read what the NIC
reported for a received packet, each gated on the flag that certifies it:
`RTE_MBUF_F_RX_RSS_HASH` for the RSS hash, `RTE_MBUF_F_RX_FDIR_ID` for a
flow `MARK`, and the registered dynamic-field mask for flow `META`, which
reads `None` until `rte_flow_dynf_metadata_register` has succeeded.

These are how software sees what flow rules did to a packet, which is what
the flow API that follows needs to be observed at all.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
@daniel-noland
daniel-noland force-pushed the split/dpdk-core/03b-segments branch from ab54519 to 4d77831 Compare October 4, 2026 06:05
@daniel-noland
daniel-noland force-pushed the split/dpdk-core/04-rx-metadata branch from 2163a66 to 984402b Compare October 4, 2026 06:05
@daniel-noland
daniel-noland changed the base branch from split/dpdk-core/03b-segments to pr/daniel-noland/dataplane-perf October 4, 2026 06:07
@daniel-noland daniel-noland changed the title (05) dpdk: RX metadata (14) dpdk: RX metadata Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/dpdk Related to DPDK (interface with or usage of the library)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant