Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[safe/jmp/linux-2.6] / include / linux / virtio.h
index 4fca4f5..f508c65 100644 (file)
@@ -34,7 +34,7 @@ struct virtqueue {
  *     out_num: the number of sg readable by other side
  *     in_num: the number of sg which are writable (after readable ones)
  *     data: the token identifying the buffer.
- *      Returns 0 or an error.
+ *      Returns remaining capacity of queue (sg segments) or a negative error.
  * @kick: update after add_buf
  *     vq: the struct virtqueue
  *     After one or more add_buf calls, invoke this to kick the other side.
@@ -51,6 +51,9 @@ 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.
+ * @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
  *
  * Locking rules are straightforward: the driver is responsible for
  * locking.  No two operations may be invoked simultaneously, with the exception
@@ -71,6 +74,7 @@ struct virtqueue_ops {
 
        void (*disable_cb)(struct virtqueue *vq);
        bool (*enable_cb)(struct virtqueue *vq);
+       void *(*detach_unused_buf)(struct virtqueue *vq);
 };
 
 /**