nvme: drop Set Features of Keep Alive Timeout

The NVMe over Fabrics transports should already be setting this in the
initial admin queue Connect command, so setting it again is not useful.

The kernel NVMe over Fabrics target additionally has a bug in the Set
Features - Keep Alive Timeout handler (it is extracting the KATO value
from the wrong offset in the command), so this works around the kernel
bug by not sending the Set Features command at all.

Change-Id: I0d7f09b71fcea116acf8810c5880157bb9315a04
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
Ziye Yang 2016-12-07 23:38:48 +08:00 committed by Daniel Verkamp
parent efd7ecd5d4
commit 320c7fb825

View File

@ -656,29 +656,6 @@ nvme_ctrlr_set_keep_alive_timeout(struct spdk_nvme_ctrlr *ctrlr)
return 0;
}
SPDK_TRACELOG(SPDK_TRACE_NVME, "Setting keep alive timeout feature to %u ms\n",
ctrlr->opts.keep_alive_timeout_ms);
status.done = false;
rc = spdk_nvme_ctrlr_cmd_set_feature(ctrlr, SPDK_NVME_FEAT_KEEP_ALIVE_TIMER,
ctrlr->opts.keep_alive_timeout_ms, 0, NULL, 0,
nvme_completion_poll_cb, &status);
if (rc != 0) {
SPDK_ERRLOG("Keep alive timeout Set Feature failed: %d\n", rc);
ctrlr->opts.keep_alive_timeout_ms = 0;
return rc;
}
while (status.done == false) {
spdk_nvme_qpair_process_completions(ctrlr->adminq, 0);
}
if (spdk_nvme_cpl_is_error(&status.cpl)) {
SPDK_ERRLOG("Keep alive timeout Set Feature failed: SC %x SCT %x\n",
status.cpl.status.sc, status.cpl.status.sct);
ctrlr->opts.keep_alive_timeout_ms = 0;
return -ENXIO;
}
/* Retrieve actual keep alive timeout, since the controller may have adjusted it. */
status.done = false;
rc = spdk_nvme_ctrlr_cmd_get_feature(ctrlr, SPDK_NVME_FEAT_KEEP_ALIVE_TIMER, 0, NULL, 0,