summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2013-07-09 13:19:18 +0300
committerBen Hutchings <ben@decadent.org.uk>2013-08-02 22:14:52 +0200
commit1e079ec5c16199e63c9c5e0e346a0fdf47681f32 (patch)
tree0b1809dd5f7a761186dfd0030089435eeb4f9e6f /include
parent2f92512982ce9672ec70838ac7f2eea4fdb1d534 (diff)
virtio: support unlocked queue poll
commit cc229884d3f77ec3b1240e467e0236c3e0647c0c upstream. This adds a way to check ring empty state after enable_cb outside any locks. Will be used by virtio_net. Note: there's room for more optimization: caller is likely to have a memory barrier already, which means we might be able to get rid of a barrier here. Deferring this optimization until we do some benchmarking. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> [wg: Backported to 3.2] Signed-off-by: Wolfram Gloger <wmglo@dent.med.uni-muenchen.de> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/virtio.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index 4c069d8bd740..96c78437d32f 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -96,6 +96,10 @@ void virtqueue_disable_cb(struct virtqueue *vq);
bool virtqueue_enable_cb(struct virtqueue *vq);
+unsigned virtqueue_enable_cb_prepare(struct virtqueue *vq);
+
+bool virtqueue_poll(struct virtqueue *vq, unsigned);
+
bool virtqueue_enable_cb_delayed(struct virtqueue *vq);
void *virtqueue_detach_unused_buf(struct virtqueue *vq);