openflow-1.1.h: improve struct ofp11_group_stats definition
authorAndy Zhou <azhou@nicira.com>
Thu, 10 Apr 2014 07:48:18 +0000 (00:48 -0700)
committerAndy Zhou <azhou@nicira.com>
Fri, 11 Apr 2014 01:47:52 +0000 (18:47 -0700)
Uncomment bucket_stats definition in struct ofp11_group_stats
to better match OpenFlow spec 1.1's definition on page 48.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
include/openflow/openflow-1.1.h

index 92dd3c5..e3e2d39 100644 (file)
@@ -688,6 +688,13 @@ struct ofp11_group_stats_request {
 };
 OFP_ASSERT(sizeof(struct ofp11_group_stats_request) == 8);
 
+/* Used in group stats replies. */
+struct ofp11_bucket_counter {
+    ovs_be64 packet_count;   /* Number of packets processed by bucket. */
+    ovs_be64 byte_count;     /* Number of bytes processed by bucket. */
+};
+OFP_ASSERT(sizeof(struct ofp11_bucket_counter) == 16);
+
 /* Body of reply to OFPST11_GROUP request */
 struct ofp11_group_stats {
     ovs_be16 length;           /* Length of this entry. */
@@ -698,18 +705,10 @@ struct ofp11_group_stats {
     uint8_t pad2[4];           /* Align to 64 bits. */
     ovs_be64 packet_count;     /* Number of packets processed by group. */
     ovs_be64 byte_count;       /* Number of bytes processed by group. */
-    /* struct ofp11_bucket_counter bucket_stats[0]; */
-
+    struct ofp11_bucket_counter bucket_stats[0];
 };
 OFP_ASSERT(sizeof(struct ofp11_group_stats) == 32);
 
-/* Used in group stats replies. */
-struct ofp11_bucket_counter {
-    ovs_be64 packet_count;   /* Number of packets processed by bucket. */
-    ovs_be64 byte_count;     /* Number of bytes processed by bucket. */
-};
-OFP_ASSERT(sizeof(struct ofp11_bucket_counter) == 16);
-
 /* Body of reply to OFPST11_GROUP_DESC request. */
 struct ofp11_group_desc_stats {
     ovs_be16 length;            /* Length of this entry. */