Maria Matejka
96f357c5d6
Minimalist mainloop implementation
2024-09-11 09:25:44 +02:00
Katerina Kubecova
4e6cea4ed9
Porting the CBOR encoder from the YANG branch
...
Minor cleanups by commiter.
(source commit 43ff10204b
but expected
to be rebased later, don't worry if you fail to find it)
2024-09-11 09:25:44 +02:00
Maria Matejka
7ebb5527ed
Added mb_strdup() to complement other similar functions
2024-09-11 09:18:44 +02:00
Maria Matejka
80c0df06a7
Moved sk_open_unix() to common lib
2024-09-11 09:18:44 +02:00
Maria Matejka
97e85f088d
lib/socket.h: added missing include
2024-09-11 09:18:44 +02:00
Maria Matejka
a6d82c2684
lib/obstacle.h: added missing include
2024-09-11 09:18:44 +02:00
Maria Matejka
96940a9751
Splitting out BIRD static library for linking to other tools
2024-09-03 12:48:39 +02:00
Maria Matejka
bb3c3f3a7a
Thread config has an explicit structure
2024-09-03 12:48:39 +02:00
Maria Matejka
ab963de471
Displaced show threads command to its own file
2024-08-29 10:12:18 +02:00
Maria Matejka
63bd3692c5
Disabling the old IO event logger as it doesn't run from worker loops anyway
2024-08-29 08:32:18 +02:00
Maria Matejka
a752914da0
Shutdown marker displaced to runtime
2024-08-28 15:49:13 +02:00
Maria Matejka
1b998e846c
Global runtime splitout to BIRD specific and lib things
2024-08-28 15:10:59 +02:00
Maria Matejka
6485a74a5c
Moved flowspec configuration checks to the config file
...
Functions flow_check_cf_bmk_values, flow_check_cf_value_length,
flow4_validate_cf and flow6_validate_cf are now not built with lib but
with conf to enable for better semantic separation.
2024-08-27 15:06:54 +02:00
Maria Matejka
6eea722d3f
Forbid locking altogether when RCU reader is active
2024-06-28 22:03:45 +02:00
Maria Matejka
1e77e6e1b2
Flush deferred calls directly after the loop finished its one run
2024-06-28 22:03:45 +02:00
Maria Matejka
af73cc4215
Allocator now reports cold pages
2024-06-26 20:45:54 +02:00
Maria Matejka
be2ba84e50
Tame improper xmalloc warning
2024-06-26 17:21:26 +02:00
Maria Matejka
b797444e94
Merge commit 'b95dc8f29f18eb177f91fdc4bf0716fac9b15366' into mq-config-ref
...
Also converted all _Bool's to bool.
2024-06-26 17:19:24 +02:00
Maria Matejka
7d455d64ca
Remove spinlock debug structures in production build
2024-06-26 11:30:41 +02:00
Maria Matejka
8e67cba528
Linpool: allocation split to fast and slow
2024-06-26 11:30:41 +02:00
Maria Matejka
6f981969bb
RCU read lock optimization
2024-06-26 11:29:43 +02:00
Maria Matejka
0b6e752bd9
Conflating multiple partial ROA reload requests together
2024-06-26 11:29:43 +02:00
Maria Matejka
bd44a13ce5
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.
2024-06-26 11:29:12 +02:00
Maria Matejka
83045e9a1f
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.
2024-06-14 23:16:07 +02:00
Maria Matejka
61dcbb1d83
Global runtime values separated from config
2024-06-14 23:16:07 +02:00
Maria Matejka
f5fd70c54a
Callback: bundling event with its target
2024-06-14 23:16:07 +02:00
Maria Matejka
3ed192edc3
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.
2024-06-12 18:07:40 +02:00
Maria Matejka
bd05dd7304
Netindex cleanup calls synchronize_rcu() by batches
2024-06-12 14:48:33 +02:00
Maria Matejka
76a1998ff5
Netindex rehash debug
2024-06-12 14:48:33 +02:00
Maria Matejka
951d0422fa
Attributes: fix collision on free-lookup
...
Freeing the eattrs is tricky as somebody else may find them
via RTA-unlocked lookup inbetween.
2024-06-12 14:48:33 +02:00
Maria Matejka
d8c0faaec9
Netindex cleanup now doesn't need to unlock to synchronize RCU
2024-06-12 14:48:33 +02:00
Maria Matejka
a146abc8fd
Revert (partial) "Route attributes now use the common lockfree usecount"
...
This partially reverts commit d617801c31
.
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.
2024-06-12 14:48:33 +02:00
Maria Matejka
47e493f228
Dropped net_resolve_index from feeder fast path
2024-06-12 14:48:33 +02:00
Maria Matejka
661193cf98
Thread IO: a little bit faster RX repeat
2024-06-12 14:48:33 +02:00
Maria Matejka
f516d7cfe9
Netindex: fix absurd hash parameters
2024-06-12 14:48:33 +02:00
Maria Matejka
fece55b810
Netindex: converted to spinlocked hash
2024-06-12 14:48:33 +02:00
Maria Matejka
1032bf2543
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.
2024-06-12 14:48:33 +02:00
Maria Matejka
d4733b28d9
Dropping netindex fragile manipulation
...
Now the netindex doesn't expose its internals and can be converted
to the spinlocked implementation much easier.
2024-06-12 09:23:50 +02:00
Maria Matejka
499d5e6fb3
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.
2024-06-12 09:23:50 +02:00
Maria Matejka
602595fe10
Attributes: cleanup
...
Dropping EAF_TYPE__MAX and adding a check for forgotten
ea class registration
2024-06-12 09:23:50 +02:00
Maria Matejka
0fb9177374
Loop scheduler tracing options configurable
2024-06-12 09:23:50 +02:00
Maria Matejka
9e88fc5b6b
Netindex: allow u32 -> netindex without locking
2024-06-12 09:23:50 +02:00
Maria Matejka
7c59ef3faa
RCU Unwinder can now retry without yielding
2024-06-12 09:23:50 +02:00
Maria Matejka
4104d668d9
Read-write spinlocks
2024-06-12 09:23:50 +02:00
Maria Matejka
8f4a784e14
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.
2024-06-05 17:47:32 +02:00
Maria Matejka
d617801c31
Route attributes now use the common lockfree usecount
...
Also route attributes are not freed immediately anymore.
2024-06-04 22:20:18 +02:00
Maria Matejka
98fee17456
Hash: dropped relics of hash iterators
2024-06-04 22:20:18 +02:00
Maria Matejka
b033561045
Route attribute hash replaced with the generic one
2024-06-04 22:20:18 +02:00
Maria Matejka
5d6c4ff35a
BGP: Freeing prefixes deferred to save rcu synchronization
2024-06-04 22:20:18 +02:00
Maria Matejka
d4ea561917
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.
2024-06-04 10:11:36 +02:00