]>
git.ipfire.org Git - thirdparty/bird.git/log
Maria Matejka [Tue, 25 Jun 2024 13:05:26 +0000 (15:05 +0200)]
BGP: show proto info crash fix if BGP is down
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
Maria Matejka [Tue, 25 Jun 2024 12:02:15 +0000 (14:02 +0200)]
Linpool: allocation split to fast and slow
Maria Matejka [Tue, 25 Jun 2024 09:19:14 +0000 (11:19 +0200)]
ROA aggregator uses its own rte source instead of recycling
Maria Matejka [Thu, 20 Jun 2024 20:57:52 +0000 (22:57 +0200)]
RCU read lock optimization
Maria Matejka [Thu, 20 Jun 2024 20:35:53 +0000 (22:35 +0200)]
ROA: Switching off digestor splitting
Maria Matejka [Thu, 20 Jun 2024 18:37:21 +0000 (20:37 +0200)]
Route attribute usecount doesn't need to synchronize on unlock
Maria Matejka [Thu, 20 Jun 2024 17:39:09 +0000 (19:39 +0200)]
RPKI socket read is prioritized over other sockets
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
Maria Matejka [Thu, 20 Jun 2024 09:58:23 +0000 (11:58 +0200)]
Conflating multiple partial ROA reload requests together
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.
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.
Maria Matejka [Wed, 19 Jun 2024 10:02:34 +0000 (12:02 +0200)]
Fixed a race condition in rcu-domain blocking
Maria Matejka [Wed, 19 Jun 2024 09:51:20 +0000 (11:51 +0200)]
Safer cleanup of table auxiliary routines
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.
Maria Matejka [Sun, 16 Jun 2024 19:36:45 +0000 (21:36 +0200)]
Prefilter runs before generating feeds
Maria Matejka [Sat, 15 Jun 2024 21:31:44 +0000 (23:31 +0200)]
Table cork now uses callbacks and direct flush to uncork
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.
Maria Matejka [Thu, 13 Jun 2024 14:30:51 +0000 (16:30 +0200)]
Global runtime values separated from config
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
Maria Matejka [Thu, 13 Jun 2024 13:49:56 +0000 (15:49 +0200)]
Filter global values are not used directly from config
Maria Matejka [Thu, 13 Jun 2024 13:36:18 +0000 (15:36 +0200)]
Config: Removed obsolete force_restart option when commiting
Maria Matejka [Thu, 13 Jun 2024 10:29:21 +0000 (12:29 +0200)]
CLI keeps its active config pointer explicitly
Maria Matejka [Thu, 13 Jun 2024 08:42:18 +0000 (10:42 +0200)]
Callback: bundling event with its target
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.
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.
Maria Matejka [Wed, 12 Jun 2024 12:47:20 +0000 (14:47 +0200)]
Netindex cleanup calls synchronize_rcu() by batches
Maria Matejka [Wed, 12 Jun 2024 10:00:11 +0000 (12:00 +0200)]
Table: fixed export_all flush when export_best is idle
Maria Matejka [Wed, 12 Jun 2024 09:33:26 +0000 (11:33 +0200)]
Removed unnecessary recursion from rt_export_get()
Maria Matejka [Tue, 11 Jun 2024 13:59:19 +0000 (15:59 +0200)]
Netindex rehash debug
Maria Matejka [Tue, 11 Jun 2024 13:38:27 +0000 (15:38 +0200)]
TMP: table best-all cleanup debug
Maria Matejka [Tue, 11 Jun 2024 12:46:25 +0000 (14:46 +0200)]
Memory allocator tweaking
TODO: make this configurable
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.
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
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.
Maria Matejka [Mon, 10 Jun 2024 21:06:43 +0000 (23:06 +0200)]
Netindex cleanup now doesn't need to unlock to synchronize RCU
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.
Maria Matejka [Mon, 10 Jun 2024 15:24:53 +0000 (17:24 +0200)]
Table best feed collision fix
Maria Matejka [Mon, 10 Jun 2024 14:25:53 +0000 (16:25 +0200)]
Dropped net_resolve_index from feeder fast path
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
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
Maria Matejka [Mon, 10 Jun 2024 12:10:51 +0000 (14:10 +0200)]
BGP: splitting TX by time, not number of messages sent
Maria Matejka [Mon, 10 Jun 2024 09:35:07 +0000 (11:35 +0200)]
Table: pruning is deferred by task time, not by item count
Maria Matejka [Mon, 10 Jun 2024 08:39:11 +0000 (10:39 +0200)]
Channel: postpone the export event when stopping
Maria Matejka [Mon, 10 Jun 2024 08:38:56 +0000 (10:38 +0200)]
IO Threads: scheduler debug shows info on next loop to run
Maria Matejka [Sun, 9 Jun 2024 09:29:47 +0000 (11:29 +0200)]
Threads: smoothening loop pickup and less aggressive dropping
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.
Maria Matejka [Sat, 8 Jun 2024 21:43:37 +0000 (23:43 +0200)]
Task-in-limit checker hacked for mainloop
Maria Matejka [Sat, 8 Jun 2024 18:19:51 +0000 (20:19 +0200)]
Table: too fast export validity check replaced with just a retry
Maria Matejka [Sat, 8 Jun 2024 18:06:52 +0000 (20:06 +0200)]
Thread IO: a little bit faster RX repeat
Maria Matejka [Sat, 8 Jun 2024 16:26:02 +0000 (18:26 +0200)]
Netindex: fix absurd hash parameters
Maria Matejka [Sat, 8 Jun 2024 00:44:09 +0000 (02:44 +0200)]
Converted ea cache to spinhash
Maria Matejka [Fri, 7 Jun 2024 23:37:24 +0000 (01:37 +0200)]
Netindex: converted to spinlocked hash
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.
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.
Maria Matejka [Fri, 7 Jun 2024 21:38:29 +0000 (23:38 +0200)]
roa_check() uses the 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.
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
Maria Matejka [Fri, 7 Jun 2024 11:19:51 +0000 (13:19 +0200)]
Threads shouldn't drop stopping loops
Maria Matejka [Fri, 7 Jun 2024 10:12:00 +0000 (12:12 +0200)]
Loop scheduler tracing options configurable
Maria Matejka [Fri, 7 Jun 2024 07:05:11 +0000 (09:05 +0200)]
Fixed nanoseconds in IO loop time limiter
Maria Matejka [Fri, 7 Jun 2024 06:59:48 +0000 (08:59 +0200)]
Fixed deferred route freeing crash
The sending channel may be already gone when rte_free_deferred()
is finally called so we have to log about route freeing in the
synchronous call instead.
Maria Matejka [Thu, 6 Jun 2024 21:06:27 +0000 (23:06 +0200)]
Fixed non-exporting protocol reload crash
Maria Matejka [Thu, 6 Jun 2024 15:45:35 +0000 (17:45 +0200)]
Netindex: allow u32 -> netindex without locking
Maria Matejka [Thu, 6 Jun 2024 12:04:06 +0000 (14:04 +0200)]
Proto: fix reimporter crash on shutdown
Channel transition to CS_STOP forgot to postpone the reimporter event,
thus reimport could theoretically run too late and cause trouble.
Maria Matejka [Thu, 6 Jun 2024 11:09:39 +0000 (13:09 +0200)]
BGP: Dropping the netindex experiment, prefix hash is faster
Maria Matejka [Thu, 6 Jun 2024 11:32:31 +0000 (13:32 +0200)]
RCU Unwinder can now retry without yielding
Maria Matejka [Wed, 5 Jun 2024 11:12:12 +0000 (13:12 +0200)]
Read-write spinlocks
Maria Matejka [Wed, 5 Jun 2024 15:47:32 +0000 (17:47 +0200)]
Netindex is now net-type specific
Combining all network types in one netindex was just a waste of memory
and too much complexity for no reason.
Maria Matejka [Fri, 31 May 2024 11:02:27 +0000 (13:02 +0200)]
IO loop: fixed unassigned count
Maria Matejka [Tue, 4 Jun 2024 19:38:05 +0000 (21:38 +0200)]
Table: Freeing routes deferred to save rcu synchronization
Maria Matejka [Tue, 4 Jun 2024 12:58:45 +0000 (14:58 +0200)]
Route attributes now use the common lockfree usecount
Also route attributes are not freed immediately anymore.
Maria Matejka [Tue, 4 Jun 2024 10:22:14 +0000 (12:22 +0200)]
Hash: dropped relics of hash iterators
Maria Matejka [Tue, 4 Jun 2024 10:09:41 +0000 (12:09 +0200)]
Route attribute hash replaced with the generic one
Maria Matejka [Tue, 4 Jun 2024 08:10:35 +0000 (10:10 +0200)]
Softened warning about too much time spent in loop
Now the warning needs at least 10 ms after the scheduled end time
to ever complain.
TODO: make this configurable
Maria Matejka [Tue, 4 Jun 2024 06:11:30 +0000 (08:11 +0200)]
BGP: Freeing prefixes deferred to save rcu synchronization
Maria Matejka [Mon, 3 Jun 2024 12:23:41 +0000 (14:23 +0200)]
Common parts of the ROA updater moved into the table
Channel is now just subscribing to yet another journal announcing
digested tries from the ROA table.
Creating tries in every channel on-the-fly was too slow to handle
and it ate obnoxious amounts of memory. Instead, the tries are
constructed directly in the table and the channels are notified
with the completed tries.
The delayed export-release mechanism is used to keep the tries allocated
until routes get reloaded.
Maria Matejka [Mon, 3 Jun 2024 09:12:20 +0000 (11:12 +0200)]
Task deferrer: kinda more dumb-resistant macro
Originally, this mechanism required to check whether there's enough time to work
and then to send an event. This macro combines all the logic and goes more straightforwardly
to the _end_ of the export processing loop.
One should note that there were two cases where the export processing loop
was deferred at the _beginning_, which led to ignoring some routes on
reimports. This wasn't easily noticeable in the tests until the one-task
limit got a ceiling on 300 ms to keep reasonable latency.
Maria Matejka [Fri, 31 May 2024 19:22:07 +0000 (21:22 +0200)]
Never allow more than 300 ms per loop
Maria Matejka [Wed, 29 May 2024 07:33:42 +0000 (09:33 +0200)]
BGP: export table stores routes, reloads and shows in CLI.
In future, this and rtable's data structures should be probably merged
but it isn't a good idea to do now. The used data structure is similar
to rtable -- an array of pointers to linked lists.
Feed is lockless, as with all tables.
Full export (receiving updates) is not supported yet but we don't have
any method how to use it anyway. Gonna implement it later.
Maria Matejka [Thu, 30 May 2024 20:59:56 +0000 (22:59 +0200)]
BGP: Prefix table uses a pointer array instead of hash
Maria Matejka [Fri, 31 May 2024 18:43:15 +0000 (20:43 +0200)]
RCU: Rewritten to be more straightforward
Maria Matejka [Sun, 2 Jun 2024 20:49:35 +0000 (22:49 +0200)]
Unit test for RCU
Maria Matejka [Thu, 30 May 2024 20:59:08 +0000 (22:59 +0200)]
Netindex: consistency checks and deletion of whole hash
Maria Matejka [Fri, 31 May 2024 13:16:41 +0000 (15:16 +0200)]
If debugging, store a malloc circular log for easier debugging
Maria Matejka [Fri, 31 May 2024 07:47:56 +0000 (09:47 +0200)]
Hostentry: made src ea_list atomic to help with consistency
Maria Matejka [Thu, 30 May 2024 21:05:15 +0000 (23:05 +0200)]
Slab: can be deleted as a single object
Maria Matejka [Thu, 30 May 2024 06:22:40 +0000 (08:22 +0200)]
Export: Next feed step-up is now internal
There is no much reason to do anything else than the netindex technique.
Maria Matejka [Wed, 29 May 2024 18:16:08 +0000 (20:16 +0200)]
BGP: Simpler hashing in export table
We need a hashing simple enough to allow for feeding by netindex.
Maria Matejka [Wed, 29 May 2024 06:18:31 +0000 (08:18 +0200)]
BGP: Export uses common attribute cache
There is no real need for storing bucket attributes locally and we may
save some memory by caching the attributes in one central place.
If this becomes a contention problem, we should reduce the lock load
of the central attribute cache.
Maria Matejka [Tue, 28 May 2024 19:49:07 +0000 (21:49 +0200)]
BGP: pending TX prefixes link netindex instead of copying net_addr
This helps with memory consumption, allows for removal of multiple
slab/mblock ifs and prepares for easier feeds.
Maria Matejka [Tue, 28 May 2024 20:33:14 +0000 (22:33 +0200)]
BGP: refactored pending TX back into channel
Maria Matejka [Thu, 2 May 2024 09:39:34 +0000 (11:39 +0200)]
Real almost-lockless feeds and more pull-like exports
Introducing a new omnipotent internal API to just pass route updates
from whatever point wherever we want.
From now on, all the exports should be processed by RT_WALK_EXPORTS
macro, and you can also issue a separate feed-only request to just get a
feed and finish.
The exporters can now also stop and the readers must expect that to
happen and recover. Main tables don't stop, though.
Maria Matejka [Wed, 29 May 2024 08:55:59 +0000 (10:55 +0200)]
BGP: explicitly sending route refresh from CLI
Maria Matejka [Wed, 27 Mar 2024 10:34:19 +0000 (11:34 +0100)]
Protocol filter reload is now done by 'reload filters'
This prepares for the separate 'reload bgp' command triggering BGP Route Refresh
Maria Matejka [Wed, 22 May 2024 06:56:37 +0000 (08:56 +0200)]
Static: Fixed undefined nexthop padding problems
Maria Matejka [Mon, 20 May 2024 13:57:13 +0000 (15:57 +0200)]
Netindex: fixed resolving net by index
Maria Matejka [Fri, 10 May 2024 14:32:08 +0000 (16:32 +0200)]
RIP partial reload never worked properly, running full reload always
Maria Matejka [Fri, 10 May 2024 14:22:16 +0000 (16:22 +0200)]
Dropping obsolete protocol Perf
We have now better methods how to measure overall performance
and this obsolete protocol has basically rotten away. If anybody
needs its features, feel free to revive it in future.
Maria Matejka [Fri, 10 May 2024 14:14:54 +0000 (16:14 +0200)]
OSPF partial reload never worked properly, running full reload always