Commit 62638991 authored by Alexey Marchuk's avatar Alexey Marchuk Committed by Ben Walker
Browse files

nvme/rdma: Don't limit max_sge if UMR is used



Since UMR creates a vurtually contig memory buffer,
we can always support up to 16 SGEs regardless of
MSDBD reported by target

Signed-off-by: default avatarAlexey Marchuk <alexeymar@nvidia.com>
Change-Id: Ibd339f71ad35d355783993f777fcf8009ea68466
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24710


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <ben@nvidia.com>
Reviewed-by: default avatarJim Harris <jim.harris@nvidia.com>
Community-CI: Community CI Samsung <spdk.community.ci.samsung@gmail.com>
Community-CI: Mellanox Build Bot
parent cec5ba28
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -3077,8 +3077,12 @@ nvme_rdma_ctrlr_get_max_sges(struct spdk_nvme_ctrlr *ctrlr)

	/* Max SGE is limited by capsule size */
	max_sge = spdk_min(max_sge, max_in_capsule_sge);
	/* Max SGE may be limited by MSDBD */
	if (ctrlr->cdata.nvmf_specific.msdbd != 0) {
	/* Max SGE may be limited by MSDBD.
	 * If umr_per_io is enabled and supported, we always use virtually contig buffer, we don't limit max_sge by
	 * MSDBD in that case */
	if (!(g_spdk_nvme_transport_opts.rdma_umr_per_io &&
	      spdk_rdma_provider_accel_sequence_supported()) &&
	    ctrlr->cdata.nvmf_specific.msdbd != 0) {
		max_sge = spdk_min(max_sge, ctrlr->cdata.nvmf_specific.msdbd);
	}