[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 3/9] virtio: Make virtqueue_alloc_element non-static
From: |
Eugenio Pérez |
Subject: |
[RFC PATCH 3/9] virtio: Make virtqueue_alloc_element non-static |
Date: |
Mon, 14 Feb 2022 20:16:29 +0100 |
So SVQ can allocate elements using it
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
include/hw/virtio/virtio.h | 1 +
hw/virtio/virtio.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index f095637058..6f4cccfd42 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -195,6 +195,7 @@ void virtqueue_fill(VirtQueue *vq, const VirtQueueElement
*elem,
unsigned int len, unsigned int idx);
void virtqueue_map(VirtIODevice *vdev, VirtQueueElement *elem);
+void *virtqueue_alloc_element(size_t sz, unsigned out_num, unsigned in_num);
void *virtqueue_pop(VirtQueue *vq, size_t sz);
unsigned int virtqueue_drop_all(VirtQueue *vq);
void *qemu_get_virtqueue_element(VirtIODevice *vdev, QEMUFile *f, size_t sz);
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index aae72fb8b7..ca7d1f0613 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -1376,7 +1376,7 @@ void virtqueue_map(VirtIODevice *vdev, VirtQueueElement
*elem)
false);
}
-static void *virtqueue_alloc_element(size_t sz, unsigned out_num, unsigned
in_num)
+void *virtqueue_alloc_element(size_t sz, unsigned out_num, unsigned in_num)
{
VirtQueueElement *elem;
size_t in_addr_ofs = QEMU_ALIGN_UP(sz, __alignof__(elem->in_addr[0]));
--
2.27.0
- [RFC PATCH 0/9] Net Control VQ support in vDPA SVQ, Eugenio Pérez, 2022/02/14
- [RFC PATCH 1/9] virtio-net: Expose ctrl virtqueue logic, Eugenio Pérez, 2022/02/14
- [RFC PATCH 2/9] vdpa: Extract get geatures part from vhost_vdpa_get_max_queue_pairs, Eugenio Pérez, 2022/02/14
- [RFC PATCH 3/9] virtio: Make virtqueue_alloc_element non-static,
Eugenio Pérez <=
- [RFC PATCH 4/9] vhost: Add SVQElement, Eugenio Pérez, 2022/02/14
- [RFC PATCH 5/9] vhost: Add custom used buffer callback, Eugenio Pérez, 2022/02/14
- [RFC PATCH 6/9] vdpa: Add map/unmap operation callback to SVQ, Eugenio Pérez, 2022/02/14
- [RFC PATCH 7/9] vhost: Add vhost_svq_inject, Eugenio Pérez, 2022/02/14
- [RFC PATCH 8/9] vhost: Add vhost_svq_start_op, Eugenio Pérez, 2022/02/14
- [RFC PATCH 9/9] vdpa: control virtqueue support on shadow virtqueue, Eugenio Pérez, 2022/02/14
- Re: [RFC PATCH 0/9] Net Control VQ support in vDPA SVQ, Eugenio Perez Martin, 2022/02/15