0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00
Commit Graph

650 Commits

Author SHA1 Message Date
Katerina Kubecova
e87080fd08 mrt: mrt looks working both period and from cli
mrt: mrt looks working both period and from cli

fixup

fixup
2024-06-24 13:42:27 +02:00
Katerina Kubecova
e0fd481b98 mrt.c: period mrt logging works (but routes in v3 seem to have less attributes)
mrt: mrt looks working

mrt: mrt looks working

mrt: mrt looks workingfrom both period and cli

mrt: mrt looks workingfrom both period and from cli

mrt: mrt looks workingfrom both period and from cli
2024-06-24 09:42:03 +02:00
Katerina Kubecova
b3e13eddb9 proto.c: show protocol uses only proto id and attr table 2024-06-24 09:42:03 +02:00
Maria Matejka
4e60865a4d Route attributes now use the common lockfree usecount
Also route attributes are not freed immediately anymore.
2024-06-24 09:42:03 +02:00
Maria Matejka
fc1ea9119f Hash: dropped relics of hash iterators 2024-06-24 09:42:03 +02:00
Maria Matejka
a04f5c7524 Route attribute hash replaced with the generic one 2024-06-24 09:42:03 +02:00
Maria Matejka
487b21b491 BGP: Freeing prefixes deferred to save rcu synchronization 2024-06-24 09:42:03 +02:00
Maria Matejka
2fedf99924 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-24 09:42:03 +02:00
Maria Matejka
e994aa93c7 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.
2024-06-24 09:42:03 +02:00
Maria Matejka
36aa64fe1c 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.
2024-06-24 09:42:03 +02:00
Maria Matejka
1e7fb948a8 RCU: Rewritten to be more straightforward 2024-06-24 09:42:03 +02:00
Maria Matejka
78a7d16c9d Unit test for RCU 2024-06-24 09:42:03 +02:00
Maria Matejka
178ae9ba9e Netindex: consistency checks and deletion of whole hash 2024-06-24 09:42:03 +02:00
Maria Matejka
1371661156 If debugging, store a malloc circular log for easier debugging 2024-06-24 09:42:03 +02:00
Maria Matejka
7ef2a042bc Slab: can be deleted as a single object 2024-06-24 09:42:03 +02:00
Maria Matejka
5cbebfc940 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.
2024-06-24 09:42:03 +02:00
Maria Matejka
b6e70f5ecf Netindex: fixed resolving net by index 2024-06-24 09:42:03 +02:00
Maria Matejka
89c92abb7a Simplified temporary resources
Also TMP_SAVED now uses the CLEANUP hook to allow for breaks and returns
2024-06-24 09:42:03 +02:00
Maria Matejka
39f69064ec SKIP_BACK_DECLARE: easier embedded-to-parent typecasting 2024-06-24 09:42:03 +02:00
Maria Matejka
66e98f69f8 Lockless feed of a single net 2024-06-24 09:42:03 +02:00
Maria Matejka
21c1df625a Using ea_lookup_tmp() for temporarily keeping attribute references
To avoid needs for keeping local temporary references for attributes,
now one can use ea_lookup_tmp() to ensure that the attributes are
valid and stored until the task ends. After that, the attributes are
automatically unref'd and also deallocated if needed.
2024-06-24 09:42:03 +02:00
Maria Matejka
bff3b7eb2c Refactored the deferring framework into a separate structure 2024-06-24 09:42:03 +02:00
Maria Matejka
e39a76d6f6 Avoiding RCU synchronization deadlock when locking in critical section
Explicitly marking domains eligible for RCU synchronization. It's then
forbidden to lock these domains in RCU critical section to avoid
possible deadlock.
2024-06-24 09:42:03 +02:00
Maria Matejka
2ca9e6fdeb RCU Unwinder refactored from route table to a separate structure 2024-06-24 09:42:03 +02:00
Maria Matejka
c872b8f826 Cached route attributes now have explicitly marked layers
Also the rta_* functions renamed to ea_* functions
2024-06-24 09:42:03 +02:00
Maria Matejka
ba3b8607fb Netindex: Dropping tmp handle mechanism in favor of deferred lfuc_unlock 2024-06-24 09:42:03 +02:00
Maria Matejka
a66be7641e Fixed all implicit seq_cst warnings caused by the previous commit 2024-06-24 09:42:03 +02:00
Maria Matejka
35ff820a3b Route flag REF_OBSOLETE
Marking routes obsolete when being removed from table, just to be sure.
2024-06-24 09:42:03 +02:00
Maria Matejka
929df85f1e Removed the obsolete birdloop flagger
This was useful when events were locking. As now sending events is lockless,
we can drop this obsolete routine for good.
2024-06-24 09:42:03 +02:00
Maria Matejka
a3b125e223 Lockfree usecount: deferring unlocks to the metaloop
This allows us for easy temporary locks without additional burden of explicit cleanup.
2024-06-24 09:42:03 +02:00
Maria Matejka
3787c0f7a5 Lock free journal refactored into a separate data structure 2024-06-24 09:42:03 +02:00
Maria Matejka
d1103b8e77 IO Loop: provide information about current loop and task time limit 2024-06-24 09:42:03 +02:00
Maria Matejka
3549a98578 Allowing to send events to the metaloop's priority list 2024-06-24 09:42:03 +02:00
Maria Matejka
f5a93eef7d Net: explicit generic-to-specific typecast with checking 2024-06-24 09:42:03 +02:00
Maria Matejka
4874a30422 Bitops: bitflip function
to flip order of bits in 32b numbers
2024-06-24 09:42:03 +02:00
Maria Matejka
ff35d2b4f8 Locking: forcefully unwinding locks to a previously stored state 2024-06-24 09:42:03 +02:00
Maria Matejka
6af2a7e606 Typed list: macro for list length 2024-06-24 09:42:03 +02:00
Maria Matejka
24d2259dc8 Typed lists: enabled defining the list structure independently on the node 2024-06-24 09:42:03 +02:00
Maria Matejka
247d4b538d Event: fixed race condition between ev_send and ev_postpone 2024-06-24 09:42:03 +02:00
Maria Matejka
3b50b11e9a lib/printf_test.c: test on strcmp fixed
we mistakenly required the return value to be only -1, 0 or 1
2024-06-24 09:42:03 +02:00
Ondrej Zajicek
294b9763ce Merge commit '114be2af28e5c124bd479a487f89244ba99c272d' into thread-next 2024-04-01 03:15:33 +02:00
Ondrej Zajicek
07757b8a0c Filter: Initialize route attribute flags properly
Move 'flags' field back to ea_class, so filtering code can use it to
initialize route attribute flags when set by filters.
2024-04-01 02:53:25 +02:00
Ondrej Zajicek
1beafe3eea Fix merge commit c195c7a0d5 2024-03-28 17:55:43 +01:00
Ondrej Zajicek
62c9f12dfc Merge commit '574d7eb241a60622b0573ab1460cb23d968ba1cc' into thread-next 2024-03-28 15:00:40 +01:00
Ondrej Zajicek
114be2af28 Filter: Add route attribute gw_mpls_stack
Add route attribute gw_mpls_stack to make MPLS stack of route nexthop
accessible from filters. Its type is T_CLIST, which is really not correct
(as it is a list, while T_CLIST is a set). Therefore, we keep this
attribute *undocumented* and it will be *changed* without further notice.

Based on a patch from Trisha Biswas <tbiswas@fastly.com>, thanks!
2024-03-05 16:47:08 +01:00
Alexander Zubkov
574d7eb241 BGP: Allow multiple EBGP neighbors with the same peer.
We can distinguish BGP sessions if at least one side uses a different IP
address. Extend olock mechanism to handle local IP as a part of key, with
optional wildcard, so BGP sessions could local IP in the olock and not
block themselves.
2024-02-07 19:11:10 +01:00
Maria Matejka
058984bc86 BGP: fixed MPLS setting in nexthops
bug introduced somewhere during conversion of nexthops to eattrs
2024-01-29 22:12:38 +01:00
Maria Matejka
cd81b6d7cd Merge commit '2c7555cf2ac8439713dd9148b348128c57222a38' into thread-next
The UDP logging had to be substantially rewritten due to a different
logging backend and reconfiguration mechanisms.

Conflicts:
	doc/bird.sgml
	sysdep/unix/config.Y
	sysdep/unix/io.c
	sysdep/unix/log.c
	sysdep/unix/unix.h
2024-01-28 23:01:39 +01:00
Maria Matejka
86ba37d8f1 Logging: uses writev instead of in-buffer magic 2024-01-28 21:42:39 +01:00
Maria Matejka
8fe58b9f8d Merge commit 'v2.13.1-192-gb8312130' into thread-next 2024-01-28 14:43:05 +01:00