vhost: add event areas to vq_is_ready()
diff mbox series

Message ID 20200125085216.15226-1-amorenoz@redhat.com
State Accepted
Delegated to: Maxime Coquelin
Headers show
Series
  • vhost: add event areas to vq_is_ready()
Related show

Checks

Context Check Description
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Adrian Moreno Jan. 25, 2020, 8:52 a.m. UTC
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

Tiwei Bie Feb. 5, 2020, 3:20 a.m. UTC | #1
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
Maxime Coquelin Feb. 5, 2020, 9:48 a.m. UTC | #2
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

Patch
diff mbox series

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 69b84a882..c9cc4d648 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;