Skip to content

feat: add reg dma buf MR support#108

Open
dragonJACson wants to merge 1 commit into
mainfrom
dev/add-dma-buf
Open

feat: add reg dma buf MR support#108
dragonJACson wants to merge 1 commit into
mainfrom
dev/add-dma-buf

Conversation

@dragonJACson
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
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

This pull request introduces support for dma-buf-backed memory regions by adding reg_dmabuf_mr methods to both MemoryRegion and ProtectionDomain. It also includes updated documentation and a test case verifying failure when using an invalid file descriptor. Review feedback points out several unused imports and a significant contradiction in the documentation which claims runtime symbol resolution while the implementation uses a direct FFI call.

Comment thread src/ibverbs/memory_region.rs Outdated
Comment thread src/ibverbs/memory_region.rs Outdated
@dragonJACson dragonJACson force-pushed the dev/add-dma-buf branch 2 times, most recently from 6f5ca99 to 754fdfe Compare May 23, 2026 08:23
@codecov
Copy link
Copy Markdown

codecov Bot commented May 23, 2026

Codecov Report

❌ Patch coverage is 79.16667% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/ibverbs/memory_region.rs 58.33% 5 Missing ⚠️
Files with missing lines Coverage Δ
src/ibverbs/mod.rs 0.00% <ø> (ø)
src/ibverbs/protection_domain.rs 91.42% <100.00%> (+4.47%) ⬆️
src/ibverbs/memory_region.rs 79.54% <58.33%> (-7.96%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dragonJACson dragonJACson changed the title WIP: feat: add reg dma buf MR support feat: add reg dma buf MR support May 25, 2026
Signed-off-by: Luke Yue <lukedyue@gmail.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for registering dma-buf–backed RDMA memory regions (MRs) in the ibverbs wrapper, updating the sys dependency and extending integration tests to exercise the new API path.

Changes:

  • Bump rdma-mummy-sys to 0.2.4 and wire in ibv_reg_dmabuf_mr bindings.
  • Add ProtectionDomain::reg_dmabuf_mr and internal MemoryRegion::reg_dmabuf_mr implementation.
  • Extend the MR/CQ integration test to call reg_dmabuf_mr (negative case with /dev/null).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_mr_and_cq.rs Adds a negative test call for dma-buf MR registration using /dev/null.
src/ibverbs/protection_domain.rs Exposes reg_dmabuf_mr API on ProtectionDomain with safety docs and example.
src/ibverbs/mod.rs Updates AccessFlags docs to reference dma-buf MR registration manpage.
src/ibverbs/memory_region.rs Implements MemoryRegion::reg_dmabuf_mr via ibv_reg_dmabuf_mr.
Cargo.toml Updates rdma-mummy-sys dependency version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ibverbs/mod.rs
///
/// - RDMAmojo: [`ibv_modify_qp`](https://www.rdmamojo.com/2013/01/12/ibv_modify_qp/), [`ibv_reg_mr`](https://www.rdmamojo.com/2012/09/07/ibv_reg_mr/)
/// - rdma-core manpages: [`ibv_reg_mr`](https://man7.org/linux/man-pages/man3/ibv_reg_mr.3.html)
/// - rdma-core manpages: [`ibv_reg_mr`](https://man7.org/linux/man-pages/man3/ibv_reg_mr.3.html), [`ibv_reg_dmabuf_mr`](https://man7.org/linux/man-pages/man3/ibv_reg_mr.3.html)
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