[ovs-git] [openvswitch/ovs] 3d2fbd: userspace: Add support for NSH MD1 match fields

GitHub noreply at github.com
Mon Aug 7 18:32:12 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 3d2fbd70bda514f7327970b859663f34f994290c
      https://github.com/openvswitch/ovs/commit/3d2fbd70bda514f7327970b859663f34f994290c
  Author: Jan Scheurich <jan.scheurich at ericsson.com>
  Date:   2017-08-07 (Mon, 07 Aug 2017)

  Changed paths:
    M build-aux/extract-odp-netlink-h
    M build-aux/extract-ofp-fields
    M datapath/linux/compat/include/linux/openvswitch.h
    M include/openvswitch/automake.mk
    M include/openvswitch/flow.h
    M include/openvswitch/match.h
    M include/openvswitch/meta-flow.h
    A include/openvswitch/nsh.h
    M include/openvswitch/packets.h
    M lib/flow.c
    M lib/flow.h
    M lib/match.c
    M lib/meta-flow.c
    M lib/meta-flow.xml
    M lib/nx-match.c
    M lib/odp-execute.c
    M lib/odp-util.c
    M lib/odp-util.h
    M lib/ofp-util.c
    M lib/packets.h
    M ofproto/ofproto-dpif-rid.h
    M ofproto/ofproto-dpif-sflow.c
    M ofproto/ofproto-dpif-xlate.c
    M tests/ofproto.at

  Log Message:
  -----------
  userspace: Add support for NSH MD1 match fields

This patch adds support for NSH packet header fields to the OVS
control plane and the userspace datapath. Initially we support the
fields of the NSH base header as defined in
https://www.ietf.org/id/draft-ietf-sfc-nsh-13.txt
and the fixed context headers specified for metadata format MD1.
The variable length MD2 format is parsed but the TLV context headers
are not yet available for matching.

The NSH fields are modelled as experimenter fields with the dedicated
experimenter class 0x005ad650 proposed for NSH in ONF. The following
fields are defined:

NXOXM code            ofctl name    Size      Comment
=====================================================================
NXOXM_NSH_FLAGS       nsh_flags       8       Bits 2-9 of 1st NSH word
(0x005ad650,1)
NXOXM_NSH_MDTYPE      nsh_mdtype      8       Bits 16-23
(0x005ad650,2)
NXOXM_NSH_NEXTPROTO   nsh_np          8       Bits 24-31
(0x005ad650,3)
NXOXM_NSH_SPI         nsh_spi         24      Bits 0-23 of 2nd NSH word
(0x005ad650,4)
NXOXM_NSH_SI          nsh_si          8       Bits 24-31
(0x005ad650,5)
NXOXM_NSH_C1          nsh_c1          32      Maskable, nsh_mdtype==1
(0x005ad650,6)
NXOXM_NSH_C2          nsh_c2          32      Maskable, nsh_mdtype==1
(0x005ad650,7)
NXOXM_NSH_C3          nsh_c3          32      Maskable, nsh_mdtype==1
(0x005ad650,8)
NXOXM_NSH_C4          nsh_c4          32      Maskable, nsh_mdtype==1
(0x005ad650,9)

Co-authored-by: Johnson Li <johnson.li at intel.com>
Signed-off-by: Yi Yang <yi.y.yang at intel.com>
Signed-off-by: Jan Scheurich <jan.scheurich at ericsson.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: e398127135006a26b5c067a5be6dc0c3b9bd4a98
      https://github.com/openvswitch/ovs/commit/e398127135006a26b5c067a5be6dc0c3b9bd4a98
  Author: Jan Scheurich <jan.scheurich at ericsson.com>
  Date:   2017-08-07 (Mon, 07 Aug 2017)

  Changed paths:
    M lib/match.c
    M tests/automake.mk
    M tests/classifier.at
    A tests/nsh.at
    M tests/ofproto-dpif.at
    M tests/testsuite.at
    M tests/tunnel.at

  Log Message:
  -----------
  Adding nsh.at for NSH unit tests

First basic NSH test case implemented and working.

Unconditionally show matched packet_type in megaflows, even when
matching on eth.

Signed-off-by: Jan Scheurich <jan.scheurich at ericsson.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 478b14731cf32b20517fc02db9e13e9e36764469
      https://github.com/openvswitch/ovs/commit/478b14731cf32b20517fc02db9e13e9e36764469
  Author: Jan Scheurich <jan.scheurich at ericsson.com>
  Date:   2017-08-07 (Mon, 07 Aug 2017)

  Changed paths:
    M lib/netdev-native-tnl.c

  Log Message:
  -----------
  userspace: add NSH support to vxlan-gpe tunnels

Signed-off-by: Yi Yang <yi.y.yang at intel.com>
Signed-off-by: Jan Scheurich <jan.scheurich at ericsson.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 1fc11c5948cf83b47588ec1eaa4eef437c2df373
      https://github.com/openvswitch/ovs/commit/1fc11c5948cf83b47588ec1eaa4eef437c2df373
  Author: Jan Scheurich <jan.scheurich at ericsson.com>
  Date:   2017-08-07 (Mon, 07 Aug 2017)

  Changed paths:
    M datapath/linux/compat/include/linux/openvswitch.h
    M include/openvswitch/ofp-ed-props.h
    M lib/dpif-netdev.c
    M lib/dpif.c
    M lib/odp-execute.c
    M lib/odp-util.c
    M lib/odp-util.h
    M lib/ofp-actions.c
    M lib/ofp-ed-props.c
    M lib/packets.c
    M lib/packets.h
    M ofproto/ofproto-dpif-ipfix.c
    M ofproto/ofproto-dpif-sflow.c
    M ofproto/ofproto-dpif-xlate.c

  Log Message:
  -----------
  Generic encap and decap support for NSH

This commit adds translation and netdev datapath support for generic
encap and decap actions for the NSH MD1 header. The generic encap and
decap actions are mapped to specific encap_nsh and decap_nsh actions
in the datapath.

The translation follows that general scheme that decap() of an NSH
packet triggers recirculation after decapsulation, while encap(nsh)
just modifies struct flow and sets the ctx->pending_encap flag to
generate the encap_nsh action at the next commit to be able to include
subsequent set_field actions for NSH headers.

Support for the flexible MD2 format using TLV properties is foreseen
in encap(nsh), but not yet fully implemented.

The CLI syntax for encap of NSH is
encap(nsh(md_type=1))
encap(nsh(md_type=2[,tlv(<tlv_class>,<tlv_type>,<hex_string>),...]))

Signed-off-by: Jan Scheurich <jan.scheurich at ericsson.com>
Signed-off-by: Yi Yang <yi.y.yang at intel.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: cc6902feda897110414c87166a1ed6454a0f28a8
      https://github.com/openvswitch/ovs/commit/cc6902feda897110414c87166a1ed6454a0f28a8
  Author: Jan Scheurich <jan.scheurich at ericsson.com>
  Date:   2017-08-07 (Mon, 07 Aug 2017)

  Changed paths:
    M tests/nsh.at

  Log Message:
  -----------
  NSH unit test cases using encap and decap actions

With the support of generic encap and decap actions for Ethernet and NSH
it is now possible to build test cases that mimic realistic OVS
configurations and OF pipelines for Service Function Chaining. Packets
are being encapsulated in NSH, forwarded based on NSH headers, sent over
Ethernet links and VXLAN-GPE tunnels, and decapsulated at the end of
a service chain.

Signed-off-by: Jan Scheurich <jan.scheurich at ericsson.com>
Signed-off-by: Yi Yang <yi.y.yang at intel.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/05f282c2e161...cc6902feda89


More information about the git mailing list