summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2011-07-13 16:20:24 -0700
committerEthan Jackson <ethan@nicira.com>2011-07-19 11:34:26 -0700
commit520e9a2acdcf6136bf0a20586df6351ecf72dd3e (patch)
treebe6c34f82db9de10c6dd99500b86b95998f16027 /include
parente81d293375afe757770d339c8bd0cd57e661a1a0 (diff)
downloadopenvswitch-520e9a2acdcf6136bf0a20586df6351ecf72dd3e.tar.gz
nicira-ext: Generalize nx_mp_fields into nx_hash_fields.
Future patches will use nx_hash_fields for non-multipath related actions. This patch renames nx_mp_fields and creates a new flow_hash_fields() function.
Diffstat (limited to 'include')
-rw-r--r--include/openflow/nicira-ext.h43
1 files changed, 21 insertions, 22 deletions
diff --git a/include/openflow/nicira-ext.h b/include/openflow/nicira-ext.h
index d73f3ba82..006d27de3 100644
--- a/include/openflow/nicira-ext.h
+++ b/include/openflow/nicira-ext.h
@@ -167,6 +167,25 @@ enum nicira_stats_type {
NXST_AGGREGATE /* Analogous to OFPST_AGGREGATE. */
};
+/* Fields to use when hashing flows. */
+enum nx_hash_fields {
+ /* Ethernet source address (NXM_OF_ETH_SRC) only. */
+ NX_HASH_FIELDS_ETH_SRC,
+
+ /* L2 through L4, symmetric across src/dst. Specifically, each of the
+ * following fields, if present, is hashed (slashes separate symmetric
+ * pairs):
+ *
+ * - NXM_OF_ETH_DST / NXM_OF_ETH_SRC
+ * - NXM_OF_ETH_TYPE
+ * - The VID bits from NXM_OF_VLAN_TCI, ignoring PCP and CFI.
+ * - NXM_OF_IP_PROTO
+ * - NXM_OF_IP_SRC / NXM_OF_IP_DST
+ * - NXM_OF_TCP_SRC / NXM_OF_TCP_DST
+ */
+ NX_HASH_FIELDS_SYMMETRIC_L4
+};
+
/* This command enables or disables an Open vSwitch extension that allows a
* controller to specify the OpenFlow table to which a flow should be added,
* instead of having the switch decide which table is most appropriate as
@@ -498,7 +517,7 @@ OFP_ASSERT(sizeof(struct nx_action_note) == 16);
*
* This action performs the following steps in sequence:
*
- * 1. Hashes the fields designated by 'fields', one of NX_MP_FIELDS_*.
+ * 1. Hashes the fields designated by 'fields', one of NX_HASH_FIELDS_*.
* Refer to the definition of "enum nx_mp_fields" for details.
*
* The 'basis' value is used as a universal hash parameter, that is,
@@ -535,7 +554,7 @@ struct nx_action_multipath {
ovs_be16 subtype; /* NXAST_MULTIPATH. */
/* What fields to hash and how. */
- ovs_be16 fields; /* One of NX_MP_FIELDS_*. */
+ ovs_be16 fields; /* One of NX_HASH_FIELDS_*. */
ovs_be16 basis; /* Universal hash parameter. */
ovs_be16 pad0;
@@ -551,26 +570,6 @@ struct nx_action_multipath {
};
OFP_ASSERT(sizeof(struct nx_action_multipath) == 32);
-/* NXAST_MULTIPATH: Fields to hash. */
-enum nx_mp_fields {
- /* Ethernet source address (NXM_OF_ETH_SRC) only. */
- NX_MP_FIELDS_ETH_SRC,
-
- /* L2 through L4, symmetric across src/dst. Specifically, each of the
- * following fields, if present, is hashed (slashes separate symmetric
- * pairs):
- *
- * - NXM_OF_ETH_DST / NXM_OF_ETH_SRC
- * - NXM_OF_ETH_TYPE
- * - The VID bits from NXM_OF_VLAN_TCI, ignoring PCP and CFI.
- * - NXM_OF_IP_PROTO
- * - NXM_OF_IP_SRC / NXM_OF_IP_DST
- * - NXM_OF_TCP_SRC / NXM_OF_TCP_DST
- * - NXM_OF_UDP_SRC / NXM_OF_UDP_DST
- */
- NX_MP_FIELDS_SYMMETRIC_L4
-};
-
/* NXAST_MULTIPATH: Multipath link choice algorithm to apply.
*
* In the descriptions below, 'n_links' is max_link + 1. */