summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGuoshuai Li <ligs@dtdream.com>2018-01-24 20:39:08 +0800
committerBen Pfaff <blp@ovn.org>2018-01-24 12:28:14 -0800
commitad35c0c58ed8108b6bf1e2caf96d0d0142f47d69 (patch)
tree4fa89d772e56e437c3d73201c6d6b810c3c6c02b /include
parentf789661794f418c844cb21bef86a9251b2491fc5 (diff)
downloadopenvswitch-ad35c0c58ed8108b6bf1e2caf96d0d0142f47d69.tar.gz
ovn-controller: Add extend_table instead of group_table to expand meter.
The structure and function of the group table and meter table are similar, refactoring code is used to extend for add the meter table. The following function as lib: table init/destroy/clear/lookup/remove, assign id for contents, Move the contents of desired to existing. Signed-off-by: Guoshuai Li <ligs@dtdream.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'include')
-rw-r--r--include/ovn/actions.h21
1 files changed, 2 insertions, 19 deletions
diff --git a/include/ovn/actions.h b/include/ovn/actions.h
index 85a484ffa..ea90dbb2a 100644
--- a/include/ovn/actions.h
+++ b/include/ovn/actions.h
@@ -31,6 +31,7 @@ struct lexer;
struct ofpbuf;
struct shash;
struct simap;
+struct ovn_extend_table;
/* List of OVN logical actions.
*
@@ -338,24 +339,6 @@ void *ovnact_put(struct ofpbuf *, enum ovnact_type, size_t len);
OVNACTS
#undef OVNACT
-#define MAX_OVN_GROUPS 65535
-
-struct group_table {
- unsigned long *group_ids; /* Used as a bitmap with value set
- * for allocated group ids in either
- * desired_groups or existing_groups. */
- struct hmap desired_groups;
- struct hmap existing_groups;
-};
-
-struct group_info {
- struct hmap_node hmap_node;
- struct ds group;
- uint32_t group_id;
- bool new_group_id; /* 'True' if 'group_id' was reserved from
- * group_table's 'group_ids' bitmap. */
-};
-
enum action_opcode {
/* "arp { ...actions... }".
*
@@ -505,7 +488,7 @@ struct ovnact_encode_params {
bool is_gateway_router;
/* A struct to figure out the group_id for group actions. */
- struct group_table *group_table;
+ struct ovn_extend_table *group_table;
/* OVN maps each logical flow table (ltable), one-to-one, onto a physical
* OpenFlow flow table (ptable). A number of parameters describe this