diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2011-05-20 02:10:54 +0300 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-05-30 11:14:15 +0930 |
commit | 8ea8cf89e19aeb596b818ee5f2bec8a8b0586b60 (patch) | |
tree | 3303edab83f45265f2e9d05a5ef59f67e758b5f7 /drivers/vhost/test.c | |
parent | a5c262c5fd83ece01bd649fb08416c501d4c59d7 (diff) |
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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c index 099f30230d0..734e1d74ad8 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; |