This adds some more enum and struct definitions to
include/openflow/openflow-1.2.h. They were omitted from the patch that
created that file as they do not seem to be in keeping with
the treatment of Open Flow 1.1 in include/openflow/openflow-1.1.h.
That is, similar definitions are not present in include/openflow/openflow-1.1.h.

Signed-off-by: Simon Horman <ho...@verge.net.au>
---
 include/openflow/openflow-1.2.h |   89 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 89 insertions(+), 0 deletions(-)

diff --git a/include/openflow/openflow-1.2.h b/include/openflow/openflow-1.2.h
index 10144d9..373cb2c 100644
--- a/include/openflow/openflow-1.2.h
+++ b/include/openflow/openflow-1.2.h
@@ -187,6 +187,19 @@ enum ofp12_controller_max_len {
                                      * sent to the controller. */
 };
 
+/* Action structure for OFPAT12_SET_FIELD. */
+struct ofp12_action_set_field {
+    uint16_t type;                  /* OFPAT12_SET_FIELD. */
+    uint16_t len;                   /* Length is padded to 64 bits. */
+    /* Followed by:
+     * - Exactly oxm_len bytes containing a single OXM TLV, then
+     * - Exactly ((oxm_len + 4) + 7)/8*8 - (oxm_len + 4) (between 0 and 7)
+     *   bytes of all-zero bytes
+     */
+    uint8_t field[4];               /* OXM TLV - Make compiler happy */
+};
+OFP_ASSERT(sizeof(struct ofp12_action_set_field) == 8);
+
 /* Flow setup and teardown (controller -> datapath). */
 struct ofp12_flow_mod {
     struct ofp_header header;
@@ -244,6 +257,47 @@ enum ofp12_stats_types {
     OFPST12_GROUP_FEATURES = 8
 };
 
+/* Body of reply to OFPST_FLOW request. */
+struct ofp12_flow_stats {
+    uint16_t length;          /* Length of this entry. */
+    uint8_t table_id;         /* ID of table flow came from. */
+    uint8_t pad;
+    uint32_t duration_sec;    /* Time flow has been alive in seconds. */
+    uint32_t duration_nsec;   /* Time flow has been alive in nanoseconds beyond
+                                 duration_sec. */
+    uint16_t priority;        /* Priority of the entry. */
+    uint16_t idle_timeout;    /* Number of seconds idle before expiration. */
+    uint16_t hard_timeout;    /* Number of seconds before expiration. */
+    uint8_t pad2[6];          /* 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 ofp12_match match; /* Description of fields. Variable size. */
+    /* struct ofp11_instruction instructions[0]; */ /* Instruction set. */
+};
+OFP_ASSERT(sizeof(struct ofp12_flow_stats) == 56);
+
+/* Body for ofp11_stats_request of type OFPST_AGGREGATE. */
+struct ofp12_aggregate_stats_request {
+    uint8_t table_id;         /* ID of table to read (from ofp12_table_stats)
+                                 OFPTT_ALL for all tables. */
+    uint8_t pad[3];           /* Align to 32 bits. */
+    uint32_t out_port;        /* Require matching entries to include this
+                                 as an output port.  A value of OFPP_ANY
+                                 indicates no restriction. */
+    uint32_t out_group;       /* Require matching entries to include this
+                                 as an output group.  A value of OFPG_ANY
+                                 indicates no restriction. */
+    uint8_t pad2[4];          /* Align to 64 bits. */
+    uint64_t cookie;          /* Require matching entries to contain this
+                                 cookie value */
+    uint64_t cookie_mask;     /* Mask used to restrict the cookie bits that
+                                 must match. A value of 0 indicates
+                                 no restriction. */
+    struct ofp12_match match; /* Fields to match. Variable size. */
+};
+OFP_ASSERT(sizeof(struct ofp12_aggregate_stats_request) == 40);
+
 /* Body of reply to OFPST_TABLE request. */
 struct ofp12_table_stats {
     uint8_t table_id;        /* Identifier of table.  Lower numbered tables
@@ -273,6 +327,41 @@ struct ofp12_table_stats {
 };
 OFP_ASSERT(sizeof(struct ofp12_table_stats) == 128);
 
+/* Body of reply to OFPST12_GROUP_FEATURES request. Group features. */
+struct ofp12_group_features_stats {
+    uint32_t  types;           /* Bitmap of OFPGT_* values supported. */
+    uint32_t  capabilities;    /* Bitmap of OFPGFC12_* capability supported. */
+    uint32_t  max_groups[4];   /* Maximum number of groups for each type. */
+    uint32_t  actions[4];      /* Bitmaps of OFPAT_* that are supported. */
+};
+OFP_ASSERT(sizeof(struct ofp12_group_features_stats) == 40);
+
+/* Group configuration flags */
+enum ofp12_group_capabilities {
+    OFPGFC12_SELECT_WEIGHT   = 1 << 0, /* Support weight for select groups */
+    OFPGFC12_SELECT_LIVENESS = 1 << 1, /* Support liveness for select groups */
+    OFPGFC12_CHAINING        = 1 << 2, /* Support chaining groups */
+    OFPGFC12_CHAINING_CHECKS = 1 << 3, /* Check chaining for loops and delete 
*/
+};
+
+/* Body for ofp11_stats_request/reply of type OFPST_EXPERIMENTER. */
+struct ofp12_experimenter_stats_header {
+    uint32_t experimenter;    /* Experimenter ID which takes the same form
+                                 as in struct ofp_experimenter_header. */
+    uint32_t exp_type;        /* Experimenter defined. */
+    /* Experimenter-defined arbitrary additional data. */
+};
+OFP_ASSERT(sizeof(struct ofp12_experimenter_stats_header) == 8);
+
+/* Queue configuration for a given port. */
+struct ofp12_queue_get_config_reply {
+    struct ofp_header header;
+    uint32_t port;
+    uint8_t pad[4];
+    /* struct ofp11_packet_queue queues[0]; */ /* List of configured queues. */
+};
+OFP_ASSERT(sizeof(struct ofp12_queue_get_config_reply) == 16);
+
 /* Role request and reply message. */
 struct ofp12_role_request {
     struct ofp_header header; /* Type OFPT12_ROLE_REQUEST/OFPT12_ROLE_REPLY. */
-- 
1.7.6.3

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to