mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Filter: Optimize IPv4 prefix sets
Use separate IPv4 and IPv6 implementation of prefix sets. Just this change makes IPv4 prefix sets 60% smaller and 50% faster.
This commit is contained in:
@@ -2789,7 +2789,7 @@ rt_init_hostcache(rtable *tab)
|
||||
hc->slab = sl_new(rt_table_pool, sizeof(struct hostentry));
|
||||
|
||||
hc->lp = lp_new(rt_table_pool, LP_GOOD_SIZE(1024));
|
||||
hc->trie = f_new_trie(hc->lp, sizeof(struct f_trie_node));
|
||||
hc->trie = f_new_trie(hc->lp, 0);
|
||||
|
||||
tab->hostcache = hc;
|
||||
}
|
||||
@@ -2943,7 +2943,7 @@ rt_update_hostcache(rtable *tab)
|
||||
|
||||
/* Reset the trie */
|
||||
lp_flush(hc->lp);
|
||||
hc->trie = f_new_trie(hc->lp, sizeof(struct f_trie_node));
|
||||
hc->trie = f_new_trie(hc->lp, 0);
|
||||
|
||||
WALK_LIST_DELSAFE(n, x, hc->hostentries)
|
||||
{
|
||||
|
Reference in New Issue
Block a user