From: Adrian Moreno <amorenoz@redhat.com>
To: dev@dpdk.org
Cc: Zhihong Wang <zhihong.wang@intel.com>,
Maxime Coquelin <maxime.coquelin@redhat.com>,
Tiwei Bie <tiwei.bie@intel.com>,
Adrian Moreno <amorenoz@redhat.com>,
yliu@fridaylinux.org, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] vhost: add event areas to vq_is_ready()
Date: Sat, 25 Jan 2020 09:52:16 +0100 [thread overview]
Message-ID: <20200125085216.15226-1-amorenoz@redhat.com> (raw)
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(-)
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;
--
2.21.1
next reply other threads:[~2020-01-25 8:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-25 8:52 Adrian Moreno [this message]
2020-02-05 3:20 ` Tiwei Bie
2020-02-05 9:48 ` Maxime Coquelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200125085216.15226-1-amorenoz@redhat.com \
--to=amorenoz@redhat.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
--cc=tiwei.bie@intel.com \
--cc=yliu@fridaylinux.org \
--cc=zhihong.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).