summaryrefslogtreecommitdiff
path: root/include/openflow
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-02-15 14:38:28 -0800
committerBen Pfaff <blp@ovn.org>2018-03-14 11:29:19 -0700
commit225c33ba64a4de1aa30b05f8549c0628fe7fe6e3 (patch)
tree1822c7bcd2e3421e5f819ecc25f5fd8e9a605fbf /include/openflow
parent62bba609351a8c71319f80a59731a3810c873d27 (diff)
downloadopenvswitch-225c33ba64a4de1aa30b05f8549c0628fe7fe6e3.tar.gz
ofp-protocol: Better abstract changing the protocol used for flow matches.
The previous interface here required the client to understand, to some extent, the low-level NXFF_* values and the encoding format for the NXT_SET_FLOW_FORMAT and NXT_SET_FLOW_MOD_TABLE_ID messages. This commit changes the interface so that the client only has to understand the ofputil_protocol type used elsewhere and none of the encoding otherwise. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'include/openflow')
-rw-r--r--include/openflow/nicira-ext.h60
1 files changed, 2 insertions, 58 deletions
diff --git a/include/openflow/nicira-ext.h b/include/openflow/nicira-ext.h
index 71a1de035..ddb68aa25 100644
--- a/include/openflow/nicira-ext.h
+++ b/include/openflow/nicira-ext.h
@@ -113,51 +113,6 @@ enum nx_hash_fields {
};
-/* 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
- * required by OpenFlow 1.0. Because NXM was designed as an extension to
- * OpenFlow 1.0, the extension applies equally to ofp10_flow_mod and
- * nx_flow_mod. By default, the extension is disabled.
- *
- * When this feature is enabled, Open vSwitch treats struct ofp10_flow_mod's
- * and struct nx_flow_mod's 16-bit 'command' member as two separate fields.
- * The upper 8 bits are used as the table ID, the lower 8 bits specify the
- * command as usual. A table ID of 0xff is treated like a wildcarded table ID.
- *
- * The specific treatment of the table ID depends on the type of flow mod:
- *
- * - OFPFC_ADD: Given a specific table ID, the flow is always placed in that
- * table. If an identical flow already exists in that table only, then it
- * is replaced. If the flow cannot be placed in the specified table,
- * either because the table is full or because the table cannot support
- * flows of the given type, the switch replies with an OFPFMFC_TABLE_FULL
- * error. (A controller can distinguish these cases by comparing the
- * current and maximum number of entries reported in ofp_table_stats.)
- *
- * If the table ID is wildcarded, the switch picks an appropriate table
- * itself. If an identical flow already exist in the selected flow table,
- * then it is replaced. The choice of table might depend on the flows
- * that are already in the switch; for example, if one table fills up then
- * the switch might fall back to another one.
- *
- * - OFPFC_MODIFY, OFPFC_DELETE: Given a specific table ID, only flows
- * within that table are matched and modified or deleted. If the table ID
- * is wildcarded, flows within any table may be matched and modified or
- * deleted.
- *
- * - OFPFC_MODIFY_STRICT, OFPFC_DELETE_STRICT: Given a specific table ID,
- * only a flow within that table may be matched and modified or deleted.
- * If the table ID is wildcarded and exactly one flow within any table
- * matches, then it is modified or deleted; if flows in more than one
- * table match, then none is modified or deleted.
- */
-struct nx_flow_mod_table_id {
- uint8_t set; /* Nonzero to enable, zero to disable. */
- uint8_t pad[7];
-};
-OFP_ASSERT(sizeof(struct nx_flow_mod_table_id) == 8);
-
enum nx_packet_in_format {
NXPIF_STANDARD = 0, /* OFPT_PACKET_IN for this OpenFlow version. */
NXPIF_NXT_PACKET_IN = 1, /* NXT_PACKET_IN (since OVS v1.1). */
@@ -618,17 +573,6 @@ OFP_ASSERT(sizeof(struct nx_async_config) == 24);
/* ## Requests and replies. ## */
/* ## --------------------- ## */
-enum nx_flow_format {
- NXFF_OPENFLOW10 = 0, /* Standard OpenFlow 1.0 compatible. */
- NXFF_NXM = 2 /* Nicira extended match. */
-};
-
-/* NXT_SET_FLOW_FORMAT request. */
-struct nx_set_flow_format {
- ovs_be32 format; /* One of NXFF_*. */
-};
-OFP_ASSERT(sizeof(struct nx_set_flow_format) == 4);
-
/* NXT_FLOW_MOD (analogous to OFPT_FLOW_MOD).
*
* It is possible to limit flow deletions and modifications to certain
@@ -637,8 +581,8 @@ OFP_ASSERT(sizeof(struct nx_set_flow_format) == 4);
*/
struct nx_flow_mod {
ovs_be64 cookie; /* Opaque controller-issued identifier. */
- ovs_be16 command; /* OFPFC_* + possibly a table ID (see comment
- * on struct nx_flow_mod_table_id). */
+ ovs_be16 command; /* OFPFC_*, and table ID if flow_mod_table_id
+ * is enabled. */
ovs_be16 idle_timeout; /* Idle time before discarding (seconds). */
ovs_be16 hard_timeout; /* Max time before discarding (seconds). */
ovs_be16 priority; /* Priority level of flow entry. */