diff options
| author | Chuck Lever <chuck.lever@oracle.com> | 2026-01-27 19:53:58 -0500 |
|---|---|---|
| committer | Leon Romanovsky <leon@kernel.org> | 2026-01-28 05:54:53 -0500 |
| commit | bea28ac14cab25d79ea759138def79aa82e0b428 (patch) | |
| tree | 94dada404043114d0f9b9418694303fb423badcb /include | |
| parent | 853e892076ba5666c81afbc86552e008280f9768 (diff) | |
RDMA/core: add MR support for bvec-based RDMA operations
The bvec-based RDMA API currently returns -EOPNOTSUPP when Memory
Region registration is required. This prevents iWARP devices from
using the bvec path, since iWARP requires MR registration for RDMA
READ operations. The force_mr debug parameter is also unusable with
bvec input.
Add rdma_rw_init_mr_wrs_bvec() to handle MR registration for bvec
arrays. The approach creates a synthetic scatterlist populated with
DMA addresses from the bvecs, then reuses the existing ib_map_mr_sg()
infrastructure. This avoids driver changes while keeping the
implementation small.
The synthetic scatterlist is stored in the rdma_rw_ctx for cleanup.
On destroy, the MRs are returned to the pool and the bvec DMA
mappings are released using the stored addresses.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20260128005400.25147-4-cel@kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/rdma/rw.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/rdma/rw.h b/include/rdma/rw.h index 205e16ed6cd8..3400c017bfb6 100644 --- a/include/rdma/rw.h +++ b/include/rdma/rw.h @@ -47,6 +47,7 @@ struct rdma_rw_ctx { struct ib_reg_wr reg_wr; struct ib_send_wr inv_wr; struct ib_mr *mr; + struct sg_table sgt; } *reg; }; }; |
