]> git.puffer.fish Git - mirror/frr.git/commit
ldpd: use red-black trees to store 'iface' elements
authorRenato Westphal <renato@opensourcerouting.org>
Tue, 13 Dec 2016 17:29:35 +0000 (15:29 -0200)
committerRenato Westphal <renato@opensourcerouting.org>
Wed, 15 Feb 2017 09:19:52 +0000 (07:19 -0200)
commit39ec2dc9bb7d19262c264398cd1c9178fabb1862
tree8a917689a7fdc1a440f3a9e867e7e23cf5da6bfd
parent9b127e580474f6a075046f81d3228d3ed29421b3
ldpd: use red-black trees to store 'iface' elements

Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
    outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).

The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ldpd/interface.c
ldpd/lde.c
ldpd/ldp_debug.c
ldpd/ldp_vty_conf.c
ldpd/ldpd.c
ldpd/ldpd.h
ldpd/ldpe.c