netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edward Cree <ecree@solarflare.com>
To: Linux Kernel Network Developers <netdev@vger.kernel.org>
Cc: David Miller <davem@davemloft.net>
Subject: Re: Checksum offload queries
Date: Wed, 9 Dec 2015 17:28:32 +0000	[thread overview]
Message-ID: <566864C0.6020204@solarflare.com> (raw)
In-Reply-To: <CALx6S357W+HXp4S8+tveKrqJ3-2XrZsKmBTvxZVHdwF93UWkOw@mail.gmail.com>

On 09/12/15 16:01, Tom Herbert wrote:
> On Wed, Dec 9, 2015 at 4:14 AM, Edward Cree <ecree@solarflare.com> > wrote: >> Convincing hardware designers to go the HW_CSUM way and only fill >> in the inner checksum, when their current approach can fill in >> both inner and outer checksums (though admittedly only for the >> protocols the hardware knows about), might be difficult. >> > But again, NETIF_F_IP[V6]_CSUM and NETIF_F_HW_CSUM describe > capabilities._not_ the interface. The interface currently allows only > one checksum to be offloaded at time, if we want to be able to > offload two checksums then the interface needs to be changed-- > probably something like defining a new capability like > NETIF_F_HW_2CSUMS, adding another csum_start,csum_offset pair into > the sk_buff.
Which only pushes the problem onto when someone wants to nest
encapsulations.  (I heard you like tunnels, so I put a tunnel in your
tunnel so you can encapsulate while you encapsulate.)
Or to put it another way, 2 isn't a number; the only numbers are 0, 1
and infinity ;)
Perhaps in practice 2 csums would be enough, for now.  But isn't the
whole point of the brave new world of generic checksums that it should
be future-proof?

> The stack will need to be modified also wherever CHECKSUM_PARTIAL is > handled.
Naturally.

> If your device is trying do offload more than one checksum on its own > accord without being asked to do so by the stack it is doing the > wrong thing!
>From the stack's perspective: yes, it is doing the wrong thing.  (I've
been discussing with colleagues today how we could change that, and I
think we can, but it involves having _three_ hardware TXQs per kernel
queue, instead of the two we have now...)
But from the outside perspective, the system as a whole isn't doing
anything bad - the packet going on the network is valid and just
happens to have both inner and outer checksums filled in.  Is there a
good reason _why_ the stack forbids a device to do this?  (Sure, it's
not necessary, and makes the hardware more complex.  But the hardware's
already been made, and it's not a *completely* useless thing to do...)

> Please stop adding this disclaimer to your messages, it is not > appropriate for the list.
Actually, the copy that goes the list doesn't have the disclaimer.  But
thanks to a combination of crappy email server and corporate politics,
it still sticks it on any CCs.  If it were up to me (it's not) we
wouldn't add that disclaimer to anything ever.
I'm now attempting (for the nth time) to convince our mgmt to get rid
of the disclaimer, but I don't hold out much hope :(

  reply	other threads:[~2015-12-09 17:28 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 [this message]
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=566864C0.6020204@solarflare.com \
    --to=ecree@solarflare.com \
    --cc=davem@davemloft.net \
    --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).