[{"id":1773383,"web_url":"http://patchwork.ozlabs.org/comment/1773383/","msgid":"<20170922090730.GC9243@stefanha-x1.localdomain>","list_archive_url":null,"date":"2017-09-22T09:07:30","subject":"Re: [PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()","submitter":{"id":2747,"url":"http://patchwork.ozlabs.org/api/people/2747/","name":"Stefan Hajnoczi","email":"stefanha@gmail.com"},"content":"On Fri, Sep 22, 2017 at 04:02:33PM +0800, Jason Wang wrote:\n> This patch introduces a helper which just increase the used idx. This\n> will be used in pair with vhost_prefetch_desc_indices() by batching\n> code.\n> \n> Signed-off-by: Jason Wang <jasowang@redhat.com>\n> ---\n>  drivers/vhost/vhost.c | 33 +++++++++++++++++++++++++++++++++\n>  drivers/vhost/vhost.h |  1 +\n>  2 files changed, 34 insertions(+)\n\nReviewed-by: Stefan Hajnoczi <stefanha@redhat.com>","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"TOFvcvwl\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xz7114vYlz9t16\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 22 Sep 2017 19:07:49 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751955AbdIVJHf (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 22 Sep 2017 05:07:35 -0400","from mail-wm0-f67.google.com ([74.125.82.67]:37428 \"EHLO\n\tmail-wm0-f67.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751808AbdIVJHe (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 22 Sep 2017 05:07:34 -0400","by mail-wm0-f67.google.com with SMTP id f4so668319wmh.4;\n\tFri, 22 Sep 2017 02:07:33 -0700 (PDT)","from localhost ([51.15.41.238]) by smtp.gmail.com with ESMTPSA id\n\t109sm2041522wrc.25.2017.09.22.02.07.31\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tFri, 22 Sep 2017 02:07:31 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=ufh8O2baz0TqPSz0v7+YAA8VoPRP6hqungNu1lhmB3o=;\n\tb=TOFvcvwlVF3eTo6l91gZI0b+Mho118km6AcLKhHDGYIE5Cy03+SdATsidchKpZH/lp\n\tNkwFzTUEbpRDeDMaEvtjei8IqtIw941pFY0B+JMtbNNxCKhda36LooU2w7SE2QNW9sd3\n\tDl5O5xrZQIf8yvh9GgKbyWwx1Gi0HcYFUO2EuqmLIb4oNoQAXD8sxZ/xiyvVl4FzpQWt\n\tOGdVIc2c49BAPk7xzwBQyW321GWgPxLT9cTp5Xc6dzEjkc2WktazMQCtRtUi8JtJfky9\n\t2wmafWnGGulIf0g4wJEMkIDXi+FB5H3VF9rFxBmzH1IQTO8J2ngXgebgjp+OM5JCW4X9\n\txlAA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=ufh8O2baz0TqPSz0v7+YAA8VoPRP6hqungNu1lhmB3o=;\n\tb=aM9gQUTAvMPks+XEflhLNEpAnUnlUNlXIllpSp2Fo+KPsMpTRZZwGtfPJrIWWeGklX\n\t4DW+KcuLZQR8FK1M4cPBkiC7TWKypLMhD5yARu04WVZhLUaqtFFWV7qDBzvBohCU/i4B\n\tgUBAtyAw1+lmciRQy5Or0K1vj9k82zOp/quZcLC2PIXnOwnzZTS4+ZDOV4OkZLPsFjFm\n\tIxICSuZ3DdP0UYM2ZP9Jp6Cgz9QGJAnxeWIOj/dP77C5HcnBSWYt8imATfffz859o0Ko\n\tqBpm5D+LraRwbGcrIx7I7/7FjHhaD9CwkqxhcmCXAz244FhwMeiJoTaSbIHpjr6y3Ypx\n\tLq0A==","X-Gm-Message-State":"AHPjjUj7nQPnKtkMBIIIftlGKYr2/ji7cGSPYhxQMK6OIW+QzA70rjhv\n\tQu8MSYhI6mjzcHKHOJqZ6p8=","X-Google-Smtp-Source":"AOwi7QCi8vQynHP4F8458jZV4RMFbg8radUFNHYm6UUCoudqrtRx/6Cz/PFWZyPt+f70iCRMMyriYQ==","X-Received":"by 10.28.132.73 with SMTP id g70mr3017396wmd.33.1506071252932;\n\tFri, 22 Sep 2017 02:07:32 -0700 (PDT)","Date":"Fri, 22 Sep 2017 10:07:30 +0100","From":"Stefan Hajnoczi <stefanha@gmail.com>","To":"Jason Wang <jasowang@redhat.com>","Cc":"mst@redhat.com, virtualization@lists.linux-foundation.org,\n\tnetdev@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org","Subject":"Re: [PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()","Message-ID":"<20170922090730.GC9243@stefanha-x1.localdomain>","References":"<1506067355-5771-1-git-send-email-jasowang@redhat.com>\n\t<1506067355-5771-4-git-send-email-jasowang@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<1506067355-5771-4-git-send-email-jasowang@redhat.com>","User-Agent":"Mutt/1.8.3 (2017-05-23)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1775792,"web_url":"http://patchwork.ozlabs.org/comment/1775792/","msgid":"<20170926170047-mutt-send-email-mst@kernel.org>","list_archive_url":null,"date":"2017-09-26T19:13:09","subject":"Re: [PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()","submitter":{"id":2235,"url":"http://patchwork.ozlabs.org/api/people/2235/","name":"Michael S. Tsirkin","email":"mst@redhat.com"},"content":"On Fri, Sep 22, 2017 at 04:02:33PM +0800, Jason Wang wrote:\n> This patch introduces a helper which just increase the used idx. This\n> will be used in pair with vhost_prefetch_desc_indices() by batching\n> code.\n> \n> Signed-off-by: Jason Wang <jasowang@redhat.com>\n> ---\n>  drivers/vhost/vhost.c | 33 +++++++++++++++++++++++++++++++++\n>  drivers/vhost/vhost.h |  1 +\n>  2 files changed, 34 insertions(+)\n> \n> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c\n> index 8424166d..6532cda 100644\n> --- a/drivers/vhost/vhost.c\n> +++ b/drivers/vhost/vhost.c\n> @@ -2178,6 +2178,39 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len)\n>  }\n>  EXPORT_SYMBOL_GPL(vhost_add_used);\n>  \n> +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n)\n> +{\n> +\tu16 old, new;\n> +\n> +\told = vq->last_used_idx;\n> +\tnew = (vq->last_used_idx += n);\n> +\t/* If the driver never bothers to signal in a very long while,\n> +\t * used index might wrap around. If that happens, invalidate\n> +\t * signalled_used index we stored. TODO: make sure driver\n> +\t * signals at least once in 2^16 and remove this.\n> +\t */\n> +\tif (unlikely((u16)(new - vq->signalled_used) < (u16)(new - old)))\n> +\t\tvq->signalled_used_valid = false;\n> +\n> +\t/* Make sure buffer is written before we update index. */\n> +\tsmp_wmb();\n> +\tif (vhost_put_user(vq, cpu_to_vhost16(vq, vq->last_used_idx),\n> +\t\t\t   &vq->used->idx)) {\n> +\t\tvq_err(vq, \"Failed to increment used idx\");\n> +\t\treturn -EFAULT;\n> +\t}\n> +\tif (unlikely(vq->log_used)) {\n> +\t\t/* Log used index update. */\n> +\t\tlog_write(vq->log_base,\n> +\t\t\t  vq->log_addr + offsetof(struct vring_used, idx),\n> +\t\t\t  sizeof(vq->used->idx));\n> +\t\tif (vq->log_ctx)\n> +\t\t\teventfd_signal(vq->log_ctx, 1);\n> +\t}\n> +\treturn 0;\n> +}\n> +EXPORT_SYMBOL_GPL(vhost_add_used_idx);\n> +\n>  static int __vhost_add_used_n(struct vhost_virtqueue *vq,\n>  \t\t\t    struct vring_used_elem *heads,\n>  \t\t\t    unsigned count)\n> diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h\n> index 16c2cb6..5dd6c05 100644\n> --- a/drivers/vhost/vhost.h\n> +++ b/drivers/vhost/vhost.h\n> @@ -199,6 +199,7 @@ int __vhost_get_vq_desc(struct vhost_virtqueue *vq,\n>  void vhost_discard_vq_desc(struct vhost_virtqueue *, int n);\n>  \n>  int vhost_vq_init_access(struct vhost_virtqueue *);\n> +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n);\n>  int vhost_add_used(struct vhost_virtqueue *, unsigned int head, int len);\n>  int vhost_add_used_n(struct vhost_virtqueue *, struct vring_used_elem *heads,\n>  \t\t     unsigned count);\n\nPlease change the API to hide the fact that there's an index that needs\nto be updated.\n\n> -- \n> 2.7.4","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=mst@redhat.com"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y1rFs2Hqcz9t4Z\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 27 Sep 2017 05:13:21 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S936424AbdIZTNM (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 26 Sep 2017 15:13:12 -0400","from mx1.redhat.com ([209.132.183.28]:34768 \"EHLO mx1.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S935538AbdIZTNL (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tTue, 26 Sep 2017 15:13:11 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 08B42356F9;\n\tTue, 26 Sep 2017 19:13:11 +0000 (UTC)","from redhat.com (ovpn-122-9.rdu2.redhat.com [10.10.122.9])\n\tby smtp.corp.redhat.com (Postfix) with SMTP id 6430862473;\n\tTue, 26 Sep 2017 19:13:10 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 08B42356F9","Date":"Tue, 26 Sep 2017 22:13:09 +0300","From":"\"Michael S. Tsirkin\" <mst@redhat.com>","To":"Jason Wang <jasowang@redhat.com>","Cc":"virtualization@lists.linux-foundation.org, netdev@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, kvm@vger.kernel.org","Subject":"Re: [PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()","Message-ID":"<20170926170047-mutt-send-email-mst@kernel.org>","References":"<1506067355-5771-1-git-send-email-jasowang@redhat.com>\n\t<1506067355-5771-4-git-send-email-jasowang@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<1506067355-5771-4-git-send-email-jasowang@redhat.com>","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.30]);\n\tTue, 26 Sep 2017 19:13:11 +0000 (UTC)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1775965,"web_url":"http://patchwork.ozlabs.org/comment/1775965/","msgid":"<c42b7244-6d43-2ce5-46a3-ea70ec9d957f@redhat.com>","list_archive_url":null,"date":"2017-09-27T00:38:24","subject":"Re: [PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()","submitter":{"id":5225,"url":"http://patchwork.ozlabs.org/api/people/5225/","name":"Jason Wang","email":"jasowang@redhat.com"},"content":"On 2017年09月27日 03:13, Michael S. Tsirkin wrote:\n> On Fri, Sep 22, 2017 at 04:02:33PM +0800, Jason Wang wrote:\n>> This patch introduces a helper which just increase the used idx. This\n>> will be used in pair with vhost_prefetch_desc_indices() by batching\n>> code.\n>>\n>> Signed-off-by: Jason Wang <jasowang@redhat.com>\n>> ---\n>>   drivers/vhost/vhost.c | 33 +++++++++++++++++++++++++++++++++\n>>   drivers/vhost/vhost.h |  1 +\n>>   2 files changed, 34 insertions(+)\n>>\n>> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c\n>> index 8424166d..6532cda 100644\n>> --- a/drivers/vhost/vhost.c\n>> +++ b/drivers/vhost/vhost.c\n>> @@ -2178,6 +2178,39 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len)\n>>   }\n>>   EXPORT_SYMBOL_GPL(vhost_add_used);\n>>   \n>> +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n)\n>> +{\n>> +\tu16 old, new;\n>> +\n>> +\told = vq->last_used_idx;\n>> +\tnew = (vq->last_used_idx += n);\n>> +\t/* If the driver never bothers to signal in a very long while,\n>> +\t * used index might wrap around. If that happens, invalidate\n>> +\t * signalled_used index we stored. TODO: make sure driver\n>> +\t * signals at least once in 2^16 and remove this.\n>> +\t */\n>> +\tif (unlikely((u16)(new - vq->signalled_used) < (u16)(new - old)))\n>> +\t\tvq->signalled_used_valid = false;\n>> +\n>> +\t/* Make sure buffer is written before we update index. */\n>> +\tsmp_wmb();\n>> +\tif (vhost_put_user(vq, cpu_to_vhost16(vq, vq->last_used_idx),\n>> +\t\t\t   &vq->used->idx)) {\n>> +\t\tvq_err(vq, \"Failed to increment used idx\");\n>> +\t\treturn -EFAULT;\n>> +\t}\n>> +\tif (unlikely(vq->log_used)) {\n>> +\t\t/* Log used index update. */\n>> +\t\tlog_write(vq->log_base,\n>> +\t\t\t  vq->log_addr + offsetof(struct vring_used, idx),\n>> +\t\t\t  sizeof(vq->used->idx));\n>> +\t\tif (vq->log_ctx)\n>> +\t\t\teventfd_signal(vq->log_ctx, 1);\n>> +\t}\n>> +\treturn 0;\n>> +}\n>> +EXPORT_SYMBOL_GPL(vhost_add_used_idx);\n>> +\n>>   static int __vhost_add_used_n(struct vhost_virtqueue *vq,\n>>   \t\t\t    struct vring_used_elem *heads,\n>>   \t\t\t    unsigned count)\n>> diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h\n>> index 16c2cb6..5dd6c05 100644\n>> --- a/drivers/vhost/vhost.h\n>> +++ b/drivers/vhost/vhost.h\n>> @@ -199,6 +199,7 @@ int __vhost_get_vq_desc(struct vhost_virtqueue *vq,\n>>   void vhost_discard_vq_desc(struct vhost_virtqueue *, int n);\n>>   \n>>   int vhost_vq_init_access(struct vhost_virtqueue *);\n>> +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n);\n>>   int vhost_add_used(struct vhost_virtqueue *, unsigned int head, int len);\n>>   int vhost_add_used_n(struct vhost_virtqueue *, struct vring_used_elem *heads,\n>>   \t\t     unsigned count);\n> Please change the API to hide the fact that there's an index that needs\n> to be updated.\n\nIn fact, an interesting optimization on top is just call \nvhost_add_used_idx(vq, n) instead of n vhost_add_used_idx(vq, 1). That's \nthe reason I leave n in the API.\n\nThanks\n\n>\n>> -- \n>> 2.7.4","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=jasowang@redhat.com"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y1zTG5N69z9t3B\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 27 Sep 2017 10:38:42 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1031142AbdI0Aie (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 26 Sep 2017 20:38:34 -0400","from mx1.redhat.com ([209.132.183.28]:50914 \"EHLO mx1.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1031014AbdI0Aic (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tTue, 26 Sep 2017 20:38:32 -0400","from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id BC666356C9;\n\tWed, 27 Sep 2017 00:38:32 +0000 (UTC)","from [10.72.12.40] (ovpn-12-40.pek2.redhat.com [10.72.12.40])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 3BFD978AA2;\n\tWed, 27 Sep 2017 00:38:27 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com BC666356C9","Subject":"Re: [PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()","To":"\"Michael S. Tsirkin\" <mst@redhat.com>","Cc":"virtualization@lists.linux-foundation.org, netdev@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, kvm@vger.kernel.org","References":"<1506067355-5771-1-git-send-email-jasowang@redhat.com>\n\t<1506067355-5771-4-git-send-email-jasowang@redhat.com>\n\t<20170926170047-mutt-send-email-mst@kernel.org>","From":"Jason Wang <jasowang@redhat.com>","Message-ID":"<c42b7244-6d43-2ce5-46a3-ea70ec9d957f@redhat.com>","Date":"Wed, 27 Sep 2017 08:38:24 +0800","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170926170047-mutt-send-email-mst@kernel.org>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Transfer-Encoding":"8bit","Content-Language":"en-US","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.14","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.30]);\n\tWed, 27 Sep 2017 00:38:32 +0000 (UTC)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1776677,"web_url":"http://patchwork.ozlabs.org/comment/1776677/","msgid":"<20170928015749-mutt-send-email-mst@kernel.org>","list_archive_url":null,"date":"2017-09-27T22:58:40","subject":"Re: [PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()","submitter":{"id":2235,"url":"http://patchwork.ozlabs.org/api/people/2235/","name":"Michael S. Tsirkin","email":"mst@redhat.com"},"content":"On Wed, Sep 27, 2017 at 08:38:24AM +0800, Jason Wang wrote:\n> \n> \n> On 2017年09月27日 03:13, Michael S. Tsirkin wrote:\n> > On Fri, Sep 22, 2017 at 04:02:33PM +0800, Jason Wang wrote:\n> > > This patch introduces a helper which just increase the used idx. This\n> > > will be used in pair with vhost_prefetch_desc_indices() by batching\n> > > code.\n> > > \n> > > Signed-off-by: Jason Wang <jasowang@redhat.com>\n> > > ---\n> > >   drivers/vhost/vhost.c | 33 +++++++++++++++++++++++++++++++++\n> > >   drivers/vhost/vhost.h |  1 +\n> > >   2 files changed, 34 insertions(+)\n> > > \n> > > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c\n> > > index 8424166d..6532cda 100644\n> > > --- a/drivers/vhost/vhost.c\n> > > +++ b/drivers/vhost/vhost.c\n> > > @@ -2178,6 +2178,39 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len)\n> > >   }\n> > >   EXPORT_SYMBOL_GPL(vhost_add_used);\n> > > +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n)\n> > > +{\n> > > +\tu16 old, new;\n> > > +\n> > > +\told = vq->last_used_idx;\n> > > +\tnew = (vq->last_used_idx += n);\n> > > +\t/* If the driver never bothers to signal in a very long while,\n> > > +\t * used index might wrap around. If that happens, invalidate\n> > > +\t * signalled_used index we stored. TODO: make sure driver\n> > > +\t * signals at least once in 2^16 and remove this.\n> > > +\t */\n> > > +\tif (unlikely((u16)(new - vq->signalled_used) < (u16)(new - old)))\n> > > +\t\tvq->signalled_used_valid = false;\n> > > +\n> > > +\t/* Make sure buffer is written before we update index. */\n> > > +\tsmp_wmb();\n> > > +\tif (vhost_put_user(vq, cpu_to_vhost16(vq, vq->last_used_idx),\n> > > +\t\t\t   &vq->used->idx)) {\n> > > +\t\tvq_err(vq, \"Failed to increment used idx\");\n> > > +\t\treturn -EFAULT;\n> > > +\t}\n> > > +\tif (unlikely(vq->log_used)) {\n> > > +\t\t/* Log used index update. */\n> > > +\t\tlog_write(vq->log_base,\n> > > +\t\t\t  vq->log_addr + offsetof(struct vring_used, idx),\n> > > +\t\t\t  sizeof(vq->used->idx));\n> > > +\t\tif (vq->log_ctx)\n> > > +\t\t\teventfd_signal(vq->log_ctx, 1);\n> > > +\t}\n> > > +\treturn 0;\n> > > +}\n> > > +EXPORT_SYMBOL_GPL(vhost_add_used_idx);\n> > > +\n> > >   static int __vhost_add_used_n(struct vhost_virtqueue *vq,\n> > >   \t\t\t    struct vring_used_elem *heads,\n> > >   \t\t\t    unsigned count)\n> > > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h\n> > > index 16c2cb6..5dd6c05 100644\n> > > --- a/drivers/vhost/vhost.h\n> > > +++ b/drivers/vhost/vhost.h\n> > > @@ -199,6 +199,7 @@ int __vhost_get_vq_desc(struct vhost_virtqueue *vq,\n> > >   void vhost_discard_vq_desc(struct vhost_virtqueue *, int n);\n> > >   int vhost_vq_init_access(struct vhost_virtqueue *);\n> > > +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n);\n> > >   int vhost_add_used(struct vhost_virtqueue *, unsigned int head, int len);\n> > >   int vhost_add_used_n(struct vhost_virtqueue *, struct vring_used_elem *heads,\n> > >   \t\t     unsigned count);\n> > Please change the API to hide the fact that there's an index that needs\n> > to be updated.\n> \n> In fact, an interesting optimization on top is just call\n> vhost_add_used_idx(vq, n) instead of n vhost_add_used_idx(vq, 1). That's the\n> reason I leave n in the API.\n> \n> Thanks\n\nRight but you could increment some internal counter in the vq\nstructure then update the used index using some api\nwith a generic name, e.g.  add_used_complete or something like this.\n\n> > \n> > > -- \n> > > 2.7.4","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=mst@redhat.com"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y2YCj1Ngqz9t5l\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 28 Sep 2017 08:58:57 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752371AbdI0W6n (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 27 Sep 2017 18:58:43 -0400","from mx1.redhat.com ([209.132.183.28]:46918 \"EHLO mx1.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1752292AbdI0W6m (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tWed, 27 Sep 2017 18:58:42 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id CD2A22AEB8D;\n\tWed, 27 Sep 2017 22:58:41 +0000 (UTC)","from redhat.com (ovpn-123-149.rdu2.redhat.com [10.10.123.149])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 479E37E575;\n\tWed, 27 Sep 2017 22:58:41 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com CD2A22AEB8D","Date":"Thu, 28 Sep 2017 01:58:40 +0300","From":"\"Michael S. Tsirkin\" <mst@redhat.com>","To":"Jason Wang <jasowang@redhat.com>","Cc":"virtualization@lists.linux-foundation.org, netdev@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, kvm@vger.kernel.org","Subject":"Re: [PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()","Message-ID":"<20170928015749-mutt-send-email-mst@kernel.org>","References":"<1506067355-5771-1-git-send-email-jasowang@redhat.com>\n\t<1506067355-5771-4-git-send-email-jasowang@redhat.com>\n\t<20170926170047-mutt-send-email-mst@kernel.org>\n\t<c42b7244-6d43-2ce5-46a3-ea70ec9d957f@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<c42b7244-6d43-2ce5-46a3-ea70ec9d957f@redhat.com>","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.38]);\n\tWed, 27 Sep 2017 22:58:41 +0000 (UTC)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1776710,"web_url":"http://patchwork.ozlabs.org/comment/1776710/","msgid":"<CAF=yD-JaivP9=dKp63U3CoReGW4K=W+j4tp_kasHEoMC7rO54A@mail.gmail.com>","list_archive_url":null,"date":"2017-09-28T00:59:53","subject":"Re: [PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()","submitter":{"id":67615,"url":"http://patchwork.ozlabs.org/api/people/67615/","name":"Willem de Bruijn","email":"willemdebruijn.kernel@gmail.com"},"content":">> > > @@ -199,6 +199,7 @@ int __vhost_get_vq_desc(struct vhost_virtqueue *vq,\n>> > >   void vhost_discard_vq_desc(struct vhost_virtqueue *, int n);\n>> > >   int vhost_vq_init_access(struct vhost_virtqueue *);\n>> > > +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n);\n>> > >   int vhost_add_used(struct vhost_virtqueue *, unsigned int head, int len);\n>> > >   int vhost_add_used_n(struct vhost_virtqueue *, struct vring_used_elem *heads,\n>> > >                        unsigned count);\n>> > Please change the API to hide the fact that there's an index that needs\n>> > to be updated.\n>>\n>> In fact, an interesting optimization on top is just call\n>> vhost_add_used_idx(vq, n) instead of n vhost_add_used_idx(vq, 1). That's the\n>> reason I leave n in the API.\n>>\n>> Thanks\n>\n> Right but you could increment some internal counter in the vq\n> structure then update the used index using some api\n> with a generic name, e.g.  add_used_complete or something like this.\n\nThat adds a layer of information hiding. If the same variable can be\nkept close to the computation in a local variable and passed directly\nto vhost_add_used_idx_n that is easier to follow.","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"qE1AFN+Y\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y2bwH2JM8z9tX4\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 28 Sep 2017 11:00:47 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752576AbdI1BAg (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 27 Sep 2017 21:00:36 -0400","from mail-oi0-f47.google.com ([209.85.218.47]:50199 \"EHLO\n\tmail-oi0-f47.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752520AbdI1BAe (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 27 Sep 2017 21:00:34 -0400","by mail-oi0-f47.google.com with SMTP id w65so8483oia.7;\n\tWed, 27 Sep 2017 18:00:34 -0700 (PDT)","by 10.168.31.195 with HTTP; Wed, 27 Sep 2017 17:59:53 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=6kdsOnwnEn2V/KZfNcPFy2r/6D7gB2RB/ZL951kXjrQ=;\n\tb=qE1AFN+YI8q6dutkUYVR3NSkYpilDbgDLxEmFF4BgpUPNhzVp/Tjq2GJbMuDckMDka\n\tQ+KOfPglO+gGHd/b4WMPd6jSu2BEHdpbdW2FPBPmnSMLTWe85W9K6j1PDXovEqiakMDv\n\tGCe8ec9TXot3yM4R2NI1gEuA1FcqCq/2QhBA+PPyW0Bj3Y+yvD/7hAIpwwAZB708CLnD\n\tFl7F6cqtuSSjQLGze/Y8Baq7nN54Hs9NYUoRkb0FDcXZILa3m7YIBys3nScs2mVmm58O\n\tQ6wEkQ8c/PcsSScb5lWAttuxgTxQgteyhObVi4kveUCEGSVXTAAT3NrCxF2cDobynJsf\n\ttkFw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=6kdsOnwnEn2V/KZfNcPFy2r/6D7gB2RB/ZL951kXjrQ=;\n\tb=OHOhtuR1W9acR9UOXf4HUApXXHl2k/ij7ovLZe9J8586EMgnbciRn8w5uEDJSdsJna\n\t78VfwOteet5am9mmQ6Jz/MaRLzfVz9m7iS+pCIxhMk8gIZ6NcfMJ4eQMioLHxUu0vlxj\n\tVtDWmJD7SoK05L4i5VL2lWPqJk6FLuartR+159Hezkf/+CEZRVO6TI1zacoBn26hk45k\n\tiXwb5K79R1Hz8TrVfF/0m11KPNJHvqgYSfCv0MuoSJstmBhW/63YkZtjJP6Kd3CSqzjB\n\tG246phYba0VsnhV+lkd2PiG7oLb4S/oUu7kKfRk8cN7XBwxjzzIvQzpkJE3NrmPl5zly\n\twoTA==","X-Gm-Message-State":"AMCzsaWYvfcX9hT2bT9w+BmfBgjzO/KoL/ViPXzZBa0vGC0VpOgY2iKQ\n\tw8Ir2gfy3fYyYzYQ3OO+t6l31rFzxQSLg4NmqnLdag==","X-Google-Smtp-Source":"AOwi7QBDlStHypPse5m86KAPgJnVLvRzdITB9Wd46BeMZ77+1PcT5b9DadVz9MkObb/CFDnloVC7trkuKCiqI6xIRF4=","X-Received":"by 10.202.206.195 with SMTP id e186mr1683342oig.73.1506560433755;\n\tWed, 27 Sep 2017 18:00:33 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170928015749-mutt-send-email-mst@kernel.org>","References":"<1506067355-5771-1-git-send-email-jasowang@redhat.com>\n\t<1506067355-5771-4-git-send-email-jasowang@redhat.com>\n\t<20170926170047-mutt-send-email-mst@kernel.org>\n\t<c42b7244-6d43-2ce5-46a3-ea70ec9d957f@redhat.com>\n\t<20170928015749-mutt-send-email-mst@kernel.org>","From":"Willem de Bruijn <willemdebruijn.kernel@gmail.com>","Date":"Wed, 27 Sep 2017 20:59:53 -0400","Message-ID":"<CAF=yD-JaivP9=dKp63U3CoReGW4K=W+j4tp_kasHEoMC7rO54A@mail.gmail.com>","Subject":"Re: [PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()","To":"\"Michael S. Tsirkin\" <mst@redhat.com>","Cc":"Jason Wang <jasowang@redhat.com>,\n\tvirtualization@lists.linux-foundation.org,\n\tNetwork Development <netdev@vger.kernel.org>,\n\tLKML <linux-kernel@vger.kernel.org>, kvm@vger.kernel.org","Content-Type":"text/plain; charset=\"UTF-8\"","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1776817,"web_url":"http://patchwork.ozlabs.org/comment/1776817/","msgid":"<76182672-9e48-101f-4e18-c2e28c87f0e8@redhat.com>","list_archive_url":null,"date":"2017-09-28T07:19:23","subject":"Re: [PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()","submitter":{"id":5225,"url":"http://patchwork.ozlabs.org/api/people/5225/","name":"Jason Wang","email":"jasowang@redhat.com"},"content":"On 2017年09月28日 06:58, Michael S. Tsirkin wrote:\n> On Wed, Sep 27, 2017 at 08:38:24AM +0800, Jason Wang wrote:\n>> On 2017年09月27日 03:13, Michael S. Tsirkin wrote:\n>>> On Fri, Sep 22, 2017 at 04:02:33PM +0800, Jason Wang wrote:\n>>>> This patch introduces a helper which just increase the used idx. This\n>>>> will be used in pair with vhost_prefetch_desc_indices() by batching\n>>>> code.\n>>>>\n>>>> Signed-off-by: Jason Wang<jasowang@redhat.com>\n>>>> ---\n>>>>    drivers/vhost/vhost.c | 33 +++++++++++++++++++++++++++++++++\n>>>>    drivers/vhost/vhost.h |  1 +\n>>>>    2 files changed, 34 insertions(+)\n>>>>\n>>>> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c\n>>>> index 8424166d..6532cda 100644\n>>>> --- a/drivers/vhost/vhost.c\n>>>> +++ b/drivers/vhost/vhost.c\n>>>> @@ -2178,6 +2178,39 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len)\n>>>>    }\n>>>>    EXPORT_SYMBOL_GPL(vhost_add_used);\n>>>> +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n)\n>>>> +{\n>>>> +\tu16 old, new;\n>>>> +\n>>>> +\told = vq->last_used_idx;\n>>>> +\tnew = (vq->last_used_idx += n);\n>>>> +\t/* If the driver never bothers to signal in a very long while,\n>>>> +\t * used index might wrap around. If that happens, invalidate\n>>>> +\t * signalled_used index we stored. TODO: make sure driver\n>>>> +\t * signals at least once in 2^16  and remove this.\n>>>> +\t */\n>>>> +\tif (unlikely((u16)(new - vq->signalled_used) < (u16)(new - old)))\n>>>> +\t\tvq->signalled_used_valid = false;\n>>>> +\n>>>> +\t/* Make sure buffer is written before we update index. */\n>>>> +\tsmp_wmb();\n>>>> +\tif (vhost_put_user(vq, cpu_to_vhost16(vq, vq->last_used_idx),\n>>>> +\t\t\t   &vq->used->idx)) {\n>>>> +\t\tvq_err(vq, \"Failed to increment used idx\");\n>>>> +\t\treturn -EFAULT;\n>>>> +\t}\n>>>> +\tif (unlikely(vq->log_used)) {\n>>>> +\t\t/* Log used index update. */\n>>>> +\t\tlog_write(vq->log_base,\n>>>> +\t\t\t  vq->log_addr + offsetof(struct vring_used, idx),\n>>>> +\t\t\t  sizeof(vq->used->idx));\n>>>> +\t\tif (vq->log_ctx)\n>>>> +\t\t\teventfd_signal(vq->log_ctx, 1);\n>>>> +\t}\n>>>> +\treturn 0;\n>>>> +}\n>>>> +EXPORT_SYMBOL_GPL(vhost_add_used_idx);\n>>>> +\n>>>>    static int __vhost_add_used_n(struct vhost_virtqueue *vq,\n>>>>    \t\t\t    struct vring_used_elem *heads,\n>>>>    \t\t\t    unsigned count)\n>>>> diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h\n>>>> index 16c2cb6..5dd6c05 100644\n>>>> --- a/drivers/vhost/vhost.h\n>>>> +++ b/drivers/vhost/vhost.h\n>>>> @@ -199,6 +199,7 @@ int __vhost_get_vq_desc(struct vhost_virtqueue *vq,\n>>>>    void vhost_discard_vq_desc(struct vhost_virtqueue *, int n);\n>>>>    int vhost_vq_init_access(struct vhost_virtqueue *);\n>>>> +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n);\n>>>>    int vhost_add_used(struct vhost_virtqueue *, unsigned int head, int len);\n>>>>    int vhost_add_used_n(struct vhost_virtqueue *, struct vring_used_elem *heads,\n>>>>    \t\t     unsigned count);\n>>> Please change the API to hide the fact that there's an index that needs\n>>> to be updated.\n>> In fact, an interesting optimization on top is just call\n>> vhost_add_used_idx(vq, n) instead of n vhost_add_used_idx(vq, 1). That's the\n>> reason I leave n in the API.\n>>\n>> Thanks\n> Right but you could increment some internal counter in the vq\n> structure then update the used index using some api\n> with a generic name, e.g.  add_used_complete or something like this.\n>\n\nRight, I see.\n\nThanks","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=jasowang@redhat.com"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y2mKT5mdlz9sNr\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 28 Sep 2017 17:19:41 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751975AbdI1HTd (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 28 Sep 2017 03:19:33 -0400","from mx1.redhat.com ([209.132.183.28]:33004 \"EHLO mx1.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1751548AbdI1HTb (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tThu, 28 Sep 2017 03:19:31 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 7ABF3E3759;\n\tThu, 28 Sep 2017 07:19:31 +0000 (UTC)","from [10.72.12.139] (ovpn-12-139.pek2.redhat.com [10.72.12.139])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id B160F7E69B;\n\tThu, 28 Sep 2017 07:19:25 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 7ABF3E3759","Subject":"Re: [PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()","To":"\"Michael S. Tsirkin\" <mst@redhat.com>","Cc":"virtualization@lists.linux-foundation.org, netdev@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, kvm@vger.kernel.org","References":"<1506067355-5771-1-git-send-email-jasowang@redhat.com>\n\t<1506067355-5771-4-git-send-email-jasowang@redhat.com>\n\t<20170926170047-mutt-send-email-mst@kernel.org>\n\t<c42b7244-6d43-2ce5-46a3-ea70ec9d957f@redhat.com>\n\t<20170928015749-mutt-send-email-mst@kernel.org>","From":"Jason Wang <jasowang@redhat.com>","Message-ID":"<76182672-9e48-101f-4e18-c2e28c87f0e8@redhat.com>","Date":"Thu, 28 Sep 2017 15:19:23 +0800","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170928015749-mutt-send-email-mst@kernel.org>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Transfer-Encoding":"8bit","Content-Language":"en-US","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]);\n\tThu, 28 Sep 2017 07:19:31 +0000 (UTC)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}}]