qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Re: [Qemu-devel] [PATCH 1/2] contrib/libvhost-user: add the protocol feature used for SET/GET message
  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 ` [Qemu-devel] [PATCH 2/2] contrib/vhost-user-blk: enable protocol feature for vhost-user-blk Changpeng Liu
  1 sibling, 0 replies; 4+ messages in thread
From: Liu, Changpeng @ 2018-03-30  2:41 UTC (permalink / raw)
  To: qemu-devel@nongnu.org
  Cc: mst@redhat.com, marcandre.lureau@redhat.com,
	maxime.coquelin@redhat.com

The patch serials depend on Maxime's patch "vhost-user: back SET/GET_CONFIG requests with a protocol feature",
which adding the protocol feature bit for SET/GET messages.

> -----Original Message-----
> From: Liu, Changpeng
> Sent: Friday, March 30, 2018 10:46 AM
> To: Liu, Changpeng <changpeng.liu@intel.com>; qemu-devel@nongnu.org
> Cc: mst@redhat.com; marcandre.lureau@redhat.com;
> maxime.coquelin@redhat.com
> Subject: [PATCH 1/2] contrib/libvhost-user: add the protocol feature used for
> SET/GET message
> 
> Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
> ---
>  contrib/libvhost-user/libvhost-user.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/contrib/libvhost-user/libvhost-user.h b/contrib/libvhost-user/libvhost-
> user.h
> index 79f7a53..b27075e 100644
> --- a/contrib/libvhost-user/libvhost-user.h
> +++ b/contrib/libvhost-user/libvhost-user.h
> @@ -50,6 +50,7 @@ enum VhostUserProtocolFeature {
>      VHOST_USER_PROTOCOL_F_CROSS_ENDIAN = 6,
>      VHOST_USER_PROTOCOL_F_CRYPTO_SESSION = 7,
>      VHOST_USER_PROTOCOL_F_PAGEFAULT = 8,
> +    VHOST_USER_PROTOCOL_F_CONFIG = 9,
> 
>      VHOST_USER_PROTOCOL_F_MAX
>  };
> --
> 1.9.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH 1/2] contrib/libvhost-user: add the protocol feature used for SET/GET message
@ 2018-03-30  2:46 Changpeng Liu
  2018-03-30  2:41 ` Liu, Changpeng
  2018-03-30  2:46 ` [Qemu-devel] [PATCH 2/2] contrib/vhost-user-blk: enable protocol feature for vhost-user-blk Changpeng Liu
  0 siblings, 2 replies; 4+ messages in thread
From: Changpeng Liu @ 2018-03-30  2:46 UTC (permalink / raw)
  To: changpeng.liu, qemu-devel; +Cc: mst, marcandre.lureau, maxime.coquelin

Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
---
 contrib/libvhost-user/libvhost-user.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/contrib/libvhost-user/libvhost-user.h b/contrib/libvhost-user/libvhost-user.h
index 79f7a53..b27075e 100644
--- a/contrib/libvhost-user/libvhost-user.h
+++ b/contrib/libvhost-user/libvhost-user.h
@@ -50,6 +50,7 @@ enum VhostUserProtocolFeature {
     VHOST_USER_PROTOCOL_F_CROSS_ENDIAN = 6,
     VHOST_USER_PROTOCOL_F_CRYPTO_SESSION = 7,
     VHOST_USER_PROTOCOL_F_PAGEFAULT = 8,
+    VHOST_USER_PROTOCOL_F_CONFIG = 9,
 
     VHOST_USER_PROTOCOL_F_MAX
 };
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH 2/2] contrib/vhost-user-blk: enable protocol feature for vhost-user-blk
  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
  2018-03-30  3:13   ` Michael S. Tsirkin
  1 sibling, 1 reply; 4+ messages in thread
From: Changpeng Liu @ 2018-03-30  2:46 UTC (permalink / raw)
  To: changpeng.liu, qemu-devel; +Cc: mst, marcandre.lureau, maxime.coquelin

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] contrib/vhost-user-blk: enable protocol feature for vhost-user-blk
  2018-03-30  2:46 ` [Qemu-devel] [PATCH 2/2] contrib/vhost-user-blk: enable protocol feature for vhost-user-blk Changpeng Liu
@ 2018-03-30  3:13   ` Michael S. Tsirkin
  0 siblings, 0 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2018-03-30  3:13 UTC (permalink / raw)
  To: Changpeng Liu; +Cc: qemu-devel, marcandre.lureau, maxime.coquelin

On Fri, Mar 30, 2018 at 10:46:17AM +0800, Changpeng Liu wrote:
> 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>


OK but pls just send a single patch next time.
People often split out just the headers or some
utility functions with little value, but this
does not help review at all.

No need to repost just for this.

> ---
>  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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-30  3:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [Qemu-devel] [PATCH 2/2] contrib/vhost-user-blk: enable protocol feature for vhost-user-blk Changpeng Liu
2018-03-30  3:13   ` Michael S. Tsirkin

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).