From 9cdd1a8a2cfa566de31d70a90a0970eaba533c8d Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Wed, 12 Oct 2022 10:59:20 +0800 Subject: [PATCH] lib/vhost: remove `vhost_session_used_signal` function `vdev_worker` in vhost-scsi is used to process request queues, and `vdev_mgmt_worker` is used to process the event and control queue, so we don't need to call `vhost_session_used_signal` in `vdev_worker`, just remove it. Change-Id: I86f3e90890e6defba69b01fec131afe1adad3a49 Signed-off-by: Changpeng Liu Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14927 Reviewed-by: Ben Walker Reviewed-by: Jim Harris Tested-by: SPDK CI Jenkins --- lib/vhost/rte_vhost_user.c | 12 ------------ lib/vhost/vhost_internal.h | 8 -------- lib/vhost/vhost_scsi.c | 3 +-- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/lib/vhost/rte_vhost_user.c b/lib/vhost/rte_vhost_user.c index b401b6604..88a3d0d5a 100644 --- a/lib/vhost/rte_vhost_user.c +++ b/lib/vhost/rte_vhost_user.c @@ -469,18 +469,6 @@ vhost_session_vq_used_signal(struct spdk_vhost_virtqueue *virtqueue) } } -void -vhost_session_used_signal(struct spdk_vhost_session *vsession) -{ - struct spdk_vhost_virtqueue *virtqueue; - uint16_t q_idx; - - for (q_idx = 0; q_idx < vsession->max_queues; q_idx++) { - virtqueue = &vsession->virtqueue[q_idx]; - vhost_session_vq_used_signal(virtqueue); - } -} - /* * Enqueue id and len to used ring. */ diff --git a/lib/vhost/vhost_internal.h b/lib/vhost/vhost_internal.h index 26aa575f6..7cd9b319b 100644 --- a/lib/vhost/vhost_internal.h +++ b/lib/vhost/vhost_internal.h @@ -301,14 +301,6 @@ int vhost_inflight_queue_get_desc(struct spdk_vhost_session *vsession, */ int vhost_vq_used_signal(struct spdk_vhost_session *vsession, struct spdk_vhost_virtqueue *vq); - -/** - * Send IRQs for all queues that need to be signaled. - * \param vsession vhost session - * \param vq virtqueue - */ -void vhost_session_used_signal(struct spdk_vhost_session *vsession); - /** * Send IRQs for the queue that need to be signaled. * \param vq virtqueue diff --git a/lib/vhost/vhost_scsi.c b/lib/vhost/vhost_scsi.c index ccdfc0ab7..c41555989 100644 --- a/lib/vhost/vhost_scsi.c +++ b/lib/vhost/vhost_scsi.c @@ -815,10 +815,9 @@ vdev_worker(void *arg) for (q_idx = VIRTIO_SCSI_REQUESTQ; q_idx < vsession->max_queues; q_idx++) { rc = process_vq(svsession, &vsession->virtqueue[q_idx]); + vhost_session_vq_used_signal(&vsession->virtqueue[q_idx]); } - vhost_session_used_signal(vsession); - return rc > 0 ? SPDK_POLLER_BUSY : SPDK_POLLER_IDLE; }