mbox series

[ovs-dev,00/41] Add ERSPAN support

Message ID 1526591733-4450-1-git-send-email-gvrose8192@gmail.com
Headers show
Series Add ERSPAN support | expand

Message

Gregory Rose May 17, 2018, 9:14 p.m. UTC
This series of patches is the backport of the Linux kernel upstream
ERSPAN feature support.

The first patch does some cleanup of unsupported kernel code.  The
remaining patches in the series begin the backport of the ERSPAN
code.

As part of the ERSPAN backport it was necessary to fixup the current
out of tree GRE, IPv4 and IPv6 tunneling support by pulling in code
from the upstream Linux kernel.  There was a great deal of
infrastructure missing so much of this patch series is actually
devoted to making sure the proper GRE, IPV4 and IPV6 tunneling code
is pulled in from the upstream kernel.

Currently the series is only guaranteed to build on kernels <= 4.9.
A future patch will enable builds on kernels greater than 4.9.
At Linux kernel release 4.15 the upstream kernel code can be
used with the OVS userspace code.

Basic functional testing - including link connectivity, pings,
and some some basic iperf) - has been done but given the scope
of changes it is impossible for me to unit test more thoroughly
on all distro and kernel combinations that might be affected.

Distros I have tested on:
RHEL 7.2
RHEL 7.3
RHEL 7.4

Ubuntu 14.04.5
Ubuntu 16.04.3
Ubuntu 16.04.4

On that note:
https://en.wikipedia.org/wiki/Release_early,_release_often

For those who may be interested the entire series may be pulled
from the erspan-combo-24 branch on my public github repository.

https://github.com/gvrose8192/ovs-experimental/tree/erspan-combo-24

Greg Rose (11):
  compat: Remove unsupported kernel compat code
  compat: Move function to header
  compat: Add #define for gre_handle_offloads
  compat: Fixups for some compile warnings and errors
  compat: Add ipv6 GRE and IPV6 Tunneling
  ip6gre: Add ip6gre vport type
  lib/dpif-netlink: Fix miscompare of gre ports
  datapath: Add dellink op to ip6gre and ip6erspan tap ops
  datapath: Use correct tunnel receive for ip6gre
  rhel: Enable ERSPAN features for RHEL 7.x
  gre: Resolve gre receive issues

Haishuang Yan (1):
  ip_gre: fix wrong return value of erspan_rcv

William Tu (25):
  gre: introduce native tunnel support for ERSPAN
  gre: fix goto statement typo
  gre: refactor the gre_fb_xmit
  compat/gre: add collect_md mode
  ip_gre: check packet length and mtu correctly in erspan tx
  ip_gre: Refactor the erpsan tunnel code.
  compat/erspan: refactor existing erspan code
  ip_gre: erspan: reload pointer after pskb_may_pull
  datapath: erspan: introduce erspan v2 for ip_gre
  compat: erspan: use bitfield instead of mask and offset
  datapath: add erspan version I and II support
  netdev-native-tnl: refactor the tunnel push header.
  userspace: add gre sequence number support.
  userspace: add erspan tunnel support.
  erspan: add kernel datapath support
  openvswitch: fix vport packet length check.
  erspan: auto detect truncated packets.
  erspan: Add flow-based erspan options
  ip6gre: add erspan v2 to tunnel lookup
  ip6erspan: improve error handling for erspan version number.
  ip6erspan: make sure enough headroom at xmit.
  erspan: auto detect truncated ipv6 packets.
  erspan: set bso when truncated bit is set.
  tunnel: add support for erspan and ip6erspan type.
  erspan: fix invalid erspan version.

Xin Long (4):
  ip_gre: get key from session_id correctly in erspan_rcv
  ip_gre: set tunnel hlen properly in erspan_tunnel_init
  ip_gre: erspan device should keep dst
  ip_gre: remove the incorrect mtu limit for ipgre tap

 acinclude.m4                                       |   64 +-
 datapath/flow_netlink.c                            |   52 +-
 datapath/linux/Modules.mk                          |    5 +-
 datapath/linux/compat/gre.c                        |  246 +-
 datapath/linux/compat/include/linux/compiler.h     |    4 +
 datapath/linux/compat/include/linux/etherdevice.h  |   30 -
 datapath/linux/compat/include/linux/if_ether.h     |    8 +
 datapath/linux/compat/include/linux/if_vlan.h      |   11 -
 datapath/linux/compat/include/linux/kconfig.h      |    8 -
 datapath/linux/compat/include/linux/kernel.h       |   38 -
 .../linux/compat/include/linux/netdev_features.h   |   19 -
 datapath/linux/compat/include/linux/netdevice.h    |   12 +-
 datapath/linux/compat/include/linux/openvswitch.h  |    4 +
 datapath/linux/compat/include/linux/skbuff.h       |   47 +-
 datapath/linux/compat/include/linux/workqueue.h    |    4 -
 datapath/linux/compat/include/net/checksum.h       |    6 -
 datapath/linux/compat/include/net/dst.h            |   28 +-
 datapath/linux/compat/include/net/dst_metadata.h   |   23 +-
 datapath/linux/compat/include/net/erspan.h         |  314 +++
 datapath/linux/compat/include/net/genetlink.h      |   11 -
 datapath/linux/compat/include/net/gre.h            |  124 +-
 datapath/linux/compat/include/net/ip6_route.h      |   23 -
 datapath/linux/compat/include/net/ip6_tunnel.h     |  206 +-
 datapath/linux/compat/include/net/ip_tunnels.h     |  236 +-
 datapath/linux/compat/include/net/ipv6.h           |   44 +-
 .../include/net/netfilter/nf_conntrack_zones.h     |    2 -
 datapath/linux/compat/include/net/netlink.h        |   15 -
 datapath/linux/compat/include/net/route.h          |  105 -
 datapath/linux/compat/ip6_gre.c                    | 2596 ++++++++++++++++++++
 datapath/linux/compat/ip6_tunnel.c                 | 2199 +++++++++++++++++
 datapath/linux/compat/ip_gre.c                     | 1237 +++++++++-
 datapath/linux/compat/ip_tunnel.c                  |  501 +++-
 datapath/linux/compat/ip_tunnels_core.c            |   41 +
 datapath/linux/compat/lisp.c                       |    2 -
 datapath/linux/compat/stt.c                        |    6 -
 datapath/linux/compat/udp_tunnel.c                 |    2 -
 datapath/linux/compat/utils.c                      |   22 -
 datapath/vport.c                                   |   33 +-
 include/openvswitch/flow.h                         |    4 +-
 include/openvswitch/match.h                        |   12 +
 include/openvswitch/meta-flow.h                    |   56 +
 include/openvswitch/packets.h                      |    6 +-
 lib/dpif-netlink-rtnl.c                            |   18 +-
 lib/dpif-netlink.c                                 |   19 +-
 lib/flow.c                                         |   32 +-
 lib/flow.h                                         |    2 +-
 lib/match.c                                        |   69 +-
 lib/meta-flow.c                                    |   77 +
 lib/meta-flow.xml                                  |   86 +
 lib/netdev-native-tnl.c                            |  223 +-
 lib/netdev-native-tnl.h                            |   18 +-
 lib/netdev-provider.h                              |    3 +-
 lib/netdev-vport.c                                 |  119 +-
 lib/netdev.c                                       |    2 +-
 lib/netdev.h                                       |   12 +
 lib/nx-match.c                                     |   13 +-
 lib/odp-util.c                                     |  245 +-
 lib/odp-util.h                                     |    2 +-
 lib/ofp-match.c                                    |    2 +-
 lib/packets.h                                      |  126 +
 lib/tnl-ports.c                                    |    3 +-
 ofproto/ofproto-dpif-rid.h                         |    2 +-
 ofproto/ofproto-dpif-xlate.c                       |    5 +-
 ofproto/tunnel.c                                   |   16 +
 tests/odp.at                                       |   25 +-
 tests/ofproto.at                                   |    6 +-
 tests/system-common-macros.at                      |    5 +
 tests/system-traffic.at                            |  147 ++
 tests/tunnel-push-pop-ipv6.at                      |  118 +
 tests/tunnel-push-pop.at                           |  178 +-
 tests/tunnel.at                                    |  155 ++
 vswitchd/vswitch.xml                               |   41 +
 72 files changed, 9466 insertions(+), 709 deletions(-)
 create mode 100644 datapath/linux/compat/include/net/erspan.h
 create mode 100644 datapath/linux/compat/ip6_gre.c
 create mode 100644 datapath/linux/compat/ip6_tunnel.c

Comments

Ben Pfaff May 17, 2018, 11:24 p.m. UTC | #1
On Thu, May 17, 2018 at 02:14:52PM -0700, Greg Rose wrote:
> This series of patches is the backport of the Linux kernel upstream
> ERSPAN feature support.

Thanks a lot for implementing this.

I did some basic review and sent out my suggestions.  If they make
sense, would you mind sending a final patch set?

Thanks,

Ben.
Gregory Rose May 17, 2018, 11:37 p.m. UTC | #2
On 5/17/2018 4:24 PM, Ben Pfaff wrote:
> On Thu, May 17, 2018 at 02:14:52PM -0700, Greg Rose wrote:
>> This series of patches is the backport of the Linux kernel upstream
>> ERSPAN feature support.
> Thanks a lot for implementing this.
>
> I did some basic review and sent out my suggestions.  If they make
> sense, would you mind sending a final patch set?
>
> Thanks,
>
> Ben.

Thanks Ben!  I'll rework the patch series with your suggestions and 
resend V2.

- Greg