summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorXuan Zhuo <xuanzhuo@linux.alibaba.com>2022-08-01 09:38:48 +0300
committerMichael S. Tsirkin <mst@redhat.com>2022-08-11 11:06:40 +0300
commit4913e85441b40386c4bb093f188b955d8165f1b7 (patch)
tree153f5bc9e18efcb0e626c4cbe61864fe763efe87 /include
parentd94587b5bb5c4bba32fbc2bd92c86cc6de25167f (diff)
downloadlinux-4913e85441b40386c4bb093f188b955d8165f1b7.tar.xz
virtio_ring: struct virtqueue introduce reset
Introduce a new member reset to the structure virtqueue to determine whether the current vq is in the reset state. Subsequent patches will use it. Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20220801063902.129329-29-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/virtio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index d45ee82a4470..a3f73bb6733e 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -20,6 +20,7 @@
* @index: the zero-based ordinal number for this queue.
* @num_free: number of elements we expect to be able to fit.
* @num_max: the maximum number of elements supported by the device.
+ * @reset: vq is in reset state or not.
*
* A note on @num_free: with indirect buffers, each buffer needs one
* element in the queue, otherwise a buffer will need one element per
@@ -34,6 +35,7 @@ struct virtqueue {
unsigned int num_free;
unsigned int num_max;
void *priv;
+ bool reset;
};
int virtqueue_add_outbuf(struct virtqueue *vq,