lkml.org 
[lkml]   [2022]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 1/4] virtio_test: kick vhost for a batch of descriptors
Date
Only kick vhost when the batch finishes.

Signed-off-by: Guo Zhi <qtxuning1999@sjtu.edu.cn>
---
tools/virtio/virtio_test.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c
index 23f142af5..95f78b311 100644
--- a/tools/virtio/virtio_test.c
+++ b/tools/virtio/virtio_test.c
@@ -208,11 +208,10 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq,
}

++started;
-
- if (unlikely(!virtqueue_kick(vq->vq))) {
- r = -1;
- break;
- }
+ }
+ if (unlikely(!virtqueue_kick(vq->vq))) {
+ r = -1;
+ break;
}

if (started >= bufs)
--
2.17.1
\
 
 \ /
  Last update: 2022-07-07 05:01    [W:0.091 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site