Skip to content

[PWCI] "iavf: fix reported max TX and RX queues in ethdev info"#613

Open
ovsrobot wants to merge 1 commit intomainfrom
series_37004
Open

[PWCI] "iavf: fix reported max TX and RX queues in ethdev info"#613
ovsrobot wants to merge 1 commit intomainfrom
series_37004

Conversation

@ovsrobot
Copy link
Owner

@ovsrobot ovsrobot commented Jan 9, 2026

NOTE: This is an auto submission for "iavf: fix reported max TX and RX queues in ethdev info".

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

Summary by Sourcery

Bug Fixes:

  • Correct the reported maximum RX and TX queue counts in ethdev info to respect whether the VF supports large numbers of queue pairs.

Summary by CodeRabbit

  • New Features
    • Intel iavf network adapters now dynamically configure queue pairs based on device capabilities, enabling support for larger queue configurations when available on the hardware.

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

With a regular iavf device, rte_eth_dev_info_get reports 256 maximum TX
and RX queues. Trying to configure a port with 20 queues returns an
error:

  ERR: IAVF_DRIVER: iavf_dev_configure(): large VF is not supported

When the large VF feature isn't supported by the PF kernel driver,
ethdev info must not report 256 supported queues but 16.

Fixes: e436cd4 ("net/iavf: negotiate large VF and request more queues")
Cc: stable@dpdk.org

Signed-off-by: Robin Jarry <rjarry@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
@sourcery-ai
Copy link

sourcery-ai bot commented Jan 9, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts iavf ethdev device info reporting so the max TX/RX queue counts reflect whether the VF supports large numbers of queue pairs or only the default, instead of always advertising the large-queue limit.

File-Level Changes

Change Details Files
Make reported max RX/TX queue counts conditional on the VF’s queue-pair capability flags instead of always using the large-queue limit.
  • Introduce a local max_queue_pairs variable in iavf_dev_info_get to hold the selected queue-pair limit.
  • Check vf_res->vf_cap_flags for VIRTCHNL_VF_LARGE_NUM_QPAIRS to decide between IAVF_MAX_NUM_QUEUES_LV and IAVF_MAX_NUM_QUEUES_DFLT.
  • Assign dev_info->max_rx_queues and dev_info->max_tx_queues from the computed max_queue_pairs rather than hard-coding the large-queue constant.
drivers/net/intel/iavf/iavf_ethdev.c

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 9, 2026

📝 Walkthrough

Walkthrough

Modifies the iavf_ethdev.c driver to dynamically calculate maximum queue pairs based on VF capability flags. The code now checks if the VIRTCHNL_VF_LARGE_NUM_QPAIRS capability is set and applies either IAVF_MAX_NUM_QUEUES_LV or IAVF_MAX_NUM_QUEUES_DFLT accordingly, replacing the previously fixed assignment.

Changes

Cohort / File(s) Summary
Dynamic queue pair capability check
drivers/net/intel/iavf/iavf_ethdev.c
Introduces conditional logic in iavf_dev_info_get() to check VF capability flag VIRTCHNL_VF_LARGE_NUM_QPAIRS and assign appropriate max queue pair constants to max_rx_queues and max_tx_queues based on capability presence.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 With whiskers twitched and nose held high,
A queue pair dance beneath the sky,
Large or small, the choice is clear,
Capabilities guide us here! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the specific fix being applied: correcting the reported maximum TX and RX queues in ethdev info for iavf devices based on VF capability support.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent 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 2e66325.

📒 Files selected for processing (1)
  • drivers/net/intel/iavf/iavf_ethdev.c
⏰ 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
🔇 Additional comments (1)
drivers/net/intel/iavf/iavf_ethdev.c (1)

1129-1140: LGTM! Correct fix for dynamic queue limits based on VF capabilities.

The implementation properly checks the VIRTCHNL_VF_LARGE_NUM_QPAIRS capability flag to determine the appropriate maximum queue count. This ensures that rte_eth_dev_info_get reports 16 queues when the PF doesn't support large VF, preventing configuration failures.

The logic is consistent with the capability check in iavf_dev_configure (lines 679-683) and follows the established pattern for accessing vf->vf_res after the adapter->closed guard. The constant definitions match expected values: IAVF_MAX_NUM_QUEUES_DFLT = 16 and IAVF_MAX_NUM_QUEUES_LV = 256.


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 guarding the vf->vf_res dereference (e.g., checking for NULL or an uninitialized state) before accessing vf_cap_flags to avoid potential crashes in edge cases where VF resources are not yet fully set up.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider guarding the `vf->vf_res` dereference (e.g., checking for NULL or an uninitialized state) before accessing `vf_cap_flags` to avoid potential crashes in edge cases where VF resources are not yet fully set up.

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.

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.

2 participants