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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220709022745.21020-2-qtxuning1999@sjtu.edu.cn>
Date:   Sat,  9 Jul 2022 10:27:42 +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 v3 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