0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-13 22:58:42 +00:00
Commit Graph

54 Commits

Author SHA1 Message Date
Maria Matejka
e91754f5b9 Event lists rewritten to a single linked list
In multithreaded environment, we need to pass messages between workers.
This is done by queuing events to their respective queues. The
double-linked list is not really useful for that as it needs locking
everywhere.

This commit rewrites the event subsystem to use a single-linked list
where events are enqueued by a single atomic instruction and the queue
is processed after atomically moving the whole queue aside.
2022-07-18 13:28:35 +02:00
Maria Matejka
4b6f5ee870 Merge commit 'a4451535' into thread-next 2022-07-18 11:11:46 +02:00
Maria Matejka
1d309c4ce6 Enforcing certain data structure explicit paddings.
Implicit paddings have undefined values in C. We want the eattr blocks
to be comparable by memcmp and eattrs settable directly by structrure
literals. This check ensures that all paddings in eattr and bval are
explicit and therefore zeroed in all literals.
2022-05-04 15:37:41 +02:00
Maria Matejka
b5061659d3 POSIX threads and thread-local storage is needed for concurrent execution 2021-11-22 19:05:43 +01:00
Ondrej Zajicek (work)
e5724f71d2 sysdep: Add wrapper to get random bytes - update
Simplify the code and fix an issue with getentropy() return value.
2021-06-06 16:26:06 +02:00
Toke Høiland-Jørgensen
c48ebde5ce sysdep: Add wrapper to get random bytes
Add a wrapper function in sysdep to get random bytes, and required checks
in configure.ac to select how to do it. The configure script tries, in
order, getrandom(), getentropy() and reading from /dev/urandom.
2021-06-06 16:26:06 +02:00
Maria Matejka
886dd92eee Slab: head now uses bitmask for used/free nodes info instead of lists
From now, there are no auxiliary pointers stored in the free slab nodes.
This led to strange debugging problems if use-after-free happened in
slab-allocated structures, especially if the structure's first member is
a next pointer.

This also reduces the memory needed by 1 pointer per allocated object.
OTOH, we now rely on pages being aligned to their size's multiple, which
is quite common anyway.
2021-03-25 16:47:48 +01:00
Maria Matejka
a08853a269 Static scanner and expensive debugging setup fix 2020-05-01 15:19:12 +02:00
Maria Matejka
a0d0a71a18 Expensive check declaration
Intended to be run at every operation with complex data structures
to check their consistency and validity.
2020-05-01 15:19:12 +02:00
Maria Matejka
027a3e66f7 RPKI: Allow build without libSSH 2020-02-04 10:15:35 +01:00
Maria Matejka
cc95b4594a Build: Pass -g to cc called as linker to explicitly keep debug info 2019-10-09 17:47:14 +02:00
Maria Matejka
368f70604f LTO: debug info also kept with the final binary 2019-10-09 17:47:14 +02:00
Ondrej Zajicek (work)
8c42205e35 Configure: CFLAGS update
- add -flto only to default CFLAGS
 - add -fno-strict-aliasing, -fno-strict-overflow always
 - remove -Wno-implicit-fallthrough
2019-08-06 14:54:36 +02:00
Ondrej Zajicek
cc02da816f Show LDFLAGS in configure 2019-08-01 14:49:03 +02:00
Ondrej Zajicek
3ffb0c4f25 Enable more threads for flto 2019-08-01 14:45:23 +02:00
Ondrej Zajicek
de41d24a3d Fix output of CFLAGS in configure script 2019-08-01 14:27:20 +02:00
Jan Maria Matejka
6479e403ef Filters: If somebody doesn't like _Thread_local, don't fail for now, just be a little slower.
When the parallel execution comes into place, we'll likely enforce this
C11 feature. It's much simpler and also faster than pthread_[sg]etspecific().
2019-05-23 11:27:24 +00:00
Maria Matejka
a68442e056 Fixed link time optimizer check for FreeBSD 2019-02-27 14:40:05 +01:00
Maria Matejka
0d12aa4836 Build: No link time optimization when debug is enabled 2019-02-26 16:11:40 +01:00
Maria Matejka
ad702bae0c Enabled link time optimization. 2019-02-20 22:30:55 +01:00
Maria Matejka
4f082dfa89 Filter: merged filter instruction constructors, counting line size on instruction construct 2019-02-20 22:30:54 +01:00
Jan Maria Matejka
02dcbf343d Configure: Don't check for implicit fallthrough unless when debugging. 2019-02-20 22:30:53 +01:00
Maria Matějka
82b742533b Perf: Protocol to measure BIRD performance internally
This protocol is highly experimental and nobody should use it in
production. Anyway it may help you getting some insight into what eats
so much time in filter processing.
2018-12-18 15:08:31 +01:00
Jan Maria Matejka
78131eee64 Debug: support for -gdwarf-4 is not available everywhere 2018-12-18 14:55:29 +01:00
Ondrej Zajicek (work)
3fda08e405 Unix: Change debugging options
The old behavior was that enabling debugging did many nontrivial changes
in BIRD behavior. The patch changes it that these changes are generally
independent. Compiling with --enable-debug now just enables compile-time
debug macros, but do not automatically activate debug mode (-d) nor local
mode (-l). Debug mode with output to file (-D) do not force foreground
mode (-f), therefore there is no need for backgroud option (-b), which is
removed. Also fixes a bug when the default log target in -D mode was
stderr instead of given debug file.
2018-12-04 16:55:25 +01:00
Ondrej Zajicek (work)
66934aceff Autoconf: Minor cleanup 2018-11-21 16:30:22 +01:00
Ondrej Zajicek (work)
863ecfc785 The MRT protocol
The new MRT protocol is responsible for periodic RIB table dumps in the
MRT format (RFC 6396). Also the existing code for BGP4MP MRT dumps is
refactored and splitted between BGP to MRT protocols, will be more
integrated into MRT in the future.

Example:

protocol mrt {
        table "*";
        filename "%N_%F_%T.mrt";
        period 60;
}

It is partially based on the old MRT code from Pavel Tvrdik.
2018-11-20 17:45:35 +01:00
Ondrej Zajicek (work)
d0b4597842 Configure: Use standard --runstatedir option
Newer Autoconf defines --runstatedir option for setting directory for
run-time variable data. Use it instead our old --with-runtimedir.
2018-11-18 01:22:09 +01:00
Jan Maria Matejka
7ffc0a6534 Bison: A bit more verbose error messages in config. 2018-08-14 14:36:44 +02:00
Jan Maria Matejka
86b9e8e39a M4: generate synchronization lines
This also includes Bison version check. Versions before 3.0 don't
support them in a reliable way and we don't promise to work with
versions older than 2.4.
2018-08-14 14:01:39 +02:00
Maria Matejka
da16b33ab9 Android: check for extra libs needed for build 2018-06-26 17:11:27 +02:00
Jan Maria Matejka
09c1e370b3 Moved freebsd cflags and ldflags to configure 2018-01-09 16:46:00 +01:00
Ondrej Zajicek (work)
9bd8cb7c3c Merge branch 'master' into int-new 2018-01-02 16:59:59 +01:00
Ondrej Zajicek (work)
cce6ba4daa Remove libhistory check
According to GNU Readline developers, if we link with libreadline then
there is no need to link with libhistory at all.
2018-01-02 14:11:59 +01:00
Maria Jan Matejka
6b0f5f68a8 Switchoff for MPLS in kernel. 2017-12-10 18:30:00 +01:00
Martin Mares
b4a33e21ea Configure: Fix a typo in checking of backtrace() 2017-07-19 13:46:48 +02:00
Ondrej Zajicek (work)
7d5e61a66a Fix of the previous fix
Avoid empty macro argument to avoid default behavior.
2017-05-18 13:29:38 +02:00
Ondrej Zajicek (work)
271fa063a3 Fix minor bug in configure script
Space in action branch breaks build on some platforms.
2017-05-18 12:05:09 +02:00
Ondrej Zajicek (work)
9b701e69cc Merge branch 'master' into int-new 2017-05-17 17:37:27 +02:00
Ondrej Zajicek (work)
d6e01ff900 Fix of the previous commit 2017-05-17 17:30:23 +02:00
Ondrej Zajicek (work)
dab6706aba History lib may be integrated to Readline lib 2017-05-17 17:03:36 +02:00
Ondrej Zajicek (work)
81edd3b3a7 Fix build on systems with dirty headers 2017-05-17 16:21:58 +02:00
Ondrej Zajicek (work)
144c10fad1 Merge branch 'master' into int-new 2017-05-17 14:38:04 +02:00
Ondrej Zajicek (work)
a01e951d0f One more configure cleanup
Simplify BIRD client library checks, add proper devel header checks and
prefer dependency on just tinfo than full ncurses.
2017-05-17 13:17:40 +02:00
Ondrej Zajicek (work)
1c5b4c5d5b Merge branch 'master' into int-new 2017-05-16 14:56:01 +02:00
Ondrej Zajicek (work)
b845ea097c Remove autoconf macros for time_t and alignment
Replaced by constant compile-time expressions. CPU_STRUCT_ALIGN is not
really correct, but is consistent with the old behavior.
2017-05-16 13:05:00 +02:00
Ondrej Zajicek (work)
b81a73d1fb Minor autoconf cleanups
Make indentation and quotation consistent in configure macros.
Also remove --with-sysinclude option, which was broken for 7 years
and nobody complained.

Thanks to Ruben Kerkhof for source patches.
2017-05-16 13:04:02 +02:00
Ondrej Zajicek (work)
e40542ef3a Minor autoconf cleanup and documentation update 2017-05-16 12:59:22 +02:00
Ondrej Zajicek (work)
c253ec3a9c Some more autoconf cleanups
Replace integer type width detection with C99 fixed-width types.
Also remove some unused or obsolete code.

Thanks to Ruben Kerkhof for the patchset.
2017-05-16 12:59:22 +02:00
Ondrej Zajicek (work)
fd1f355b7b Merge branch 'master' into int-new 2017-05-09 17:37:38 +02:00