2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00

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>
This commit is contained in:
Ben Pfaff
2014-08-11 10:57:03 -07:00
parent 677825392c
commit 08d1e23456
11 changed files with 510 additions and 433 deletions

View File

@@ -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);