]> git.proxmox.com Git - mirror_ovs.git/commit - lib/ofp-ed-props.c
Generic encap and decap support for NSH
authorJan Scheurich <jan.scheurich@ericsson.com>
Sat, 5 Aug 2017 05:41:11 +0000 (13:41 +0800)
committerBen Pfaff <blp@ovn.org>
Mon, 7 Aug 2017 18:26:17 +0000 (11:26 -0700)
commit1fc11c5948cf83b47588ec1eaa4eef437c2df373
treee0f6d5dd9b7c8e8cd8c54816222c2ca4eb06b897
parent478b14731cf32b20517fc02db9e13e9e36764469
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@ericsson.com>
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
14 files changed:
datapath/linux/compat/include/linux/openvswitch.h
include/openvswitch/ofp-ed-props.h
lib/dpif-netdev.c
lib/dpif.c
lib/odp-execute.c
lib/odp-util.c
lib/odp-util.h
lib/ofp-actions.c
lib/ofp-ed-props.c
lib/packets.c
lib/packets.h
ofproto/ofproto-dpif-ipfix.c
ofproto/ofproto-dpif-sflow.c
ofproto/ofproto-dpif-xlate.c