From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753291AbdIYCDX (ORCPT ); Sun, 24 Sep 2017 22:03:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53338 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752988AbdIYCDV (ORCPT ); Sun, 24 Sep 2017 22:03:21 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DE7E1883B8 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jasowang@redhat.com Subject: Re: [PATCH net-next RFC 1/5] vhost: split out ring head fetching logic To: Stefan Hajnoczi Cc: mst@redhat.com, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <1506067355-5771-1-git-send-email-jasowang@redhat.com> <1506067355-5771-2-git-send-email-jasowang@redhat.com> <20170922083157.GA9243@stefanha-x1.localdomain> From: Jason Wang 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 Thunderbird/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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 25 Sep 2017 02:03:21 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017年09月22日 16:31, Stefan Hajnoczi wrote: > On Fri, Sep 22, 2017 at 04:02:31PM +0800, Jason Wang wrote: >> +/* This looks in the virtqueue and for the first available buffer, and converts >> + * it to an iovec for convenient access. Since descriptors consist of some >> + * number of output then some number of input descriptors, it's actually two >> + * iovecs, but we pack them into one and note how many of each there were. >> + * >> + * This function returns the descriptor number found, or vq->num (which is >> + * never a valid descriptor number) if none was found. A negative code is >> + * returned on error. */ >> +int __vhost_get_vq_desc(struct vhost_virtqueue *vq, >> + struct iovec iov[], unsigned int iov_size, >> + unsigned int *out_num, unsigned int *in_num, >> + struct vhost_log *log, unsigned int *log_num, >> + __virtio16 head) > [...] >> +int vhost_get_vq_desc(struct vhost_virtqueue *vq, >> + struct iovec iov[], unsigned int iov_size, >> + unsigned int *out_num, unsigned int *in_num, >> + struct vhost_log *log, unsigned int *log_num) > Please document vhost_get_vq_desc(). > > Please also explain the difference between __vhost_get_vq_desc() and > vhost_get_vq_desc() in the documentation. Right, will document this in next version. Thanks