summaryrefslogtreecommitdiff
path: root/include/openflow
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2014-08-11 10:57:03 -0700
committerBen Pfaff <blp@nicira.com>2014-08-11 10:57:03 -0700
commit08d1e2345660f563d95c53719cd305048b67a27e (patch)
tree97dbcf0eab6b8d01a96c22bbd11f48b0735e3844 /include/openflow
parent677825392ce8021547db5007e048a3e900bdc6db (diff)
downloadopenvswitch-08d1e2345660f563d95c53719cd305048b67a27e.tar.gz
ofp-actions: Add action bitmap abstraction.
Until now, sets of actions have been abstracted separately outside ofp-actions, as enum ofputil_action_bitmap. Drawing sets of actions into ofp-actions, as done in this commit, makes for a better overall abstraction of actions, with better consistency. A big part of this commit is shifting from using ofp12_table_stats as if it were an abstraction for OpenFlow table stats, toward using a new struct ofputil_table_stats, which is what we generally do with other OpenFlow structures and fits better with the rest of the code. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Diffstat (limited to 'include/openflow')
-rw-r--r--include/openflow/openflow-1.2.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/openflow/openflow-1.2.h b/include/openflow/openflow-1.2.h
index 1069f4e0e..c7ba6fda6 100644
--- a/include/openflow/openflow-1.2.h
+++ b/include/openflow/openflow-1.2.h
@@ -306,12 +306,20 @@ struct ofp12_table_stats {
};
OFP_ASSERT(sizeof(struct ofp12_table_stats) == 128);
+/* Number of types of groups supported by ofp12_group_features_stats. */
+#define OFPGT12_N_TYPES 4
+
/* Body of reply to OFPST12_GROUP_FEATURES request. Group features. */
struct ofp12_group_features_stats {
ovs_be32 types; /* Bitmap of OFPGT11_* values supported. */
ovs_be32 capabilities; /* Bitmap of OFPGFC12_* capability supported. */
- ovs_be32 max_groups[4]; /* Maximum number of groups for each type. */
- ovs_be32 actions[4]; /* Bitmaps of OFPAT_* that are supported. */
+
+ /* Each element in the following arrays corresponds to the group type with
+ * the same number, e.g. max_groups[0] is the maximum number of OFPGT11_ALL
+ * groups, actions[2] is the actions supported by OFPGT11_INDIRECT
+ * groups. */
+ ovs_be32 max_groups[OFPGT12_N_TYPES]; /* Max number of groups. */
+ ovs_be32 actions[OFPGT12_N_TYPES]; /* Bitmaps of supported OFPAT_*. */
};
OFP_ASSERT(sizeof(struct ofp12_group_features_stats) == 40);