vhost: add event areas to vq_is_ready()
Checks
Commit Message
Consider a virtqueue ready when, apart from the the descriptor area,
both event supression areas have been mapped.
Fixes: 2d1541e2b6b3 ("vhost: add vring address setup for packed queues")
Cc: yliu@fridaylinux.org
Cc: stable@dpdk.org
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
---
lib/librte_vhost/vhost_user.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Sat, Jan 25, 2020 at 09:52:16AM +0100, Adrian Moreno wrote:
> Consider a virtqueue ready when, apart from the the descriptor area,
s/the the/the/
> both event supression areas have been mapped.
s/supression/suppression/
>
> Fixes: 2d1541e2b6b3 ("vhost: add vring address setup for packed queues")
> Cc: yliu@fridaylinux.org
> Cc: stable@dpdk.org
>
> Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
> ---
> lib/librte_vhost/vhost_user.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Thanks,
Tiwei
On 1/25/20 9:52 AM, Adrian Moreno wrote:
> Consider a virtqueue ready when, apart from the the descriptor area,
> both event supression areas have been mapped.
>
> Fixes: 2d1541e2b6b3 ("vhost: add vring address setup for packed queues")
> Cc: yliu@fridaylinux.org
> Cc: stable@dpdk.org
>
> Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
> ---
> lib/librte_vhost/vhost_user.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to dpdk-next-virtio tree.
Thanks,
Maxime
@@ -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;