From: Changpeng Liu <changpeng.liu@intel.com>
To: changpeng.liu@intel.com, qemu-devel@nongnu.org
Cc: mst@redhat.com, marcandre.lureau@redhat.com, maxime.coquelin@redhat.com
Subject: [Qemu-devel] [PATCH 2/2] contrib/vhost-user-blk: enable protocol feature for vhost-user-blk
Date: Fri, 30 Mar 2018 10:46:17 +0800 [thread overview]
Message-ID: <1522377977-29623-2-git-send-email-changpeng.liu@intel.com> (raw)
In-Reply-To: <1522377977-29623-1-git-send-email-changpeng.liu@intel.com>
This patch reports the protocol feature that is only advertised by
QEMU if the device implements the config ops.
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
---
contrib/vhost-user-blk/vhost-user-blk.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib/vhost-user-blk/vhost-user-blk.c
index 67dac81..f6e0170 100644
--- a/contrib/vhost-user-blk/vhost-user-blk.c
+++ b/contrib/vhost-user-blk/vhost-user-blk.c
@@ -311,6 +311,12 @@ vub_get_features(VuDev *dev)
1ull << VHOST_USER_F_PROTOCOL_FEATURES;
}
+static uint64_t
+vub_get_protocol_features(VuDev *dev)
+{
+ return 1ull << VHOST_USER_PROTOCOL_F_CONFIG;
+}
+
static int
vub_get_config(VuDev *vu_dev, uint8_t *config, uint32_t len)
{
@@ -372,6 +378,7 @@ vub_set_config(VuDev *vu_dev, const uint8_t *data,
static const VuDevIface vub_iface = {
.get_features = vub_get_features,
+ .get_protocol_features = vub_get_protocol_features,
.queue_set_started = vub_queue_set_started,
.get_config = vub_get_config,
.set_config = vub_set_config,
--
1.9.3
next prev parent reply other threads:[~2018-03-30 2:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-30 2:46 [Qemu-devel] [PATCH 1/2] contrib/libvhost-user: add the protocol feature used for SET/GET message Changpeng Liu
2018-03-30 2:41 ` Liu, Changpeng
2018-03-30 2:46 ` Changpeng Liu [this message]
2018-03-30 3:13 ` [Qemu-devel] [PATCH 2/2] contrib/vhost-user-blk: enable protocol feature for vhost-user-blk Michael S. Tsirkin
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=1522377977-29623-2-git-send-email-changpeng.liu@intel.com \
--to=changpeng.liu@intel.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).