nvme: eliminate global configuration 'spdk_nvme_retry_count' option with PCIe transport
We have defined NVMe controller initialization 'transport_retry_count' option, so global 'spdk_nvme_retry_count' can be removed, we will remove the variable with PCIe transport first, and make the retry count can be configured via RPC. Change-Id: I4d54f78c8da2180d536635587e7291f44a57c4fb Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464472 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
16ed234497
commit
936d856219
@ -94,7 +94,7 @@ struct spdk_nvme_ctrlr_opts {
|
||||
/**
|
||||
* Specify the retry number when there is issue with the transport
|
||||
*/
|
||||
int transport_retry_count;
|
||||
uint8_t transport_retry_count;
|
||||
|
||||
/**
|
||||
* The queue depth of each NVMe I/O queue.
|
||||
|
@ -119,6 +119,10 @@ spdk_nvme_ctrlr_get_default_ctrlr_opts(struct spdk_nvme_ctrlr_opts *opts, size_t
|
||||
opts->keep_alive_timeout_ms = MIN_KEEP_ALIVE_TIMEOUT_IN_MS;
|
||||
}
|
||||
|
||||
if (FIELD_OK(transport_retry_count)) {
|
||||
opts->transport_retry_count = SPDK_NVME_DEFAULT_RETRY_COUNT;
|
||||
}
|
||||
|
||||
if (FIELD_OK(io_queue_size)) {
|
||||
opts->io_queue_size = DEFAULT_IO_QUEUE_SIZE;
|
||||
}
|
||||
|
@ -156,6 +156,8 @@ struct nvme_pcie_qpair {
|
||||
|
||||
uint16_t num_entries;
|
||||
|
||||
uint8_t retry_count;
|
||||
|
||||
uint16_t max_completions_cap;
|
||||
|
||||
uint16_t last_sq_tail;
|
||||
@ -1013,6 +1015,8 @@ nvme_pcie_qpair_construct(struct spdk_nvme_qpair *qpair,
|
||||
cq_paddr = opts->cq.paddr;
|
||||
}
|
||||
|
||||
pqpair->retry_count = ctrlr->opts.transport_retry_count;
|
||||
|
||||
/*
|
||||
* Limit the maximum number of completions to return per call to prevent wraparound,
|
||||
* and calculate how many trackers can be submitted at once without overflowing the
|
||||
@ -1316,7 +1320,7 @@ nvme_pcie_qpair_complete_tracker(struct spdk_nvme_qpair *qpair, struct nvme_trac
|
||||
|
||||
error = spdk_nvme_cpl_is_error(cpl);
|
||||
retry = error && nvme_completion_is_retry(cpl) &&
|
||||
req->retries < spdk_nvme_retry_count;
|
||||
req->retries < pqpair->retry_count;
|
||||
|
||||
if (error && print_on_error && !qpair->ctrlr->opts.disable_error_logging) {
|
||||
spdk_nvme_qpair_print_command(qpair, &req->cmd);
|
||||
|
Loading…
Reference in New Issue
Block a user