[ovs-dev] [PATCH 1/5] OpenFlow: Move stats message enums into "common".

Justin Pettit jpettit at nicira.com
Mon May 7 18:56:48 UTC 2012


We will be adding some OpenFlow 1.3 stats (aka multipart request)
messages to our OpenFlow 1.0 implementation.  As such, move the
definition of those message numbers to the common location.

Signed-off-by: Justin Pettit <jpettit at nicira.com>
---
 include/openflow/openflow-1.0.h    |   36 ----------------------------------
 include/openflow/openflow-common.h |   38 ++++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 36 deletions(-)

diff --git a/include/openflow/openflow-1.0.h b/include/openflow/openflow-1.0.h
index 802e80d..890676c 100644
--- a/include/openflow/openflow-1.0.h
+++ b/include/openflow/openflow-1.0.h
@@ -514,42 +514,6 @@ struct ofp_error_msg {
 };
 OFP_ASSERT(sizeof(struct ofp_error_msg) == 12);
 
-enum ofp_stats_types {
-    /* Description of this OpenFlow switch.
-     * The request is struct ofp_stats_msg.
-     * The reply is struct ofp_desc_stats. */
-    OFPST_DESC,
-
-    /* Individual flow statistics.
-     * The request is struct ofp_flow_stats_request.
-     * The reply body is an array of struct ofp_flow_stats. */
-    OFPST_FLOW,
-
-    /* Aggregate flow statistics.
-     * The request is struct ofp_flow_stats_request.
-     * The reply is struct ofp_aggregate_stats_reply. */
-    OFPST_AGGREGATE,
-
-    /* Flow table statistics.
-     * The request is struct ofp_stats_msg.
-     * The reply body is an array of struct ofp_table_stats. */
-    OFPST_TABLE,
-
-    /* Physical port statistics.
-     * The request is struct ofp_port_stats_request.
-     * The reply body is an array of struct ofp_port_stats. */
-    OFPST_PORT,
-
-    /* Queue statistics for a port.
-     * The request body is struct ofp_queue_stats_request.
-     * The reply body is an array of struct ofp_queue_stats. */
-    OFPST_QUEUE,
-
-    /* Vendor extension.
-     * The request and reply begin with "struct ofp_vendor_stats". */
-    OFPST_VENDOR = 0xffff
-};
-
 /* Statistics request or reply message. */
 struct ofp_stats_msg {
     struct ofp_header header;
diff --git a/include/openflow/openflow-common.h b/include/openflow/openflow-common.h
index 57b7d51..49ae85f 100644
--- a/include/openflow/openflow-common.h
+++ b/include/openflow/openflow-common.h
@@ -242,6 +242,44 @@ struct ofp_port_status {
 };
 OFP_ASSERT(sizeof(struct ofp_port_status) == 16);
 
+enum ofp_stats_types {
+    /* Description of this OpenFlow switch. (OFPMP_DESC)
+     * The OF1.0 request is struct ofp_stats_msg.
+     * The OF1.0 reply is struct ofp_desc_stats. */
+    OFPST_DESC,
+
+    /* Individual flow statistics. (OFPMP_FLOW)
+     * The OF1.0 request is struct ofp_flow_stats_request.
+     * The OF1.0 reply body is an array of struct ofp_flow_stats. */
+    OFPST_FLOW,
+
+    /* Aggregate flow statistics. (OFPMP_AGGREGATE)
+     * The OF1.0 request is struct ofp_flow_stats_request.
+     * The OF1.0 reply is struct ofp_aggregate_stats_reply. */
+    OFPST_AGGREGATE,
+
+    /* Flow table statistics. (OFPMP_TABLE)
+     * The OF1.0 request is struct ofp_stats_msg.
+     * The OF1.0 reply body is an array of struct ofp_table_stats. */
+    OFPST_TABLE,
+
+    /* Physical port statistics. (OFPMP_PORT_STATS)
+     * The OF1.0 request is struct ofp_port_stats_request.
+     * The OF1.0 reply body is an array of struct ofp_port_stats. */
+    OFPST_PORT,
+
+    /* Queue statistics for a port. (OFPMP_QUEUE)
+     * The OF1.0 request is struct ofp_stats_msg.
+     * The OF1.0 reply body is an array of struct ofp_queue_stats. */
+    OFPST_QUEUE,
+
+    /* Vendor extension.
+     * The OF1.0 request and reply begin with struct ofp_vendor_stats. */
+    OFPST_VENDOR = 0xffff
+};
+
+
+
 /* The match type indicates the match structure (set of fields that compose the
  * match) in use. The match type is placed in the type field at the beginning
  * of all match structures. The "OpenFlow Extensible Match" type corresponds
-- 
1.7.5.4




More information about the dev mailing list