[ovs-dev] [PATCH 25/38] ofp-msgs: Split OFPRAW_OFPST_QUEUE_{REQUEST, REPLY}

Simon Horman horms at verge.net.au
Thu Aug 9 08:49:46 UTC 2012


Split OFPRAW_OFPST_QUEUE_{REQUEST,REPLY} into OpenFlow 1.0 and 1.1+
versions.

This prepares for encoding and decoding Open Flow 1.1 and 1.2 Queue Stats
Request and Reply messages.

Signed-off-by: Simon Horman <horms at verge.net.au>

---

v11
* No change

v10
* Initial Post
---
 lib/ofp-msgs.h        | 14 ++++++++++----
 utilities/ovs-ofctl.c |  2 +-
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/lib/ofp-msgs.h b/lib/ofp-msgs.h
index 6420c5d..ceb3fc3 100644
--- a/lib/ofp-msgs.h
+++ b/lib/ofp-msgs.h
@@ -226,10 +226,14 @@ enum ofpraw {
     OFPRAW_OFPST11_PORT_REPLY,
 
     /* OFPST 1.0 (5): struct ofp10_queue_stats_request. */
-    OFPRAW_OFPST_QUEUE_REQUEST,
+    OFPRAW_OFPST10_QUEUE_REQUEST,
+    /* OFPST 1.1+ (5): struct ofp11_queue_stats_request. */
+    OFPRAW_OFPST11_QUEUE_REQUEST,
 
     /* OFPST 1.0 (5): struct ofp10_queue_stats[]. */
-    OFPRAW_OFPST_QUEUE_REPLY,
+    OFPRAW_OFPST10_QUEUE_REPLY,
+    /* OFPST 1.1+ (5): struct ofp11_queue_stats[]. */
+    OFPRAW_OFPST11_QUEUE_REPLY,
 
     /* OFPST 1.0 (13): void. */
     OFPRAW_OFPST_PORT_DESC_REQUEST,
@@ -390,8 +394,10 @@ enum ofptype {
                                       * OFPRAW_OFPST11_PORT_REQUEST. */
     OFPTYPE_PORT_STATS_REPLY,        /* OFPRAW_OFPST10_PORT_REPLY.
                                       * OFPRAW_OFPST11_PORT_REPLY. */
-    OFPTYPE_QUEUE_STATS_REQUEST,     /* OFPRAW_OFPST_QUEUE_REQUEST. */
-    OFPTYPE_QUEUE_STATS_REPLY,       /* OFPRAW_OFPST_QUEUE_REPLY. */
+    OFPTYPE_QUEUE_STATS_REQUEST,     /* OFPRAW_OFPST10_QUEUE_REQUEST.
+                                      * OFPRAW_OFPST11_QUEUE_REQUEST. */
+    OFPTYPE_QUEUE_STATS_REPLY,       /* OFPRAW_OFPST10_QUEUE_REPLY.
+                                      * OFPRAW_OFPST11_QUEUE_REPLY. */
     OFPTYPE_PORT_DESC_STATS_REQUEST, /* OFPRAW_OFPST_PORT_DESC_REQUEST. */
     OFPTYPE_PORT_DESC_STATS_REPLY,   /* OFPRAW_OFPST_PORT_DESC_REPLY. */
 
diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
index b8d1393..ec72c91 100644
--- a/utilities/ovs-ofctl.c
+++ b/utilities/ovs-ofctl.c
@@ -973,7 +973,7 @@ ofctl_queue_stats(int argc, char *argv[])
     struct vconn *vconn;
 
     open_vconn(argv[1], &vconn);
-    request = ofpraw_alloc(OFPRAW_OFPST_QUEUE_REQUEST,
+    request = ofpraw_alloc(OFPRAW_OFPST10_QUEUE_REQUEST,
                            vconn_get_version(vconn), 0);
     req = ofpbuf_put_zeros(request, sizeof *req);
 
-- 
1.7.10.2.484.gcd07cc5




More information about the dev mailing list