projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2855b33
)
virtio: add ability to iterate over vqs
author
Michael S. Tsirkin
<mst@redhat.com>
Fri, 20 Apr 2018 17:22:40 +0000
(20:22 +0300)
committer
Michael S. Tsirkin
<mst@redhat.com>
Wed, 25 Apr 2018 17:33:19 +0000
(20:33 +0300)
For cleanup it's helpful to be able to simply scan all vqs and discard
all data. Add an iterator to do that.
Cc: stable@vger.kernel.org
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
include/linux/virtio.h
patch
|
blob
|
blame
|
history
diff --git
a/include/linux/virtio.h
b/include/linux/virtio.h
index 988c7355bc22753373ab3f543cb922962f4451e7..fa1b5da2804e6041df3b8f47e5ce0c7ddf828a54 100644
(file)
--- a/
include/linux/virtio.h
+++ b/
include/linux/virtio.h
@@
-157,6
+157,9
@@
int virtio_device_freeze(struct virtio_device *dev);
int virtio_device_restore(struct virtio_device *dev);
#endif
+#define virtio_device_for_each_vq(vdev, vq) \
+ list_for_each_entry(vq, &vdev->vqs, list)
+
/**
* virtio_driver - operations for a virtio I/O driver
* @driver: underlying device driver (populate name and owner).