From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org, mst@redhat.com,
marcandre.lureau@redhat.com, maxime.coquelin@redhat.com
Subject: [Qemu-devel] [PATCH 1/4] libvhost-user: vu_queue_started
Date: Mon, 2 Oct 2017 20:15:18 +0100 [thread overview]
Message-ID: <20171002191521.15748-2-dgilbert@redhat.com> (raw)
In-Reply-To: <20171002191521.15748-1-dgilbert@redhat.com>
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Add a vu_queue_started method to complement vu_queue_enabled.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
contrib/libvhost-user/libvhost-user.c | 6 ++++++
contrib/libvhost-user/libvhost-user.h | 9 +++++++++
2 files changed, 15 insertions(+)
diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/libvhost-user.c
index d27d6303db..5ee8483a32 100644
--- a/contrib/libvhost-user/libvhost-user.c
+++ b/contrib/libvhost-user/libvhost-user.c
@@ -943,6 +943,12 @@ vu_queue_enabled(VuDev *dev, VuVirtq *vq)
return vq->enable;
}
+bool
+vu_queue_started(const VuDev *dev, const VuVirtq *vq)
+{
+ return vq->started;
+}
+
static inline uint16_t
vring_avail_flags(VuVirtq *vq)
{
diff --git a/contrib/libvhost-user/libvhost-user.h b/contrib/libvhost-user/libvhost-user.h
index 4021f1124e..94d7cc8fbd 100644
--- a/contrib/libvhost-user/libvhost-user.h
+++ b/contrib/libvhost-user/libvhost-user.h
@@ -335,6 +335,15 @@ void vu_queue_set_notification(VuDev *dev, VuVirtq *vq, int enable);
bool vu_queue_enabled(VuDev *dev, VuVirtq *vq);
/**
+ * vu_queue_started:
+ * @dev: a VuDev context
+ * @vq: a VuVirtq queue
+ *
+ * Returns: whether the queue is started.
+ */
+bool vu_queue_started(const VuDev *dev, const VuVirtq *vq);
+
+/**
* vu_queue_empty:
* @dev: a VuDev context
* @vq: a VuVirtq queue
--
2.13.6
next prev parent reply other threads:[~2017-10-02 19:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 19:15 [Qemu-devel] [PATCH 0/4] Small vhost-user fixes and tweaks Dr. David Alan Gilbert (git)
2017-10-02 19:15 ` Dr. David Alan Gilbert (git) [this message]
2017-10-02 22:35 ` [Qemu-devel] [PATCH 1/4] libvhost-user: vu_queue_started Marc-André Lureau
2017-10-02 19:15 ` [Qemu-devel] [PATCH 2/4] vhost-user-bridge: Only process received packets on started queues Dr. David Alan Gilbert (git)
2017-10-02 19:15 ` [Qemu-devel] [PATCH 3/4] libvhost-user: Update and fix feature and request lists Dr. David Alan Gilbert (git)
2017-10-02 22:37 ` Marc-André Lureau
2017-10-02 19:15 ` [Qemu-devel] [PATCH 4/4] libvhost-user: Support VHOST_USER_SET_SLAVE_REQ_FD Dr. David Alan Gilbert (git)
2017-10-02 22:36 ` Marc-André Lureau
2017-10-03 8:15 ` [Qemu-devel] [PATCH 0/4] Small vhost-user fixes and tweaks 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=20171002191521.15748-2-dgilbert@redhat.com \
--to=dgilbert@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=maxime.coquelin@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).