feat: add reg dma buf MR support#108
Conversation
There was a problem hiding this comment.
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.
6f5ca99 to
754fdfe
Compare
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
Signed-off-by: Luke Yue <lukedyue@gmail.com>
754fdfe to
ecebc42
Compare
There was a problem hiding this comment.
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-systo0.2.4and wire inibv_reg_dmabuf_mrbindings. - Add
ProtectionDomain::reg_dmabuf_mrand internalMemoryRegion::reg_dmabuf_mrimplementation. - 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.
| /// | ||
| /// - 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) |
No description provided.