From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36ADC4418EB; Tue, 20 Jan 2026 14:31:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768919489; cv=none; b=l1Z/Jo/jo8USVZ3tRoKwoY6Wze1Q4lvPYY3VhNyVt6QDQ0EnJrnT/KqkMfO+R6g2hwwLqVaMXnBS77UamYRAsMC8ashgkLzUQsSdAMIvH4IysTXbf2iNxOLMQr1HSoVmhVcuECpgc1K9ykEKLfkItnUOiaPHnzpHdfh0PDmYpTE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768919489; c=relaxed/simple; bh=yWe2BiAKmz1nnP+ELvTTO/qvhoUwBLk1saPmV7jBgmA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DGI389qSRVmKQWivJdeBmqHFPUOQnKamI4i1D21GPDbdvP1N41sfEe+UnmExfnVSkkv2hICDhjogcLz1ZSB6jnP7POlsCRYcl+cM8n88M9im56xMgbzcmkk55YRE5e60ctL1d2gyPssomWFBIs7mndV+Jvppi9uZRTw1VOKwQVQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=m0kjyW6g; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="m0kjyW6g" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5447C16AAE; Tue, 20 Jan 2026 14:31:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768919488; bh=yWe2BiAKmz1nnP+ELvTTO/qvhoUwBLk1saPmV7jBgmA=; h=From:To:Cc:Subject:Date:From; b=m0kjyW6gRdBJr8dpzKP3BqDIOSmIP15IkWuwG0z8y6UHtdmeuXQSn8n+C01uUcrMx L6CpFzRy8taZXwhkn6AHML9BqZka+Pm+lnnc6ciZ/m48gK1+Y6GKMUne6aOQi1tr94 iisX44WCrzHz3LAuJ98ds/JUfRDu2mtkdxXG8m1tLVMmyNHF9mS7fxi8xw8NSprGVH eqZH/23TyIgihjHic5TVW9tHneUHO2ofL85CHS//amj+TwOByCk89s4jG4DJrU5Jfm 5VPRkL9VzQnlU9XQKlud54iikf9akMSX3UOTfl/Z6SvYJ6Smk/LxMxIJNprKK271bR XONU/ouAW5C+g== From: Chuck Lever To: Jason Gunthorpe , Leon Romanovsky , Christoph Hellwig Cc: NeilBrown , Jeff Layton , Olga Kornievskaia , Dai Ngo , Tom Talpey , , , Chuck Lever Subject: [PATCH v2 0/4] Add a bio_vec based API to core/rw.c Date: Tue, 20 Jan 2026 09:31:20 -0500 Message-ID: <20260120143124.1822121-1-cel@kernel.org> X-Mailer: git-send-email 2.52.0 Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Chuck Lever This series introduces a bio_vec based API for RDMA read and write operations in the RDMA core, eliminating unnecessary scatterlist conversions for callers that already work with bvecs. Current users of rdma_rw_ctx_init() must convert their native data structures into scatterlists. For subsystems like svcrdma that maintain data in bvec format, this conversion adds overhead both in CPU cycles and memory footprint. The new API accepts bvec arrays directly. For hardware RDMA devices, the implementation uses the IOVA-based DMA mapping API to reduce IOTLB synchronization overhead from O(n) per-page syncs to a single O(1) sync after all mappings complete. Software RDMA devices (rxe, siw) continue using virtual addressing. The series includes MR registration support for bvec arrays, enabling iWARP devices and the force_mr debug parameter. The MR path reuses existing ib_map_mr_sg() infrastructure by constructing a synthetic scatterlist from the bvec DMA addresses. The final patch adds the first consumer for the new API: svcrdma. Based on v6.19-rc6. --- Changes since v1: - Simplify rw.c by using bvec iters internally - IOVA mapping produces a contiguous DMA address range - Clarify the comment that documents struct svc_rdma_rw_ctxt - svcrdma now uses pre-allocated bio_vec arrays Chuck Lever (4): RDMA/core: add bio_vec based RDMA read/write API RDMA/core: use IOVA-based DMA mapping for bvec RDMA operations RDMA/core: add MR support for bvec-based RDMA operations svcrdma: use bvec-based RDMA read/write API drivers/infiniband/core/rw.c | 463 ++++++++++++++++++++++++++++++ include/rdma/ib_verbs.h | 42 +++ include/rdma/rw.h | 26 ++ net/sunrpc/xprtrdma/svc_rdma_rw.c | 136 +++++---- 4 files changed, 605 insertions(+), 62 deletions(-) -- 2.52.0