diff options
| author | Hawkins Jiawei <yin31149@gmail.com> | 2023-08-29 13:54:43 +0800 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2023-10-04 04:54:23 -0400 |
| commit | b0de17a2e28de477e09e77a587fcbeafbbc897c4 (patch) | |
| tree | b30f871659217fd4af1c9a59a52eb08ec2996577 /hw/virtio/vhost-shadow-virtqueue.h | |
| parent | f13f5f6412fc51574c961f39dbd625357948282b (diff) | |
| download | focaccia-qemu-b0de17a2e28de477e09e77a587fcbeafbbc897c4.tar.gz focaccia-qemu-b0de17a2e28de477e09e77a587fcbeafbbc897c4.zip | |
vhost: Add count argument to vhost_svq_poll()
Next patches in this series will no longer perform an immediate poll and check of the device's used buffers for each CVQ state load command. Instead, they will send CVQ state load commands in parallel by polling multiple pending buffers at once. To achieve this, this patch refactoring vhost_svq_poll() to accept a new argument `num`, which allows vhost_svq_poll() to wait for the device to use multiple elements, rather than polling for a single element. Signed-off-by: Hawkins Jiawei <yin31149@gmail.com> Acked-by: Eugenio Pérez <eperezma@redhat.com> Message-Id: <950b3bfcfc5d446168b9d6a249d554a013a691d4.1693287885.git.yin31149@gmail.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio/vhost-shadow-virtqueue.h')
| -rw-r--r-- | hw/virtio/vhost-shadow-virtqueue.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/virtio/vhost-shadow-virtqueue.h b/hw/virtio/vhost-shadow-virtqueue.h index 6efe051a70..5bce67837b 100644 --- a/hw/virtio/vhost-shadow-virtqueue.h +++ b/hw/virtio/vhost-shadow-virtqueue.h @@ -119,7 +119,7 @@ void vhost_svq_push_elem(VhostShadowVirtqueue *svq, int vhost_svq_add(VhostShadowVirtqueue *svq, const struct iovec *out_sg, size_t out_num, const struct iovec *in_sg, size_t in_num, VirtQueueElement *elem); -size_t vhost_svq_poll(VhostShadowVirtqueue *svq); +size_t vhost_svq_poll(VhostShadowVirtqueue *svq, size_t num); void vhost_svq_set_svq_kick_fd(VhostShadowVirtqueue *svq, int svq_kick_fd); void vhost_svq_set_svq_call_fd(VhostShadowVirtqueue *svq, int call_fd); |