nvmf/vfio-user: fix set_ctrlr_intr_mode() queue check

We need to check that the given SQ is active (i.e. is currently mapped
into the process), so make the check the same as that in
poll_group_poll().

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Ibd3babd7520f611f596f3bab15765fa13b4d6b99
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12663
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
John Levon 2022-04-28 14:55:24 +00:00 committed by Tomasz Zawadzki
parent 3c481cc271
commit a6b0cd0c05

View File

@ -1495,7 +1495,11 @@ set_ctrlr_intr_mode(struct nvmf_vfio_user_ctrlr *ctrlr)
* skip it.
*/
for (size_t i = 1; i < NVMF_VFIO_USER_DEFAULT_MAX_QPAIRS_PER_CTRLR; ++i) {
if (!io_q_exists(ctrlr, i, false)) {
struct nvmf_vfio_user_sq *sq = ctrlr->sqs[i];
if (sq == NULL ||
sq->sq_state != VFIO_USER_SQ_ACTIVE ||
!sq->size) {
continue;
}