From: jiangyiwen <jiangyiwen@huawei.com>
To: David Miller <davem@davemloft.net>
Cc: <stefanha@redhat.com>, <mst@redhat.com>, <jasowang@redhat.com>,
<netdev@vger.kernel.org>, <kvm@vger.kernel.org>,
<virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH v2 1/5] VSOCK: support fill mergeable rx buffer in guest
Date: Thu, 13 Dec 2018 10:47:21 +0800 [thread overview]
Message-ID: <5C11C839.1040004@huawei.com> (raw)
In-Reply-To: <20181212.110829.1327856253463467975.davem@davemloft.net>
On 2018/12/13 3:08, David Miller wrote:
> From: jiangyiwen <jiangyiwen@huawei.com>
> 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.
prev parent reply other threads:[~2018-12-13 2:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-12 9:28 [PATCH v2 1/5] VSOCK: support fill mergeable rx buffer in guest jiangyiwen
2018-12-12 19:08 ` David Miller
2018-12-13 2:47 ` jiangyiwen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5C11C839.1040004@huawei.com \
--to=jiangyiwen@huawei.com \
--cc=davem@davemloft.net \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).