virtio: rename virtqueue_discard to virtqueue_unpop

The function undoes the effect of virtqueue_pop and doesn't do anything
destructive or irreversible so virtqueue_unpop is a more fitting name.

Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Ladi Prosek 2016-11-03 09:55:49 +01:00 committed by Michael S. Tsirkin
parent bacabb0afa
commit 27e57efe32
4 changed files with 8 additions and 8 deletions

View file

@ -1177,7 +1177,7 @@ static ssize_t virtio_net_receive(NetClientState *nc, const uint8_t *buf, size_t
* must have consumed the complete packet.
* Otherwise, drop it. */
if (!n->mergeable_rx_bufs && offset < size) {
virtqueue_discard(q->rx_vq, elem, total);
virtqueue_unpop(q->rx_vq, elem, total);
g_free(elem);
return size;
}