Skip to content

Conversation

@ovsrobot
Copy link
Owner

@ovsrobot ovsrobot commented Jan 4, 2026

NOTE: This is an auto submission for "[RFC] ethdev: support Rx data discard".

See "http://patchwork.dpdk.org/project/dpdk/list/?series=36951" for details.

Summary by Sourcery

New Features:

  • Introduce RTE_ETH_DEV_DISCARD_RX_DATA flag to advertise devices that support discarding received data.

Summary by CodeRabbit

Release Notes

  • New Features
    • Introduced a new Ethernet device capability flag enabling support for discarding received data at the device level, expanding available device configuration options.

✏️ Tip: You can customize this high-level summary in your review settings.

In some cases application does not need to receive entire packet
from port hardware.
If application could fetch required data only and safely discard the
rest of Rx packet data, that could improve port performance by
reducing PCI bandwidth.

The RTE_ETH_DEV_DISCARD_RX_DATA device capability flag notifies that
a port hardware supports Rx data discard.

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
@sourcery-ai
Copy link

sourcery-ai bot commented Jan 4, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Add a new ethdev device capability flag to advertise support for Rx data discard in the ethdev API.

Class diagram for new ethdev Rx data discard capability flag

classDiagram
    class RteEthDevCapabilityFlags {
        <<bitmask>>
        RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS RTE_BIT32_6
        RTE_ETH_DEV_DISCARD_RX_DATA RTE_BIT32_7
    }

    class RteEthDevice {
        uint32 dev_flags
    }

    RteEthDevice "1" -- "1" RteEthDevCapabilityFlags : uses
Loading

File-Level Changes

Change Details Files
Introduce a new ethdev device capability flag for Rx data discard support.
  • Extend the set of ethdev device capability flags with a new macro constant representing Rx data discard support.
  • Assign the new flag to bit position 7 in the 32-bit device capability bitmap, adjacent to existing autofill queue xstats flag.
lib/ethdev/rte_ethdev.h

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link

coderabbitai bot commented Jan 4, 2026

📝 Walkthrough

Walkthrough

A new public device capability flag RTE_ETH_DEV_DISCARD_RX_DATA is added to the ethdev library header, assigned bit position 7 using RTE_BIT32(7). This flag extends existing device capability markers alongside RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS.

Changes

Cohort / File(s) Summary
Device Capability Flags
lib/ethdev/rte_ethdev.h
Added new public macro RTE_ETH_DEV_DISCARD_RX_DATA with value RTE_BIT32(7) to the device flags section.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A flag hops onto the stage so bright,
RTE_ETH_DEV_DISCARD_RX_DATA shines with might,
Bit seven claimed, the ethdev grows,
Capabilities bloom where rabbit code flows! 🌱

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly indicates support for Rx data discard in ethdev, which directly matches the main change of adding RTE_ETH_DEV_DISCARD_RX_DATA capability flag.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

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 and usage tips.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Consider expanding the comment on RTE_ETH_DEV_DISCARD_RX_DATA to clarify the expected PMD behavior (e.g., whether metadata is still delivered, how it interacts with existing Rx offloads, and in which modes it applies), so consumers can implement consistent handling.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider expanding the comment on `RTE_ETH_DEV_DISCARD_RX_DATA` to clarify the expected PMD behavior (e.g., whether metadata is still delivered, how it interacts with existing Rx offloads, and in which modes it applies), so consumers can implement consistent handling.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
lib/ethdev/rte_ethdev.h (1)

2173-2174: New device flag looks correct; consider cross-checking doc/usage.

The new RTE_ETH_DEV_DISCARD_RX_DATA flag uses the next free bit (RTE_BIT32(7)) in the device flags block and follows existing naming/comment style; no ABI or semantic issues here. As a follow-up, ensure:

  • Its meaning is documented in the ethdev/PMD documentation.
  • It is wired consistently via rte_eth_dev_info.dev_flags, and not confused with the RTE_ETH_DEV_CAPA_* capability bits elsewhere.

To verify consistency, please double-check that any new documentation and PMD implementations refer to this as a dev_flags bit (not dev_capa) and that no other flag is already using bit 7.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cd60dcd and dbe3bf0.

📒 Files selected for processing (1)
  • lib/ethdev/rte_ethdev.h
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Sourcery review

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.

3 participants