qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] vhost-vsock: support parse mergeable feature


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH] vhost-vsock: support parse mergeable feature
Date: Wed, 12 Dec 2018 08:19:40 -0500

On Wed, Dec 12, 2018 at 05:54:49PM +0800, jiangyiwen wrote:
> Currently vhost-vsock doesn't have any feature bits, so it
> don't support parse mergeable rx buffer feature. And the
> feature is support in another series of patches named
> "VSOCK: support mergeable rx buffer in vhost-vsock".
> 
> So we neet to support parse mergeable feature in vhost-vsock
> if above patches are merged.
> 
> Signed-off-by: Yiwen Jiang <address@hidden>

OK but what does it do? this just defines the feature bit ...
Also pls copy virtio-dev whenever you change the host/guest
interface.

Thanks!

> ---
>  hw/virtio/vhost-vsock.c                       | 9 +++++++--
>  include/standard-headers/linux/virtio_vsock.h | 3 +++
>  2 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/virtio/vhost-vsock.c b/hw/virtio/vhost-vsock.c
> index aa5af92..5023c05 100644
> --- a/hw/virtio/vhost-vsock.c
> +++ b/hw/virtio/vhost-vsock.c
> @@ -178,8 +178,13 @@ static uint64_t vhost_vsock_get_features(VirtIODevice 
> *vdev,
>                                           uint64_t requested_features,
>                                           Error **errp)
>  {
> -    /* No feature bits used yet */
> -    return requested_features;
> +    VHostVSock *vsock = VHOST_VSOCK(vdev);
> +    uint64_t features;
> +
> +    virtio_add_feature(&requested_features, VIRTIO_VSOCK_F_MRG_RXBUF);
> +    features = requested_features & vsock->vhost_dev.features;
> +
> +    return features;
>  }
> 
>  static void vhost_vsock_handle_output(VirtIODevice *vdev, VirtQueue *vq)
> diff --git a/include/standard-headers/linux/virtio_vsock.h 
> b/include/standard-headers/linux/virtio_vsock.h
> index be44321..4c583ec 100644
> --- a/include/standard-headers/linux/virtio_vsock.h
> +++ b/include/standard-headers/linux/virtio_vsock.h
> @@ -38,6 +38,9 @@
>  #include "standard-headers/linux/virtio_ids.h"
>  #include "standard-headers/linux/virtio_config.h"
> 
> +/* Virtio-vsock feature */
> +#define VIRTIO_VSOCK_F_MRG_RXBUF 0 /* Host can merge receive buffers. */
> +
>  struct virtio_vsock_config {
>       uint64_t guest_cid;
>  } QEMU_PACKED;
> -- 
> 1.8.3.1
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]