netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.duyck@gmail.com>
To: Tom Herbert <tom@herbertland.com>
Cc: David Miller <davem@davemloft.net>,
	Netdev <netdev@vger.kernel.org>, Kernel Team <kernel-team@fb.com>
Subject: Re: [PATCH next-next 0/7] net: Cleanup IPv6 ip tunnels
Date: Mon, 2 May 2016 19:03:36 -0700	[thread overview]
Message-ID: <CAKgT0Uft38QUh4ROsUwcsSqJPisORYDFBAnUdFnDpSeYLxw3Ug@mail.gmail.com> (raw)
In-Reply-To: <1461975141-954269-1-git-send-email-tom@herbertland.com>

On Fri, Apr 29, 2016 at 5:12 PM, Tom Herbert <tom@herbertland.com> wrote:
> The IPv6 tunnel code is very different from IPv4 code. There is a lot
> of redundancy with the IPv4 code, particularly in the GRE tunneling.
>
> This patch set cleans up the tunnel code to make the IPv6 code look
> more like the IPv4 code and use common functions between the two
> stacks where possible.
>
> This work should make it easier to maintain and extend the IPv6 ip
> tunnels.
>
> Items in this patch set:
>   - Cleanup IPv6 tunnel receive path (ip6_tnl_rcv). Includes using
>     gro_cells and exporting ip6_tnl_rcv so the ip6_gre can call it
>   - Move GRE functions to common header file (tx functions) or
>     gre_demux.c (rx functions like gre_parse_header)
>   - Call common GRE functions from IPv6 GRE
>   - Create ip6_tnl_xmit (to be like ip_tunnel_xmit)
>
> Tested:
>   Ran super_netperf tests for TCP_RR and TCP_STREAM for:
>     - IPv4 over gre, gretap, gre6, gre6tap
>     - IPv6 over gre, gretap, gre6, gre6tap
>     - ipip
>     - ip6ip6
>     - ipip/gue
>     - IPv6 over gre/gue
>     - IPv4 over gre/gue
>
> Tom Herbert (7):
>   ipv6: Cleanup IPv6 tunnel receive path
>   gre: Move utility functions to common headers
>   gre6: Cleanup GREv6 receive path, call common GRE functions
>   ipv6: Create ip6_tnl_xmit
>   gre: Create common functions for transmit
>   ipv6: Generic tunnel cleanup
>   gre6: Cleanup GREv6 transmit path, call common GRE functions
>
>  include/net/gre.h        | 104 +++++++++++++
>  include/net/ip6_tunnel.h |  11 +-
>  net/ipv4/gre_demux.c     |  64 ++++++++
>  net/ipv4/ip_gre.c        | 199 +++---------------------
>  net/ipv6/ip6_gre.c       | 392 +++++++++--------------------------------------
>  net/ipv6/ip6_tunnel.c    | 266 +++++++++++++++++++++-----------
>  6 files changed, 452 insertions(+), 584 deletions(-)
>
> --
> 2.8.0.rc2
>

I was wondering if you have more work going on in this area or not?  I
ask because I was just going through and auditing the calls to
skb_reset_inner_headers and I think the only spot left that is calling
it without verifying that either GSO or CHECKSUM_PARTIAL is set is in
ip6_tnl_xmit.  If we can get that moved over to using
iptunnel_handle_offloads like the other functions then we should be
guaranteed that skb->encapsulation is only ever set if an offload is
requested, and that in turn guarantees that csum_start and
inner_transport_offset will always be the same value.

Thanks.

- Alex

      parent reply	other threads:[~2016-05-03  2:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-30  0:12 [PATCH next-next 0/7] net: Cleanup IPv6 ip tunnels Tom Herbert
2016-04-30  0:12 ` [PATCH next-next 1/7] ipv6: Cleanup IPv6 tunnel receive path Tom Herbert
2016-04-30  0:12 ` [PATCH next-next 2/7] gre: Move utility functions to common headers Tom Herbert
2016-05-03 11:29   ` Jiri Benc
2016-05-04  4:53     ` David Miller
2016-05-04  8:35       ` Jiri Benc
2016-05-04 16:45         ` David Miller
2016-04-30  0:12 ` [PATCH next-next 3/7] gre6: Cleanup GREv6 receive path, call common GRE functions Tom Herbert
2016-04-30  0:12 ` [PATCH next-next 4/7] ipv6: Create ip6_tnl_xmit Tom Herbert
2016-04-30  0:12 ` [PATCH next-next 5/7] gre: Create common functions for transmit Tom Herbert
2016-04-30  0:12 ` [PATCH net-next 6/7] ipv6: Generic tunnel cleanup Tom Herbert
2016-04-30  0:12 ` [PATCH next-next 7/7] gre6: Cleanup GREv6 transmit path, call common GRE functions Tom Herbert
2016-04-30  1:00 ` [PATCH next-next 0/7] net: Cleanup IPv6 ip tunnels Alexander Duyck
2016-05-02 19:32   ` Tom Herbert
2016-05-02 19:42     ` Alexander Duyck
2016-05-02 23:23 ` David Miller
2016-05-03  2:03 ` Alexander Duyck [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=CAKgT0Uft38QUh4ROsUwcsSqJPisORYDFBAnUdFnDpSeYLxw3Ug@mail.gmail.com \
    --to=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kernel-team@fb.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 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).