(14) dpdk: RX metadata - #1877
daniel-noland wants to merge 1 commit into
Conversation
|
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
📒 Files selected for processing (1)
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. 📝 WalkthroughWalkthrough
ChangesMbuf receive accessors
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to 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)
Comment |
| 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 | ||
| } |
There was a problem hiding this comment.
this should likely return a stronger type. A bitfield enum or some such
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
bc9de15 to
56039b8
Compare
56039b8 to
996c9bc
Compare
113667a to
2163a66
Compare
`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>
ab54519 to
4d77831
Compare
2163a66 to
984402b
Compare
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