From: "Eugenio Pérez" <eperezma@redhat.com>
To: qemu-devel@nongnu.org
Cc: Laurent Vivier <lvivier@redhat.com>,
Parav Pandit <parav@mellanox.com>, Cindy Lu <lulu@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Gautam Dawar <gdawar@xilinx.com>,
Harpreet Singh Anand <hanand@xilinx.com>,
Eli Cohen <eli@mellanox.com>,
Zhu Lingshan <lingshan.zhu@intel.com>,
Liuxiangdong <liuxiangdong5@huawei.com>
Subject: [RFC PATCH v2 07/18] virtio: Make virtqueue_alloc_element non-static
Date: Thu, 17 Mar 2022 19:23:48 +0100 [thread overview]
Message-ID: <20220317182400.651508-8-eperezma@redhat.com> (raw)
In-Reply-To: <20220317182400.651508-1-eperezma@redhat.com>
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 9e8f51dfb0..e143d900a1 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
next prev parent reply other threads:[~2022-03-17 18:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-17 18:23 [RFC PATCH v2 00/18] Net Control VQ support with asid in vDPA SVQ Eugenio Pérez
2022-03-17 18:23 ` [RFC PATCH v2 01/18] vdpa: Add x-svq to NetdevVhostVDPAOptions Eugenio Pérez
2022-03-17 18:23 ` [RFC PATCH v2 02/18] vhost: move descriptor translation to vhost_svq_vring_write_descs Eugenio Pérez
2022-03-17 18:23 ` [RFC PATCH v2 03/18] vdpa: Fix index calculus at vhost_vdpa_svqs_start Eugenio Pérez
2022-03-17 18:23 ` [RFC PATCH v2 04/18] virtio-net: use g_memdup2() instead of unsafe g_memdup() Eugenio Pérez
2022-03-17 18:23 ` [RFC PATCH v2 05/18] virtio-net: Expose ctrl virtqueue logic Eugenio Pérez
2022-03-17 18:23 ` [RFC PATCH v2 06/18] vdpa: Extract get geatures part from vhost_vdpa_get_max_queue_pairs Eugenio Pérez
2022-03-17 18:23 ` Eugenio Pérez [this message]
2022-03-17 18:23 ` [RFC PATCH v2 08/18] vhost: Add SVQElement Eugenio Pérez
2022-03-17 18:23 ` [RFC PATCH v2 09/18] vhost: Add custom used buffer callback Eugenio Pérez
2022-03-17 18:23 ` [RFC PATCH v2 10/18] vdpa: control virtqueue support on shadow virtqueue Eugenio Pérez
2022-03-17 18:23 ` [RFC PATCH v2 11/18] vhost: Add vhost_iova_tree_find Eugenio Pérez
2022-03-17 18:23 ` [RFC PATCH v2 12/18] vdpa: Add map/unmap operation callback to SVQ Eugenio Pérez
2022-03-17 18:23 ` [RFC PATCH v2 13/18] vhost: Add vhost_svq_inject Eugenio Pérez
2022-03-17 18:23 ` [RFC PATCH v2 14/18] vdpa: add NetClientState->start() callback Eugenio Pérez
2022-03-17 18:23 ` [RFC PATCH v2 15/18] vdpa: Add vhost_vdpa_start_control_svq Eugenio Pérez
2022-03-17 18:23 ` [RFC PATCH v2 16/18] vhost: Update kernel headers Eugenio Pérez
2022-03-17 18:23 ` [RFC PATCH v2 17/18] vdpa: Add asid attribute to vdpa device Eugenio Pérez
2022-03-17 18:23 ` [RFC PATCH v2 18/18] vdpa: Add x-cvq-svq Eugenio Pérez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220317182400.651508-8-eperezma@redhat.com \
--to=eperezma@redhat.com \
--cc=eli@mellanox.com \
--cc=gdawar@xilinx.com \
--cc=hanand@xilinx.com \
--cc=jasowang@redhat.com \
--cc=lingshan.zhu@intel.com \
--cc=liuxiangdong5@huawei.com \
--cc=lulu@redhat.com \
--cc=lvivier@redhat.com \
--cc=mst@redhat.com \
--cc=parav@mellanox.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).