nvmf: Add a flag dif_insert_or_strip to struct spdk_nvmf_ctrlr
Add a flag dif_insert_or_strip to struct spdk_nvmf_ctrlr that indicates whether DIF insert/strip is done. Copy the DIF insert/strip setting of the corresponding transport options to the flag at NVMf controller creation. The purpose of this patch is to make DIF insert/strip not per-transport option but per-controller option because we may want to be able to control DIF insert/strip per controller at some point. Besides this patch will clean the implementation. Besides align indent around the change. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I57f65960b430e55f4021ed514aacd85581ff9993 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461313 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
parent
a4b0a2b6fd
commit
91da9aaafe
@ -352,6 +352,8 @@ spdk_nvmf_ctrlr_create(struct spdk_nvmf_subsystem *subsystem,
|
|||||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "cc 0x%x\n", ctrlr->vcprop.cc.raw);
|
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "cc 0x%x\n", ctrlr->vcprop.cc.raw);
|
||||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "csts 0x%x\n", ctrlr->vcprop.csts.raw);
|
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "csts 0x%x\n", ctrlr->vcprop.csts.raw);
|
||||||
|
|
||||||
|
ctrlr->dif_insert_or_strip = transport->opts.dif_insert_or_strip;
|
||||||
|
|
||||||
req->qpair->ctrlr = ctrlr;
|
req->qpair->ctrlr = ctrlr;
|
||||||
spdk_thread_send_msg(subsystem->thread, _spdk_nvmf_subsystem_add_ctrlr, req);
|
spdk_thread_send_msg(subsystem->thread, _spdk_nvmf_subsystem_add_ctrlr, req);
|
||||||
|
|
||||||
|
@ -310,10 +310,12 @@ struct spdk_nvmf_ctrlr {
|
|||||||
TAILQ_HEAD(log_page_head, spdk_nvmf_reservation_log) log_head;
|
TAILQ_HEAD(log_page_head, spdk_nvmf_reservation_log) log_head;
|
||||||
|
|
||||||
/* Time to trigger keep-alive--poller_time = now_tick + period */
|
/* Time to trigger keep-alive--poller_time = now_tick + period */
|
||||||
uint64_t last_keep_alive_tick;
|
uint64_t last_keep_alive_tick;
|
||||||
struct spdk_poller *keep_alive_poller;
|
struct spdk_poller *keep_alive_poller;
|
||||||
|
|
||||||
TAILQ_ENTRY(spdk_nvmf_ctrlr) link;
|
bool dif_insert_or_strip;
|
||||||
|
|
||||||
|
TAILQ_ENTRY(spdk_nvmf_ctrlr) link;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct spdk_nvmf_subsystem {
|
struct spdk_nvmf_subsystem {
|
||||||
|
Loading…
Reference in New Issue
Block a user