summaryrefslogtreecommitdiff
path: root/include/openflow/openflow.h
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@nicira.com>2010-01-12 23:22:22 -0800
committerJustin Pettit <jpettit@nicira.com>2010-02-20 02:22:28 -0800
commit39997502e46f49f4f7eaa994d1883c76e0c23451 (patch)
treed724877f8a9f7525c7939b7e6ccb727ef87ea31d /include/openflow/openflow.h
parent8abc4ed712a755b0454e41cccad3ad33fa167f15 (diff)
downloadopenvswitch-39997502e46f49f4f7eaa994d1883c76e0c23451.tar.gz
ofproto: Add support for flow cookies (OpenFlow 1.0)
In OpenFlow 1.0, flows have been extended to include an opaque identifier, referred to as a cookie. The cookie is specified by the controller when the flow is installed; the cookie will be returned as part of each flow stats and flow removed message. NOTE: OVS at this point is not wire-compatible with OpenFlow 1.0 until the final commit in this Openflow 1.0 set.
Diffstat (limited to 'include/openflow/openflow.h')
-rw-r--r--include/openflow/openflow.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/openflow/openflow.h b/include/openflow/openflow.h
index 4835b8a99..2847aedd8 100644
--- a/include/openflow/openflow.h
+++ b/include/openflow/openflow.h
@@ -543,6 +543,7 @@ enum ofp_flow_mod_flags {
struct ofp_flow_mod {
struct ofp_header header;
struct ofp_match match; /* Fields to match */
+ uint64_t cookie; /* Opaque controller-issued identifier. */
/* Flow actions. */
uint16_t command; /* One of OFPFC_*. */
@@ -556,12 +557,11 @@ struct ofp_flow_mod {
output port. A value of OFPP_NONE
indicates no restriction. */
uint16_t flags; /* One of OFPFF_*. */
- uint32_t reserved; /* Reserved for future use. */
struct ofp_action_header actions[0]; /* The action length is inferred
from the length field in the
header. */
};
-OFP_ASSERT(sizeof(struct ofp_flow_mod) == 68);
+OFP_ASSERT(sizeof(struct ofp_flow_mod) == 72);
/* Why was this flow removed? */
enum ofp_flow_removed_reason {
@@ -574,6 +574,7 @@ enum ofp_flow_removed_reason {
struct ofp_flow_removed {
struct ofp_header header;
struct ofp_match match; /* Description of fields. */
+ uint64_t cookie; /* Opaque controller-issued identifier. */
uint16_t priority; /* Priority level of flow entry. */
uint8_t reason; /* One of OFPRR_*. */
@@ -585,7 +586,7 @@ struct ofp_flow_removed {
uint64_t packet_count;
uint64_t byte_count;
};
-OFP_ASSERT(sizeof(struct ofp_flow_removed) == 80);
+OFP_ASSERT(sizeof(struct ofp_flow_removed) == 88);
/* Values for 'type' in ofp_error_message. These values are immutable: they
* will not change in future versions of the protocol (although new values may
@@ -753,12 +754,13 @@ struct ofp_flow_stats {
when this is not an exact-match entry. */
uint16_t idle_timeout; /* Number of seconds idle before expiration. */
uint16_t hard_timeout; /* Number of seconds before expiration. */
- uint16_t pad2; /* Pad to 64 bits. */
+ uint8_t pad2[2]; /* Align to 64 bits. */
+ uint64_t cookie; /* Opaque controller-issued identifier. */
uint64_t packet_count; /* Number of packets in flow. */
uint64_t byte_count; /* Number of bytes in flow. */
struct ofp_action_header actions[0]; /* Actions. */
};
-OFP_ASSERT(sizeof(struct ofp_flow_stats) == 72);
+OFP_ASSERT(sizeof(struct ofp_flow_stats) == 80);
/* Body for ofp_stats_request of type OFPST_AGGREGATE. */
struct ofp_aggregate_stats_request {