nvme: use saved CC register value when creating IO qpairs

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I6c518df9d8ecd74247ed8f8ffe133305cbd627f3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8622
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Konrad Sztyber 2021-06-29 16:50:43 +02:00 committed by Tomasz Zawadzki
parent 9e2166807a
commit 0825befa59
2 changed files with 3 additions and 7 deletions

View File

@ -387,11 +387,7 @@ nvme_ctrlr_create_io_qpair(struct spdk_nvme_ctrlr *ctrlr,
}
nvme_robust_mutex_lock(&ctrlr->ctrlr_lock);
if (nvme_ctrlr_get_cc(ctrlr, &cc)) {
NVME_CTRLR_ERRLOG(ctrlr, "get_cc failed\n");
nvme_robust_mutex_unlock(&ctrlr->ctrlr_lock);
return NULL;
}
cc.raw = ctrlr->process_init_cc.raw;
if (opts->qprio & ~SPDK_NVME_CREATE_IO_SQ_QPRIO_MASK) {
nvme_robust_mutex_unlock(&ctrlr->ctrlr_lock);

View File

@ -1578,7 +1578,7 @@ test_alloc_io_qpair_wrr_1(void)
* Fake to simulate the controller with weighted round robin
* arbitration mechanism.
*/
g_ut_nvme_regs.cc.bits.ams = SPDK_NVME_CC_AMS_WRR;
ctrlr.process_init_cc.bits.ams = SPDK_NVME_CC_AMS_WRR;
spdk_nvme_ctrlr_get_default_io_qpair_opts(&ctrlr, &opts, sizeof(opts));
@ -1632,7 +1632,7 @@ test_alloc_io_qpair_wrr_2(void)
* Fake to simulate the controller with weighted round robin
* arbitration mechanism.
*/
g_ut_nvme_regs.cc.bits.ams = SPDK_NVME_CC_AMS_WRR;
ctrlr.process_init_cc.bits.ams = SPDK_NVME_CC_AMS_WRR;
spdk_nvme_ctrlr_get_default_io_qpair_opts(&ctrlr, &opts, sizeof(opts));