[{"id":1773358,"web_url":"http://patchwork.ozlabs.org/comment/1773358/","msgid":"<20170922083157.GA9243@stefanha-x1.localdomain>","list_archive_url":null,"date":"2017-09-22T08:31:58","subject":"Re: [PATCH net-next RFC 1/5] vhost: split out ring head fetching\n\tlogic","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:31PM +0800, Jason Wang wrote:\n> +/* This looks in the virtqueue and for the first available buffer, and converts\n> + * it to an iovec for convenient access.  Since descriptors consist of some\n> + * number of output then some number of input descriptors, it's actually two\n> + * iovecs, but we pack them into one and note how many of each there were.\n> + *\n> + * This function returns the descriptor number found, or vq->num (which is\n> + * never a valid descriptor number) if none was found.  A negative code is\n> + * returned on error. */\n> +int __vhost_get_vq_desc(struct vhost_virtqueue *vq,\n> +\t\t\tstruct iovec iov[], unsigned int iov_size,\n> +\t\t\tunsigned int *out_num, unsigned int *in_num,\n> +\t\t\tstruct vhost_log *log, unsigned int *log_num,\n> +\t\t\t__virtio16 head)\n[...]\n> +int vhost_get_vq_desc(struct vhost_virtqueue *vq,\n> +\t\t      struct iovec iov[], unsigned int iov_size,\n> +\t\t      unsigned int *out_num, unsigned int *in_num,\n> +\t\t      struct vhost_log *log, unsigned int *log_num)\n\nPlease document vhost_get_vq_desc().\n\nPlease also explain the difference between __vhost_get_vq_desc() and\nvhost_get_vq_desc() in the documentation.","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=\"or+1F/uK\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xz6D742Gmz9sBd\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 22 Sep 2017 18:32:23 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751851AbdIVIcL (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 22 Sep 2017 04:32:11 -0400","from mail-wr0-f173.google.com ([209.85.128.173]:46092 \"EHLO\n\tmail-wr0-f173.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751792AbdIVIcJ (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 22 Sep 2017 04:32:09 -0400","by mail-wr0-f173.google.com with SMTP id o42so360866wrb.3;\n\tFri, 22 Sep 2017 01:32:08 -0700 (PDT)","from localhost ([51.15.41.238]) by smtp.gmail.com with ESMTPSA id\n\tu186sm3185024wmd.19.2017.09.22.01.32.06\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tFri, 22 Sep 2017 01:32:06 -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=sB4yWPCf/dxxwurCpBmc189OkWhBFzf2JHii67cv+7Q=;\n\tb=or+1F/uKIMp1D1O6jDruIbpP18l2Tr1P1JPjbOXfFNqwHEk7C54ybmeu6sZTAvrUPy\n\tEcvcl3Ls+ukWDCA+Hf9oPjJxAgVLpv+6DaF6mlVjhSP3AWtYgavqZDPtlXFJ7gWPrkJ8\n\tS7hnB2mDaPbmz9LmqtbrD1pDESe1NJ+r3wc1mduX/VX1vB5r/JijW/Im4BTm8f07LfCJ\n\tDJHtOmvcZRzh9qT2euTCvRXZdsqkk9dx+N91SwOuFqYDdeggHx4Nl7KS5NHcWsB7nBSf\n\tZrVV0malkoOrETf+01EyaPXfahrYcivHMEdKinA5G6EDkgxS4rM9Gshmu4aWvSAq/hOM\n\t4jkw==","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=sB4yWPCf/dxxwurCpBmc189OkWhBFzf2JHii67cv+7Q=;\n\tb=n/CGwdau3D1OO0TTpGVoTp4DtGdU52W/po2ff4Xh4iiJgBKSz9dNLS05lLtLYwmeDJ\n\tLfUb3A/oXF4062MEjamem2NCFFNzxjqpFweCmmKZlVfqlNBwG9Nq04ZBnS3FvVRg4wdc\n\tIF6AMrEiFv3ngkWItr3Y7NVb9EnETYAIXds1cmaOcQkf8iyy55L296dHAb4SqFOOvqCr\n\tLQSFkM13CADylyZiK0pWXfwj8CcREXiDlmxPAnyzMUfehMgD8D48cH5itGOP7x+LiyI/\n\t2kWmIIpvOH9MhE0jpdiyBs3wxVKnEu/MisvozAtqJXKlre+p1jyYzaWNlVSQqoX78IET\n\tH/xQ==","X-Gm-Message-State":"AHPjjUiUASWBY2tzM0KO37jxW67E0HaoIPSuz6MuYKqfASSLIkfMq4S9\n\twoptD7UDngHelDrxUODe/Xqw21d3","X-Google-Smtp-Source":"AOwi7QCRya6qJIY5sDRD9FCTECAoadynPu93ks8Q0sGOO5nE4CpuiA2KOgPd1WtQ1/X0u4acvybh4A==","X-Received":"by 10.223.157.198 with SMTP id q6mr4083983wre.102.1506069127777; \n\tFri, 22 Sep 2017 01:32:07 -0700 (PDT)","Date":"Fri, 22 Sep 2017 09:31:58 +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 1/5] vhost: split out ring head fetching\n\tlogic","Message-ID":"<20170922083157.GA9243@stefanha-x1.localdomain>","References":"<1506067355-5771-1-git-send-email-jasowang@redhat.com>\n\t<1506067355-5771-2-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-2-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":1774330,"web_url":"http://patchwork.ozlabs.org/comment/1774330/","msgid":"<5ff7d603-124e-75f1-38fa-9984b194af82@redhat.com>","list_archive_url":null,"date":"2017-09-25T02:03:14","subject":"Re: [PATCH net-next RFC 1/5] vhost: split out ring head fetching\n\tlogic","submitter":{"id":5225,"url":"http://patchwork.ozlabs.org/api/people/5225/","name":"Jason Wang","email":"jasowang@redhat.com"},"content":"On 2017年09月22日 16:31, Stefan Hajnoczi wrote:\n> On Fri, Sep 22, 2017 at 04:02:31PM +0800, Jason Wang wrote:\n>> +/* This looks in the virtqueue and for the first available buffer, and converts\n>> + * it to an iovec for convenient access.  Since descriptors consist of some\n>> + * number of output then some number of input descriptors, it's actually two\n>> + * iovecs, but we pack them into one and note how many of each there were.\n>> + *\n>> + * This function returns the descriptor number found, or vq->num (which is\n>> + * never a valid descriptor number) if none was found.  A negative code is\n>> + * returned on error. */\n>> +int __vhost_get_vq_desc(struct vhost_virtqueue *vq,\n>> +\t\t\tstruct iovec iov[], unsigned int iov_size,\n>> +\t\t\tunsigned int *out_num, unsigned int *in_num,\n>> +\t\t\tstruct vhost_log *log, unsigned int *log_num,\n>> +\t\t\t__virtio16 head)\n> [...]\n>> +int vhost_get_vq_desc(struct vhost_virtqueue *vq,\n>> +\t\t      struct iovec iov[], unsigned int iov_size,\n>> +\t\t      unsigned int *out_num, unsigned int *in_num,\n>> +\t\t      struct vhost_log *log, unsigned int *log_num)\n> Please document vhost_get_vq_desc().\n>\n> Please also explain the difference between __vhost_get_vq_desc() and\n> vhost_get_vq_desc() in the documentation.\n\nRight, will document this in next version.\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-mx02.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx02.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 3y0nS46r80z9t4B\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 25 Sep 2017 12:03:32 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753165AbdIYCDW (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSun, 24 Sep 2017 22:03:22 -0400","from mx1.redhat.com ([209.132.183.28]:53338 \"EHLO mx1.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1752988AbdIYCDV (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tSun, 24 Sep 2017 22:03:21 -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 DE7E1883B8;\n\tMon, 25 Sep 2017 02:03:20 +0000 (UTC)","from [10.72.12.85] (ovpn-12-85.pek2.redhat.com [10.72.12.85])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 20A2462953;\n\tMon, 25 Sep 2017 02:03:16 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com DE7E1883B8","Subject":"Re: [PATCH net-next RFC 1/5] vhost: split out ring head fetching\n\tlogic","To":"Stefan Hajnoczi <stefanha@gmail.com>","Cc":"mst@redhat.com, virtualization@lists.linux-foundation.org,\n\tnetdev@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org","References":"<1506067355-5771-1-git-send-email-jasowang@redhat.com>\n\t<1506067355-5771-2-git-send-email-jasowang@redhat.com>\n\t<20170922083157.GA9243@stefanha-x1.localdomain>","From":"Jason Wang <jasowang@redhat.com>","Message-ID":"<5ff7d603-124e-75f1-38fa-9984b194af82@redhat.com>","Date":"Mon, 25 Sep 2017 10:03:14 +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":"<20170922083157.GA9243@stefanha-x1.localdomain>","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.26]);\n\tMon, 25 Sep 2017 02:03:21 +0000 (UTC)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}}]