]> git.ipfire.org Git - thirdparty/bird.git/log
thirdparty/bird.git
4 months agoBugfix ip-aggregator-new
Igor Putovny [Tue, 11 Mar 2025 16:38:48 +0000 (17:38 +0100)] 
Bugfix

When pruning the trie, do not remove nodes of original prefixes

4 months agoRefactor second_pass()
Igor Putovny [Tue, 11 Mar 2025 15:50:13 +0000 (16:50 +0100)] 
Refactor second_pass()

4 months agoMore comments
Igor Putovny [Mon, 10 Mar 2025 18:01:13 +0000 (19:01 +0100)] 
More comments

4 months agoMinor changes
Igor Putovny [Mon, 10 Mar 2025 13:57:24 +0000 (14:57 +0100)] 
Minor changes

4 months agoBugfix
Igor Putovny [Fri, 7 Mar 2025 15:36:06 +0000 (16:36 +0100)] 
Bugfix

Set node status to NON_FIB when allocating additional nodes

4 months agoRefactor aggregator_start()
Igor Putovny [Fri, 7 Mar 2025 15:26:00 +0000 (16:26 +0100)] 
Refactor aggregator_start()

4 months agoRename
Igor Putovny [Fri, 7 Mar 2025 14:08:59 +0000 (15:08 +0100)] 
Rename

4 months agoReplace uint with u32
Igor Putovny [Fri, 7 Mar 2025 12:53:56 +0000 (13:53 +0100)] 
Replace uint with u32

4 months agoRename
Igor Putovny [Fri, 7 Mar 2025 12:06:43 +0000 (13:06 +0100)] 
Rename

4 months agoFormatting
Igor Putovny [Thu, 6 Mar 2025 16:17:56 +0000 (17:17 +0100)] 
Formatting

4 months agoCleanup
Igor Putovny [Thu, 6 Mar 2025 15:29:03 +0000 (16:29 +0100)] 
Cleanup

4 months agoRemove assertions
Igor Putovny [Thu, 6 Mar 2025 14:44:48 +0000 (15:44 +0100)] 
Remove assertions

If prefix node was pruned from the trie, these assertions may not hold
for returned node

4 months agoDon't deaggregate trie as a separate step, do it during second pass
Igor Putovny [Thu, 6 Mar 2025 14:34:16 +0000 (15:34 +0100)] 
Don't deaggregate trie as a separate step, do it during second pass

4 months agoRefactor aggregator_init_trie()
Igor Putovny [Thu, 6 Mar 2025 14:09:28 +0000 (15:09 +0100)] 
Refactor aggregator_init_trie()

5 months agoReplace trie linpool with slab
Igor Putovny [Tue, 4 Mar 2025 15:38:30 +0000 (16:38 +0100)] 
Replace trie linpool with slab

5 months agoFix trie_remove_prefix() to work with pruned trie
Igor Putovny [Tue, 4 Mar 2025 14:06:10 +0000 (15:06 +0100)] 
Fix trie_remove_prefix() to work with pruned trie

5 months agoPrune the trie after every aggregation
Igor Putovny [Tue, 4 Mar 2025 14:04:44 +0000 (15:04 +0100)] 
Prune the trie after every aggregation

5 months agoRefactor: merge update_prefix() and withdraw_prefix() into one function
Igor Putovny [Mon, 3 Mar 2025 18:26:24 +0000 (19:26 +0100)] 
Refactor: merge update_prefix() and withdraw_prefix() into one function

5 months agoRefactor print_prefixes()
Igor Putovny [Mon, 3 Mar 2025 15:29:49 +0000 (16:29 +0100)] 
Refactor print_prefixes()

5 months agoRename
Igor Putovny [Mon, 3 Mar 2025 15:25:23 +0000 (16:25 +0100)] 
Rename

5 months agoBugfix
Igor Putovny [Fri, 28 Feb 2025 17:12:47 +0000 (18:12 +0100)] 
Bugfix

This was another bug tricky to find.
It manifested in a following way. After running aggregator with configuration A,
reconfiguring it to B (this works now as it was fixed in the previous commit)
and reconfiguring back to A, no routes from A were exported to the routing
table, despite prefixes being present in the trie.

It was found that aggregator_bucket_update() is correctly called, however, it
returned on the first "if", meaning that bucket was empty. It was found that
there were two different buckets with the same ID. The culprit turned out to
be freeing bucket ID when the bucket becomes empty in rt_notify() due to
reconfiguration. When that happens, freed ID will be used again for new bucket
created during reconfiguration.
However, the bucket pointer in the bucket list was never updated and pointer to
old bucket was still kept there at position [ID]. When the aggregator decided
for creating new route after reconfiguring back to A, it found bucket pointer
by its ID. However, this pointer was actually pointer to an empty bucket.
This triggered early return from aggregator_bucket_update(), which means that
control flow never reached the point where new route could be exported.
Either way, the empty bucket means that rte_update2() would be called with
wrong arguments and route export would still be unsuccessful.

5 months agoBugfix
Igor Putovny [Fri, 28 Feb 2025 12:38:59 +0000 (13:38 +0100)] 
Bugfix

When removing prefix from the trie, we need to find the closest IN_FIB
ancestor of the updated node. However, since the updated node may still
have IN_FIB status, we need to check that the target node and updated node
are not the same.

This bug manifested itself in a following way. After running aggregator with
configuation A and reconfiguring it to configuration B, routes from A, which
should have been removed, were still present in the routing table. This was
caused by old prefixes not being removed from the trie.

Because of the missing condition that the updated node and its ancestor are not
the same, trie recalculation was called on prefix nodes which were, in most
cases, leaves. Therefore, trie was not updated at all. All prefixes were still
present in the trie, and thus in the routing table as well.

5 months agoBugfix
Igor Putovny [Thu, 27 Feb 2025 16:29:18 +0000 (17:29 +0100)] 
Bugfix

Node can have selected bucket when entering third pass

5 months agoBugfix
Igor Putovny [Thu, 27 Feb 2025 16:26:55 +0000 (17:26 +0100)] 
Bugfix

Node can have selected bucket in the second pass

5 months agoBugfix
Igor Putovny [Thu, 27 Feb 2025 16:22:09 +0000 (17:22 +0100)] 
Bugfix

Do not delete selected bucket during deaggregation, it will be needed
in the third pass for route withdrawal

5 months agoBugfix
Igor Putovny [Thu, 27 Feb 2025 16:13:47 +0000 (17:13 +0100)] 
Bugfix

IN_FIB node can be a filler if it was previously original and was removed
from the trie

5 months agoBugfix
Igor Putovny [Thu, 27 Feb 2025 16:03:14 +0000 (17:03 +0100)] 
Bugfix

When removing prefix from the trie, prefix node can still be IN_FIB and
it will be a filler because it is no longer original.

5 months agoBugfix
Igor Putovny [Thu, 27 Feb 2025 15:43:43 +0000 (16:43 +0100)] 
Bugfix

Fix aggregator_trie_remove_prefix()

Never change FIB status except in the third pass. FIB status is decided only
by the algorithm and no one else. Never withdraw route except in the third pass.
Again, route exports and withdrawals are solely the algorithm's responsibility.
Keep selected bucket because it will be needed for route withdrawal in the
third pass.

5 months agoCheck consistency of the whole trie after every recalculation
Igor Putovny [Thu, 27 Feb 2025 15:24:02 +0000 (16:24 +0100)] 
Check consistency of the whole trie after every recalculation

5 months agoRename
Igor Putovny [Tue, 25 Feb 2025 16:56:36 +0000 (17:56 +0100)] 
Rename

5 months agoBugfix
Igor Putovny [Mon, 24 Feb 2025 16:18:28 +0000 (17:18 +0100)] 
Bugfix

Assign px_origin of target node in the third pass

5 months agoCheck trie consistency after every aggregation run
Igor Putovny [Mon, 24 Feb 2025 16:03:57 +0000 (17:03 +0100)] 
Check trie consistency after every aggregation run

5 months agoAdd more comments
Igor Putovny [Mon, 24 Feb 2025 15:56:53 +0000 (16:56 +0100)] 
Add more comments

5 months agoFix comments
Igor Putovny [Mon, 24 Feb 2025 13:43:54 +0000 (14:43 +0100)] 
Fix comments

5 months agoBugfix
Igor Putovny [Mon, 24 Feb 2025 13:18:48 +0000 (14:18 +0100)] 
Bugfix

Do not add potential bucket during deaggregation, this is done in the second
pass now that the first pass is omitted.
Change node status to FILLER if it's not ORIGINAL during deaggregation.

5 months agoFix
Igor Putovny [Mon, 24 Feb 2025 11:50:21 +0000 (12:50 +0100)] 
Fix

5 months agoFix comments
Igor Putovny [Mon, 24 Feb 2025 11:38:08 +0000 (12:38 +0100)] 
Fix comments

5 months agoAdd prefix to function names, rename
Igor Putovny [Mon, 24 Feb 2025 11:31:56 +0000 (12:31 +0100)] 
Add prefix to function names, rename

5 months agoSplit aggregator.c into two files
Igor Putovny [Fri, 21 Feb 2025 16:09:42 +0000 (17:09 +0100)] 
Split aggregator.c into two files

aggregator.c now contains main protocol functionality, evaluation of route
attributes and operations with buckets

trie.c now contains prefix aggregation and functions that operate on the trie

5 months agoRename
Igor Putovny [Fri, 21 Feb 2025 12:17:02 +0000 (13:17 +0100)] 
Rename

5 months agoSwitch order of expressions in condition testing
Igor Putovny [Fri, 21 Feb 2025 12:04:03 +0000 (13:04 +0100)] 
Switch order of expressions in condition testing

5 months agoReplace assert with ASSERT_DIE
Igor Putovny [Fri, 21 Feb 2025 11:51:14 +0000 (12:51 +0100)] 
Replace assert with ASSERT_DIE

5 months agoMerge branch 'ip-aggregator-new' of https://gitlab.nic.cz/labs/bird into ip-aggregato...
Igor Putovny [Fri, 21 Feb 2025 11:39:53 +0000 (12:39 +0100)] 
Merge branch 'ip-aggregator-new' of https://gitlab.nic.cz/labs/bird into ip-aggregator-new

5 months agoAggregator: Support prefix aggregation
Igor Putovny [Fri, 21 Feb 2025 11:00:14 +0000 (12:00 +0100)] 
Aggregator: Support prefix aggregation

(ready for code review)

5 months agoIP: Getting and setting bits from ip_addr
Igor Putovny [Fri, 21 Feb 2025 10:59:38 +0000 (11:59 +0100)] 
IP: Getting and setting bits from ip_addr

5 months agoSatanize the build to find sus behavior
Igor Putovny [Fri, 21 Feb 2025 10:58:53 +0000 (11:58 +0100)] 
Satanize the build to find sus behavior

5 months agoAutoconf: Merge check and add compiler option to one macro
Igor Putovny [Fri, 21 Feb 2025 10:39:53 +0000 (11:39 +0100)] 
Autoconf: Merge check and add compiler option to one macro

5 months agoBugfix
Igor Putovny [Fri, 21 Feb 2025 10:09:27 +0000 (11:09 +0100)] 
Bugfix

5 months agoRework documentation, add comments
Igor Putovny [Thu, 20 Feb 2025 16:35:32 +0000 (17:35 +0100)] 
Rework documentation, add comments

5 months agoRemove first pass, second pass now fills its function
Igor Putovny [Thu, 20 Feb 2025 16:30:43 +0000 (17:30 +0100)] 
Remove first pass, second pass now fills its function

5 months agoRename
Igor Putovny [Thu, 20 Feb 2025 16:18:16 +0000 (17:18 +0100)] 
Rename

5 months agoAdd another implementation of node_add_potential_bucket()
Igor Putovny [Thu, 20 Feb 2025 16:16:17 +0000 (17:16 +0100)] 
Add another implementation of node_add_potential_bucket()

5 months agoFix formatting
Igor Putovny [Thu, 20 Feb 2025 16:06:29 +0000 (17:06 +0100)] 
Fix formatting

5 months agomemset removed nodes, add const and inline
Igor Putovny [Thu, 20 Feb 2025 13:31:32 +0000 (14:31 +0100)] 
memset removed nodes, add const and inline

5 months agoSet ancestor without another if
Igor Putovny [Wed, 19 Feb 2025 15:57:29 +0000 (16:57 +0100)] 
Set ancestor without another if

5 months agoReplace superfluous else-if with else
Igor Putovny [Wed, 19 Feb 2025 15:24:52 +0000 (16:24 +0100)] 
Replace superfluous else-if with else

5 months agoRemove logs
Igor Putovny [Wed, 19 Feb 2025 13:12:38 +0000 (14:12 +0100)] 
Remove logs

5 months agoRename
Igor Putovny [Wed, 19 Feb 2025 12:52:43 +0000 (13:52 +0100)] 
Rename

5 months agoAdd comments
Igor Putovny [Wed, 19 Feb 2025 11:38:10 +0000 (12:38 +0100)] 
Add comments

5 months agoFix printing prefixes
Igor Putovny [Tue, 18 Feb 2025 16:22:12 +0000 (17:22 +0100)] 
Fix printing prefixes

5 months agoCleanup
Igor Putovny [Tue, 18 Feb 2025 16:20:53 +0000 (17:20 +0100)] 
Cleanup

5 months agoRemove unnecessary else branches
Igor Putovny [Tue, 18 Feb 2025 16:11:59 +0000 (17:11 +0100)] 
Remove unnecessary else branches

5 months agoAdd parentheses to ternary operator expressions
Igor Putovny [Tue, 18 Feb 2025 15:49:01 +0000 (16:49 +0100)] 
Add parentheses to ternary operator expressions
Improve bug messages

5 months agoRefactor deaggregate()
Igor Putovny [Tue, 18 Feb 2025 15:41:12 +0000 (16:41 +0100)] 
Refactor deaggregate()

5 months agoAdd const
Igor Putovny [Tue, 18 Feb 2025 15:29:57 +0000 (16:29 +0100)] 
Add const

5 months agoRename aggregator_process_withdraw()
Igor Putovny [Tue, 18 Feb 2025 15:28:19 +0000 (16:28 +0100)] 
Rename aggregator_process_withdraw()

5 months agoRename choose_lowest_id_bucket()
Igor Putovny [Tue, 18 Feb 2025 15:27:11 +0000 (16:27 +0100)] 
Rename choose_lowest_id_bucket()

5 months agoRename node_insert_potential_bucket()
Igor Putovny [Tue, 18 Feb 2025 15:19:11 +0000 (16:19 +0100)] 
Rename node_insert_potential_bucket()

5 months agoFix typo
Igor Putovny [Tue, 18 Feb 2025 15:14:08 +0000 (16:14 +0100)] 
Fix typo

5 months agoRefactor
Igor Putovny [Tue, 18 Feb 2025 14:22:47 +0000 (15:22 +0100)] 
Refactor

5 months agoSmall changes
Igor Putovny [Fri, 14 Feb 2025 16:51:33 +0000 (17:51 +0100)] 
Small changes

5 months agoCleanup
Igor Putovny [Fri, 14 Feb 2025 16:44:07 +0000 (17:44 +0100)] 
Cleanup

5 months agoRename
Igor Putovny [Fri, 14 Feb 2025 16:12:25 +0000 (17:12 +0100)] 
Rename

5 months agoAdd assertions
Igor Putovny [Fri, 14 Feb 2025 16:07:36 +0000 (17:07 +0100)] 
Add assertions

5 months agoCleanup
Igor Putovny [Thu, 13 Feb 2025 17:28:12 +0000 (18:28 +0100)] 
Cleanup

5 months agoRename
Igor Putovny [Thu, 13 Feb 2025 17:06:06 +0000 (18:06 +0100)] 
Rename

5 months agotrie_insert_prefix() now takes pointer to aggregator_proto
Igor Putovny [Thu, 13 Feb 2025 17:02:51 +0000 (18:02 +0100)] 
trie_insert_prefix() now takes pointer to aggregator_proto

5 months agoRename
Igor Putovny [Thu, 13 Feb 2025 16:53:50 +0000 (17:53 +0100)] 
Rename

5 months agoUse builtin popcount
Igor Putovny [Thu, 13 Feb 2025 16:46:57 +0000 (17:46 +0100)] 
Use builtin popcount

5 months agoRelocate code
Igor Putovny [Thu, 13 Feb 2025 16:30:10 +0000 (17:30 +0100)] 
Relocate code

5 months agoFix errors
Igor Putovny [Thu, 13 Feb 2025 15:29:24 +0000 (16:29 +0100)] 
Fix errors

5 months agoRewrite print_prefixes() using ip_addr instead of net_addr
Igor Putovny [Thu, 13 Feb 2025 15:10:13 +0000 (16:10 +0100)] 
Rewrite print_prefixes() using ip_addr instead of net_addr

5 months agoRewrite dump_trie() using ip_addr instead of net_addr
Igor Putovny [Wed, 12 Feb 2025 18:43:08 +0000 (19:43 +0100)] 
Rewrite dump_trie() using ip_addr instead of net_addr

5 months agoRewrite construct_trie() using ip_addr instead of net_addr
Igor Putovny [Wed, 12 Feb 2025 18:18:35 +0000 (19:18 +0100)] 
Rewrite construct_trie() using ip_addr instead of net_addr

5 months agoRewrite trie_process() using ip_addr instead of net_addr
Igor Putovny [Wed, 12 Feb 2025 18:16:10 +0000 (19:16 +0100)] 
Rewrite trie_process() using ip_addr instead of net_addr

5 months agoRewrite third_pass() using ip_addr instead of net_addr
Igor Putovny [Wed, 12 Feb 2025 18:06:57 +0000 (19:06 +0100)] 
Rewrite third_pass() using ip_addr instead of net_addr

5 months agoRewrite find_subtree_prefix() using ip_addr instead of net_addr
Igor Putovny [Wed, 12 Feb 2025 17:38:33 +0000 (18:38 +0100)] 
Rewrite find_subtree_prefix() using ip_addr instead of net_addr

5 months agoRewrite trie_remove_prefix() using ip_addr instead of net_addr
Igor Putovny [Wed, 12 Feb 2025 17:22:58 +0000 (18:22 +0100)] 
Rewrite trie_remove_prefix() using ip_addr instead of net_addr

5 months agoRewrite prepare_rte_withdrawal() using ip_addr instead of net_addr
Igor Putovny [Wed, 12 Feb 2025 17:08:15 +0000 (18:08 +0100)] 
Rewrite prepare_rte_withdrawal() using ip_addr instead of net_addr

5 months agoRewrite trie_insert_prefix() using ip_addr instead of net_addr
Igor Putovny [Wed, 12 Feb 2025 16:24:03 +0000 (17:24 +0100)] 
Rewrite trie_insert_prefix() using ip_addr instead of net_addr

5 months agoAdd shift values for ipa bit operations
Igor Putovny [Wed, 12 Feb 2025 16:17:56 +0000 (17:17 +0100)] 
Add shift values for ipa bit operations

5 months agoRewrite create_route() using ip_addr instead of net_addr
Igor Putovny [Wed, 12 Feb 2025 16:12:10 +0000 (17:12 +0100)] 
Rewrite create_route() using ip_addr instead of net_addr

5 months agoRemove collect_prefixes()
Igor Putovny [Wed, 12 Feb 2025 16:07:21 +0000 (17:07 +0100)] 
Remove collect_prefixes()

5 months agoAdd macros for ipa bit operations
Igor Putovny [Wed, 12 Feb 2025 15:49:22 +0000 (16:49 +0100)] 
Add macros for ipa bit operations

5 months agoSmall changes
Igor Putovny [Tue, 11 Feb 2025 13:02:09 +0000 (14:02 +0100)] 
Small changes

5 months agoCreate default route in the thid pass
Igor Putovny [Mon, 10 Feb 2025 16:22:26 +0000 (17:22 +0100)] 
Create default route in the thid pass

5 months agoInitialize root node with NON_FIB status
Igor Putovny [Mon, 10 Feb 2025 15:55:48 +0000 (16:55 +0100)] 
Initialize root node with NON_FIB status

5 months agoBugfix
Igor Putovny [Mon, 10 Feb 2025 15:12:02 +0000 (16:12 +0100)] 
Bugfix

Export new route when node status is changing from NON_FIB or UNASSIGNED to IN_FIB

5 months agoUse net_addr at rte_withdrawal struct, plus small changes
Igor Putovny [Fri, 7 Feb 2025 16:28:53 +0000 (17:28 +0100)] 
Use net_addr at rte_withdrawal struct, plus small changes

5 months agoSmall changes
Igor Putovny [Fri, 7 Feb 2025 15:52:42 +0000 (16:52 +0100)] 
Small changes