nvme: move SPDK_NVME_DEFAULT_RETRY_COUNT out from nvme.h
SPDK_NVME_DEFAULT_RETRY_COUNT is the default value for each controller, so we can move it out from public header file, and change the value if users provide a new one. "NvmeRetryCount" was deprecated for a long time, so we removed the support for this configuration option as well. Change-Id: I187251cc1e5342abb4fce96727d06631b7c16a01 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464489 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
62bb65289d
commit
7cbe1ccd56
@ -48,8 +48,6 @@ extern "C" {
|
|||||||
#include "spdk/nvme_spec.h"
|
#include "spdk/nvme_spec.h"
|
||||||
#include "spdk/nvmf_spec.h"
|
#include "spdk/nvmf_spec.h"
|
||||||
|
|
||||||
#define SPDK_NVME_DEFAULT_RETRY_COUNT (4)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opaque handle to a controller. Returned by spdk_nvme_probe()'s attach_cb.
|
* Opaque handle to a controller. Returned by spdk_nvme_probe()'s attach_cb.
|
||||||
*/
|
*/
|
||||||
|
@ -104,7 +104,7 @@ static TAILQ_HEAD(, nvme_probe_skip_entry) g_skipped_nvme_ctrlrs = TAILQ_HEAD_IN
|
|||||||
static struct spdk_bdev_nvme_opts g_opts = {
|
static struct spdk_bdev_nvme_opts g_opts = {
|
||||||
.action_on_timeout = SPDK_BDEV_NVME_TIMEOUT_ACTION_NONE,
|
.action_on_timeout = SPDK_BDEV_NVME_TIMEOUT_ACTION_NONE,
|
||||||
.timeout_us = 0,
|
.timeout_us = 0,
|
||||||
.retry_count = SPDK_NVME_DEFAULT_RETRY_COUNT,
|
.retry_count = 4,
|
||||||
.nvme_adminq_poll_period_us = 1000000ULL,
|
.nvme_adminq_poll_period_us = 1000000ULL,
|
||||||
.nvme_ioq_poll_period_us = 0,
|
.nvme_ioq_poll_period_us = 0,
|
||||||
.io_queue_requests = 0,
|
.io_queue_requests = 0,
|
||||||
@ -1379,16 +1379,10 @@ bdev_nvme_library_init(void)
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((retry_count = spdk_conf_section_get_intval(sp, "RetryCount")) < 0) {
|
retry_count = spdk_conf_section_get_intval(sp, "RetryCount");
|
||||||
if ((retry_count = spdk_conf_section_get_intval(sp, "NvmeRetryCount")) < 0) {
|
if (retry_count >= 0) {
|
||||||
retry_count = SPDK_NVME_DEFAULT_RETRY_COUNT;
|
|
||||||
} else {
|
|
||||||
SPDK_WARNLOG("NvmeRetryCount was renamed to RetryCount\n");
|
|
||||||
SPDK_WARNLOG("Please update your configuration file\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
g_opts.retry_count = retry_count;
|
g_opts.retry_count = retry_count;
|
||||||
|
}
|
||||||
|
|
||||||
val = spdk_conf_section_get_val(sp, "TimeoutUsec");
|
val = spdk_conf_section_get_val(sp, "TimeoutUsec");
|
||||||
if (val != NULL) {
|
if (val != NULL) {
|
||||||
|
@ -141,6 +141,8 @@ extern pid_t g_spdk_nvme_pid;
|
|||||||
#define DEFAULT_ADMIN_QUEUE_REQUESTS (32)
|
#define DEFAULT_ADMIN_QUEUE_REQUESTS (32)
|
||||||
#define DEFAULT_IO_QUEUE_REQUESTS (512)
|
#define DEFAULT_IO_QUEUE_REQUESTS (512)
|
||||||
|
|
||||||
|
#define SPDK_NVME_DEFAULT_RETRY_COUNT (4)
|
||||||
|
|
||||||
#define MIN_KEEP_ALIVE_TIMEOUT_IN_MS (10000)
|
#define MIN_KEEP_ALIVE_TIMEOUT_IN_MS (10000)
|
||||||
|
|
||||||
/* We want to fit submission and completion rings each in a single 2MB
|
/* We want to fit submission and completion rings each in a single 2MB
|
||||||
|
Loading…
Reference in New Issue
Block a user