This patchset implements "Generic encap/decap actions" (EXT-382),
it is based on top of the below patchsets:

[PATCH v1 0/5] NSH userspace support
https://mail.openvswitch.org/pipermail/ovs-dev/2017-April/331158.html

[PATCH 0/10] userspace: Packet type-aware pipeline
https://mail.openvswitch.org/pipermail/ovs-dev/2017-April/331023.html

[PATCH v3 0/8] userspace: Support for L3 tunnelin
https://mail.openvswitch.org/pipermail/ovs-dev/2017-April/330488.html

In control path, generic encap & decap actions looks like

encap(nsh, {nsh, md_type:1})
decap(nsh)

But in datapath, they will be specific actions for NSH

encap_nsh(mdtype=1,np=3,spi=23,si=45,c1=0xc0a83247,c2=0x00001234,c3=0x12345678,c4=0x87654321)
decap_nsh()

encap_nsh just appends an empty NSH header to the packet, soem fields are 
zeroed, some fields are set to default values (i.e. si is set to 255), you must 
use set_field action to set them.

decap_nsh will remove NSH header at the head of the packet.

Welcome your comments.

Please refro to 
https://docs.google.com/document/d/1oWMYUH8sjZJzWa72o2q9kU0N6pNE-rwZcLH3-kbbDR8 
for more details.

Yi Yang (2):
  Add generic encap & decap actions support in control path
  Add encap_nsh & decap_nsh actions support in datapath

 datapath/linux/compat/include/linux/openvswitch.h |  46 +++
 include/openvswitch/automake.mk                   |   1 +
 include/openvswitch/ofp-actions.h                 |  29 ++
 include/openvswitch/ofp-ed-props.h                |  87 ++++++
 lib/automake.mk                                   |   1 +
 lib/dpif-netdev.c                                 |   4 +
 lib/dpif.c                                        |   4 +
 lib/odp-execute.c                                 |  19 ++
 lib/odp-util.c                                    | 162 +++++++++++
 lib/ofp-actions.c                                 | 219 ++++++++++++++
 lib/ofp-ed-props.c                                | 334 ++++++++++++++++++++++
 lib/ofp-util.c                                    |   2 +-
 lib/packets.c                                     |  48 ++++
 lib/packets.h                                     |   3 +
 ofproto/ofproto-dpif-sflow.c                      |   4 +
 ofproto/ofproto-dpif-xlate.c                      | 107 +++++++
 16 files changed, 1069 insertions(+), 1 deletion(-)
 create mode 100644 include/openvswitch/ofp-ed-props.h
 create mode 100644 lib/ofp-ed-props.c

-- 
2.1.0

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to