From c5a910dd92ecbad24f86b4c59b4ff8105b5149fd Mon Sep 17 00:00:00 2001 From: Adrian Moreno Date: Sat, 25 Jan 2020 09:52:16 +0100 Subject: [PATCH] vhost: fix packed virtqueue ready condition Consider a virtqueue ready when, apart from the descriptor area, both event suppression areas have been mapped. Fixes: 2d1541e2b6b3 ("vhost: add vring address setup for packed queues") Cc: stable@dpdk.org Signed-off-by: Adrian Moreno Reviewed-by: Tiwei Bie --- lib/librte_vhost/vhost_user.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index 69b84a8820..c9cc4d6489 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -1298,7 +1298,8 @@ vq_is_ready(struct virtio_net *dev, struct vhost_virtqueue *vq) return false; if (vq_is_packed(dev)) - rings_ok = !!vq->desc_packed; + rings_ok = vq->desc_packed && vq->driver_event && + vq->device_event; else rings_ok = vq->desc && vq->avail && vq->used; -- 2.20.1