virtio: introduce virtqueue_discard()
authorJason Wang <jasowang@redhat.com>
Fri, 25 Sep 2015 05:21:29 +0000 (13:21 +0800)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 21 Oct 2015 18:40:24 +0000 (13:40 -0500)
commitc2a550d3dfa1f22eac77842aceed6047f6db2320
tree4f0e2fee81c5d107e35da34a3c408ac4a338bc74
parenta64d4cafa9dedad93da475f2f1e41133f433be67
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>
(cherry picked from commit 29b9f5efd78ae0f9cc02dd169b6e80d2c404bade)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/virtio/virtio.c
include/hw/virtio/virtio.h