From: Matias Ezequiel Vara Larsen <matiasevara@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>,
Stefano Garzarella <sgarzare@redhat.com>
Cc: stefanha@redhat.com, davem@davemloft.net, kvm@vger.kernel.org,
virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vsock/virtio: add support for MSG_PEEK
Date: Fri, 27 Sep 2019 15:38:43 +0000 [thread overview]
Message-ID: <20190927153843.GA15350@scw-93ddc8.cloud.online.net> (raw)
In-Reply-To: <a7a77f0b-a658-6e46-3381-3dfea55b14d1@gmail.com>
On Fri, Sep 27, 2019 at 06:37:00AM -0700, Eric Dumazet wrote:
>
>
> On 9/27/19 1:55 AM, Stefano Garzarella wrote:
>
> > Good catch!
> >
> > Maybe we can solve in this way:
> >
> > list_for_each_entry(pkt, &vvs->rx_queue, list) {
> > size_t off = pkt->off;
> >
> > if (total == len)
> > break;
> >
> > while (total < len && off < pkt->len) {
> > /* using 'off' instead of 'pkt->off' */
> > ...
> >
> > total += bytes;
> > off += bytes;
> > }
> > }
> >
> > What do you think?
> >
>
> Maybe, but I need to see a complete patch, evil is in the details :)
>
Thanks both for your comments, I will take them into account and submit
a second version.
Matias
next prev parent reply other threads:[~2019-09-27 15:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-26 18:23 [PATCH] vsock/virtio: add support for MSG_PEEK Matias Ezequiel Vara Larsen
2019-09-26 19:33 ` Eric Dumazet
2019-09-27 8:55 ` Stefano Garzarella
2019-09-27 13:37 ` Eric Dumazet
2019-09-27 15:38 ` Matias Ezequiel Vara Larsen [this message]
2019-09-27 16:44 ` [PATCH v2] " Matias Ezequiel Vara Larsen
2019-09-27 18:59 ` David Miller
2019-09-30 14:12 ` Stefano Garzarella
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=20190927153843.GA15350@scw-93ddc8.cloud.online.net \
--to=matiasevara@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sgarzare@redhat.com \
--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).