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 8072E34D3AC; Thu, 22 Jan 2026 22:04:06 +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=1769119446; cv=none; b=d8isuZWY8TgJyMfCCW+ml8FzxD1F9VCLxsubESkf7qO0jbV03RPZhfYlIbZ6wK7d1R37YWrM06ibuVOf1E3ecIHcyCVH4bBq3R8WrjW77gBDqTfSzxq/me0VOv5EfGp870X3rsuK2tt2ViDSIcQjF2LyRNepVuExJwkBJPfFgw0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769119446; c=relaxed/simple; bh=La/utEg2+SlsH0nglhZtrlUVcEjYN6fiQtrD7kayTZE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BVA/oZqOBO/41elyHBUYbrZ+rHirLTkDTgrJp10yojLS9HVtchD3BZslF8GLFfNRcYb2RpqFhgJGiqQCfhx5apd44lIlIxuUpmVHixFaOSsknU+ZlsujTxCEZq+kV2irYTUYoXuflVJDukEgfeSNX8GI8UG3GBXRlHvw6CO4gzM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aIbVT8VY; 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="aIbVT8VY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A18D6C116C6; Thu, 22 Jan 2026 22:04:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769119445; bh=La/utEg2+SlsH0nglhZtrlUVcEjYN6fiQtrD7kayTZE=; h=From:To:Cc:Subject:Date:From; b=aIbVT8VYOQh7fjMRI83odMIMlzLqM6OUHohyYoyObD66JF62Fztjeuqd8/mMaSn6z 5cuvvlOiIDbHKXVnLJglrAFLjanRhbD0NETBnnYAdFGZnhKiwazyJDHGaPaRywF4qy 3Xg7slNQ1lCSURSBxGpugmHhyKmo4n9vsELhoUjj72evD5IsYjl0msklxCszZQt/kA Doc7PMf9zoAfpSqvbqOrEE/ffCE4H3swA8imRQXy4rXuUHm9zFwa/lLkzp7LwQbRaK tzI/wVtjbXx8lvJKv62ytr6hOt/H+gkxYQHU1rVpVKq0b9h1v807CoupLeZaeBGVtq zvLaXNAjTlnHg== From: Chuck Lever To: Jason Gunthorpe , Leon Romanovsky , Christoph Hellwig Cc: NeilBrown , Jeff Layton , Olga Kornievskaia , Dai Ngo , Tom Talpey , , , Chuck Lever Subject: [PATCH v3 0/5] Add a bio_vec based API to core/rw.c Date: Thu, 22 Jan 2026 17:03:56 -0500 Message-ID: <20260122220401.1143331-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 v2: - Add bvec iter arguments to the new API - Add a synthetic SGL in the MR mapping function - Try IOVA coalescing before max_sgl_rd triggers MR in bvec path - Attempt once again to address SQ/CQ/max_rdma_ctxs sizing issues 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 (5): 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 RDMA/core: add rdma_rw_max_sge() helper for SQ sizing svcrdma: use bvec-based RDMA read/write API drivers/infiniband/core/rw.c | 591 ++++++++++++++++++++--- drivers/infiniband/ulp/isert/ib_isert.c | 4 +- drivers/nvme/target/rdma.c | 4 +- include/rdma/ib_verbs.h | 42 ++ include/rdma/rw.h | 36 +- net/sunrpc/xprtrdma/svc_rdma_rw.c | 155 +++--- net/sunrpc/xprtrdma/svc_rdma_transport.c | 8 +- 7 files changed, 699 insertions(+), 141 deletions(-) -- 2.52.0