]> Pileus Git - ~andy/linux/blobdiff - include/linux/virtio.h
virtio: add api for delayed callbacks
[~andy/linux] / include / linux / virtio.h
index aff5b4f740417ee39cc3b42c8c70bfe351fc4564..7108857496055b1ed9f437ef22ae96c2ae9f0bf3 100644 (file)
@@ -51,6 +51,13 @@ struct virtqueue {
  *     This re-enables callbacks; it returns "false" if there are pending
  *     buffers in the queue, to detect a possible race between the driver
  *     checking for more work, and enabling callbacks.
+ * virtqueue_enable_cb_delayed: restart callbacks after disable_cb.
+ *     vq: the struct virtqueue we're talking about.
+ *     This re-enables callbacks but hints to the other side to delay
+ *     interrupts until most of the available buffers have been processed;
+ *     it returns "false" if there are many pending buffers in the queue,
+ *     to detect a possible race between the driver checking for more work,
+ *     and enabling callbacks.
  * virtqueue_detach_unused_buf: detach first unused buffer
  *     vq: the struct virtqueue we're talking about.
  *     Returns NULL or the "data" token handed to add_buf
@@ -86,6 +93,8 @@ void virtqueue_disable_cb(struct virtqueue *vq);
 
 bool virtqueue_enable_cb(struct virtqueue *vq);
 
+bool virtqueue_enable_cb_delayed(struct virtqueue *vq);
+
 void *virtqueue_detach_unused_buf(struct virtqueue *vq);
 
 /**