vhost: fix packed virtqueue ready condition

Consider a virtqueue ready when, apart from the descriptor area,
both event suppression areas have been mapped.

Fixes: 2d1541e2b6 ("vhost: add vring address setup for packed queues")
Cc: stable@dpdk.org

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
This commit is contained in:
Adrian Moreno 2020-01-25 09:52:16 +01:00 committed by Ferruh Yigit
parent 03df3c7473
commit c5a910dd92

View File

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