mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Nest: Use bitmaps to keep track of exported routes
Use a hierarchical bitmap in a routing table to assign ids to routes, and then use bitmaps (indexed by route id) in channels to keep track whether routes were exported. This avoids unreliable and inefficient re-evaluation of filters for old routes in order to determine whether they were exported.
This commit is contained in:
@@ -26,6 +26,13 @@ bmap_init(struct bmap *b, pool *p, uint size)
|
||||
b->data = mb_allocz(p, b->size);
|
||||
}
|
||||
|
||||
void
|
||||
bmap_reset(struct bmap *b, uint size)
|
||||
{
|
||||
b->size = BIRD_ALIGN(size, 4);
|
||||
memset(b->data, 0, b->size);
|
||||
}
|
||||
|
||||
void
|
||||
bmap_grow(struct bmap *b, uint need)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user