mbox series

[ovs-dev,ERSPAN,RFC,00/25] Introduce ERSPAN for OVS

Message ID 1521756461-3870-1-git-send-email-gvrose8192@gmail.com
Headers show
Series Introduce ERSPAN for OVS | expand

Message

Gregory Rose March 22, 2018, 10:07 p.m. UTC
Recently support for ERSPAN Versions I and II (one and two) were
added to the upstream kernel.  This set of patches backports that
feature.  To support the feature for kernels RHEL 3.10 up to current
(4.15 as of this post) a great deal of upstream gre, ipgre, ip6gre,
ip_tunnel and ip6_tunnel code has been pulled into the out of tree
datapath kernel driver.

This set of patches will need to be re-ordered with the last patch of
this series eventually going away as it is folded into previous patches.
In particular, the last patch is not very pretty but it has all the
"stuff" I needed to pull in and/or fix in order to get basic erspan
send/receive working.  And it does pass checkpatch!

And that's the only claim - erspan works a little bit.  I have not
tested on a RHEL 7 kernel - I ran out of time.

I have also not had time to test erspan II nor have had I had time
to test erspan over ipv6 yet.

I have not tested on kernels newer than 4.7 with most of my testing
going on 3.16.55, 4.1.49 and 4.4.102.  Ubuntu 16.04 has a 4.4 kernel
so that should be a good choice for quick and dirty testing.

You can pull branch e-71 from my github repository:

https://github.com/gvrose8192/ovs-experimental.git

This branch as additional code on top of this set of patches to enable
all the userspace erspan for OVS and enable the erspan datapath so that
this code can be tested.

With the code in branch e-71 the user can add an erspan tunnel:

ovs-vsctl add-port br0 at_erspan0 -- set int at_erspan0 type=erspan options:remote_ip=192.168.0.103 options:erspan_ver=1 options:erspan_idx=0x7

Greg Rose (6):
  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
  datapath: More ipgre fixes

Haishuang Yan (2):
  ip_gre: fix wrong return value of erspan_rcv
  ip_gre: fix potential memory leak in erspan_rcv

William Tu (13):
  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
  net: erspan: fix metadata extraction
  erspan: fix erspan config overwrite
  datapath: add erspan version I and II support

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                                       |   49 +-
 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  |    1 +
 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            |  106 +-
 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                    | 2358 ++++++++++++++++++++
 datapath/linux/compat/ip6_tunnel.c                 | 2195 ++++++++++++++++++
 datapath/linux/compat/ip_gre.c                     | 1141 +++++++++-
 datapath/linux/compat/ip_tunnel.c                  |  500 ++++-
 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                                   |   12 +
 lib/odp-util.c                                     |    2 +
 39 files changed, 7259 insertions(+), 675 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