summaryrefslogtreecommitdiff
path: root/include/openflow/openflow-1.2.h
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2014-08-11 12:50:36 -0700
committerBen Pfaff <blp@nicira.com>2014-08-11 12:57:17 -0700
commitc2d936a44fa612e88c743c6e7b367a9813093202 (patch)
tree4d95eb5499b40791c87bf8e6aa1003cf06ef4a43 /include/openflow/openflow-1.2.h
parent8f2cded496c13307eff2d8bd0f01dee389cf6166 (diff)
downloadopenvswitch-c2d936a44fa612e88c743c6e7b367a9813093202.tar.gz
ofp-actions: Centralize all OpenFlow action code for maintainability.
Until now, knowledge about OpenFlow has been somewhat scattered around the tree. Some of it is in ofp-actions, some of it is in ofp-util, some in separate files for individual actions, and most of the wire format declarations are in include/openflow. This commit centralizes all of that in ofp-actions. Encoding and decoding OpenFlow actions was previously broken up by OpenFlow version. This was OK with only OpenFlow 1.0 and 1.1, but each additional version added a new wrapper around the existing ones, which started to become hard to understand. This commit merges all of the processing for the different versions, to the extent that they are similar, making the version differences clearer. Previously, ofp-actions contained OpenFlow encoding and decoding, plus ofpact formatting, but OpenFlow parsing was separated into ofp-parse, which seems an odd division. This commit moves the parsing code into ofp-actions with the rest of the code. Before this commit, the four main bits of code associated with a particular ofpact--OpenFlow encoding and decoding, ofpact formatting and parsing--were all found far away from each other. This often made it hard to see what was going on for a particular ofpact, since you had to search around to many different pieces of code. This commit reorganizes so that all of the code for a given ofpact is in a single place. As a code refactoring, this commit has little visible behavioral change. The update to ofproto-dpif.at illustrates one minor bug fix as a side effect: a flow that was added with the action "dec_ttl" (a standard OpenFlow action) was previously formatted as "dec_ttl(0)" (using a Nicira extension to specifically direct packets bounced to the controller because of too-low TTL), but after this commit it is correctly formatted as "dec_ttl". The other visible effect is to drop support for the Nicira extension dec_ttl action in OpenFlow 1.1 and later in favor of the equivalent standard action. It seems unlikely that anyone was really using the Nicira extension in OF1.1 or later. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Diffstat (limited to 'include/openflow/openflow-1.2.h')
-rw-r--r--include/openflow/openflow-1.2.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/include/openflow/openflow-1.2.h b/include/openflow/openflow-1.2.h
index c7ba6fda6..58be0b57b 100644
--- a/include/openflow/openflow-1.2.h
+++ b/include/openflow/openflow-1.2.h
@@ -110,22 +110,18 @@ enum oxm12_ofb_match_fields {
OFPXMT12_OFB_IPV6_ND_TLL, /* Target link-layer for ND. */
OFPXMT12_OFB_MPLS_LABEL, /* MPLS label. */
OFPXMT12_OFB_MPLS_TC, /* MPLS TC. */
-#define OFPXMT12_MASK ((1ULL << (OFPXMT12_OFB_MPLS_TC + 1)) - 1)
/* Following added in OpenFlow 1.3 */
OFPXMT13_OFB_MPLS_BOS, /* MPLS BoS bit. */
OFPXMT13_OFB_PBB_ISID, /* PBB I-SID. */
OFPXMT13_OFB_TUNNEL_ID, /* Logical Port Metadata */
OFPXMT13_OFB_IPV6_EXTHDR, /* IPv6 Extension Header pseudo-field */
-#define OFPXMT13_MASK ((1ULL << (OFPXMT13_OFB_IPV6_EXTHDR + 1)) - 1)
/* Following added in OpenFlow 1.4. */
OFPXMT14_OFB_PBB_UCA = 41, /* PBB UCA header field. */
-#define OFPXMT14_MASK (1ULL << OFPXMT14_OFB_PBB_UCA)
/* Following added in OpenFlow 1.5. */
OFPXMT15_OFB_TCP_FLAGS = 42, /* TCP flags. */
-#define OFPXMT15_MASK (1ULL << OFPXMT15_OFB_TCP_FLAGS)
};
/* OXM implementation makes use of NXM as they are the same format
@@ -230,10 +226,6 @@ struct ofp12_oxm_experimenter_header {
};
OFP_ASSERT(sizeof(struct ofp12_oxm_experimenter_header) == 8);
-enum ofp12_action_type {
- OFPAT12_SET_FIELD = 25, /* Set a header field using OXM TLV format. */
-};
-
enum ofp12_controller_max_len {
OFPCML12_MAX = 0xffe5, /* maximum max_len value which can be used
* to request a specific byte length. */
@@ -242,18 +234,6 @@ enum ofp12_controller_max_len {
* sent to the controller. */
};
-/* Action structure for OFPAT12_SET_FIELD. */
-struct ofp12_action_set_field {
- ovs_be16 type; /* OFPAT12_SET_FIELD. */
- ovs_be16 len; /* Length is padded to 64 bits. */
- ovs_be32 dst; /* OXM TLV header */
- /* Followed by:
- * - Exactly ((oxm_len + 4) + 7)/8*8 - (oxm_len + 4) (between 0 and 7)
- * bytes of all-zero bytes
- */
-};
-OFP_ASSERT(sizeof(struct ofp12_action_set_field) == 8);
-
/* OpenFlow 1.2 specific flags
* (struct ofp12_flow_mod, member flags). */
enum ofp12_flow_mod_flags {