]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
RDMA/core: add bio_vec based RDMA read/write API
authorChuck Lever <chuck.lever@oracle.com>
Wed, 28 Jan 2026 00:53:56 +0000 (19:53 -0500)
committerLeon Romanovsky <leon@kernel.org>
Wed, 28 Jan 2026 10:54:53 +0000 (05:54 -0500)
commit5e541553588d493bd9317bc8a8c1ab85cbddc2c5
tree13c58634c3c20ec64d2e84eac4968762b67730f5
parent959d2c356e32abde9c5b95c7e83236cded94251a
RDMA/core: add bio_vec based RDMA read/write API

The existing rdma_rw_ctx_init() API requires callers to construct a
scatterlist, which is then DMA-mapped page by page. Callers that
already have data in bio_vec form (such as the NVMe-oF target) must
first convert to scatterlist, adding overhead and complexity.

Introduce rdma_rw_ctx_init_bvec() and rdma_rw_ctx_destroy_bvec() to
accept bio_vec arrays directly. The new helpers use dma_map_phys()
for hardware RDMA devices and virtual addressing for software RDMA
devices (rxe, siw), avoiding intermediate scatterlist construction.

Memory registration (MR) path support is deferred to a follow-up
series; callers requiring MR-based transfers (iWARP devices or
force_mr=1) receive -EOPNOTSUPP and should use the scatterlist API.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20260128005400.25147-2-cel@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/rw.c
include/rdma/ib_verbs.h
include/rdma/rw.h