0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-03-11 17:08:46 +00:00

5372 Commits

Author SHA1 Message Date
Maria Matejka
39bf446319 Lib: CBOR message streams and channels 2025-02-23 19:01:48 +01:00
Maria Matejka
556c257a63 Lib: mostly rewritten CBOR encoder 2025-02-23 19:01:48 +01:00
Maria Matejka
f32136499a Lib: added a generic CBOR parser framework 2025-02-23 19:01:48 +01:00
Maria Matejka
f01b9c70bf Lib: added tmp_v?sprintf and tmp_strdup allocating from tmp_linpool 2025-02-23 19:01:48 +01:00
Maria Matejka
1da9f57bfc Birdloop pipe is set O_CLOEXEC.
If we decide to exec something, we shouldn't pass along our intenal fds.
2025-02-23 19:01:48 +01:00
Maria Matejka
e368ace237 Debug: Do not compile allocator debug journals in unless requested.
These journals can become very memory-heavy when it comes to
constrained environments where every 100k of RAM matters.
2025-02-23 19:01:48 +01:00
Maria Matejka
65df01ffb8 Minimalist mainloop implementation 2025-02-23 19:01:48 +01:00
Maria Matejka
ed63bc9ad4 Properly handling situations when birdloops are created before spawning threads 2025-02-23 19:01:48 +01:00
Maria Matejka
ca8c3300b7 Allocator parameters can be configured now. 2025-02-23 19:01:47 +01:00
Maria Matejka
a1a94b686e Socket: pausing and restoring RX is a little bit more checked 2025-02-23 18:55:57 +01:00
Maria Matejka
c0aee2698b Socket: error hook is called from a function 2025-02-23 18:55:57 +01:00
Katerina Kubecova
3f4ee4b09d Porting the CBOR encoder from the YANG branch
Minor cleanups by commiter.

(source commit 43ff10204b1d9b76f6d5afc5252fb09480d5ffc5 but expected
to be rebased later, don't worry if you fail to find it)
2025-02-23 18:55:56 +01:00
Maria Matejka
6e48389a64 Added mb_strdup() to complement other similar functions 2025-02-23 18:45:42 +01:00
Maria Matejka
5cd52668c8 Moved sk_open_unix() to common lib 2025-02-23 18:45:39 +01:00
Maria Matejka
a972a3f0cc lib/socket.h: added missing include 2025-02-23 18:32:12 +01:00
Maria Matejka
49c9746702 lib/obstacle.h: added missing include 2025-02-23 18:32:12 +01:00
Maria Matejka
792dc08070 Splitting out BIRD static library for linking to other tools 2025-02-23 18:32:12 +01:00
Maria Matejka
ce40615816 Thread config has an explicit structure 2025-02-23 18:31:45 +01:00
Maria Matejka
08acdc9364 Enabled LTO for LLVM and making use of jobserver for LTO in GCC 2025-02-23 18:28:45 +01:00
Maria Matejka
146dce5cd4 Compiler vendor detection for autotools 2025-02-23 18:28:45 +01:00
Maria Matejka
3d249ca595 Kernel preferred interface address updater decoupled from the lib 2025-02-23 18:28:45 +01:00
Maria Matejka
a6e5c12933 Moved hostname resolver to logger 2025-02-23 18:28:45 +01:00
Maria Matejka
7ff111e97b Displaced show threads command to its own file 2025-02-23 18:28:44 +01:00
Maria Matejka
c322c7c475 Interface CLI commands moved to a separate file.
This is a preparation both for CLI splitup and for lib splitup.
2025-02-23 18:21:27 +01:00
Maria Matejka
a9852d0968 Disabling the old IO event logger as it doesn't run from worker loops anyway 2025-02-23 18:21:25 +01:00
Maria Matejka
2132907881 Shutdown marker displaced to runtime 2025-02-23 18:17:45 +01:00
Maria Matejka
c4651893c4 Splitting out clock and tracked files from sysdep/unix/io.c 2025-02-23 18:17:44 +01:00
Maria Matejka
e7d749a6e8 Global runtime splitout to BIRD specific and lib things 2025-02-23 18:03:16 +01:00
Maria Matejka
3eb2ef7744 Moved stored_sock to io-loop.c (old hack for mainloop) 2025-02-23 10:14:41 +01:00
Maria Matejka
51549da0bb Calling cf_warn from log_switch makes no sense 2025-02-23 10:14:41 +01:00
Maria Matejka
08f4e2a04c Displaced bird_name to log.c where it rightfully belongs 2025-02-23 10:14:41 +01:00
Maria Matejka
c6653df9ae Sysdep: moved socket code into a separate file 2025-02-23 10:14:39 +01:00
Maria Matejka
8f64df1af1 Moved flowspec configuration checks to the config file
Functions flow_check_cf_bmk_values, flow_check_cf_value_length,
flow4_validate_cf and flow6_validate_cf are now not built with lib but
with conf to enable for better semantic separation.
2025-02-23 09:46:12 +01:00
Maria Matejka
77582da162 NEWS and version update v3.0.1 2025-01-09 21:54:53 +01:00
Maria Matejka
bd3ba2af92 Merge remote-tracking branch 'origin/stable-v2.16' into HEAD 2025-01-09 21:54:15 +01:00
Maria Matejka
11913f58cb NEWS and version update v2.16.1 2025-01-09 21:51:15 +01:00
Maria Matejka
000ba7e960 Merge commit 'abecb5bb408f253cd24345ba94940ea0f7b59f4f' into HEAD 2025-01-09 18:55:26 +01:00
Maria Matejka
4074112992 Merge commit '85aa283071ed75059fd8c889bc4ee33be1f901af' into HEAD 2025-01-09 18:46:04 +01:00
Maria Matejka
d0a328bfa9 Merge commit 'd221f39731be40ed3821f8db09d590edb849cb0c' into HEAD 2025-01-09 18:45:50 +01:00
Maria Matejka
5c3eff5645 Merge commit 'e063365590b9b857a5bd0acfa519783eba639bbf' into stable-v3.0 2025-01-09 18:40:29 +01:00
Ondrej Zajicek
abecb5bb40 lib: Unify alignment of allocators
Different internal allocators (memory blocks, linpools, and slabs) used
different way to compute alignment. Unify it to use alignment based on
standard max_align_t type.

On x86_64, this does not change alignment of memory blocks and linpools
(both old and new is 16), but it increases alignment of slabs from 8 to
16.

Minor changes by commiter.
2025-01-09 17:42:55 +01:00
Maria Matejka
b2de140d1a Table: Fixed table debug settings reconfiguration 2025-01-09 10:35:00 +01:00
Maria Matejka
a24ec59d24 Table: more best route refeed fixes
Best route refeed is tricky. The journal may include repeatedly the same
route in the old and/or in the new position in case of flaps. We don't
like checking that fully in the RCU critical section which is already
way too long, thus we filter out the repeated occurence of the current
best route while keeping possibly more old routes.

We also don't want to send spurious withdraws, and we need to check that
only one notification per net is sent for RA_OPTIMAL.

There was also missing a rejected map update in case of idempotent
squashed update, and last but not least, the best route journal should
not include invalid routes (import keep filtered).
2025-01-09 10:35:00 +01:00
Maria Matejka
9381f8f2d8 Table: old best route refeed fix
When refeeding with RA_OPTIMAL, the old best routes weren't announced,
leading to weird behavior of protocols, mostly kernel. Fixed.
2025-01-09 10:34:49 +01:00
Maria Matejka
d43538acbd BGP: fixed deterministic med crashes
There were several places of forgotten NULL checks.

Thanks to Alarig Le Lay <alarig@swordarmor.fr> for reporting:
https://trubka.network.cz/pipermail/bird-users/2024-December/017990.html
2025-01-09 10:08:27 +01:00
Maria Matejka
c2bd489bbc BGP: fix display name of bgp_otc attribute 2025-01-09 10:08:27 +01:00
Maria Matejka
ffa57a4303 Allocate the normalization buckets on stack
Even though allocating from tmp_linpool is quite cheap,
it isn't cheap when the block is larger than a page, which is the case here.
Instead, we now allocate just the result which typically fits in a page,
avoiding a necessity of a malloc().
2025-01-09 10:08:27 +01:00
Maria Matejka
4f7899e3cb BGP: TX bucket storage moved to Stonehenge 2025-01-09 10:08:27 +01:00
Maria Matejka
240dd41f06 Route attribute storage moved to Stonehenge 2025-01-09 10:08:27 +01:00
Maria Matejka
29df992f7f Stonehenge: multi-slab allocator
To mid-term allocate and free lots of small blocks in a fast pace,
mb_alloc is too slow and causes heap bloating. We can already allocate
blocks from slabs, and if we allow for a little bit of inefficiency,
we can just use multiple slabs with stepped sizes.

This technique is already used in ea_list allocation which is gonna be
converted to Stonehenge.
2025-01-09 10:08:27 +01:00