[ovs-dev] [PATCH v6 0/5] userspace: Support for L3 tunneling

Zoltán Balogh zoltan.balogh at ericsson.com
Fri May 12 11:07:35 UTC 2017


From: Jan Scheurich <jan.scheurich at ericssom.com>

This patch set is part of an initiative to deal with non-Ethernet packets in OVS for advanced use cases like L3 tunneling or NSH. The initiative is centering on the new OpenFlow concepts of "Packet type-aware pipeline" (PTAP) and "Generic encap/decap actions" (EXT-382). The overall design is documented in 
https://docs.google.com/document/d/1oWMYUH8sjZJzWa72o2q9kU0N6pNE-rwZcLH3-kbbDR8

The patches implement the user-space parts of the support for L3 tunnels connected to the legacy Ethernet-only pipeline in OVS. In large parts it is an adaptation of the earlier work on L3 tunneling by Lorand Jakab, Simon Horman, Jiri Benc and Yi Yang, adapted to the new design for packet type aware pipelines as prototyped by Jean Tourrilhes. 

Key changes compared to earlier patch series are the introduction of explicit packet_type members in the structs dp_packet and flow, as well as a simpler handling of L3 tunnels limited to the ofproto layer.

The present series v6 supersedes v5. The reason of creating v6 is that tunnel handling has been changed on master branch, so rebasing was necessary.
The present series v5 supersedes v4 (https://mail.openvswitch.org/pipermail/ovs-dev/2017-April/331424.html), v4 fixes struct ovs_action_push_eth, so kernel and userspace use same data structure and removes a patch from the series which was applied to master.
The series v4 supersedes v3 (https://mail.openvswitch.org/pipermail/ovs-dev/2017-April/330488.html), v4 fixes sparse warnings coding style and removes a patch from the series.
The series v3 superseded v2 (https://mail.openvswitch.org/pipermail/ovs-dev/2017-April/330444.html) which added support for vxlan-gpe tunnels in the netdev-dpdk datapath based on earlier patches 14-16 out of a patch set by Yi Yang (https://mail.openvswitch.org/pipermail/ovs-dev/2017-February/328498.html). 

   userspace: Switching of L3 packets in L2 pipeline 
   userspace: L3 tunnel support for GRE and LISP 
   dpif-netlink: Don't send PACKET_TYPE to kernel 
   ofproto-dpif-xlate: refactor compose_output_action__
   userspace: add vxlan gpe support to vport

For native L3 tunneling with the userspace datapath these patches are complete and could be merged.

The necessary kernel module changes for L3 tunneling have already been upstreamed to the net-next kernel and back-ported to OVS. To apply L3 tunneling to the kernel datapath, one will need the following additional contributions:

* [PATCH v2 0/7] create tunnel devices using rtnetlink interface
   https://mail.openvswitch.org/pipermail/ovs-dev/2017-March/329893.html 
* An additional user-space patch based on the above to configure the layer3 tunnel option in the kernel datapath

Changes v1 -> v2:
* Rebased to master (f40c558 ovn: Gratuitous ARP for distributed NAT rules)
* Moved new packet_type member to fill a 4-byte padding in struct flow
* Define the packet_type constants to be in host byte order
* Update the display format of packet_type in match and flow key printouts to a pair format "(ns, type)"
* Renamed dp_packet_l2() to dp_packet_eth()
* Removed unnecessary wrappers dp_packet_packet_type() and dp_packet_set_packet_type()
* Fixed "sparse" warnings
* Removed misleading or unnecessary comments
* Added support for vxlan-gpe tunnel vports for Ethernet, IPv4, IPv6 and NSH payload

Changes v2 -> v3:
* Removed unused function dp_packet_is_l3()
* Using VLOG_DROP_DBG and VLOG_DBG instead of VLOG_DBG_RL in dp_netdev_flow_add()
* Moved changes related comment from flow_put_on_md() into commit message
* PT_NS* macros were replaced with inline functions
* Unnecessary if statements removed from match_format()
* Using assignment operator instead of memset where it's possible
* Improved some commit messages

Changes v3 -> v4:
* Fixed "sparse" warnings
* Fixed coding style
* Removed patch "ofproto-dpif-upcall: Intialize dump-seq of new flow to zero"
* Rebased to origin/master (9a84f46)

Changes v4 -> v5:
* Eth_type member removed from struct ovs_action_push_eth.
* Patch "userspace: Add packet_type in dp_packet and flow" exluded.

Changes v5 ->v6:
* Rebased to origin/master (f5f6455)
* Patch "userspace: Support for push_eth and pop_eth actions" exluded.

 build-aux/extract-ofp-fields                      |   1 +
 datapath/linux/compat/include/linux/openvswitch.h |   3 +
 include/openvswitch/automake.mk                   |   4 +-
 include/openvswitch/match.h                       |   1 +
 include/openvswitch/meta-flow.h                   |  15 +-
 include/openvswitch/vxlangpe.h                    |  76 ++++++++
 lib/dpif-netdev.c                                 |  46 +++--
 lib/dpif-netlink.c                                |  39 +++-
 lib/dpif.c                                        |   2 +-
 lib/match.c                                       |  25 +++
 lib/meta-flow.c                                   |   2 +
 lib/netdev-native-tnl.c                           |  85 ++++++++-
 lib/netdev-vport.c                                |  34 +++-
 lib/netdev.h                                      |   1 +
 lib/odp-execute.c                                 |   2 +
 lib/odp-util.c                                    | 184 +++++++++++++++----
 lib/odp-util.h                                    |   6 +-
 lib/packets.h                                     |   1 -
 ofproto/ofproto-dpif-sflow.c                      |   1 +
 ofproto/ofproto-dpif-upcall.c                     |   4 +-
 ofproto/ofproto-dpif-xlate.c                      | 206 +++++++++++++++-------
 ofproto/ofproto-dpif.c                            |   6 +-
 ofproto/tunnel.c                                  |  15 +-
 tests/tunnel-push-pop-ipv6.at                     |  26 +--
 tests/tunnel-push-pop.at                          |  55 ++++--
 tests/tunnel.at                                   |  28 +--
 vswitchd/vswitch.xml                              |  13 ++


More information about the dev mailing list