From: Edward Cree <ecree@solarflare.com>
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, Tom Herbert <tom@herbertland.com>
Subject: Re: Checksum offload queries
Date: Tue, 8 Dec 2015 14:42:19 +0000 [thread overview]
Message-ID: <5666EC4B.40800@solarflare.com> (raw)
In-Reply-To: <20151207.143848.2158761076110518741.davem@davemloft.net>
On 07/12/15 19:38, David Miller wrote:
> No, it is better to universally provide the 1's complement sum for
> all receive packets. This allows the stack more flexibility in
> checksum handling.
I'm afraid I still don't see it. If a device can both provide the 1's complement sum _and_ validate some of the checksums in the packet, that should be strictly better than just providing the 1's complement sum - the stack has at least as much information, and less work to do. And while there is no general way at present for a driver to tell the stack it has done both (and in my opinion there should be such a way), it _is_ possible in the specific case of a UDP packet with the checksum filled in, thanks to CHECKSUM_UNNECESSARY conversion. So why shouldn't a device (that otherwise gives the full ones complement sum with CHECKSUM_COMPLETE) use CHECKSUM_UNNECESSARY in this specific case? Is there a flaw in my logic, or is it just that this would be a hack and the Right Thing is to change
the interface to let a driver report both pieces of information *directly*? Or am I wrong for some other reason?
>> 3) Related to the above, what does a NETIF_F_HW_CSUM device do when
>> transmitting an unencapsulated packet
> The stack will have skb->csum_start point to the UDP header's checksum
> field for unencapsulated packets, and it has done this for decades.
>
> Sun Microsystems had NETIF_F_HW_CSUM supporting NICs nearly two
> decades ago, and this is what NETIF_F_HW_CSUM was designed for.
Thanks, that makes more sense now. Though, does that mean that there's no way in this case to offload the IP header checksum? (Of course, it's generally much less work than the payload checksum, and it goes away in v6.)
next prev parent reply other threads:[~2015-12-08 14:42 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-07 15:39 Checksum offload queries Edward Cree
2015-12-07 17:29 ` Tom Herbert
2015-12-07 17:52 ` Tom Herbert
2015-12-08 16:03 ` Edward Cree
2015-12-08 16:43 ` Tom Herbert
2015-12-08 18:03 ` Edward Cree
2015-12-08 17:09 ` David Miller
2015-12-08 17:24 ` Edward Cree
2015-12-08 17:28 ` David Miller
2015-12-07 19:38 ` David Miller
2015-12-08 14:42 ` Edward Cree [this message]
2015-12-08 17:04 ` Tom Herbert
2015-12-09 1:56 ` Thomas Graf
2015-12-09 16:08 ` Tom Herbert
2015-12-09 22:29 ` Thomas Graf
2015-12-09 22:51 ` Tom Herbert
2015-12-09 23:13 ` Thomas Graf
2015-12-08 17:06 ` David Miller
2015-12-09 12:14 ` Edward Cree
2015-12-09 16:01 ` Tom Herbert
2015-12-09 17:28 ` Edward Cree
2015-12-09 17:31 ` David Laight
2015-12-09 18:00 ` Tom Herbert
2015-12-09 22:21 ` Thomas Graf
2015-12-09 22:42 ` Tom Herbert
2015-12-09 22:44 ` Thomas Graf
2015-12-10 15:49 ` Edward Cree
2015-12-10 16:26 ` Tom Herbert
2015-12-10 20:28 ` Edward Cree
2015-12-10 21:02 ` Rustad, Mark D
2015-12-14 15:11 ` [RFC PATCH net-next 0/2] Local checksum offload for VXLAN Edward Cree
2015-12-14 15:13 ` [PATCH 1/2] net: udp: local checksum offload for encapsulation Edward Cree
2015-12-14 17:16 ` Tom Herbert
2015-12-15 18:07 ` Edward Cree
2015-12-14 15:13 ` [PATCH 2/2] net: vxlan: enable local checksum offload on HW_CSUM devices Edward Cree
2015-12-11 23:50 ` Checksum offload queries Tom Herbert
2015-12-12 16:41 ` Sowmini Varadhan
2015-12-12 17:24 ` Tom Herbert
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=5666EC4B.40800@solarflare.com \
--to=ecree@solarflare.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=tom@herbertland.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).