All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Cree <ecree@solarflare.com>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Tom Herbert <tom@herbertland.com>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: Generic TSO (was Re: [net-next PATCH 0/2] GENEVE/VXLAN: Enable outer Tx checksum by default)
Date: Fri, 11 Mar 2016 21:29:07 +0000	[thread overview]
Message-ID: <56E338A3.5070909@solarflare.com> (raw)
In-Reply-To: <CAKgT0Ud0bj=1Baty7O_8Bi5dEU67-036EeZxLpXjvovANem=6Q@mail.gmail.com>

On 11/03/16 21:09, Alexander Duyck wrote:
> The only real issue with the "generic" TSO is that it isn't going to
> be so generic.  We have different devices that will support different
> levels of stuff.  For example the ixgbe drivers will need to treat the
> outer tunnel header as one giant L2 header.  As a result we will need
> to populate all the fields in the outer header including the outer IP
> ID, checksum, udp->len, and UDP or GRE checksum if requested.  For
> i40e I think this gets a bit simpler as they already handle the outer
> IPv4 ID and checksum.  I think there we may need to only populate the
> checksum for it to work out correctly.  As such I may look at coming
> up with a number of functions so that we can mix and match based on
> what is needed in order to assemble a partially segmented frame.
AIUI, the point of the design is that we _can_ populate everything,
because we're keeping lengths and outer IP ID fixed, so outer checksums
stay the same and the outer tunnel header _is_ just one giant L2 header
which is bit-for-bit identical for each generated segment.  So every
devicegets to just be dumb and treat it as opaque.
> The other issue I am working on at the moment to enable all this is to
> fix the differents between csum_tcpudp_magic and csum_ipv6_magic in
> terms of handling packet lengths greater than 65535.  Currently we are
> messing up the checksum in relation to IPv6 since we are using the
> truncated uh->len value.  I'll be submitting some patches later today
> that will hopefully get that fixed and that in turn should make the
> rest of the segmentation work easier.
Again, in the superpacket we want to calculate the checksum based on the
subsegment length, rather than the length of the superpacket.  The idea
is to create the header for an MSS-sized segment, then follow it with an
inner IP & TCP header, and n*MSS bytes of payload.  (This of course
produces a superpacket that's not what you'd send over a link with a 64k
MTU, unlike how we do it today.)
Then hw just chops up the payload, fixes up the inner headers, and glues
the "L2" header on each packet.

-Ed

  reply	other threads:[~2016-03-11 21:33 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-19 19:26 [net-next PATCH 0/2] GENEVE/VXLAN: Enable outer Tx checksum by default Alexander Duyck
2016-02-19 19:26 ` [net-next PATCH 1/2] GENEVE: Support outer IPv4 Tx checksums " Alexander Duyck
2016-02-19 20:28   ` Tom Herbert
2016-02-19 19:26 ` [net-next PATCH 2/2] VXLAN: " Alexander Duyck
2016-02-19 20:27   ` Tom Herbert
2016-02-19 21:36     ` Jesse Gross
2016-02-19 21:53 ` [net-next PATCH 0/2] GENEVE/VXLAN: Enable outer Tx checksum " Jesse Gross
2016-02-19 23:10   ` Alex Duyck
2016-02-20  0:08     ` Jesse Gross
2016-02-20  0:14       ` Tom Herbert
2016-02-20  2:18         ` Jesse Gross
2016-02-20 19:51           ` Tom Herbert
2016-02-23  3:31             ` Jesse Gross
2016-02-23 15:18               ` Edward Cree
2016-02-23 16:47                 ` Tom Herbert
2016-02-23 17:20                   ` Rick Jones
2016-02-23 17:38                     ` Edward Cree
2016-02-23 18:08                       ` David Miller
2016-02-23 20:20                         ` Edward Cree
2016-02-23 23:11                           ` David Miller
2016-02-24  0:53                           ` Tom Herbert
2016-02-24 17:30                             ` Edward Cree
2016-02-23 18:11                       ` Tom Herbert
2016-02-23 17:31                   ` Jesse Gross
2016-02-23 17:42                     ` Tom Herbert
2016-02-23 18:18                       ` Alexander Duyck
2016-02-23 18:26                       ` David Miller
2016-02-23 18:32                         ` Tom Herbert
2016-02-23 18:24                     ` David Miller
2016-02-24  9:58                       ` David Laight
2016-02-24 15:41                         ` David Miller
2016-02-25 20:14                   ` David Miller
2016-03-11 19:20             ` Generic TSO (was Re: [net-next PATCH 0/2] GENEVE/VXLAN: Enable outer Tx checksum by default) Edward Cree
2016-03-11 19:57               ` Tom Herbert
2016-03-11 19:59                 ` Edward Cree
2016-03-11 20:16                   ` Tom Herbert
2016-03-11 20:24                     ` Edward Cree
2016-03-11 21:09                       ` Alexander Duyck
2016-03-11 21:29                         ` Edward Cree [this message]
2016-03-11 22:31                           ` Alexander Duyck
2016-03-11 22:55                             ` Tom Herbert
2016-03-12  5:40                               ` Alexander Duyck
2016-03-14 10:26                                 ` Generic TSO Edward Cree
2016-03-14 10:32                                   ` Edward Cree
2016-03-14 15:59                                     ` Alexander Duyck
2016-03-11 20:22               ` David Miller
2016-02-22  3:06 ` [net-next PATCH 0/2] GENEVE/VXLAN: Enable outer Tx checksum by default David Miller

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=56E338A3.5070909@solarflare.com \
    --to=ecree@solarflare.com \
    --cc=alexander.duyck@gmail.com \
    --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 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.