This patch adds support for NSH function implementation which can be used for
service function chaining. It covers control plane, kernel dataplane and 
DPDK-netdev dataplane. 

Three modes are enabled in this patch: Decapsulation and encapsulation, 
special none decapsulation, NSH conversion. 

Decapsulation and encapsulation for packet are basic feature for NSH. This 
patch can support decapsulation and encapsulation for packet with 
VxLAN-GPE+NSH format in both kernel dataplane and DPDK-netdev dataplane, and
support it with Ethernet+NSH format only in DPDK-netdev dataplane.
The VxLAN-GPE+NSH design is based on the basic VxLAN implementation, and the 
default UDP destination for VxLAN-GPE+NSH VTEP is '4790'. The type 'eth_nsh' 
for tunnel port is added to support Ethernet+NSH, and ET '0x894F' is used to 
indicate this format. New fields in metadata for NSH is added: service path 
header (nsp, nsi) and context header with NSH MD-type 1(nshc1, nshc2, nshc3, 
nshc4), which can be used for match field and set field according to the 
VxLAN-GPE NSH configuration and related rules.

Speical none decapsulation mode is used for decapsulation-reencapsulation case
in DPDK-netdev dataplane. In this mode, tunnel port will parse the input tunnel
packets with VxLAN-GPE+NSH or Etherne+NSH format, and tunnel header will be 
kept. This feature can boost the performance for decapsulation-reencapsulation 
case.

NSH conversion mode is used for converting VxLAN-GPE+NSH to Ethernet+NSH and
Ethernet+NSH to VxLAN-GPE+NSH in DPKD-netdev dataplane. The vport with the
feature of conversion from VxLAN-GPE+NSH to Ethernet+NSH, can remove the outer
MAC header, IP header, UDP header and VxLAN-GPE header from packet with 
VxLAN-GPE+NSH format, then add the Outer MAC header to build the packet with 
Ethernet+NSH format. For the vport with the feature of conversion from
Ethernet+NSH to VxLAN-GPE+NSH, the packets are processed inversely.

Ricky Li, Mengke Liu, Pritesh Kothari(7):
  vxlan-gpe-nsh: decap and encap in kernel dataplane and control plane.
  vxlan-gpe-nsh: decap and encap in DPDK-netdev dataplane and control
    plane.
  vxlan-gpe-nsh: tun_nodecap mode in DPDk-netdev dataplane.
  vxlan-gpe-nsh: convert vxlan-gpe nsh to ethernet nsh in DPDK-netdev
    dataplane.
  Ethernet-nsh: decap and encap in DPDK-netdev dataplane.
  Ethernet-nsh: tun_nodecap mode in DPDK-netdev dataplane.
  Ethernet-nsh: convert eth nsh to vxlan-gpe nsh in DPDK-netdev
    dataplane.

 datapath/flow.h                                   |  30 +-
 datapath/flow_netlink.c                           |  70 ++
 datapath/linux/Modules.mk                         |   1 +
 datapath/linux/compat/include/linux/openvswitch.h |  36 +
 datapath/linux/compat/include/net/ip_tunnels.h    |   8 +
 datapath/linux/compat/include/net/nsh.h           | 103 +++
 datapath/linux/compat/include/net/vxlan.h         |  20 +-
 datapath/linux/compat/vxlan.c                     |  97 ++-
 datapath/vport-geneve.c                           |   2 +-
 datapath/vport-gre.c                              |   2 +-
 datapath/vport-lisp.c                             |   2 +-
 datapath/vport-stt.c                              |   2 +-
 datapath/vport-vxlan.c                            |  15 +-
 datapath/vport.c                                  |   5 +
 lib/dpif-netdev.c                                 |  36 +
 lib/dpif-netlink.c                                |   3 +
 lib/dpif.c                                        |   4 +-
 lib/flow.c                                        |  51 +-
 lib/match.c                                       |  91 +++
 lib/match.h                                       |  14 +
 lib/meta-flow.c                                   | 135 ++++
 lib/meta-flow.h                                   | 102 +++
 lib/netdev-bsd.c                                  |   1 +
 lib/netdev-dpdk.c                                 |   1 +
 lib/netdev-dummy.c                                |   1 +
 lib/netdev-linux.c                                |   1 +
 lib/netdev-provider.h                             |   4 +
 lib/netdev-vport.c                                | 875 +++++++++++++++++++++-
 lib/netdev.c                                      |  24 +
 lib/netdev.h                                      |  60 ++
 lib/nx-match.c                                    |   6 +
 lib/odp-execute.c                                 |   5 +
 lib/odp-util.c                                    | 807 ++++++++++++++++----
 lib/odp-util.h                                    |  15 +-
 lib/ofp-actions.c                                 | 353 ++++++++-
 lib/ofp-actions.h                                 |  48 ++
 lib/ofp-parse.c                                   |  13 +
 lib/ofp-parse.h                                   |   1 +
 lib/ofp-print.c                                   |   1 +
 lib/ovs-router.c                                  |  64 ++
 lib/ovs-router.h                                  |   1 +
 lib/packets.c                                     |  30 +
 lib/packets.h                                     | 147 +++-
 lib/tnl-ports.c                                   |  32 +
 lib/tnl-ports.h                                   |   2 +
 ofproto/ofproto-dpif-ipfix.c                      |   4 +
 ofproto/ofproto-dpif-sflow.c                      |   4 +
 ofproto/ofproto-dpif-xlate.c                      | 306 +++++++-
 ofproto/tunnel.c                                  | 624 +++++++++++++--
 ofproto/tunnel.h                                  |  25 +-
 tests/ofproto.at                                  |  10 +-
 tests/tunnel.at                                   | 403 ++++++++++
 52 files changed, 4430 insertions(+), 267 deletions(-)
 create mode 100644 datapath/linux/compat/include/net/nsh.h

-- 
1.9.3

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to