|
@@ -51,6 +51,9 @@ struct virtqueue {
|
|
* This re-enables callbacks; it returns "false" if there are pending
|
|
* This re-enables callbacks; it returns "false" if there are pending
|
|
* buffers in the queue, to detect a possible race between the driver
|
|
* buffers in the queue, to detect a possible race between the driver
|
|
* checking for more work, and enabling callbacks.
|
|
* 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 rules are straightforward: the driver is responsible for
|
|
* locking. No two operations may be invoked simultaneously, with the exception
|
|
* locking. No two operations may be invoked simultaneously, with the exception
|
|
@@ -71,6 +74,7 @@ struct virtqueue_ops {
|
|
|
|
|
|
void (*disable_cb)(struct virtqueue *vq);
|
|
void (*disable_cb)(struct virtqueue *vq);
|
|
bool (*enable_cb)(struct virtqueue *vq);
|
|
bool (*enable_cb)(struct virtqueue *vq);
|
|
|
|
+ void *(*detach_unused_buf)(struct virtqueue *vq);
|
|
};
|
|
};
|
|
|
|
|
|
/**
|
|
/**
|