[RFC v2 2/2] example/vhost: support to clear in-flight packets for async dequeue

Yuan Wang yuanx.wang at intel.com
Fri Mar 11 18:34:14 CET 2022


This patch allows vring_state_changed() to clear
in-flight dequeue packets.

Signed-off-by: Yuan Wang <yuanx.wang at intel.com>
---
 examples/vhost/main.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index d26e40ab73..04e7821322 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1767,9 +1767,6 @@ vring_state_changed(int vid, uint16_t queue_id, int enable)
 	if (!vdev)
 		return -1;
 
-	if (queue_id != VIRTIO_RXQ)
-		return 0;
-
 	if (dma_bind[vid2socketid[vid]].dmas[queue_id].async_enabled) {
 		if (!enable)
 			vhost_clear_queue_thread_unsafe(vdev, queue_id);
-- 
2.25.1



More information about the dev mailing list