]> granicus.if.org Git - libnl/commit
cache: avoid duplicate check on initial dump
authorHolger Eitzenberger <holger@eitzenberger.org>
Sun, 23 Nov 2014 14:40:36 +0000 (15:40 +0100)
committerThomas Haller <thaller@redhat.com>
Sun, 23 Nov 2014 14:58:13 +0000 (15:58 +0100)
commit0020ba1212caad02841f72d680815e67d7180683
treea38a4c76dfaffc7b17464735f5b2a2f445fe3f7f
parent15178401c264a348677db7a2d8cd041970a1ce72
cache: avoid duplicate check on initial dump

The cache pickup does a check for duplicates for some time now.

However, the pickup in nl_cache_refill() explicitely clears the
cache, so the pickup doesn't need to actually do the dupe check,
as uniqueness is already guaranteed be Netlink subsystem.

And avoiding the dup check is beneficitial for performance
reasons, as the current algorithm is O(n^2).

http://lists.infradead.org/pipermail/libnl/2014-October/001680.html

Fixes: 96bb7c9a4cdd10a2665c0f56120943e79e33c560
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
include/netlink/cache.h
lib/cache.c
lib/fib_lookup/lookup.c