From 92ee5fc4be432c254eee89cc97d5a45b38dc9078 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 12 Dec 2016 16:27:23 -0700 Subject: [PATCH] nvme: rename queue_size option to io_queue_size This better describes what the field controls (it does not affect the admin queue size). Change-Id: I851ae46fb4ed0fce819af07ae235824e0fc817e6 Signed-off-by: Daniel Verkamp --- include/spdk/nvme.h | 2 +- lib/nvme/nvme_ctrlr.c | 2 +- lib/nvme/nvme_internal.h | 2 +- lib/nvme/nvme_pcie.c | 4 +--- lib/nvme/nvme_rdma.c | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/spdk/nvme.h b/include/spdk/nvme.h index 7cf06d7d9..500c424b4 100644 --- a/include/spdk/nvme.h +++ b/include/spdk/nvme.h @@ -99,7 +99,7 @@ struct spdk_nvme_ctrlr_opts { /** * The queue depth of each NVMe I/O queue. */ - uint32_t queue_size; + uint32_t io_queue_size; /** * The host NQN to use when connecting to NVMe over Fabrics controllers. diff --git a/lib/nvme/nvme_ctrlr.c b/lib/nvme/nvme_ctrlr.c index e326de1a9..097ba7858 100644 --- a/lib/nvme/nvme_ctrlr.c +++ b/lib/nvme/nvme_ctrlr.c @@ -80,7 +80,7 @@ spdk_nvme_ctrlr_opts_set_defaults(struct spdk_nvme_ctrlr_opts *opts) opts->use_cmb_sqs = false; opts->arb_mechanism = SPDK_NVME_CC_AMS_RR; opts->keep_alive_timeout_ms = 10 * 1000; - opts->queue_size = DEFAULT_MAX_QUEUE_SIZE; + opts->io_queue_size = DEFAULT_IO_QUEUE_SIZE; strncpy(opts->hostnqn, DEFAULT_HOSTNQN, sizeof(opts->hostnqn)); } diff --git a/lib/nvme/nvme_internal.h b/lib/nvme/nvme_internal.h index f27fab18d..2e3a037a7 100644 --- a/lib/nvme/nvme_internal.h +++ b/lib/nvme/nvme_internal.h @@ -98,7 +98,7 @@ * try to configure, if available. */ #define DEFAULT_MAX_IO_QUEUES (1024) -#define DEFAULT_MAX_QUEUE_SIZE (256) +#define DEFAULT_IO_QUEUE_SIZE (256) #define DEFAULT_HOSTNQN "nqn.2016-06.io.spdk:host" diff --git a/lib/nvme/nvme_pcie.c b/lib/nvme/nvme_pcie.c index 7e0b11d0f..88d3cb1d8 100644 --- a/lib/nvme/nvme_pcie.c +++ b/lib/nvme/nvme_pcie.c @@ -1339,9 +1339,7 @@ nvme_pcie_ctrlr_create_io_qpair(struct spdk_nvme_ctrlr *ctrlr, uint16_t qid, * the MQES field in the capabilities register. */ num_entries = nvme_min(NVME_IO_ENTRIES, ctrlr->cap.bits.mqes + 1); - - /* Also should choose minmal between original and the value passed by users */ - num_entries = nvme_min(num_entries, ctrlr->opts.queue_size); + num_entries = nvme_min(num_entries, ctrlr->opts.io_queue_size); rc = nvme_qpair_construct(qpair, qid, num_entries, ctrlr, qprio); if (rc != 0) { diff --git a/lib/nvme/nvme_rdma.c b/lib/nvme/nvme_rdma.c index b14f1df2b..ac7de08ab 100644 --- a/lib/nvme/nvme_rdma.c +++ b/lib/nvme/nvme_rdma.c @@ -957,7 +957,7 @@ nvme_rdma_ctrlr_create_qpair(struct spdk_nvme_ctrlr *ctrlr, uint16_t qid, } else { num_entries = nvme_min(NVME_HOST_MAX_ENTRIES_PER_QUEUE, ctrlr->cap.bits.mqes + 1); - num_entries = nvme_min(num_entries, rctrlr->ctrlr.opts.queue_size); + num_entries = nvme_min(num_entries, rctrlr->ctrlr.opts.io_queue_size); } rc = nvme_qpair_construct(qpair, qid, num_entries, ctrlr, qprio);