summaryrefslogtreecommitdiffstats
path: root/drivers/vhost/test.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2011-05-20 01:10:54 +0200
committerRusty Russell <rusty@rustcorp.com.au>2011-05-30 03:44:15 +0200
commit8ea8cf89e19aeb596b818ee5f2bec8a8b0586b60 (patch)
tree3303edab83f45265f2e9d05a5ef59f67e758b5f7 /drivers/vhost/test.c
parentvirtio_ring: support event idx feature (diff)
downloadlinux-8ea8cf89e19aeb596b818ee5f2bec8a8b0586b60.tar.xz
linux-8ea8cf89e19aeb596b818ee5f2bec8a8b0586b60.zip
vhost: support event index
Support the new event index feature. When acked, utilize it to reduce the # of interrupts sent to the guest. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/vhost/test.c')
-rw-r--r--drivers/vhost/test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c
index 099f30230d06..734e1d74ad80 100644
--- a/drivers/vhost/test.c
+++ b/drivers/vhost/test.c
@@ -49,7 +49,7 @@ static void handle_vq(struct vhost_test *n)
return;
mutex_lock(&vq->mutex);
- vhost_disable_notify(vq);
+ vhost_disable_notify(&n->dev, vq);
for (;;) {
head = vhost_get_vq_desc(&n->dev, vq, vq->iov,
@@ -61,8 +61,8 @@ static void handle_vq(struct vhost_test *n)
break;
/* Nothing new? Wait for eventfd to tell us they refilled. */
if (head == vq->num) {
- if (unlikely(vhost_enable_notify(vq))) {
- vhost_disable_notify(vq);
+ if (unlikely(vhost_enable_notify(&n->dev, vq))) {
+ vhost_disable_notify(&n->dev, vq);
continue;
}
break;