From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXk0X-0005P0-4B for qemu-devel@nongnu.org; Fri, 14 Dec 2018 04:43:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXk0S-0003Nx-Bo for qemu-devel@nongnu.org; Fri, 14 Dec 2018 04:43:45 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:3112 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gXk0R-0003M1-SX for qemu-devel@nongnu.org; Fri, 14 Dec 2018 04:43:40 -0500 References: <5C10DAE9.3010605@huawei.com> <20181212081902-mutt-send-email-mst@kernel.org> <5C11D19C.4010007@huawei.com> <20181213095048-mutt-send-email-mst@kernel.org> From: jiangyiwen Message-ID: <5C137B40.1070408@huawei.com> Date: Fri, 14 Dec 2018 17:43:28 +0800 MIME-Version: 1.0 In-Reply-To: <20181213095048-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] vhost-vsock: support parse mergeable feature List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Stefan Hajnoczi , Jason Wang , qemu-devel@nongnu.org On 2018/12/13 22:54, Michael S. Tsirkin wrote: > On Thu, Dec 13, 2018 at 11:27:24AM +0800, jiangyiwen wrote: >> On 2018/12/12 21:19, Michael S. Tsirkin wrote: >>> 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 >>> >>> 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! >>> >> >> Hi Michael, >> >> In my opinion, for vhost device, device feature bits need to be >> intersected between vhost and qemu, so I add mergeable rx buffer feature >> into vdev->host_features, and then intersected with vhost_dev features. >> >> Later if someone want to add new feature, it can use virtio_add_feature() >> in vhost_vsock_get_features(). >> >> Thanks, >> Yiwen. > > I understand. Sorry. It seems that your patchset wasn't threaded > properly, each patch was by its own. Can you pls take a look at fixing > that? > Hi Michael, Thanks your suggestions, I want to how to send patch when patch involving multiple communities, like qemu and linux kernel. In this case, how should we send them? Thanks, Yiwen. >>>> --- >>>> 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 >>>> >>> >>> . >>> >> > > . >