Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1265314

Re: GSO with udp_tunnel_xmit_skb

From Maciej Żenczykowski <zenczykowski@gmail.com>
Newsgroups linux.kernel
Subject Re: GSO with udp_tunnel_xmit_skb
Date 2015-11-09 04:20 +0100
Message-ID <qsL9T-Lx-1@gated-at.bofh.it> (permalink)
References (6 earlier) <qsvy9-7nD-7@gated-at.bofh.it> <qsvRw-7vV-9@gated-at.bofh.it> <qszBL-1qU-1@gated-at.bofh.it> <qsJKO-84X-5@gated-at.bofh.it> <qsKnv-7m-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

GSO with udp_tunnel_xmit_skb "Jason A. Donenfeld" <Jason@zx2c4.com> - 2015-11-05 12:00 +0100
  Re: GSO with udp_tunnel_xmit_skb Tom Herbert <tom@herbertland.com> - 2015-11-06 08:20 +0100
    Re: GSO with udp_tunnel_xmit_skb "Jason A. Donenfeld" <Jason@zx2c4.com> - 2015-11-06 12:50 +0100
      Re: GSO with udp_tunnel_xmit_skb Maciej Żenczykowski <zenczykowski@gmail.com> - 2015-11-07 18:20 +0100
        Re: GSO with udp_tunnel_xmit_skb "Jason A. Donenfeld" <Jason@zx2c4.com> - 2015-11-07 23:50 +0100
          Re: GSO with udp_tunnel_xmit_skb Maciej Żenczykowski <zenczykowski@gmail.com> - 2015-11-08 00:50 +0100
            Re: GSO with udp_tunnel_xmit_skb "Jason A. Donenfeld" <Jason@zx2c4.com> - 2015-11-08 11:40 +0100
              Re: GSO with udp_tunnel_xmit_skb Herbert Xu <herbert@gondor.apana.org.au> - 2015-11-08 12:00 +0100
                Re: GSO with udp_tunnel_xmit_skb "Jason A. Donenfeld" <Jason@zx2c4.com> - 2015-11-08 16:00 +0100
                Re: GSO with udp_tunnel_xmit_skb Herbert Xu <herbert@gondor.apana.org.au> - 2015-11-09 02:50 +0100
                Re: GSO with udp_tunnel_xmit_skb "Jason A. Donenfeld" <Jason@zx2c4.com> - 2015-11-09 03:30 +0100
                Re: GSO with udp_tunnel_xmit_skb Maciej Żenczykowski <zenczykowski@gmail.com> - 2015-11-09 04:20 +0100

csiph-web