From: Jason Wang Subject: Re: [RFC PATCH V2 4/5] vhost: introduce helpers to get the size of metadata area Date: Thu, 7 Mar 2019 10:40:20 +0800 Message-ID: References: <1551856692-3384-1-git-send-email-jasowang@redhat.com> <1551856692-3384-5-git-send-email-jasowang@redhat.com> <608E47C2-5130-41DE-9D52-02807EBCDD43@dinechin.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: mst@redhat.com, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, peterx@redhat.com, linux-mm@kvack.org, aarcange@redhat.com To: Christophe de Dinechin Return-path: In-Reply-To: <608E47C2-5130-41DE-9D52-02807EBCDD43@dinechin.org> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 2019/3/6 下午6:56, Christophe de Dinechin wrote: >> On 6 Mar 2019, at 08:18, Jason Wang wrote: >> >> Signed-off-by: Jason Wang >> --- >> drivers/vhost/vhost.c | 46 ++++++++++++++++++++++++++++------------------ >> 1 file changed, 28 insertions(+), 18 deletions(-) >> >> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c >> index 2025543..1015464 100644 >> --- a/drivers/vhost/vhost.c >> +++ b/drivers/vhost/vhost.c >> @@ -413,6 +413,27 @@ static void vhost_dev_free_iovecs(struct vhost_dev *dev) >> vhost_vq_free_iovecs(dev->vqs[i]); >> } >> >> +static size_t vhost_get_avail_size(struct vhost_virtqueue *vq, int num) > Nit: Any reason not to make `num` unsigned or size_t? > Let me use unsigned int to match the definition of vq->num. Thanks