[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH] virtio-net: correct header length math
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] Re: [PATCH] virtio-net: correct header length math |
Date: |
Thu, 24 Jun 2010 11:39:14 +0300 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
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 <address@hidden>
> > ---
> > 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