Commit a6b0cd0c authored by John Levon's avatar John Levon Committed by Tomasz Zawadzki
Browse files

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: default avatarJohn 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: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 3c481cc2
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;
		}