Skip to content

fix(ibverbs): propagate configured qp_type in QueuePairBuilder::build#98

Merged
dragonJACson merged 1 commit intomainfrom
dev/fix-build-qp
Mar 12, 2026
Merged

fix(ibverbs): propagate configured qp_type in QueuePairBuilder::build#98
dragonJACson merged 1 commit intomainfrom
dev/fix-build-qp

Conversation

@dragonJACson
Copy link
Contributor

QueuePairBuilder::build rebuilt a legacy ibv_qp_init_attr but always passed IBV_QPT_RC, which ignored setup_qp_type(). Use the configured qp_type so basic queue pairs are created with the requested transport type.

QueuePairBuilder::build rebuilt a legacy ibv_qp_init_attr but always
passed IBV_QPT_RC, which ignored setup_qp_type(). Use the configured
qp_type so basic queue pairs are created with the requested transport
type.

Signed-off-by: Luke Yue <lukedyue@gmail.com>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical bug in the QueuePairBuilder where the build method was not correctly propagating the user-configured queue pair type. The fix ensures that queue pairs are now instantiated with the intended transport type, resolving an issue where all basic queue pairs were inadvertently being created as reliable connections regardless of the specified configuration.

Highlights

  • QueuePairBuilder::build behavior: The QueuePairBuilder::build method previously ignored the configured qp_type from setup_qp_type() and always used IBV_QPT_RC. This pull request corrects this by ensuring the build method uses the qp_type that was explicitly configured.
Changelog
  • src/ibverbs/queue_pair.rs
    • Modified the QueuePairBuilder to use the self.init_attr.qp_type for the qp_type field in the ibv_qp_init_attr structure, replacing the previously hardcoded QueuePairType::ReliableConnection.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request correctly addresses the issue where QueuePairBuilder::build was not propagating the configured qp_type to the ibv_qp_init_attr structure. The change ensures that the qp_type set by setup_qp_type() is now correctly used when creating a BasicQueuePair, aligning the behavior with the builder's configuration. This is a good and necessary fix.

@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/ibverbs/queue_pair.rs 70.59% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dragonJACson dragonJACson requested a review from FujiZ March 11, 2026 16:05
@dragonJACson dragonJACson merged commit efddbd4 into main Mar 12, 2026
5 checks passed
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