diff options
author | Guoshuai Li <ligs@dtdream.com> | 2018-01-24 20:39:08 +0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-01-24 12:28:14 -0800 |
commit | ad35c0c58ed8108b6bf1e2caf96d0d0142f47d69 (patch) | |
tree | 4fa89d772e56e437c3d73201c6d6b810c3c6c02b /tests | |
parent | f789661794f418c844cb21bef86a9251b2491fc5 (diff) | |
download | openvswitch-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 'tests')
-rw-r--r-- | tests/test-ovn.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/test-ovn.c b/tests/test-ovn.c index f9a5085f7..4f65ee9d1 100644 --- a/tests/test-ovn.c +++ b/tests/test-ovn.c @@ -33,6 +33,7 @@ #include "ovn/lex.h" #include "ovn/lib/logical-fields.h" #include "ovn/lib/ovn-l7.h" +#include "ovn/lib/extend-table.h" #include "ovs-thread.h" #include "ovstest.h" #include "openvswitch/shash.h" @@ -1207,11 +1208,8 @@ test_parse_actions(struct ovs_cmdl_context *ctx OVS_UNUSED) create_gen_opts(&dhcp_opts, &dhcpv6_opts, &nd_ra_opts); /* Initialize group ids. */ - struct group_table group_table; - group_table.group_ids = bitmap_allocate(MAX_OVN_GROUPS); - bitmap_set1(group_table.group_ids, 0); /* Group id 0 is invalid. */ - hmap_init(&group_table.desired_groups); - hmap_init(&group_table.existing_groups); + struct ovn_extend_table group_table; + ovn_extend_table_init(&group_table); simap_init(&ports); simap_put(&ports, "eth0", 5); |