lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu,  7 Jul 2022 10:44:06 +0800
From:   Guo Zhi <qtxuning1999@...u.edu.cn>
To:     jasowang@...hat.com, mst@...hat.com
Cc:     eperezma@...hat.com, virtualization@...ts.linux-foundation.org,
        linux-kernel@...r.kernel.org, sgarzare@...hat.com,
        Guo Zhi <qtxuning1999@...u.edu.cn>
Subject: [PATCH v2 1/4] virtio_test: kick vhost for a batch of descriptors

Only kick vhost when the batch finishes.

Signed-off-by: Guo Zhi <qtxuning1999@...u.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ