Maria Matejka
74800729c0
Proto: The active flag converted to actual fifth protocol state
...
What was PS_DOWN before, is now PS_DOWN and PS_FLUSH.
2024-11-18 22:21:12 +01:00
Katerina Kubecova
7889f0c25b
Neighbor locking: forgotten neighbors to unlink are actually a bug.
...
These may cause runaway pointers.
2024-11-18 10:09:36 +01:00
Katerina Kubecova
ca5ed6997c
nest/cli: fixup - empty printing in birdc does not freeze
2024-11-15 10:04:51 +01:00
Katerina Kubecova
dc69284f61
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.
2024-11-14 11:41:37 +01:00
Maria Matejka
eb6918e4db
Neighbor cache: fixed neighbor referencing
2024-11-14 11:41:37 +01:00
Katerina Kubecova
b97d924e52
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.
2024-11-14 11:41:37 +01:00
Katerina Kubecova
330c71bd0a
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.
2024-11-09 09:55:40 +01:00
Maria Matejka
02de88de41
Table: tame warnings around unused debug messages
2024-10-11 12:23:52 +02:00
Maria Matejka
5ea6423cb9
Fixed secondary route export
2024-06-28 22:03:45 +02:00
Maria Matejka
c2480ff533
Export: Throw a warning instead of crashing on export_accepted_map inconsistency
2024-06-28 22:03:45 +02:00
Maria Matejka
6eea722d3f
Forbid locking altogether when RCU reader is active
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
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
16e53f3f30
channel roa reload debug message
2024-06-26 15:13:12 +02:00
Maria Matejka
3d45539455
ROA aggregator uses its own rte source instead of recycling
2024-06-26 11:29:43 +02:00
Maria Matejka
d23db54da0
ROA: Switching off digestor splitting
2024-06-26 11:29:43 +02:00
Maria Matejka
4998ca5554
Route attribute usecount doesn't need to synchronize on unlock
2024-06-26 11:29:43 +02:00
Maria Matejka
f9b46a1ba1
Refeed done hooks are called in the same order as the requests came in
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
282066ee29
Moved the cork thresholds massively up
...
This allows for more efficient import and export bundling, including
best route export and next hop resolution.
2024-06-26 11:29:12 +02:00
Maria Matejka
67875e76d9
Safer cleanup of table auxiliary routines
2024-06-19 12:36:55 +02:00
Maria Matejka
a1405a5bc7
Prefilter runs before generating feeds
2024-06-16 21:36:45 +02:00
Maria Matejka
d6233b4de0
Table cork now uses callbacks and direct flush to uncork
2024-06-15 23:31:44 +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
73ad0e2dcb
CLI: Show symbols, route and mpls explicitly passes the actual config to the show function
2024-06-14 23:16:07 +02:00
Maria Matejka
397eee5a00
Config: Removed obsolete force_restart option when commiting
2024-06-14 23:16:07 +02:00
Maria Matejka
ea996d8403
CLI keeps its active config pointer explicitly
2024-06-14 23:16:07 +02:00
Maria Matejka
4ac55615e4
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.
2024-06-12 22:40:17 +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
95d8329043
Table: fixed export_all flush when export_best is idle
2024-06-12 14:48:33 +02:00
Maria Matejka
0e42398304
Removed unnecessary recursion from rt_export_get()
2024-06-12 14:48:33 +02:00
Maria Matejka
9991fbbe0b
TMP: table best-all cleanup 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
4d01ca3e8f
Every table has its own netindex now
...
It's obnoxiously slow to walk over sparse tables.
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
8e240fc44f
Table best feed collision fix
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
ab1697d7a0
Next hop update is split by time, not by number of routes
2024-06-12 14:48:33 +02:00
Maria Matejka
0827797e6e
Table: pruning is deferred by task time, not by item count
2024-06-12 14:48:33 +02:00
Maria Matejka
464d483af4
Channel: postpone the export event when stopping
2024-06-12 14:48:33 +02:00
Maria Matejka
d7cf378003
Table: too fast export validity check replaced with just a retry
2024-06-12 14:48:33 +02:00
Maria Matejka
6d79433a44
Converted ea cache to spinhash
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
b15eb4b546
roa_check() uses the auxiliary table
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
45cd4bbe9c
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.
2024-06-12 09:23:50 +02:00
Maria Matejka
b548ffe197
Fixed non-exporting protocol reload crash
2024-06-12 09:23:50 +02:00
Maria Matejka
dbe246a4bd
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.
2024-06-12 09:23:50 +02:00