]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: convert NHT code to use rb-trees instead of routing tables
authorRenato Westphal <renato@opensourcerouting.org>
Thu, 9 Apr 2020 18:56:11 +0000 (15:56 -0300)
committerGalaxyGorilla <sascha@netdef.org>
Mon, 31 Aug 2020 09:09:05 +0000 (09:09 +0000)
commitf663c5819c7ce9b3b5b37255c9bb7c752eafb60e
tree107efe9c2aee1d5b2a9551321626e0382dac36de
parentff35a1167604193afa9a94b37102e47d25cd3a5c
bgpd: convert NHT code to use rb-trees instead of routing tables

Fist, routing tables aren't the most appropriate data structure
to store nexthops and imported routes since we don't need to do
longest prefix matches with that information.

Second, by converting the NHT code to use rb-trees, we can index
the nexthops using additional information, not only the destination
address.  This will be useful later to index bgpd's nexthops by
both destination and SR-TE color.

Co-authored-by: Sebastien Merle <sebastien@netdef.org>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
bgpd/bgp_nexthop.c
bgpd/bgp_nexthop.h
bgpd/bgp_nht.c
bgpd/bgpd.h