]> git.ipfire.org Git - thirdparty/bird.git/log
thirdparty/bird.git
8 months agobgp/bgp.c, bgp/packets.c, io-loop.c: solving slow shutdown when bird is busy ibgp-shutdown-fixing
Katerina Kubecova [Tue, 3 Dec 2024 14:37:56 +0000 (15:37 +0100)] 
bgp/bgp.c, bgp/packets.c, io-loop.c: solving slow shutdown when bird is busy

8 months agort-show.c: fixed OBSREF_SET after cf_error(), changed message when 'show route export...
Katerina Kubecova [Tue, 19 Nov 2024 09:33:49 +0000 (10:33 +0100)] 
rt-show.c: fixed OBSREF_SET after cf_error(), changed message when 'show route export' called on static protocol

8 months agoProtocol restart timer reworked.
Maria Matejka [Mon, 25 Nov 2024 11:02:13 +0000 (12:02 +0100)] 
Protocol restart timer reworked.

The restart timer was racy and didn't allow for immediate restarts
from limits. Now the protocols stores the last restart time and in case
of too frequent autorestarts caused by exceeded limits, the protocol
gets disabled with an error message.

Also now there is a configuration knob for this.

8 months agoHash test spurious fail fixed
Maria Matejka [Mon, 25 Nov 2024 08:44:00 +0000 (09:44 +0100)] 
Hash test spurious fail fixed

There was a race condition in the test itself,
causing the test reader access data after free.

8 months agoProtocol and BGP state information cleanup and fixes
Maria Matejka [Fri, 22 Nov 2024 13:49:13 +0000 (14:49 +0100)] 
Protocol and BGP state information cleanup and fixes

There were some nasty problems with deferred protocol state updates and
race conditions on BGP startup, shutdown, and also with referencing the
cached states.

Now it looks fixed.

8 months agoDebug option for ea_free
Maria Matejka [Sun, 24 Nov 2024 17:43:09 +0000 (18:43 +0100)] 
Debug option for ea_free

8 months agoDeferred call may need to be returned for future cleanups
Maria Matejka [Sat, 23 Nov 2024 20:24:45 +0000 (21:24 +0100)] 
Deferred call may need to be returned for future cleanups

8 months agoBMP: updated to v3 API
Katerina Kubecova [Fri, 27 Sep 2024 12:02:40 +0000 (14:02 +0200)] 
BMP: updated to v3 API

8 months agoBGP: protocol specific state information cleanup
Maria Matejka [Wed, 20 Nov 2024 19:04:33 +0000 (20:04 +0100)] 
BGP: protocol specific state information cleanup

8 months agoProto: The active flag converted to actual fifth protocol state
Maria Matejka [Mon, 18 Nov 2024 21:06:50 +0000 (22:06 +0100)] 
Proto: The active flag converted to actual fifth protocol state

What was PS_DOWN before, is now PS_DOWN and PS_FLUSH.

8 months agoNeighbor locking: forgotten neighbors to unlink are actually a bug.
Katerina Kubecova [Wed, 13 Nov 2024 14:45:09 +0000 (15:45 +0100)] 
Neighbor locking: forgotten neighbors to unlink are actually a bug.

These may cause runaway pointers.

8 months agonest/cli: fixup - empty printing in birdc does not freeze
Katerina Kubecova [Fri, 15 Nov 2024 09:04:51 +0000 (10:04 +0100)] 
nest/cli: fixup - empty printing in birdc does not freeze

8 months agoMRT: buildable and running again for BIRD 3
Katerina Kubecova [Fri, 27 Sep 2024 11:58:46 +0000 (13:58 +0200)] 
MRT: buildable and running again for BIRD 3

Tests for MRT are scarce and not automated for now, so it may behave
weirdly in corner cases.

8 months agoNeighbor cache: fixed neighbor referencing
Maria Matejka [Sun, 10 Nov 2024 12:33:22 +0000 (13:33 +0100)] 
Neighbor cache: fixed neighbor referencing

8 months agoDefer: fixup missing include guards
Maria Matejka [Sun, 10 Nov 2024 12:32:16 +0000 (13:32 +0100)] 
Defer: fixup missing include guards

8 months agoBGP: exporting protocol-specific state information
Katerina Kubecova [Fri, 11 Oct 2024 10:38:18 +0000 (12:38 +0200)] 
BGP: exporting protocol-specific state information

8 months agoBGP: Start state is now using extended state
Maria Matejka [Tue, 15 Oct 2024 11:10:58 +0000 (13:10 +0200)] 
BGP: Start state is now using extended state

8 months agoProto: adding lockless state table and journal
Katerina Kubecova [Tue, 15 Oct 2024 09:31:32 +0000 (11:31 +0200)] 
Proto: adding lockless state table and journal

To allow reading of protocol states from other protocols or completely
different routines, we have to export these states to data structures
not requiring to lock the protocol loops.

On one hand, this doesn't give the reader the actual state "right now",
on the other hand, getting that is impossible in a properly
multithreaded environment and you will always get the information with
some (little but noteworthy) delay.

This implementation handles only the basic state information of the
protocols, common for all the protocols. Adding protocol-specific state
information should be done by implementing the protocol hook init_state().

Channel information is stored but not announced, as we don't need the
announcements for now.

8 months agoMore attribute types: pointers, strings, btime
Katerina Kubecova [Tue, 15 Oct 2024 08:50:29 +0000 (10:50 +0200)] 
More attribute types: pointers, strings, btime

For the upcoming rework of protocol state information propagation,
we need some more eattr types to be defined.

These types are probably not defined completely and before using
them for route attributes, you should check that they don't lack
some crucial methods.

9 months agoTable: tame warnings around unused debug messages
Maria Matejka [Fri, 11 Oct 2024 10:23:15 +0000 (12:23 +0200)] 
Table: tame warnings around unused debug messages

10 months agoKernel: protocol shuts down synchronously
Katerina Kubecova [Fri, 27 Sep 2024 12:54:21 +0000 (14:54 +0200)] 
Kernel: protocol shuts down synchronously

Before this commit, on kernel shutdown, the routes were re-exported by
the regular export but treated as withdraw. This was too hairy and
caused unnecessary complexity of the protocol's state machine.

Instead of that, we found out that it makes more sense to just refeed
the routes synchronously and convert to withdraw. This is done by the
direct export access instead of the channel.

It would (maybe) make more sense to run export filters on this in case
the export filter updates the krt_metric attribute, but as this doesn't
work on regular withdraw anyway, it's better for now to just let it be
and maybe somebody in the future fixes this issue.

13 months agoNEWS and version update
Maria Matejka [Mon, 1 Jul 2024 13:34:06 +0000 (15:34 +0200)] 
NEWS and version update

13 months agoFixed secondary route export
Maria Matejka [Fri, 28 Jun 2024 19:38:54 +0000 (21:38 +0200)] 
Fixed secondary route export

13 months agoshow threads: displaying the same thread id's as in log
Maria Matejka [Thu, 27 Jun 2024 12:04:26 +0000 (14:04 +0200)] 
show threads: displaying the same thread id's as in log

13 months agoExport: Throw a warning instead of crashing on export_accepted_map inconsistency
Maria Matejka [Thu, 27 Jun 2024 11:49:37 +0000 (13:49 +0200)] 
Export: Throw a warning instead of crashing on export_accepted_map inconsistency

13 months agoConfig undo queuing bug fixed
Maria Matejka [Thu, 27 Jun 2024 07:48:38 +0000 (09:48 +0200)] 
Config undo queuing bug fixed

13 months agoBGP runs TX as a deferred routine
Maria Matejka [Thu, 27 Jun 2024 07:34:23 +0000 (09:34 +0200)] 
BGP runs TX as a deferred routine

This should help flushing the tx buffers as soon as possible.

13 months agoForbid locking altogether when RCU reader is active
Maria Matejka [Thu, 27 Jun 2024 06:42:11 +0000 (08:42 +0200)] 
Forbid locking altogether when RCU reader is active

13 months agoFlush deferred calls directly after the loop finished its one run
Maria Matejka [Thu, 27 Jun 2024 06:37:05 +0000 (08:37 +0200)] 
Flush deferred calls directly after the loop finished its one run

13 months agoIO: Allow to take new loops if the thread is hot, but only one at time
Maria Matejka [Thu, 27 Jun 2024 06:26:00 +0000 (08:26 +0200)] 
IO: Allow to take new loops if the thread is hot, but only one at time

13 months agoEven on shutdown we should try to pass the freed memory to others
Maria Matejka [Wed, 26 Jun 2024 21:21:32 +0000 (23:21 +0200)] 
Even on shutdown we should try to pass the freed memory to others

13 months agoAllocator now reports cold pages
Maria Matejka [Wed, 26 Jun 2024 18:45:54 +0000 (20:45 +0200)] 
Allocator now reports cold pages

13 months agoFilter unit test uncertainty hack
Maria Matejka [Wed, 26 Jun 2024 16:30:17 +0000 (18:30 +0200)] 
Filter unit test uncertainty hack

13 months agoTame improper xmalloc warning
Maria Matejka [Wed, 26 Jun 2024 15:21:26 +0000 (17:21 +0200)] 
Tame improper xmalloc warning

13 months agoMerge commit 'b95dc8f29f18eb177f91fdc4bf0716fac9b15366' into mq-config-ref
Maria Matejka [Wed, 26 Jun 2024 15:19:24 +0000 (17:19 +0200)] 
Merge commit 'b95dc8f29f18eb177f91fdc4bf0716fac9b15366' into mq-config-ref

Also converted all _Bool's to bool.

13 months agochannel roa reload debug message
Maria Matejka [Wed, 26 Jun 2024 13:13:12 +0000 (15:13 +0200)] 
channel roa reload debug message

13 months agoIO: allow for faster loop dropping
Maria Matejka [Tue, 25 Jun 2024 15:48:25 +0000 (17:48 +0200)] 
IO: allow for faster loop dropping

13 months agoRevert "BGP: Export uses common attribute cache"
Maria Matejka [Tue, 25 Jun 2024 15:08:57 +0000 (17:08 +0200)] 
Revert "BGP: Export uses common attribute cache"

This reverts commit d01a7c2bdaf50aff23cf5e1b4e494328c5294960.

It seems that the performance penalty in global ea cache is actually
very high so returning back to local attribute caches in every BGP.

13 months agoFixed fast subsequent reconfigurations bug
Maria Matejka [Tue, 25 Jun 2024 13:53:13 +0000 (15:53 +0200)] 
Fixed fast subsequent reconfigurations bug

13 months agoRemove spinlock debug structures in production build
Maria Matejka [Tue, 25 Jun 2024 13:48:11 +0000 (15:48 +0200)] 
Remove spinlock debug structures in production build

13 months agoBGP: show proto info crash fix if BGP is down
Maria Matejka [Tue, 25 Jun 2024 13:05:26 +0000 (15:05 +0200)] 
BGP: show proto info crash fix if BGP is down

13 months agoBGP: using closer pointer for netindex hash than all the way to the table
Maria Matejka [Tue, 25 Jun 2024 12:41:34 +0000 (14:41 +0200)] 
BGP: using closer pointer for netindex hash than all the way to the table

13 months agoLinpool: allocation split to fast and slow
Maria Matejka [Tue, 25 Jun 2024 12:02:15 +0000 (14:02 +0200)] 
Linpool: allocation split to fast and slow

13 months agoROA aggregator uses its own rte source instead of recycling
Maria Matejka [Tue, 25 Jun 2024 09:19:14 +0000 (11:19 +0200)] 
ROA aggregator uses its own rte source instead of recycling

13 months agoRCU read lock optimization
Maria Matejka [Thu, 20 Jun 2024 20:57:52 +0000 (22:57 +0200)] 
RCU read lock optimization

13 months agoROA: Switching off digestor splitting
Maria Matejka [Thu, 20 Jun 2024 20:35:53 +0000 (22:35 +0200)] 
ROA: Switching off digestor splitting

13 months agoRoute attribute usecount doesn't need to synchronize on unlock
Maria Matejka [Thu, 20 Jun 2024 18:37:21 +0000 (20:37 +0200)] 
Route attribute usecount doesn't need to synchronize on unlock

13 months agoRPKI socket read is prioritized over other sockets
Maria Matejka [Thu, 20 Jun 2024 17:39:09 +0000 (19:39 +0200)] 
RPKI socket read is prioritized over other sockets

13 months agoRefeed done hooks are called in the same order as the requests came in
Maria Matejka [Thu, 20 Jun 2024 10:09:38 +0000 (12:09 +0200)] 
Refeed done hooks are called in the same order as the requests came in

13 months agoConflating multiple partial ROA reload requests together
Maria Matejka [Thu, 20 Jun 2024 09:58:23 +0000 (11:58 +0200)] 
Conflating multiple partial ROA reload requests together

13 months agoSpinhash main lock removed
Maria Matejka [Wed, 19 Jun 2024 18:53:44 +0000 (20:53 +0200)] 
Spinhash main lock removed

Spinhash now uses RCU instead to guard cur-new exchanges to avoid
excessive synchronization and cache misses on the main spinlock.

13 months agoMoved the cork thresholds massively up
Maria Matejka [Wed, 19 Jun 2024 14:19:04 +0000 (16:19 +0200)] 
Moved the cork thresholds massively up

This allows for more efficient import and export bundling, including
best route export and next hop resolution.

13 months agoFixed a race condition in rcu-domain blocking
Maria Matejka [Wed, 19 Jun 2024 10:02:34 +0000 (12:02 +0200)] 
Fixed a race condition in rcu-domain blocking

13 months agoSafer cleanup of table auxiliary routines
Maria Matejka [Wed, 19 Jun 2024 09:51:20 +0000 (11:51 +0200)] 
Safer cleanup of table auxiliary routines

13 months agoNo page flush before polling
Maria Matejka [Tue, 18 Jun 2024 09:02:51 +0000 (11:02 +0200)] 
No page flush before polling

The maximum amount of locally kept pages is 128 so we can just
well keep the half-meg of RAM allocated and prepared for future use.

13 months agoPrefilter runs before generating feeds
Maria Matejka [Sun, 16 Jun 2024 19:36:45 +0000 (21:36 +0200)] 
Prefilter runs before generating feeds

13 months agoTable cork now uses callbacks and direct flush to uncork
Maria Matejka [Sat, 15 Jun 2024 21:31:44 +0000 (23:31 +0200)] 
Table cork now uses callbacks and direct flush to uncork

13 months agoConfiguration obstacles made a separate, explicit structure
Maria Matejka [Thu, 13 Jun 2024 10:15:38 +0000 (12:15 +0200)] 
Configuration obstacles made a separate, explicit structure

With this, one can walk the obstacle list in a debugger and
easier see which specific object is holding the reference.

13 months agoGlobal runtime values separated from config
Maria Matejka [Thu, 13 Jun 2024 14:30:51 +0000 (16:30 +0200)] 
Global runtime values separated from config

13 months agoCLI: Show symbols, route and mpls explicitly passes the actual config to the show...
Maria Matejka [Thu, 13 Jun 2024 14:58:41 +0000 (16:58 +0200)] 
CLI: Show symbols, route and mpls explicitly passes the actual config to the show function

13 months agoFilter global values are not used directly from config
Maria Matejka [Thu, 13 Jun 2024 13:49:56 +0000 (15:49 +0200)] 
Filter global values are not used directly from config

13 months agoConfig: Removed obsolete force_restart option when commiting
Maria Matejka [Thu, 13 Jun 2024 13:36:18 +0000 (15:36 +0200)] 
Config: Removed obsolete force_restart option when commiting

13 months agoCLI keeps its active config pointer explicitly
Maria Matejka [Thu, 13 Jun 2024 10:29:21 +0000 (12:29 +0200)] 
CLI keeps its active config pointer explicitly

13 months agoCallback: bundling event with its target
Maria Matejka [Thu, 13 Jun 2024 08:42:18 +0000 (10:42 +0200)] 
Callback: bundling event with its target

13 months agoBGP and HCU uncorking is processed in the right loop
Maria Matejka [Wed, 12 Jun 2024 20:36:12 +0000 (22:36 +0200)] 
BGP and HCU uncorking is processed in the right loop

closes #86

The uncork events are running from mainloop so these should just
dispatch the right event to the right loop. Doing anything long there
is bad for performance and latency as the uncork list may be huge.

13 months agoTable: RCU synchronization moved to lfjour
Maria Matejka [Wed, 12 Jun 2024 12:48:15 +0000 (14:48 +0200)] 
Table: RCU synchronization moved to lfjour

the sync is actually needed when the pages get freed, not precisely
after every item cleanup, as the data technically stays intact until the
deferred free's are called.

13 months agoNetindex cleanup calls synchronize_rcu() by batches
Maria Matejka [Wed, 12 Jun 2024 12:47:20 +0000 (14:47 +0200)] 
Netindex cleanup calls synchronize_rcu() by batches

13 months agoTable: fixed export_all flush when export_best is idle
Maria Matejka [Wed, 12 Jun 2024 10:00:11 +0000 (12:00 +0200)] 
Table: fixed export_all flush when export_best is idle

13 months agoRemoved unnecessary recursion from rt_export_get()
Maria Matejka [Wed, 12 Jun 2024 09:33:26 +0000 (11:33 +0200)] 
Removed unnecessary recursion from rt_export_get()

13 months agoNetindex rehash debug
Maria Matejka [Tue, 11 Jun 2024 13:59:19 +0000 (15:59 +0200)] 
Netindex rehash debug

13 months agoTMP: table best-all cleanup debug
Maria Matejka [Tue, 11 Jun 2024 13:38:27 +0000 (15:38 +0200)] 
TMP: table best-all cleanup debug

13 months agoMemory allocator tweaking
Maria Matejka [Tue, 11 Jun 2024 12:46:25 +0000 (14:46 +0200)] 
Memory allocator tweaking

TODO: make this configurable

13 months agoAttributes: fix collision on free-lookup
Maria Matejka [Tue, 11 Jun 2024 11:16:50 +0000 (13:16 +0200)] 
Attributes: fix collision on free-lookup

Freeing the eattrs is tricky as somebody else may find them
via RTA-unlocked lookup inbetween.

13 months agoTime accounting must be done by coarse timers
Maria Matejka [Mon, 10 Jun 2024 21:09:05 +0000 (23:09 +0200)] 
Time accounting must be done by coarse timers

on some ARM, the precise timers are too slow to be actually useful

13 months agoEvery table has its own netindex now
Maria Matejka [Mon, 10 Jun 2024 21:07:36 +0000 (23:07 +0200)] 
Every table has its own netindex now

It's obnoxiously slow to walk over sparse tables.

13 months agoNetindex cleanup now doesn't need to unlock to synchronize RCU
Maria Matejka [Mon, 10 Jun 2024 21:06:43 +0000 (23:06 +0200)] 
Netindex cleanup now doesn't need to unlock to synchronize RCU

13 months agoRevert (partial) "Route attributes now use the common lockfree usecount"
Maria Matejka [Tue, 11 Jun 2024 08:48:21 +0000 (10:48 +0200)] 
Revert (partial) "Route attributes now use the common lockfree usecount"

This partially reverts commit d617801c31018926cccd75a64186ebb0597a6bcc.

The common lockfree doesn't work well for high-volume structures like
eattr cache because it expects the structure to be cleaned up by a
sweeper routine ... which is very ineffective for >1M records.

OTOH, we need the deferred ea_free in all cases ... so keeping that.

13 months agoTable best feed collision fix
Maria Matejka [Mon, 10 Jun 2024 15:24:53 +0000 (17:24 +0200)] 
Table best feed collision fix

13 months agoDropped net_resolve_index from feeder fast path
Maria Matejka [Mon, 10 Jun 2024 14:25:53 +0000 (16:25 +0200)] 
Dropped net_resolve_index from feeder fast path

13 months agoNext hop update is split by time, not by number of routes
Maria Matejka [Mon, 10 Jun 2024 12:17:28 +0000 (14:17 +0200)] 
Next hop update is split by time, not by number of routes

13 months agoIO Loop: process socket reads only after timers and events are done
Maria Matejka [Mon, 10 Jun 2024 12:11:51 +0000 (14:11 +0200)] 
IO Loop: process socket reads only after timers and events are done

13 months agoBGP: splitting TX by time, not number of messages sent
Maria Matejka [Mon, 10 Jun 2024 12:10:51 +0000 (14:10 +0200)] 
BGP: splitting TX by time, not number of messages sent

13 months agoTable: pruning is deferred by task time, not by item count
Maria Matejka [Mon, 10 Jun 2024 09:35:07 +0000 (11:35 +0200)] 
Table: pruning is deferred by task time, not by item count

13 months agoChannel: postpone the export event when stopping
Maria Matejka [Mon, 10 Jun 2024 08:39:11 +0000 (10:39 +0200)] 
Channel: postpone the export event when stopping

13 months agoIO Threads: scheduler debug shows info on next loop to run
Maria Matejka [Mon, 10 Jun 2024 08:38:56 +0000 (10:38 +0200)] 
IO Threads: scheduler debug shows info on next loop to run

13 months agoThreads: smoothening loop pickup and less aggressive dropping
Maria Matejka [Sun, 9 Jun 2024 09:29:47 +0000 (11:29 +0200)] 
Threads: smoothening loop pickup and less aggressive dropping

13 months agoIO loop picker fixed
Maria Matejka [Sat, 8 Jun 2024 22:43:14 +0000 (00:43 +0200)] 
IO loop picker fixed

Now if the thread finds out that it actually isn't busy,
it unsets the business status and picks something up right away.

13 months agoTask-in-limit checker hacked for mainloop
Maria Matejka [Sat, 8 Jun 2024 21:43:37 +0000 (23:43 +0200)] 
Task-in-limit checker hacked for mainloop

13 months agoTable: too fast export validity check replaced with just a retry
Maria Matejka [Sat, 8 Jun 2024 18:19:51 +0000 (20:19 +0200)] 
Table: too fast export validity check replaced with just a retry

13 months agoThread IO: a little bit faster RX repeat
Maria Matejka [Sat, 8 Jun 2024 18:06:52 +0000 (20:06 +0200)] 
Thread IO: a little bit faster RX repeat

13 months agoNetindex: fix absurd hash parameters
Maria Matejka [Sat, 8 Jun 2024 16:26:02 +0000 (18:26 +0200)] 
Netindex: fix absurd hash parameters

13 months agoConverted ea cache to spinhash
Maria Matejka [Sat, 8 Jun 2024 00:44:09 +0000 (02:44 +0200)] 
Converted ea cache to spinhash

13 months agoNetindex: converted to spinlocked hash
Maria Matejka [Fri, 7 Jun 2024 23:37:24 +0000 (01:37 +0200)] 
Netindex: converted to spinlocked hash

13 months agoHash: Added a spinlocked variant
Maria Matejka [Fri, 7 Jun 2024 23:33:57 +0000 (01:33 +0200)] 
Hash: Added a spinlocked variant

The spinlocked hash has a main rw spinlock for the data blocks
and then a rw spinlock for each hash chain. Rehashing is asynchronous,
running from an event, and it happens chain-wise, never blocking more
than one chain at a time.

13 months agoDropping netindex fragile manipulation
Maria Matejka [Fri, 7 Jun 2024 16:01:22 +0000 (18:01 +0200)] 
Dropping netindex fragile manipulation

Now the netindex doesn't expose its internals and can be converted
to the spinlocked implementation much easier.

13 months agoroa_check() uses the auxiliary table
Maria Matejka [Fri, 7 Jun 2024 21:38:29 +0000 (23:38 +0200)] 
roa_check() uses the auxiliary table

13 months agoROA tables have now an auxiliary table
Maria Matejka [Fri, 7 Jun 2024 17:41:04 +0000 (19:41 +0200)] 
ROA tables have now an auxiliary table

There is an IP table for every ROA table, holding special records
combining all known ROAs for every top-prefix.

The ROA digestor is now an IP digestor, running over the auxiliary
table.

13 months agoAttributes: cleanup
Maria Matejka [Fri, 7 Jun 2024 19:41:17 +0000 (21:41 +0200)] 
Attributes: cleanup

Dropping EAF_TYPE__MAX and adding a check for forgotten
ea class registration

13 months agoThreads shouldn't drop stopping loops
Maria Matejka [Fri, 7 Jun 2024 11:19:51 +0000 (13:19 +0200)] 
Threads shouldn't drop stopping loops

13 months agoLoop scheduler tracing options configurable
Maria Matejka [Fri, 7 Jun 2024 10:12:00 +0000 (12:12 +0200)] 
Loop scheduler tracing options configurable