[PATCH] vhost: fix slot index in async split virtqueue Tx

Cheng Jiang cheng1.jiang at intel.com
Thu Feb 23 03:30:32 CET 2023


The slot_idx in the asynchronous Vhost split virtqueue dequeue data path
is supposed to be decreased by 1 when desc_to_mbuf() fails.

Fixes: 84d5204310d7 ("vhost: support async dequeue for split ring")
Cc: stable at dpdk.org

Signed-off-by: Cheng Jiang <cheng1.jiang at intel.com>
---
 lib/vhost/virtio_net.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
index 8caf05319e..374007a61a 100644
--- a/lib/vhost/virtio_net.c
+++ b/lib/vhost/virtio_net.c
@@ -3720,6 +3720,7 @@ virtio_dev_tx_async_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 				allocerr_warned = true;
 			}
 			dropped = true;
+			slot_idx--;
 			break;
 		}

--
2.35.1



More information about the stable mailing list