summaryrefslogtreecommitdiffstats
path: root/include/hw/virtio/virtio.h
diff options
context:
space:
mode:
authorYuri Benditovich2016-12-13 09:12:07 +0100
committerMichael S. Tsirkin2017-01-10 06:02:53 +0100
commit54e17709ac2d2ea8275101655fe746bba7ae0064 (patch)
tree963f846f63b1c92f7923112d172de942bdfcc01c /include/hw/virtio/virtio.h
parentnet: vhost stop updates virtio queue state (diff)
downloadqemu-54e17709ac2d2ea8275101655fe746bba7ae0064.tar.gz
qemu-54e17709ac2d2ea8275101655fe746bba7ae0064.tar.xz
qemu-54e17709ac2d2ea8275101655fe746bba7ae0064.zip
virtio: Introduce virtqueue_drop_all procedure
Add procedure for fast drop of queued packets, acting like pop and push without mapping the buffers into memory. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/virtio/virtio.h')
-rw-r--r--include/hw/virtio/virtio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index e15c06489b..e5541c61f7 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -173,6 +173,7 @@ void virtqueue_fill(VirtQueue *vq, const VirtQueueElement *elem,
void virtqueue_map(VirtIODevice *vdev, VirtQueueElement *elem);
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);
void qemu_put_virtqueue_element(QEMUFile *f, VirtQueueElement *elem);
int virtqueue_avail_bytes(VirtQueue *vq, unsigned int in_bytes,