0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-09 20:58:44 +00:00
Commit Graph

1061 Commits

Author SHA1 Message Date
Maria Matejka
4104d668d9 Read-write spinlocks 2024-06-12 09:23:50 +02:00
Maria Matejka
6ffab25f01 IO loop: fixed unassigned count 2024-06-04 22:20:18 +02:00
Maria Matejka
423eaf3438 Softened warning about too much time spent in loop
Now the warning needs at least 10 ms after the scheduled end time
to ever complain.

TODO: make this configurable
2024-06-04 22:20:18 +02:00
Maria Matejka
2705c385c0 Never allow more than 300 ms per loop 2024-06-04 10:11:36 +02:00
Maria Matejka
dc416d2de3 RCU: Rewritten to be more straightforward 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
b5f803ce4a Simplified temporary resources
Also TMP_SAVED now uses the CLEANUP hook to allow for breaks and returns
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
29cd2c0170 Refactored the deferring framework into a separate structure 2024-05-22 11:34:34 +02:00
Maria Matejka
2b38a833cd 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-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
a716e7ea79 Kernel: replaced synchronous prune by a refeed 2024-05-22 11:34:34 +02:00
Maria Matejka
46164395b2 Fixed all implicit seq_cst warnings caused by the previous commit 2024-05-22 11:34:34 +02:00
Maria Matejka
6a13c02d3b 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-05-22 11:34:34 +02:00
Maria Matejka
0046594237 Missing definition of RTAX_FASTOPEN_NO_COOKIE shouldn't kill the whole build 2024-05-19 12:47:38 +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
4b9d12708e Loop run waits until pingers finish
This ensures that if somebody passes an event to a loop which
has just started executing, then the event gets picked up. Otherwise
there is a race condition causing stray events pending in queue
but without the ping (because the run actually finishes too fast
to pickup the later events).
2024-05-18 15:50:03 +02:00
Maria Matejka
67f6ac1628 IO Loop: provide information about current loop and task time limit 2024-05-18 15:48:03 +02:00
Maria Matejka
b1b3c7aac2 Allowing to send events to the metaloop's priority list 2024-05-18 15:48:03 +02:00
Maria Matejka
418578bc6b IO loop: fixed local hot page cache flushing condition 2024-05-18 15:48:03 +02:00
Ondrej Zajicek
d556788282 Merge commit '5c04f0e2354ff0cca9b1479e68882b72755f3aab' into thread-next
(No need for deprecated names in BIRD 3.)
2024-03-28 20:00:50 +01:00
Ondrej Zajicek
4036da3732 Nest: Fix bitfield attributes
Fix missing route lookup, causing crash when accessing route attribute.

Also fix additional space in bitfield formatting.
2024-03-28 19:46:24 +01:00
Ondrej Zajicek
f47ca71d77 Merge commit 'e68363909cb9733c1bf55fff80a8b034e4111849' into thread-next 2024-03-28 19:16:44 +01:00
Ondrej Zajicek
d548665de8 Merge commit '225943eaea3cdd634dce8fd84547baf1bc363640' into thread-next 2024-03-28 17:46:04 +01:00
Ondrej Zajicek
5c04f0e235 Netlink: Fix spelling of krt_ssthresh / krt_lock_ssthresh
BIRD route attribute for RTAX_SSTHRESH metric was krt_sstresh instead of
krt_ssthresh. Fix that and keep old name as an depreacted alias.
2024-02-16 15:00:03 +01:00
Ondrej Zajicek
e68363909c Netlink: Cleanups in route metrics
- Add krt_fastopen_no_cookie atttibute
- Add missing krt_lock_* bits
- Fix krt_feature_allfrag
- Fix type of EA_KRT_LOCK and EA_KRT_FEATURES
2024-02-16 15:00:03 +01:00
Ondrej Zajicek
225943eaea Filter: Add support for setting TCP congestion control algorithm
Allow to set TCP congestion control algorithm using krt_congctl
route attribute.

Based on patch from Trisha Biswas <tbiswas@fastly.com>, thanks!
2024-02-14 14:29:19 +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
7045a715cf Merge commit 'v2.13.1-189-g105e50f6' into thread-next 2024-01-28 14:42:36 +01:00
Maria Matejka
a28264adc5 Merge commit 'v2.13.1-168-g5e9cf0ab' into thread-next 2024-01-28 13:40:23 +01:00
Ondrej Zajicek
f40e2bc270 Nest: Fix bug in recursive routes with MPLS-labeled nexthops
When a recursive route with MPLS-labeled nexthop was exported to kernel
and read back, the nexthop_same() failed due to different labels_orig
field and kernel protocol reinstalled it unnecessarily.

For comparing hext hops, route cache has to distinguish ones with
different labels_orig, but KRT has to ignore that, so we need two
nexthop compare functions.

Thanks to Marcel Menzel for the bugreport.
2024-01-27 17:38:06 +01:00
Maria Matejka
8fb1f098d1 Fixes for CLang 2024-01-26 14:50:56 +01:00
Maria Matejka
2379ed40be Linux: Not binding the default-vrf socket to the (nonexistent) vrf device 2024-01-26 14:42:55 +01:00
Maria Matejka
548dbb2252 Replacing table FIB by netindex and simple pointer block
Using the netindex data structure to simplify route storage inside route
tables. This should also help with future unlocking of route import.
2024-01-08 09:34:32 +01:00
Maria Matejka
6c4be8d1d3 Kernel: Before first scan, reject exported routes immediately in preexport 2024-01-08 09:23:35 +01:00
Ondrej Zajicek
2c7555cf2a Log: Add support for UDP logging
Add support for UDP logging, using RFC 3164 syslog protocol.

Based on the patch from Alexander Zubkov <green@qrator.net>, thanks!
2023-12-13 04:01:09 +01:00
Maria Matejka
5a916ed53f Locking: Dropping DEFINE_DOMAIN ugly macro 2023-12-04 10:39:32 +01:00
Maria Matejka
c7cc1ccd2e Merge branch 'mq-aggregator-for-v3' into thread-next 2023-11-09 15:50:13 +01:00
Maria Matejka
30712a2bdf Merge branch 'mq-aggregator-for-v3' into thread-next 2023-11-08 21:51:46 +01:00
Maria Matejka
28bb5694f8 Merge remote-tracking branch 'origin/partial-reload' into thread-next 2023-11-08 17:37:42 +01:00
Katerina Kubecova
f992e7e1fe krt.c: fixup lots of routes learn & unlearn 2023-11-06 09:38:13 +01:00
Maria Matejka
c6fba7d7e6 Merge branch 'thread-next' into HEAD 2023-11-02 14:43:15 +01:00
Katerina Kubecova
9680bf68e4 Automatic ROA reloads on channel import
This includes updating OSPF, Pipe and RIP to enable partial route reload
directly from the protocols' internal tables.
2023-11-02 14:37:27 +01:00
Maria Matejka
6f1485baf9 Debug file fix
It got mistakenly closed while applying the log configuration.
2023-11-01 18:25:15 +01:00
Maria Matejka
796f0af0cc Fixes to root pool and meta loop to allow resource dumps 2023-11-01 18:23:43 +01:00
Maria Matejka
ddf698ec99 Renamed nest/rt.h back to nest/route.h
Some [redacted] (yes, myself) had a really bad idea
to rename nest/route.h to nest/rt.h while refactoring
some data structures out of it.

This led to unnecessarily complex problems with
merging updates from v2. Reverting this change
to make my life a bit easier.

At least it needed only one find-sed command:

    find -name '*.[chlY]' -type f -exec sed -i 's#nest/rt.h#nest/route.h#' '{}' +
2023-10-29 16:29:26 +01:00
Maria Matejka
1a49a4aea8 Merge commit 'fc9d471b' into thread-next
Conflicts:
	conf/cf-lex.l
	conf/conf.h
	filter/config.Y
	filter/data.c
	filter/data.h
2023-10-28 23:42:21 +02:00
Maria Matejka
0ba22509a8 Merge commit '51f2e7af' into thread-next
Conflicts:
	conf/cf-lex.l
	conf/conf.h
	conf/confbase.Y
	filter/config.Y
	nest/config.Y
	nest/proto.c
	nest/rt-table.c
	proto/bgp/bgp.c
	sysdep/unix/main.c
2023-10-27 18:29:31 +02:00
Maria Matejka
e6baff89f8 Merge commit '5951dfbd' into thread-next 2023-10-27 18:06:34 +02:00