From e590f607e6f135c000ce58975ea88f625297f0a5 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Wed, 10 Oct 2018 15:55:29 -0700 Subject: [PATCH] nvmf: Report that we support more than one SGL element Change-Id: Idf5aeb1fa3d6a3a83042bd699e0099b95e34f5b9 Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/428776 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- lib/nvmf/ctrlr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/nvmf/ctrlr.c b/lib/nvmf/ctrlr.c index 0522f9821..eae11c99c 100644 --- a/lib/nvmf/ctrlr.c +++ b/lib/nvmf/ctrlr.c @@ -1525,7 +1525,12 @@ spdk_nvmf_ctrlr_identify_ctrlr(struct spdk_nvmf_ctrlr *ctrlr, struct spdk_nvme_c cdata->nvmf_specific.iorcsz = sizeof(struct spdk_nvme_cpl) / 16; cdata->nvmf_specific.icdoff = 0; /* offset starts directly after SQE */ cdata->nvmf_specific.ctrattr.ctrlr_model = SPDK_NVMF_CTRLR_MODEL_DYNAMIC; - cdata->nvmf_specific.msdbd = 1; /* target supports single SGL in capsule */ + /* The RDMA transport supports up to SPDK_NVMF_MAX_SGL_ENTRIES descriptors. */ + if (transport->ops->type == SPDK_NVME_TRANSPORT_RDMA) { + cdata->nvmf_specific.msdbd = SPDK_NVMF_MAX_SGL_ENTRIES; + } else { + cdata->nvmf_specific.msdbd = 1; + } /* TODO: this should be set by the transport */ cdata->nvmf_specific.ioccsz += transport->opts.in_capsule_data_size / 16;