[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 11/19] vhost: Expose vhost_svq_add
From: |
Eugenio Pérez |
Subject: |
[PATCH v3 11/19] vhost: Expose vhost_svq_add |
Date: |
Fri, 15 Jul 2022 19:18:26 +0200 |
This allows external parts of SVQ to forward custom buffers to the
device.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
hw/virtio/vhost-shadow-virtqueue.h | 3 +++
hw/virtio/vhost-shadow-virtqueue.c | 6 +++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/hw/virtio/vhost-shadow-virtqueue.h
b/hw/virtio/vhost-shadow-virtqueue.h
index d9fc1f1799..dd78f4bec2 100644
--- a/hw/virtio/vhost-shadow-virtqueue.h
+++ b/hw/virtio/vhost-shadow-virtqueue.h
@@ -86,6 +86,9 @@ bool vhost_svq_valid_features(uint64_t features, Error
**errp);
void vhost_svq_push_elem(VhostShadowVirtqueue *svq,
const VirtQueueElement *elem, uint32_t len);
+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);
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);
diff --git a/hw/virtio/vhost-shadow-virtqueue.c
b/hw/virtio/vhost-shadow-virtqueue.c
index b377e125e7..406a823c81 100644
--- a/hw/virtio/vhost-shadow-virtqueue.c
+++ b/hw/virtio/vhost-shadow-virtqueue.c
@@ -238,9 +238,9 @@ static void vhost_svq_kick(VhostShadowVirtqueue *svq)
*
* Return -EINVAL if element is invalid, -ENOSPC if dev queue is full
*/
-static 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)
+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)
{
unsigned qemu_head;
unsigned ndescs = in_num + out_num;
--
2.31.1
- [PATCH v3 02/19] virtio-net: Expose MAC_TABLE_ENTRIES, (continued)
- [PATCH v3 02/19] virtio-net: Expose MAC_TABLE_ENTRIES, Eugenio Pérez, 2022/07/15
- [PATCH v3 05/19] vhost: Move vhost_svq_kick call to vhost_svq_add, Eugenio Pérez, 2022/07/15
- [PATCH v3 04/19] vhost: Reorder vhost_svq_kick, Eugenio Pérez, 2022/07/15
- [PATCH v3 06/19] vhost: Check for queue full at vhost_svq_add, Eugenio Pérez, 2022/07/15
- [PATCH v3 07/19] vhost: Decouple vhost_svq_add from VirtQueueElement, Eugenio Pérez, 2022/07/15
- [PATCH v3 09/19] vhost: Track number of descs in SVQDescState, Eugenio Pérez, 2022/07/15
- [PATCH v3 08/19] vhost: Add SVQDescState, Eugenio Pérez, 2022/07/15
- [PATCH v3 03/19] virtio-net: Expose ctrl virtqueue logic, Eugenio Pérez, 2022/07/15
- [PATCH v3 13/19] vhost: Add svq avail_handler callback, Eugenio Pérez, 2022/07/15
- [PATCH v3 12/19] vhost: add vhost_svq_poll, Eugenio Pérez, 2022/07/15
- [PATCH v3 11/19] vhost: Expose vhost_svq_add,
Eugenio Pérez <=
- [PATCH v3 15/19] vdpa: manual forward CVQ buffers, Eugenio Pérez, 2022/07/15
- [PATCH v3 18/19] vdpa: Add device migration blocker, Eugenio Pérez, 2022/07/15
- [PATCH v3 17/19] vdpa: Extract get features part from vhost_vdpa_get_max_queue_pairs, Eugenio Pérez, 2022/07/15
- [PATCH v3 10/19] vhost: add vhost_svq_push_elem, Eugenio Pérez, 2022/07/15
- [PATCH v3 16/19] vdpa: Buffer CVQ support on shadow virtqueue, Eugenio Pérez, 2022/07/15
- [PATCH v3 14/19] vdpa: Export vhost_vdpa_dma_map and unmap calls, Eugenio Pérez, 2022/07/15
- [PATCH v3 19/19] vdpa: Add x-svq to NetdevVhostVDPAOptions, Eugenio Pérez, 2022/07/15
- Re: [PATCH v3 00/19] vdpa net devices Rx filter change notification with Shadow VQ, Jason Wang, 2022/07/17
- Re: [PATCH v3 00/19] vdpa net devices Rx filter change notification with Shadow VQ, Michael S. Tsirkin, 2022/07/19