From mboxrd@z Thu Jan 1 00:00:00 1970 From: jiangyiwen Subject: Re: [PATCH v2 1/5] VSOCK: support fill mergeable rx buffer in guest Date: Thu, 13 Dec 2018 10:47:21 +0800 Message-ID: <5C11C839.1040004@huawei.com> References: <5C10D4B0.8080504@huawei.com> <20181212.110829.1327856253463467975.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Cc: , , , , , To: David Miller Return-path: Received: from szxga05-in.huawei.com ([45.249.212.191]:15683 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726457AbeLMCr1 (ORCPT ); Wed, 12 Dec 2018 21:47:27 -0500 In-Reply-To: <20181212.110829.1327856253463467975.davem@davemloft.net> Sender: netdev-owner@vger.kernel.org List-ID: On 2018/12/13 3:08, David Miller wrote: > From: jiangyiwen > Date: Wed, 12 Dec 2018 17:28:16 +0800 > >> +static int fill_mergeable_rx_buff(struct virtio_vsock *vsock, >> + struct virtqueue *vq) >> +{ >> + struct page_frag *alloc_frag = &vsock->alloc_frag; >> + struct scatterlist sg; >> + /* Currently we don't use ewma len, use PAGE_SIZE instead, because too >> + * small size can't fill one full packet, sadly we only 128 vq num now. >> + */ >> + unsigned int len = PAGE_SIZE, hole; >> + void *buf; >> + int err; > > Please don't break up a set of local variable declarations with a > comment like this. The comment seems to be about the initialization > of 'len', so move that initialization into the code below the variable > declarations and bring the comment along for the ride as well. > > . > Hi David, Thanks your suggestions, if maintainers approve use this series of patches other than "vsock over virtio-net" idea, I will send to next version and fix it. Otherwise, I hope it can give maintainers the motivation that aggregate the vsock(virtio_transport related) and virtio-net. Thanks, Yiwen.