From d73d43a9cf10c6ef494dc4656b27e1c1a281e07a Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Wed, 8 Dec 2021 21:08:59 +0800 Subject: [PATCH] nvmf/vfio-user: don't set ACTIVE state for ADMIN queue pair When doing live migration, the destination VM will construct ADMIN queue pair at the beginning, but the controller isn't in READY state, we should not poll the ADMIN queue pair right now. This is fine for normal controllers, normal controllers will set ADMIN queue pair state in CC callback. Change-Id: I0db36f75a463fb7476ee62323f9ed0c74c2451dc Signed-off-by: Changpeng Liu Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10621 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- lib/nvmf/vfio_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nvmf/vfio_user.c b/lib/nvmf/vfio_user.c index 675c49286..2b135fced 100644 --- a/lib/nvmf/vfio_user.c +++ b/lib/nvmf/vfio_user.c @@ -2919,7 +2919,6 @@ handle_queue_connect_rsp(struct nvmf_vfio_user_req *req, void *cb_arg) vu_group = SPDK_CONTAINEROF(vu_sq->group, struct nvmf_vfio_user_poll_group, group); TAILQ_INSERT_TAIL(&vu_group->sqs, vu_sq, link); - vu_sq->sq_state = VFIO_USER_SQ_ACTIVE; vu_cq = vu_ctrlr->cqs[0]; assert(vu_cq != NULL); @@ -2961,6 +2960,7 @@ handle_queue_connect_rsp(struct nvmf_vfio_user_req *req, void *cb_arg) } vu_sq->post_create_io_sq_completion = false; } + vu_sq->sq_state = VFIO_USER_SQ_ACTIVE; } TAILQ_INSERT_TAIL(&vu_ctrlr->connected_sqs, vu_sq, tailq);