summaryrefslogtreecommitdiff
path: root/include/openflow/openflow-1.2.h
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2012-06-11 09:56:12 -0700
committerBen Pfaff <blp@nicira.com>2012-06-11 10:02:13 -0700
commitb5ae8913b20df772ee484902c7def3b42b3871f6 (patch)
treee554140167ef3ae68b3bf67d8846841a5857e7c0 /include/openflow/openflow-1.2.h
parenta9c34071edc8371b5a4d9eebf8256723ffe92df2 (diff)
downloadopenvswitch-b5ae8913b20df772ee484902c7def3b42b3871f6.tar.gz
nx-match: Add parsing and serialisation of OXM matches.
This code, which leverages the existing NXM implementation, adds parsing and serialisation of OXM matches. Test cases have also been provided. This patch only implements parsing and serialisation of OXM fields that are already handled by NXM. It should be noted that in OXM ports are 32bit whereas in NXM they are 16 bit. This has been handled as a special case as all other field widths are the same in both OXM and NXM. This patch does not address differences in wildcarding between OXM and NXM. It is planned that liberal wildcarding policy dictated by either OXM or NXM will be implemented. This patch also does not address any (subtle?) differences between OXM and NXM treatment of specific fields. It is envisages that his can be handled by subsequent patches. Signed-off-by: Simon Horman <horms@verge.net.au> [blp@nicira.com adjusted style, added a comment, changed in_port special case, enabled NXM extensions to OXM] Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'include/openflow/openflow-1.2.h')
-rw-r--r--include/openflow/openflow-1.2.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/openflow/openflow-1.2.h b/include/openflow/openflow-1.2.h
index aaf52a148..bb55881a6 100644
--- a/include/openflow/openflow-1.2.h
+++ b/include/openflow/openflow-1.2.h
@@ -125,6 +125,8 @@ enum oxm12_ofb_match_fields {
#define OXM_HEADER_W(FIELD, LENGTH) \
NXM_HEADER_W(OFPXMC12_OPENFLOW_BASIC, FIELD, LENGTH)
+#define IS_OXM_HEADER(header) (NXM_VENDOR(header) == OFPXMC12_OPENFLOW_BASIC)
+
#define OXM_OF_IN_PORT OXM_HEADER (OFPXMT12_OFB_IN_PORT, 4)
#define OXM_OF_IN_PHY_PORT OXM_HEADER (OFPXMT12_OFB_IN_PHY_PORT, 4)
#define OXM_OF_METADATA OXM_HEADER (OFPXMT12_OFB_METADATA, 8)