diff --git a/lib/nvme/nvme.c b/lib/nvme/nvme.c index 213166bcc..4ca915cbe 100644 --- a/lib/nvme/nvme.c +++ b/lib/nvme/nvme.c @@ -39,7 +39,7 @@ struct nvme_driver g_nvme_driver = { .lock = NVME_MUTEX_INITIALIZER, - .max_io_queues = NVME_MAX_IO_QUEUES + .max_io_queues = DEFAULT_MAX_IO_QUEUES }; int32_t nvme_retry_count; diff --git a/lib/nvme/nvme_internal.h b/lib/nvme/nvme_internal.h index 29f32e339..219414eb5 100644 --- a/lib/nvme/nvme_internal.h +++ b/lib/nvme/nvme_internal.h @@ -95,6 +95,13 @@ /* Maximum log page size to fetch for AERs. */ #define NVME_MAX_AER_LOG_SIZE (4096) +/* + * NVME_MAX_IO_QUEUES in nvme_spec.h defines the 64K spec-limit, but this + * define specifies the maximum number of queues this driver will actually + * try to configure, if available. + */ +#define DEFAULT_MAX_IO_QUEUES (1024) + struct nvme_request { struct nvme_command cmd; diff --git a/test/lib/nvme/unit/nvme_ctrlr_c/nvme_ctrlr_ut.c b/test/lib/nvme/unit/nvme_ctrlr_c/nvme_ctrlr_ut.c index f58f6666b..804403344 100644 --- a/test/lib/nvme/unit/nvme_ctrlr_c/nvme_ctrlr_ut.c +++ b/test/lib/nvme/unit/nvme_ctrlr_c/nvme_ctrlr_ut.c @@ -37,7 +37,7 @@ struct nvme_driver g_nvme_driver = { .lock = NVME_MUTEX_INITIALIZER, - .max_io_queues = NVME_MAX_IO_QUEUES + .max_io_queues = DEFAULT_MAX_IO_QUEUES }; char outbuf[OUTBUF_SIZE]; diff --git a/test/lib/nvme/unit/nvme_qpair_c/nvme_qpair_ut.c b/test/lib/nvme/unit/nvme_qpair_c/nvme_qpair_ut.c index 3efec1603..f2e938dab 100644 --- a/test/lib/nvme/unit/nvme_qpair_c/nvme_qpair_ut.c +++ b/test/lib/nvme/unit/nvme_qpair_c/nvme_qpair_ut.c @@ -37,7 +37,7 @@ struct nvme_driver g_nvme_driver = { .lock = NVME_MUTEX_INITIALIZER, - .max_io_queues = NVME_MAX_IO_QUEUES, + .max_io_queues = DEFAULT_MAX_IO_QUEUES, }; int32_t nvme_retry_count = 1;