]> git.proxmox.com Git - mirror_frr.git/commit - ldpd/lde.c
ldpd: use red-black trees to store 'l2vpn_pw' elements
authorRenato Westphal <renato@opensourcerouting.org>
Wed, 14 Dec 2016 15:53:07 +0000 (13:53 -0200)
committerRenato Westphal <renato@opensourcerouting.org>
Wed, 4 Jan 2017 00:07:13 +0000 (22:07 -0200)
commit20bacaeba2381b7b199166e006576606defbaf0f
tree4d7750899bae7956d4283078420b4133a61a41be
parent029c195854a229067a4c4374f17f8fa54fc1c56b
ldpd: use red-black trees to store 'l2vpn_pw' 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/l2vpn.c
ldpd/lde.c
ldpd/ldp_vty_conf.c
ldpd/ldpd.c
ldpd/ldpd.h
ldpd/ldpe.c