From: Jeff Garzik <jeff@garzik.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: netdev@vger.kernel.org, virtualization@lists.linux-foundation.org
Subject: Re: [PATCH 1/4] virtio_net: Fix skb->csum_start computation
Date: Tue, 10 Jun 2008 18:21:42 -0400 [thread overview]
Message-ID: <484EFE76.1080309@garzik.org> (raw)
In-Reply-To: <200806082049.00641.rusty@rustcorp.com.au>
Rusty Russell wrote:
> From: Mark McLoughlin <markmc@redhat.com>
>
> hdr->csum_start is the offset from the start of the ethernet
> header to the transport layer checksum field. skb->csum_start
> is the offset from skb->head.
>
> skb_partial_csum_set() assumes that skb->data points to the
> ethernet header - i.e. it computes skb->csum_start by adding
> the headroom to hdr->csum_start.
>
> Since eth_type_trans() skb_pull()s the ethernet header,
> skb_partial_csum_set() should be called before
> eth_type_trans().
>
> (Without this patch, GSO packets from a guest to the world outside the
> host are corrupted).
>
> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
> Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> ---
> drivers/net/virtio_net.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
applied 1-4
prev parent reply other threads:[~2008-06-10 22:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-08 10:49 [PATCH 1/4] virtio_net: Fix skb->csum_start computation Rusty Russell
2008-06-08 10:49 ` [PATCH 2/4] virtio: Fix typo in virtio_net_hdr comments Rusty Russell
2008-06-08 10:50 ` [PATCH 3/4] virtio: virtio_net free transmit skbs in a timer Rusty Russell
2008-06-08 10:51 ` [PATCH 4/4] virtio: use callback on empty in virtio_net Rusty Russell
2008-06-10 22:21 ` Jeff Garzik [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=484EFE76.1080309@garzik.org \
--to=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--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).