All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Herbert <tom@herbertland.com>
To: Edward Cree <ecree@solarflare.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>
Subject: Re: Checksum offload queries
Date: Thu, 10 Dec 2015 08:26:57 -0800	[thread overview]
Message-ID: <CALx6S34bg-iRMcTpGd+yw+CV1T7MxpWx+i_AdxXjsfTTnOGK4g@mail.gmail.com> (raw)
In-Reply-To: <56699F15.3030202@solarflare.com>

On Thu, Dec 10, 2015 at 7:49 AM, Edward Cree <ecree@solarflare.com> wrote:
> On 09/12/15 18:00, Tom Herbert wrote:
>> That is not at all true. If the stack has set up VXLAN RCO and the > device decides to set the inner checksum itself then the checksum > will be bad. The checksum interface is very specific please read it > carefully (sk_buff.h), if the driver/device thinks it is smarter > than the stack and tries to do set its own rules on how checksum > offload works then things will eventually break miserably.
>
> Ok, I've passed that on to the guy working on this bit of the driver.
>
> It looks like the best way to support the capabilities of NICs like the
> sfc 8000 series (which can fill in two checksums but uses packet parsing
> to figure out what to do, rather than using csum start/offset) is:
>
> (core / stack)
> * add NETIF_F_HW_2CSUMS (or whatever name)
> * squeeze a second csum start/offset pair into the skb (as you mention,
>  we can do this without size increase)
> * Modify (Tx) CHECKSUM_PARTIAL generation to use both csum pairs.
>  Presumably by creating CHECKSUM_PARTIAL_2CSUMS to indicate that the
>  second csum pair has been filled in as well.
>
> (sfc driver)
> * declare 2CSUMS support
> * on getting an skb for xmit, check whether the csum pairs match what our
>  eeevil packet parsing hardware will do.  If so, send it with appropriate
>  csum offload settings (we can enable/disable inner & outer offload
>  independently, with TX Option descriptors).  Any csum pair that doesn't
>  match, we call skb_checksum_help to do it in software, and tell the
>  hardware not to do that one.
>

> Does that seem reasonable?

It sounds like potentially interesting work. You'll probably want my
patches that provider helper functions that allow a driver to verify
that it can offload a checksum. We'll have to update those also to
allow two checksums.

  reply	other threads:[~2015-12-10 16:26 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
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 [this message]
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=CALx6S34bg-iRMcTpGd+yw+CV1T7MxpWx+i_AdxXjsfTTnOGK4g@mail.gmail.com \
    --to=tom@herbertland.com \
    --cc=davem@davemloft.net \
    --cc=ecree@solarflare.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.