diff options
| author | Jason Wang | 2015-09-25 07:21:29 +0200 |
|---|---|---|
| committer | Michael S. Tsirkin | 2015-10-01 15:16:52 +0200 |
| commit | 29b9f5efd78ae0f9cc02dd169b6e80d2c404bade (patch) | |
| tree | 61adbcab5d9a55d6ee79959d06763bffb5d40193 /include/hw | |
| parent | virtio: introduce virtqueue_unmap_sg() (diff) | |
| download | qemu-29b9f5efd78ae0f9cc02dd169b6e80d2c404bade.tar.gz qemu-29b9f5efd78ae0f9cc02dd169b6e80d2c404bade.tar.xz qemu-29b9f5efd78ae0f9cc02dd169b6e80d2c404bade.zip | |
virtio: introduce virtqueue_discard()
This patch introduces virtqueue_discard() to discard a descriptor and
unmap the sgs. This will be used by the patch that will discard
descriptor when packet is truncated.
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw')
| -rw-r--r-- | include/hw/virtio/virtio.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 6201ee8ce0..9d09115fab 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -146,6 +146,8 @@ void virtio_del_queue(VirtIODevice *vdev, int n); void virtqueue_push(VirtQueue *vq, const VirtQueueElement *elem, unsigned int len); void virtqueue_flush(VirtQueue *vq, unsigned int count); +void virtqueue_discard(VirtQueue *vq, const VirtQueueElement *elem, + unsigned int len); void virtqueue_fill(VirtQueue *vq, const VirtQueueElement *elem, unsigned int len, unsigned int idx); |
