diff options
author | Ben Pfaff <blp@nicira.com> | 2014-09-16 22:13:44 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2014-10-07 15:34:38 -0700 |
commit | 178742f941354475c3f242c676b3e772ad5d7d9e (patch) | |
tree | 8d8b863577293c6e45ce13b9880129268bc99376 /include/openflow | |
parent | ba5cc068c8e295453e8ccb9cf223045d5a9e0976 (diff) | |
download | openvswitch-178742f941354475c3f242c676b3e772ad5d7d9e.tar.gz |
nx-match: Move all knowledge of OXM/NXM here.
This improves the general abstraction of OXM/NXM by eliminating direct
knowledge of it from the meta-flow code and other places.
Some function renaming might be called for; for example, mf_oxm_header()
may not be the best name now that the function is implemented within
nx-match. However, these renamings would make this commit larger and
harder to review, so I'm postponing them.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Diffstat (limited to 'include/openflow')
-rw-r--r-- | include/openflow/nicira-ext.h | 32 | ||||
-rw-r--r-- | include/openflow/openflow-1.2.h | 16 |
2 files changed, 0 insertions, 48 deletions
diff --git a/include/openflow/nicira-ext.h b/include/openflow/nicira-ext.h index b1885b276..65ba950ee 100644 --- a/include/openflow/nicira-ext.h +++ b/include/openflow/nicira-ext.h @@ -467,21 +467,6 @@ OFP_ASSERT(sizeof(struct nx_async_config) == 24); * nx_match error. */ -#define NXM_HEADER__(VENDOR, FIELD, HASMASK, LENGTH) \ - (((VENDOR) << 16) | ((FIELD) << 9) | ((HASMASK) << 8) | (LENGTH)) -#define NXM_HEADER(VENDOR, FIELD, LENGTH) \ - NXM_HEADER__(VENDOR, FIELD, 0, LENGTH) -#define NXM_HEADER_W(VENDOR, FIELD, LENGTH) \ - NXM_HEADER__(VENDOR, FIELD, 1, (LENGTH) * 2) -#define NXM_VENDOR(HEADER) ((HEADER) >> 16) -#define NXM_FIELD(HEADER) (((HEADER) >> 9) & 0x7f) -#define NXM_TYPE(HEADER) (((HEADER) >> 9) & 0x7fffff) -#define NXM_HASMASK(HEADER) (((HEADER) >> 8) & 1) -#define NXM_LENGTH(HEADER) ((HEADER) & 0xff) - -#define NXM_MAKE_WILD_HEADER(HEADER) \ - NXM_HEADER_W(NXM_VENDOR(HEADER), NXM_FIELD(HEADER), NXM_LENGTH(HEADER)) - /* Number of registers allocated NXM field IDs. */ #define NXM_NX_MAX_REGS 16 @@ -489,23 +474,6 @@ OFP_ASSERT(sizeof(struct nx_async_config) == 24); #define NX_IP_FRAG_ANY (1 << 0) /* Is this a fragment? */ #define NX_IP_FRAG_LATER (1 << 1) /* Is this a fragment with nonzero offset? */ -/* Flow cookie. - * - * This may be used to gain the OpenFlow 1.1-like ability to restrict - * certain NXM-based Flow Mod and Flow Stats Request messages to flows - * with specific cookies. See the "nx_flow_mod" and "nx_flow_stats_request" - * structure definitions for more details. This match is otherwise not - * allowed. - * - * Prereqs: None. - * - * Format: 64-bit integer in network byte order. - * - * Masking: Arbitrary masks. */ -#define NXM_NX_COOKIE NXM_HEADER (0x0001, 30, 8) -#define NXM_NX_COOKIE_W NXM_HEADER_W(0x0001, 30, 8) - - /* ## --------------------- ## */ /* ## Requests and replies. ## */ /* ## --------------------- ## */ diff --git a/include/openflow/openflow-1.2.h b/include/openflow/openflow-1.2.h index ef1d340ec..f4c97a1e5 100644 --- a/include/openflow/openflow-1.2.h +++ b/include/openflow/openflow-1.2.h @@ -58,22 +58,6 @@ /* Error type for experimenter error messages. */ #define OFPET12_EXPERIMENTER 0xffff -/* - * OXM Class IDs. - * The high order bit differentiate reserved classes from member classes. - * Classes 0x0000 to 0x7FFF are member classes, allocated by ONF. - * Classes 0x8000 to 0xFFFE are reserved classes, reserved for standardisation. - */ -enum ofp12_oxm_class { - OFPXMC12_NXM_0 = 0x0000, /* Backward compatibility with NXM */ - OFPXMC12_NXM_1 = 0x0001, /* Backward compatibility with NXM */ - OFPXMC12_OPENFLOW_BASIC = 0x8000, /* Basic class for OpenFlow */ - OFPXMC15_PACKET_REGS = 0x8001, /* Packet registers (pipeline fields). */ - OFPXMC12_EXPERIMENTER = 0xffff, /* Experimenter class */ -}; - -#define IS_OXM_HEADER(header) (NXM_VENDOR(header) == OFPXMC12_OPENFLOW_BASIC) - /* The VLAN id is 12-bits, so we can use the entire 16 bits to indicate * special conditions. */ |