openflow: Add ofp11_group
authorSimon Horman <horms@verge.net.au>
Wed, 6 Jun 2012 07:26:36 +0000 (16:26 +0900)
committerBen Pfaff <blp@nicira.com>
Fri, 15 Jun 2012 04:40:42 +0000 (21:40 -0700)
OFPG11_ANY may be used as the out_group for ofp11_flow_mod and
ofp11_flow_stats_request.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
include/openflow/openflow-1.1.h

index 7d6e016..8461dad 100644 (file)
@@ -471,7 +471,7 @@ struct ofp11_flow_mod {
                                     indicates no restriction. */
     ovs_be32 out_group;          /* For OFPFC_DELETE* commands, require
                                     matching entries to include this as an
-                                    output group. A value of OFPG_ANY
+                                    output group. A value of OFPG11_ANY
                                     indicates no restriction. */
     ovs_be16 flags;              /* One of OFPFF_*. */
     uint8_t pad[2];
@@ -489,6 +489,20 @@ enum ofp11_group_type {
     OFPGT11_FF        /* Fast failover group. */
 };
 
+/* Group numbering. Groups can use any number up to OFPG_MAX. */
+enum ofp11_group {
+    /* Last usable group number. */
+    OFPG11_MAX        = 0xffffff00,
+
+    /* Fake groups. */
+    OFPG11_ALL        = 0xfffffffc,  /* Represents all groups for group delete
+                                        commands. */
+    OFPG11_ANY        = 0xffffffff   /* Wildcard group used only for flow stats
+                                        requests. Selects all flows regardless
+                                        of group (including flows with no
+                                        group). */
+};
+
 /* Bucket for use in groups. */
 struct ofp11_bucket {
     ovs_be16 len;                    /* Length the bucket in bytes, including
@@ -537,7 +551,7 @@ struct ofp11_flow_stats_request {
                                  as an output port. A value of OFPP_ANY
                                  indicates no restriction. */
     ovs_be32 out_group;       /* Require matching entries to include this
-                                 as an output group. A value of OFPG_ANY
+                                 as an output group. A value of OFPG11_ANY
                                  indicates no restriction. */
     uint8_t pad2[4];          /* Align to 64 bits. */
     ovs_be64 cookie;          /* Require matching entries to contain this