Skip to contentSkip to conversation

vhost: add event areas to vq_is_ready()

PATCH Applied Adrian Moreno 3 participants 3 messages Jan 25, 2020 – Feb 5, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vhost: add event areas to vq_is_ready()

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")
---
 lib/librte_vhost/vhost_user.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/librte_vhost/vhost_user.c +2 -1
index 69b84a882..c9cc4d648 100644
@@ -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;
 
Signature · 1 line
2.21.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · Adrian Moreno

Consider a virtqueue ready when, apart from the the descriptor area,

s/the the/the/

Quoted 1 line

both event supression areas have been mapped.

s/supression/suppression/

Quoted 9 lines
Fixes 2d1541e2b6b3 ("vhost: add vring address setup for packed queues")
---
 lib/librte_vhost/vhost_user.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Thanks,
Tiwei

#2 lore raw
In reply to Adrian Moreno
Quoted 11 lines · Adrian Moreno

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")
---
 lib/librte_vhost/vhost_user.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Applied to dpdk-next-virtio tree.

Thanks,
Maxime