summaryrefslogtreecommitdiff
path: root/include/openvswitch/packets.h
diff options
context:
space:
mode:
authorYi Yang <yi.y.yang@intel.com>2018-01-06 13:47:51 +0800
committerBen Pfaff <blp@ovn.org>2018-01-08 13:19:14 -0800
commitf59cb331c481d08f9a851c07cf31e9d826650485 (patch)
tree4aacb2db30cd80a9a7f43f733fa29d49db0ffd65 /include/openvswitch/packets.h
parentd3b8483300532167ece1307252b441de24f07dfa (diff)
downloadopenvswitch-f59cb331c481d08f9a851c07cf31e9d826650485.tar.gz
nsh: rework NSH netlink keys and actions
This patch changes OVS_KEY_ATTR_NSH to nested attribute and adds three new NSH sub attribute keys: OVS_NSH_KEY_ATTR_BASE: for length-fixed NSH base header OVS_NSH_KEY_ATTR_MD1: for length-fixed MD type 1 context OVS_NSH_KEY_ATTR_MD2: for length-variable MD type 2 metadata Its intention is to align to NSH kernel implementation. NSH match fields, set and PUSH_NSH action all use the below nested attribute format: OVS_KEY_ATTR_NSH begin OVS_NSH_KEY_ATTR_BASE OVS_NSH_KEY_ATTR_MD1 OVS_KEY_ATTR_NSH end or OVS_KEY_ATTR_NSH begin OVS_NSH_KEY_ATTR_BASE OVS_NSH_KEY_ATTR_MD2 OVS_KEY_ATTR_NSH end In addition, NSH encap and decap actions are renamed as push_nsh and pop_nsh to meet action naming convention. Signed-off-by: Yi Yang <yi.y.yang@intel.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'include/openvswitch/packets.h')
-rw-r--r--include/openvswitch/packets.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/openvswitch/packets.h b/include/openvswitch/packets.h
index 43b93b374..ae1cf9caf 100644
--- a/include/openvswitch/packets.h
+++ b/include/openvswitch/packets.h
@@ -81,7 +81,16 @@ struct flow_nsh {
uint8_t np;
uint8_t si;
ovs_be32 spi;
- ovs_be32 c[4];
+ ovs_be32 context[4];
+};
+
+struct ovs_key_nsh {
+ uint8_t flags;
+ uint8_t mdtype;
+ uint8_t np;
+ uint8_t pad;
+ ovs_be32 path_hdr;
+ ovs_be32 context[4];
};
/* NSH flags */