Skip to content
  • Jarno Rajahalme's avatar
    lib: Add new 'counting cmap' type. · 1c4dd424
    Jarno Rajahalme authored
    
    
    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: default avatarJarno Rajahalme <jarno@ovn.org>
    Acked-by: default avatarBen Pfaff <blp@ovn.org>
    1c4dd424