2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-28 04:47:49 +00:00

2 Commits

Author SHA1 Message Date
Bhanuprakash Bodireddy
6be7aa7d54 ccmap: Use PADDED_MEMBERS macro in ccmap_impl structure.
Instead of explicitly adding the pad bytes to force the structure an exact
multiple of cacheline size, let the PADDED_MEMBERS macro do the job.

Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2017-11-03 13:33:05 -07:00
Jarno Rajahalme
1c4dd4246c lib: Add new 'counting cmap' type.
cmap implements duplicates as linked lists, which causes removal of
rules to become (O^2) with large number of duplicates.  This patch
fixes the problem by introducing a new 'counting' variant of the cmap
(ccmap), which can be efficiently used to keep counts of inserted hash
values provided by the caller.  This does not require a node in the
user data structure, so this makes the user implementation a bit more
memory efficient, too.

Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
2016-05-16 17:46:55 -07:00