From: "Michael S. Tsirkin" <mst@redhat.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: alex.williamson@redhat.com, qemu-devel@nongnu.org,
Juan Quintela <quintela@redhat.com>
Subject: [Qemu-devel] Re: [PATCH] virtio-net: correct header length math
Date: Thu, 24 Jun 2010 11:39:14 +0300 [thread overview]
Message-ID: <20100624083914.GC937@redhat.com> (raw)
In-Reply-To: <20100624084213.GQ27193@amit-laptop.redhat.com>
On Thu, Jun 24, 2010 at 02:12:13PM +0530, Amit Shah wrote:
> On (Wed) Jun 23 2010 [12:51:18], Michael S. Tsirkin wrote:
> > We were requesting too much when checking buffer
> > length: size already includes host header length.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> > hw/virtio-net.c | 20 +++++++++++---------
> > 1 files changed, 11 insertions(+), 9 deletions(-)
>
> Couple of minor comments. But I'll still provide the
>
> ACK
>
> > @@ -556,9 +557,10 @@ static ssize_t virtio_net_receive(VLANClientState *nc, const uint8_t *buf, size_
> > virtqueue_pop(n->rx_vq, &elem) == 0) {
> > if (i == 0)
> > return -1;
> > - fprintf(stderr, "virtio-net truncating packet: "
> > - "offset %zd, size %zd, hdr_len %zd\n",
> > - offset, size, hdr_len);
> > + fprintf(stderr, "virtio-net truncating packet: i %d mergeable %d "
> > + "offset %zd, size %zd, guest hdr %zd, host hdr %zd\n",
> > + i, n->mergeable_rx_bufs,
> > + offset, size, guest_hdr_len, host_hdr_len);
>
> Again, tab usage and 'guest hdr len' and 'host hdr len' make better
> sense than 'guest hdr' and 'host hdr'
>
> > exit(1);
>
> Can we drop the packet(s) instead of exiting?
>
> Amit
This is a guest bug in the same way as moving indexes incorrectly.
But since we do have such buggy guests in the field (old virtio),
I guess we should.
--
MST
prev parent reply other threads:[~2010-06-24 8:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-23 9:51 [Qemu-devel] [PATCH] virtio-net: correct header length math Michael S. Tsirkin
2010-06-23 15:57 ` [Qemu-devel] " Juan Quintela
2010-06-23 15:55 ` Michael S. Tsirkin
2010-06-24 8:42 ` Amit Shah
2010-06-24 8:39 ` Michael S. Tsirkin [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=20100624083914.GC937@redhat.com \
--to=mst@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=amit.shah@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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).