nvmf: fix the associate timeout value
SPDK poller uses microsecond as the input parameter, so we need to change the correct value when opts.association_timeout is expressed by millisecond. Change-Id: Ia674f0115ea176b998e4c0c70b8ce75b28984701 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3861 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI 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
5d5a9077a3
commit
01b6bd8a92
@ -86,6 +86,7 @@ struct spdk_nvmf_transport_opts {
|
|||||||
uint32_t sock_priority;
|
uint32_t sock_priority;
|
||||||
int acceptor_backlog;
|
int acceptor_backlog;
|
||||||
uint32_t abort_timeout_sec;
|
uint32_t abort_timeout_sec;
|
||||||
|
/* ms */
|
||||||
uint32_t association_timeout;
|
uint32_t association_timeout;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -788,7 +788,7 @@ nvmf_ctrlr_cc_shn_done(struct spdk_io_channel_iter *i, int status)
|
|||||||
/* After CC.EN transitions to 0 (due to shutdown or reset), the association
|
/* After CC.EN transitions to 0 (due to shutdown or reset), the association
|
||||||
* between the host and controller shall be preserved for at least 2 minutes */
|
* between the host and controller shall be preserved for at least 2 minutes */
|
||||||
ctrlr->association_timer = SPDK_POLLER_REGISTER(nvmf_ctrlr_association_remove, ctrlr,
|
ctrlr->association_timer = SPDK_POLLER_REGISTER(nvmf_ctrlr_association_remove, ctrlr,
|
||||||
ctrlr->admin_qpair->transport->opts.association_timeout);
|
ctrlr->admin_qpair->transport->opts.association_timeout * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -808,7 +808,7 @@ nvmf_ctrlr_cc_reset_done(struct spdk_io_channel_iter *i, int status)
|
|||||||
/* After CC.EN transitions to 0 (due to shutdown or reset), the association
|
/* After CC.EN transitions to 0 (due to shutdown or reset), the association
|
||||||
* between the host and controller shall be preserved for at least 2 minutes */
|
* between the host and controller shall be preserved for at least 2 minutes */
|
||||||
ctrlr->association_timer = SPDK_POLLER_REGISTER(nvmf_ctrlr_association_remove, ctrlr,
|
ctrlr->association_timer = SPDK_POLLER_REGISTER(nvmf_ctrlr_association_remove, ctrlr,
|
||||||
ctrlr->admin_qpair->transport->opts.association_timeout);
|
ctrlr->admin_qpair->transport->opts.association_timeout * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct spdk_nvmf_registers *
|
const struct spdk_nvmf_registers *
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
#include "spdk/util.h"
|
#include "spdk/util.h"
|
||||||
|
|
||||||
#define MAX_MEMPOOL_NAME_LENGTH 40
|
#define MAX_MEMPOOL_NAME_LENGTH 40
|
||||||
#define NVMF_TRANSPORT_DEFAULT_ASSOCIATION_TIMEOUT 120000 /* ms */
|
#define NVMF_TRANSPORT_DEFAULT_ASSOCIATION_TIMEOUT_IN_MS 120000
|
||||||
|
|
||||||
struct nvmf_transport_ops_list_element {
|
struct nvmf_transport_ops_list_element {
|
||||||
struct spdk_nvmf_transport_ops ops;
|
struct spdk_nvmf_transport_ops ops;
|
||||||
@ -500,7 +500,7 @@ spdk_nvmf_transport_opts_init(const char *transport_name,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
opts->association_timeout = NVMF_TRANSPORT_DEFAULT_ASSOCIATION_TIMEOUT;
|
opts->association_timeout = NVMF_TRANSPORT_DEFAULT_ASSOCIATION_TIMEOUT_IN_MS;
|
||||||
ops->opts_init(opts);
|
ops->opts_init(opts);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user