1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00
Commit Graph

4963 Commits

Author SHA1 Message Date
Maria Matejka
e10b15d395 TMP 2024-05-10 16:32:53 +02:00
Maria Matejka
78d95885ee TMP 2024-05-10 16:32:53 +02:00
Maria Matejka
8cc35a71ea TMP
TMP: rt_journal stub

going for rt_journal_reader

partial commit

TMP

TMP

TMP

TMP

TMP

TMP

TMP

API clients updated, now for the rt-table itself, woohoo

TMP

TMP
2024-05-10 16:32:53 +02:00
Maria Matejka
292e72052d RIP partial reload never worked properly, running full reload always 2024-05-10 16:32:08 +02:00
Maria Matejka
4a44445b66 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-10 16:22:16 +02:00
Maria Matejka
a44ac354dc OSPF partial reload never worked properly, running full reload always 2024-05-10 16:14:54 +02:00
Maria Matejka
6e4eae7248 Simplified temporary resources
Also TMP_SAVED now uses the CLEANUP hook to allow for breaks and returns
2024-05-08 18:55:01 +02:00
Maria Matejka
41fe5e659e Refactoring BGP export to use a common rt_exporter structure
Introducing a new omnipotent internal API to just pass route updates
from whatever point wherever we want. In the next commit, we aim to
convert the main routing tables to this API, while also implementing the
rest of it (like feeding).

For now, it's just refactoring of this code and structures out of BGP.
2024-05-06 23:13:26 +02:00
Maria Matejka
0fff47aeea SKIP_BACK_DECLARE: easier embedded-to-parent typecasting 2024-05-06 23:13:26 +02:00
Maria Matejka
5b713566b8 Lockless feed of a single net 2024-05-06 23:13:26 +02:00
Maria Matejka
7fd70908e5 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-04-23 18:51:05 +02:00
Maria Matejka
21c7debff8 Refactored the deferring framework into a separate structure 2024-04-23 18:51:05 +02:00
Maria Matejka
83992ccb99 Fixed flush condition when stale cycle valid/set indicators wrap around 2024-04-22 19:27:57 +02:00
Maria Matejka
84ab4cb35b 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-04-20 18:15:15 +02:00
Maria Matejka
2e67bfbced Fixed in-table route refresh counter to not randomly add 256 2024-04-20 18:15:15 +02:00
Maria Matejka
2b4c82f991 Fixed hostcache notifier pool
This pool has to be the service pool to allow the seq bitmaps to grow
from the exporter and feeder routines
2024-04-20 18:15:15 +02:00
Maria Matejka
9c351a80f3 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-04-20 18:15:15 +02:00
Maria Matejka
1a4fbb137a Fixed announcement inconsistency between feeds and regular exports 2024-04-20 18:11:49 +02:00
Maria Matejka
14ce3fb8d5 Kernel: replaced synchronous prune by a refeed 2024-04-20 18:11:49 +02:00
Maria Matejka
0e6aec7ac3 Fixed best route announcements after NHU
When more routes in one net changed at once, the best route
announcements were inconsistent which confused exporters.
2024-04-10 17:18:11 +02:00
Maria Matejka
9c0181f129 Fixed reporting about exported routes 2024-04-10 17:18:11 +02:00
Maria Matejka
16c87d402e Lockless hostentry resolution
Now the hostentry doesn't need to lock table, instead it tracks the
hostentry version and retries if the hostentry changed while updating.
2024-04-10 17:18:11 +02:00
Maria Matejka
d42d5619cb Fixed annoying undefined values with nexthops 2024-04-10 17:18:11 +02:00
Maria Matejka
e9a26f8409 Cached route attributes now have explicitly marked layers
Also the rta_* functions renamed to ea_* functions
2024-04-10 17:18:11 +02:00
Maria Matejka
91ba29a5c5 IO Loop: provide information about current loop and task time limit 2024-04-10 17:18:11 +02:00
Maria Matejka
6aa76dfb01 Locking: forcefully unwinding locks to a previously stored state 2024-04-10 17:18:11 +02:00
Maria Matejka
cb476883be Netindex: Dropping tmp handle mechanism in favor of deferred lfuc_unlock 2024-04-10 17:18:11 +02:00
Maria Matejka
a8d7bbc874 Fixed all implicit seq_cst warnings caused by the previous commit 2024-04-10 17:18:11 +02:00
Maria Matejka
3fb9d72348 Enabling warnings for implicit seq_cst in atomic access 2024-04-10 17:18:11 +02:00
Maria Matejka
83a0bfd876 IO loop: fixed local hot page cache flushing condition 2024-04-10 17:18:11 +02:00
Maria Matejka
9fe98dd167 New BGP export table
This table uses lfjour to signalize changes both to TX packet generator
and to possibly external readers; to be enabled in following commits.

Prefix structures are now pointing to the tables' netindex
instead of copying net_addr. With proper referencing of netindex,
this allows us to allocate struct bgp_prefix from a slab.

Also export buckets now don't copy route attributes locally,
they use global attribute cache instead. This allows also export
buckets to have fixed length and therefore get allocated from a slab.

Finally, merged bgp_pending_tx back to bgp_channel. The split looked
like a good idea then. It isn't, the pending TX is an integral part of
BGP channel with no real reason for splitting.
2024-04-10 17:18:11 +02:00
Maria Matejka
60ddaa0a62 Protocol filter reload is now done by 'reload filters'
This prepares for the separate 'reload bgp' command triggering BGP Route Refresh
2024-04-06 18:28:43 +02:00
Maria Matejka
a0a592e673 Doc: short migration info for BIRD 2 -> 3 2024-04-06 18:28:43 +02:00
Maria Matejka
bb35c4f9dc Route flag REF_OBSOLETE
Marking routes obsolete when being removed from table, just to be sure.
2024-04-06 18:28:43 +02:00
Maria Matejka
b6853989ac Bitops: bitflip function
to flip order of bits in 32b numbers
2024-04-06 18:28:43 +02:00
Maria Matejka
27f2fd4aa9 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-04-06 18:28:43 +02:00
Maria Matejka
8527bb6bf3 Simplified table deletion (one less step) 2024-04-06 18:28:43 +02:00
Maria Matejka
cacf743dcb Hostentry usecount converted to lfuc 2024-04-06 18:28:43 +02:00
Maria Matejka
622d406087 Lockfree usecount: deferring unlocks to the metaloop
This allows us for easy temporary locks without additional burden of explicit cleanup.
2024-04-06 18:28:43 +02:00
Maria Matejka
422ecddaae Allowing to send events to the metaloop's priority list 2024-04-06 18:28:43 +02:00
Maria Matejka
b114aa0073 Static: Unlock IGP tables on cleanup to avoid problems with hostentry unlocking 2024-04-06 18:28:43 +02:00
Maria Matejka
233004988b Net: explicit generic-to-specific typecast with checking 2024-04-06 18:28:43 +02:00
Maria Matejka
0dd6ec566d Route table export journal converted to the generic structure 2024-04-06 18:28:43 +02:00
Maria Matejka
a5eb8e0f9f Lock free journal refactored into a separate data structure 2024-04-06 18:28:43 +02:00
Maria Matejka
d020cc7e26 Event: fixed race condition between ev_send and ev_postpone 2024-04-06 18:28:43 +02:00
Maria Matejka
d1c337f235 Replacing the NHU table loop flag with a proper event 2024-04-06 18:28:43 +02:00
Maria Matejka
6bc1490f30 Undefined behavior fix 2024-04-03 13:58:41 +02:00
Maria Matejka
84c8f24241 CLang compilation fix 2024-04-03 13:58:41 +02:00
Maria Matejka
ec5d9d49ab Flowspec links don't peruse the all-hooks list for lookup 2024-04-03 13:58:41 +02:00
Maria Matejka
76e43b405f Typed list: macro for list length 2024-04-03 13:58:41 +02:00