Commit d786273d authored by Changpeng Liu's avatar Changpeng Liu Committed by Tomasz Zawadzki
Browse files

nvmf/vfio-user: connect IO queue pair after creating SQ



The CQ is created first, so it's more reasonable to connect
the IO queue pair after creating the SQ.

Change-Id: I196c19a54a015310a3777d9bfca7db8735a4d5b2
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6309


Community-CI: Broadcom CI
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 8586a1b3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -889,6 +889,7 @@ handle_create_io_q(struct nvmf_vfio_user_ctrlr *ctrlr,
			sc = SPDK_NVME_SC_INTERNAL_DEVICE_ERROR;
			goto out;
		}
	} else {
		/*
		 * After we've returned from the nvmf_vfio_user_poll_group_poll thread, once
		 * nvmf_vfio_user_accept executes it will pick up this QP and will eventually
@@ -897,6 +898,7 @@ handle_create_io_q(struct nvmf_vfio_user_ctrlr *ctrlr,
		 * completion callback.
		 */
		TAILQ_INSERT_TAIL(&ctrlr->transport->new_qps, ctrlr->qp[cmd->cdw10_bits.create_io_q.qid], link);

	}
	insert_queue(ctrlr, &io_q, is_cq, cmd->cdw10_bits.create_io_q.qid);