netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
To: netdev@vger.kernel.org, xen-devel@lists.xenproject.org
Cc: davem@davemloft.net, david.vrabel@citrix.com,
	konrad.wilk@oracle.com, boris.ostrovsky@oracle.com,
	wei.liu2@citrix.com, paul.durrant@citrix.com
Subject: [PATCH] xen-netfront: reset skb transport header before checksum
Date: Mon, 11 May 2015 18:34:24 -0700	[thread overview]
Message-ID: <20150512013424.GA7960@oracle.com> (raw)

In ed1f50c3a ("net: add skb_checksum_setup") some checksum functions
were introduced in core. Subsequent change b5cf66cd1 ("xen-netfront:
use new skb_checksum_setup function") made use of those functions to
replace its own implementation. With that change ip_hdr() and tcp_hdr()
were not pointing at the right place. d554f73df ("xen-netfront: reset
skb network header before checksum") fixed the ip_hdr().

This patch fixes tcp_hdr().

We saw this problem when LRO was enabled on the host and it results in
netfront setting skb->ip_summed to CHECKSUM_UNNECESSARY.

Signed-off-by: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
---
 drivers/net/xen-netfront.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 3f45afd..ed5c242 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -889,6 +889,7 @@ static int handle_incoming_queue(struct netfront_queue *queue,
 		/* Ethernet work: Delayed to here as it peeks the header. */
 		skb->protocol = eth_type_trans(skb, queue->info->netdev);
 		skb_reset_network_header(skb);
+		skb_set_transport_header(skb, ip_hdrlen(skb));
 
 		if (checksum_setup(queue->info->netdev, skb)) {
 			kfree_skb(skb);
-- 
1.8.2.1

             reply	other threads:[~2015-05-12  1:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12  1:34 Venkat Venkatsubra [this message]
2015-05-12  1:51 ` [PATCH] xen-netfront: reset skb transport header before checksum Eric Dumazet
2015-05-12 14:00   ` Venkat Venkatsubra

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=20150512013424.GA7960@oracle.com \
    --to=venkat.x.venkatsubra@oracle.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=davem@davemloft.net \
    --cc=david.vrabel@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=netdev@vger.kernel.org \
    --cc=paul.durrant@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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).