[ovs-dev] [PATCH v7 0/5] Support for layer 3 ports/flows

Lorand Jakab lojakab at cisco.com
Fri Nov 14 13:51:44 UTC 2014


This series implements support for layer 3 ports, of which we have one example
so far, the LISP vport.  LISP support is currently implemented with a hack, by
adding/removing the Ethernet header within the datapath/vport-lisp.c file.  By
removing the assumption that all packets/flows have Ethernet header, this
series adds generic support for layer 3 ports in OVS, and thus it is expected
that the user/kernel space API for LISP support will not change.  This will
allow the upstreaming of the LISP vport, resulting in a decreased the delta
against the Linux kernel module, which is the goal that started this work.  It
will also allow supporting layer 3 GRE tunnels, for which patches have been
proposed based on this work.  Additionally, it's a starting point for
prototyping the ONF's EXT-112.

The patch set doesn't change the current behavior when a packet from a LISP
port is sent to a layer 2 port or the other way around, so it's not necessary
to change existing flow rules.  The implementation will automatically add the
appropriate pop_eth and push_eth actions to datapath flows.  This may change in
the future when OpenFlow support for these actions will be added, since
discussions on EXT-112 in the ONF showed preference for explicitly requiring
the pop_eth and push_eth actions in OpenFlow rules.

Netperf tests between two Ubuntu (12.04 and 14.04) VMs with kernels 3.2.0 and
3.13.0, having GSO enabled and TSO disabled on the br0 interface didn't reveal
any packet losses.

Changes from v6:
  * Rebased
  * Patch 2: Removed MFF_ETH_SRC and MFF_ETH_DST from Ethernet prerequisites to
    allow setting Ethernet addresses in push_eth without knowing a priori the
    layer of the output port; this will be reverted when {push,pop}_eth will be
    explicit (see above)
  * Patch 3: Re-added "key->eth.tci = 0" in flow_extract(), since removal broke
    validation of flows
  * Added support for layer 3 packets in "ovs_packet" netlink messages which
    execute actions on a packet received in a miss upcall.  Support is in two
    new commits, one for user space, one for the linux datapath, to make review
    easier.

Changes from v5:
  * Addressed the new round of comments from Jesse
    * Renamed noeth to is_layer3
    * Fixed is_layer3 wildcarding
    * Fixed style issues

Changes from v4:
  * Addressed the new round of comments from Jesse
  * Rebased several times

Changes from v3:
  * Addressed the new round of comments from Ben
  * Rebased several times

Changes from v2:
  * Addressed the new round of comments from Ben
  * Addressed Jesse's comments
  * Rebased several times

Changes from the initial version:
  * Addressed all comments from Ben's review
  * Fixed all failing unit tests


Lorand Jakab (5):
  userspace: add support for pop_eth and push_eth actions
  userspace: add layer 3 flow and switching support
  datapath: add layer 3 flow/port support
  userspace: add layer 3 support to packet metadata
  datapath: add layer 3 support to ovs_packet_cmd_execute()

 build-aux/extract-ofp-fields                      |   1 +
 datapath/actions.c                                |  87 ++++++++++++---
 datapath/datapath.c                               |  29 ++---
 datapath/flow.c                                   |  60 +++++++----
 datapath/flow.h                                   |   4 +-
 datapath/flow_netlink.c                           |  83 ++++++++++++--
 datapath/linux/compat/include/linux/openvswitch.h |  12 +++
 datapath/vport-geneve.c                           |   7 +-
 datapath/vport-gre.c                              |   7 +-
 datapath/vport-internal_dev.c                     |   2 +-
 datapath/vport-lisp.c                             |  34 ++----
 datapath/vport-netdev.c                           |   2 +-
 datapath/vport-vxlan.c                            |   7 +-
 datapath/vport.c                                  |   6 +-
 datapath/vport.h                                  |   2 +-
 lib/bfd.c                                         |   1 +
 lib/dpif-netdev.c                                 |   5 +-
 lib/dpif-netlink.c                                |   8 ++
 lib/dpif.c                                        |   8 +-
 lib/flow.c                                        | 125 ++++++++++++++--------
 lib/flow.h                                        |  18 +++-
 lib/match.c                                       |   2 +-
 lib/meta-flow.c                                   |   5 +
 lib/meta-flow.h                                   |   9 +-
 lib/netdev-dummy.c                                |   1 +
 lib/netdev-linux.c                                |   1 +
 lib/nx-match.c                                    |   2 +-
 lib/odp-execute.c                                 |  19 ++++
 lib/odp-util.c                                    | 109 +++++++++++++++++--
 lib/odp-util.h                                    |   8 +-
 lib/ofp-print.c                                   |  19 ++--
 lib/ofp-print.h                                   |   3 +-
 lib/ofp-util.c                                    |   2 +-
 lib/ofpbuf.h                                      |  12 ++-
 lib/packets.c                                     |  27 +++++
 lib/packets.h                                     |   5 +
 lib/pcap-file.c                                   |   1 +
 ofproto/ofproto-dpif-xlate.c                      |  30 ++++--
 ofproto/ofproto-dpif-xlate.h                      |   2 +-
 ofproto/ofproto-dpif.c                            |   3 +-
 ofproto/ofproto.c                                 |   1 +
 tests/ofproto-dpif.at                             |   6 +-
 tests/vlan-splinters.at                           |   4 +-
 43 files changed, 597 insertions(+), 182 deletions(-)

-- 
1.9.3 (Apple Git-50)




More information about the dev mailing list