0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-10-18 09:58:43 +00:00
Commit Graph

1992 Commits

Author SHA1 Message Date
Maria Matejka
61dcbb1d83 Global runtime values separated from config 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
47e493f228 Dropped net_resolve_index from feeder fast path 2024-06-12 14:48:33 +02:00
Maria Matejka
f45c519039 BGP: splitting TX by time, not number of messages sent 2024-06-12 14:48:33 +02:00
Maria Matejka
d78448dd7c BGP: Dropping the netindex experiment, prefix hash is faster 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
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
Maria Matejka
b287c13f21 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-04 10:11:36 +02:00
Maria Matejka
7a169e46a8 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-04 10:11:36 +02:00
Maria Matejka
f8e3ea9402 BGP: Prefix table uses a pointer array instead of hash 2024-06-04 10:11:36 +02:00
Maria Matejka
abcdde1b38 BGP: Simpler hashing in export table
We need a hashing simple enough to allow for feeding by netindex.
2024-06-04 10:11:36 +02:00
Maria Matejka
d01a7c2bda 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.
2024-06-04 10:11:36 +02:00
Maria Matejka
73afffc464 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.
2024-06-04 10:11:36 +02:00
Maria Matejka
6f59a414b1 BGP: refactored pending TX back into channel 2024-06-04 10:11:36 +02:00
Maria Matejka
10bb1c1e9d 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-04 10:11:36 +02:00
Maria Matejka
ee7afdabc7 BGP: explicitly sending route refresh from CLI 2024-05-29 17:09:50 +02:00
Maria Matejka
492c416c0a Static: Fixed undefined nexthop padding problems 2024-05-25 19:37:26 +02:00
Maria Matejka
1d1338c4f5 RIP partial reload never worked properly, running full reload always 2024-05-25 19:37:16 +02:00
Maria Matejka
4581ecd8de 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.
2024-05-25 19:37:16 +02:00
Maria Matejka
030044b2f6 OSPF partial reload never worked properly, running full reload always 2024-05-25 19:37:16 +02:00
Maria Matejka
76ca53e4f8 SKIP_BACK_DECLARE: easier embedded-to-parent typecasting 2024-05-25 19:37:16 +02:00
Maria Matejka
091130e84b 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-05-25 19:37:16 +02:00
Maria Matejka
6fb467a54c RCU Unwinder refactored from route table to a separate structure 2024-05-22 11:34:34 +02:00
Maria Matejka
eaf187b57b Table feeds are now lockless
This commit makes the route chains in the tables atomic. This allows not
only standard exports but also feeds and bulk exports to be processed
without ever locking the table.

Design note: the overall data structures are quite brittle. We're using
RCU read-locks to keep track about readers, and we're indicating ongoing
work on the data structures by prepending a REF_OBSOLETE sentinel node
to make every reader go waiting.

All the operations are intended to stay inside nest/rt-table.c and it
may be even best to further refactor the code to hide the routing table
internal structure inside there. Nobody shall definitely write any
routines manipulating live routes in tables from outside.
2024-05-22 11:34:34 +02:00
Maria Matejka
83a409abd2 Cached route attributes now have explicitly marked layers
Also the rta_* functions renamed to ea_* functions
2024-05-22 11:34:34 +02:00
Maria Matejka
a6ef8cd492 Route table export journal converted to the generic structure 2024-05-22 11:34:34 +02:00
Maria Matejka
10f41cda87 Refactoring of struct rt_pending_export
Now it stores const rte * instead of struct rte_storage * to allow for
different storage backends.
2024-05-22 11:34:33 +02:00
Maria Matejka
fe3d7c1a17 Merge a branch of fixes and updates needed for stabilization of v3.
Merge commit 'c06ce709' into HEAD
2024-05-19 11:28:03 +02:00
Maria Matejka
2900a608f0 L3VPN: Setting the bgp_ext_community flags properly 2024-05-19 11:27:18 +02:00
Maria Matejka
c06ce7090f Static: Unlock IGP tables on cleanup to avoid problems with hostentry unlocking 2024-05-18 15:50:03 +02:00
Maria Matejka
c3698535e3 BGP: Fixed corking of RX
If cork occurred after some incoming data had been already processed,
BGP incorrectly processed them again after uncorking because it forgot
to store the actual socket state.

Now storing the socket state (done at the end of bgp_rx()) and
therefore the bug is fixed.
2024-05-18 15:48:03 +02:00
Maria Matejka
ef16f07633 Fixed annoying undefined values with nexthops 2024-05-18 15:46:53 +02:00
Ondrej Zajicek
5d5c431a3c Merge commit '0b684a43bd7ce4a32c9cd7754b88286bcd1815bb' into thread-next 2024-04-01 18:24:10 +02:00
Ondrej Zajicek
477b3e5c98 Merge commit '66d6ac70856bdb29840983454373bb10a532e4f7' into thread-next 2024-04-01 18:21:37 +02:00
Ondrej Zajicek
0883ce66bf Merge commit '1b064355f752b9bfe4644f775697bbd9b711f762' into thread-next 2024-04-01 18:20:18 +02:00
Ondrej Zajicek
f27d1bae0f Merge commit '26dd61ee7f91c15157601b2404de5b6500a6061c' into thread-next 2024-04-01 03:01:59 +02:00
Ondrej Zajicek
a0ec075de3 Merge commit '2d0652dd1088395c50df8fe1a99f1111b44688c6' into thread-next 2024-04-01 03:00:10 +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
0bcc7a9316 Merge commit '44a16bff6cbf3f5ae8db21ffcec602bc51295d0a' into thread-next 2024-03-28 20:03:46 +01:00
Ondrej Zajicek
62c9f12dfc Merge commit '574d7eb241a60622b0573ab1460cb23d968ba1cc' into thread-next 2024-03-28 15:00:40 +01:00
Ondrej Zajicek
d2a531a92b L3VPN: Fix missing rte_owner_class registration 2024-03-28 00:55:19 +01:00
Ondrej Zajicek
a698f8d917 Static: Fix invalid combination of nexthop options
BFD requires defined local IP, but for nexthop with onlink there might
not be such address. So we reject this combination of nexthop options.
This prevent crash where such combination of options is used.
2024-03-22 00:40:06 +01:00
Ondrej Zajicek
d21a508e8d Revert "OSPF: On physical PtP links, skip next-hop resolving"
This reverts commit 31aa62ae6d.
2024-03-21 15:59:26 +01:00
Ondrej Zajicek
46a4932574 Merge commit '44e351d1522f0099687aac9fd65dcea73a04af43' 2024-03-21 15:58:52 +01:00
Ondrej Zajicek
66d6ac7085 Babel: Fix build with limited set of protocols 2024-03-19 15:39:46 +01:00
Ondrej Zajicek
06209c1917 Aggregator: Fix build with limited set of protocols 2024-03-19 15:39:19 +01:00
Michal Zagorski
099898ffdd Static: Fix build with limited set of protocols 2024-03-11 12:57:13 +01:00
Ondrej Zajicek
1b064355f7 Client: Add support for completion of command options
We can easily extend command completion to handle also keywords for
command options. Help for command options is not yet supported.
2024-03-05 19:04:10 +01:00
Ondrej Zajicek
26dd61ee7f BFD: Add arguments to 'show bfd sessions' command
Add several arguments to 'show bfd sessions' command to filter
the list of sessions.
2024-03-05 00:02:16 +01:00