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

Message ID 20220413182742.860659-3-yuanx.wang@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Maxime Coquelin
Headers
Series support to clear in-flight packets for async |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation warning apply issues

Commit Message

Wang, YuanX April 13, 2022, 6:27 p.m. UTC
  This patch allows vring_state_changed() to clear
in-flight dequeue packets.

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

Patch

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);