mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 21:03:54 -06:00
libvhost-user: add vu_queue_unpop()
vhost-user-input will make use of this function to undo some queue pop in case the virtio queue does not have enough room. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190308140454.32437-11-marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
922ef483ec
commit
b13919ab64
2 changed files with 30 additions and 0 deletions
|
@ -458,6 +458,20 @@ void vu_queue_notify(VuDev *dev, VuVirtq *vq);
|
|||
*/
|
||||
void *vu_queue_pop(VuDev *dev, VuVirtq *vq, size_t sz);
|
||||
|
||||
|
||||
/**
|
||||
* vu_queue_unpop:
|
||||
* @dev: a VuDev context
|
||||
* @vq: a VuVirtq queue
|
||||
* @elem: The #VuVirtqElement
|
||||
* @len: number of bytes written
|
||||
*
|
||||
* Pretend the most recent element wasn't popped from the virtqueue. The next
|
||||
* call to vu_queue_pop() will refetch the element.
|
||||
*/
|
||||
void vu_queue_unpop(VuDev *dev, VuVirtq *vq, VuVirtqElement *elem,
|
||||
size_t len);
|
||||
|
||||
/**
|
||||
* vu_queue_rewind:
|
||||
* @dev: a VuDev context
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue