All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Maciej Żenczykowski" <zenczykowski@gmail.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	Tom Herbert <tom@herbertland.com>, Jiri Benc <jbenc@redhat.com>,
	Netdev <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: GSO with udp_tunnel_xmit_skb
Date: Sun, 8 Nov 2015 19:18:08 -0800	[thread overview]
Message-ID: <CAHo-OozFzSeEcj5t8x_boaRDX=cVh4c_kC-q9RnU9NKem-3jhw@mail.gmail.com> (raw)
In-Reply-To: <CAHmME9rfbkn+5M0zPQKEtjrmieBjsvPWG9o9q+YHVkpuLGzuKQ@mail.gmail.com>

> Once it figures out which gso_inner_segment to use, it calls
> __skb_udp_tunnel_segment with it, which then does some curious header
> calculations on various lengths (that I need to read carefully), and
> then proceeds to split the segments using our gso_inner_segment
> function of choice, and then adds the length and checksum header
> fields. Unfortunately, it doesn't add the UDP source and destination
> port header fields. That means I might as well be building the UDP
> headers ahead of time myself, which is a bit of a bummer.

I'm guessing the udp src dst port (and ??possibly?? optional gue
headers) are meant to be part of the external headers that are already
pre-populated.

> Anyway, the idea would be to [ab]use SKB_GSO_UDP_TUNNEL with a
> scintillating gso_inner_segment function for a custom inner_ipproto
> field, in order to make a superpacket.

That's probably basically what that was designed for.  So doesn't seem
like an abuse.

Tunnel GSO offloads are still very very fresh and actively being
worked on (by Tom and Eric among others).
I'm afraid my knowledge of them at HEAD is very limited.
I've only recently started experimenting in this area myself.

> How's this looking as a strategy (and an outline of the "niggly bits"
> as you put it)?

Looks fine.  Devil is in the details.  You may discover that the stack
is still missing some things you'll need to add in.

(for example, personally I'm trying to understand if CHECKSUM_PARTIAL
shouldn't carry an extra bit of information specifying whether
we need a TCP or UDP style checksum, since they differ in how a
checksum of 0 is transmitted, it appears this causes nic drivers
to need to redigest the packet to figure it out before they can pass
it on to the hardware)

- Maciej

      reply	other threads:[~2015-11-09  3:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-05 10:52 GSO with udp_tunnel_xmit_skb Jason A. Donenfeld
2015-11-06  7:19 ` Tom Herbert
2015-11-06 11:48   ` Jason A. Donenfeld
2015-11-07 17:19     ` Maciej Żenczykowski
2015-11-07 22:39       ` Jason A. Donenfeld
2015-11-07 23:40         ` Maciej Żenczykowski
2015-11-08 10:36           ` Jason A. Donenfeld
2015-11-08 10:57             ` Herbert Xu
2015-11-08 14:57               ` Jason A. Donenfeld
2015-11-09  1:40                 ` Herbert Xu
2015-11-09  2:23                   ` Jason A. Donenfeld
2015-11-09  3:18                     ` Maciej Żenczykowski [this message]

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='CAHo-OozFzSeEcj5t8x_boaRDX=cVh4c_kC-q9RnU9NKem-3jhw@mail.gmail.com' \
    --to=zenczykowski@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jbenc@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --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.