From: David Woodhouse <dwmw2@infradead.org>
To: netdev@vger.kernel.org
Subject: [RFC PATCH 3/3] Use hardware checksum for UDPv6 and ICMPv6
Date: Mon, 14 Jan 2013 12:15:07 +0000 [thread overview]
Message-ID: <1358165707.27054.67.camel@shinybook.infradead.org> (raw)
In-Reply-To: <1358165431.27054.62.camel@shinybook.infradead.org>
[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]
This actually enables the use of CHECKSUM_PARTIAL for outbound ICMPv6
frames. My check in the driver for non-hw-csum frames was *also*
triggering when I was running 'nc -u' over IPv6, and this appears to fix
that too. Is there a reason it wasn't happening already?
I only see the driver check trigger for ndisc and igmp frames now, and I
don't think we care very much about those?
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 5552d13..8a27090 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1370,7 +1370,12 @@ alloc_new_skb:
/*
* Fill in the control structures
*/
- skb->ip_summed = CHECKSUM_NONE;
+ if ((sk->sk_protocol == IPPROTO_ICMPV6 ||
+ sk->sk_protocol == IPPROTO_UDP) &&
+ rt->dst.dev->features & NETIF_F_HW_CSUM)
+ skb->ip_summed = CHECKSUM_PARTIAL;
+ else
+ skb->ip_summed = CHECKSUM_NONE;
skb->csum = 0;
/* reserve for fragmentation and ipsec header */
skb_reserve(skb, hh_len + sizeof(struct frag_hdr) +
--
dwmw2
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 6171 bytes --]
next prev parent reply other threads:[~2013-01-14 12:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 12:10 [RFC PATCH 1/3] Avoid making inappropriate requests of NETIF_F_V[46]_CSUM devices David Woodhouse
2013-01-14 12:12 ` [RFC PATCH 2/3] Prepare to allow for hardware checksum of ICMPv6 David Woodhouse
2013-01-14 12:15 ` David Woodhouse [this message]
2013-01-16 20:54 ` [RFC PATCH 1/3] Avoid making inappropriate requests of NETIF_F_V[46]_CSUM devices David Miller
2013-01-16 22:34 ` David Woodhouse
2013-01-16 23:00 ` David Miller
2013-01-17 0:03 ` David Woodhouse
2013-01-29 16:35 ` David Woodhouse
2015-09-21 16:29 ` David Woodhouse
2015-09-23 15:42 ` David Woodhouse
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=1358165707.27054.67.camel@shinybook.infradead.org \
--to=dwmw2@infradead.org \
--cc=netdev@vger.kernel.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).