nvme: fix issue with io queue size
The quirk can only be applied when not exceeding mqes. Given codition is not enough as DEFAULT_IO_QUEUE_SIZE can be equal mqes + 1. In such case driver is unable to create io queues. Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com> Change-Id: I72de37ee413788ffd3483e814eded21ea05997c9 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1456 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
parent
ab23eb6565
commit
b8eaa96791
@ -472,8 +472,9 @@ nvme_ctrlr_probe(const struct spdk_nvme_transport_id *trid,
|
||||
/* If the user specifically set an IO queue size different than the
|
||||
* default, use that value. Otherwise overwrite with the quirked value.
|
||||
* This allows this quirk to be overridden when necessary.
|
||||
* However, cap.mqes still needs to be respected.
|
||||
*/
|
||||
ctrlr->opts.io_queue_size = DEFAULT_IO_QUEUE_SIZE_FOR_QUIRK;
|
||||
ctrlr->opts.io_queue_size = spdk_min(DEFAULT_IO_QUEUE_SIZE_FOR_QUIRK, ctrlr->cap.bits.mqes + 1u);
|
||||
}
|
||||
|
||||
nvme_qpair_set_state(ctrlr->adminq, NVME_QPAIR_ENABLED);
|
||||
|
Loading…
Reference in New Issue
Block a user