]> git.proxmox.com Git - mirror_frr.git/commit - lib/vrf.h
lib/zebra: convert vrf_list to a red-black tree
authorRenato Westphal <renato@opensourcerouting.org>
Sat, 29 Oct 2016 22:30:57 +0000 (20:30 -0200)
committerRenato Westphal <renato@opensourcerouting.org>
Mon, 28 Nov 2016 18:18:35 +0000 (16:18 -0200)
commit806f87607e6b41f67cd1550bc8a9b579522fb15c
tree04145132076e24f72a6ebec63599920349414161
parent5f3d1bdf3ce8ac030831ee8c4dd6655ce5172431
lib/zebra: convert vrf_list to a red-black tree

Since we're already using a red-black tree to store VRFs sorted by their
vrf_id's, create a new tree to store VRFs sorted by their names.

The biggest advantage of doing this is that we reduce the time complexity
of vrf_list_lookup_by_name() from O(n) to O(log n).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
lib/vrf.c
lib/vrf.h
zebra/zebra_vrf.c
zebra/zebra_vty.c