diff options
author | Xuan Zhuo | 2023-08-10 20:30:54 +0800 |
---|---|---|
committer | Michael S. Tsirkin | 2023-09-03 18:10:23 -0400 |
commit | ba3e0c47c070c4cf010be9fb1e4eb669c744af11 (patch) | |
tree | 327b335e496638ffe2c06c77082679752af18548 /include/linux | |
parent | ad48d53b5b3fbcc10ea89070709724ad589e9223 (diff) |
virtio_ring: introduce virtqueue_reset()
Introduce virtqueue_reset() to release all buffer inside vq.
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20230810123057.43407-10-xuanzhuo@linux.alibaba.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/virtio.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index bd55a05eec04..49a640e0a6f4 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -99,6 +99,8 @@ dma_addr_t virtqueue_get_used_addr(const struct virtqueue *vq); int virtqueue_resize(struct virtqueue *vq, u32 num, void (*recycle)(struct virtqueue *vq, void *buf)); +int virtqueue_reset(struct virtqueue *vq, + void (*recycle)(struct virtqueue *vq, void *buf)); /** * struct virtio_device - representation of a device using virtio |