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

4500 Commits

Author SHA1 Message Date
Ondrej Filip
eb859a3fb0 Small change to fix doc building on Debian 2022-02-20 15:30:47 +01:00
Ondrej Filip
9b13fa4d9c Small changes related to the new release 2022-02-20 14:28:06 +01:00
Ondrej Zajicek (work)
64d5d6d2c3 NEWS: Fix formatting and add some notes 2022-02-13 16:45:49 +01:00
Ondrej Zajicek (work)
71c9484b00 NEWS and version update 2022-02-09 03:47:49 +01:00
Ondrej Zajicek (work)
2fc8b4c4ba Alloc: Use posix_memalign() instead of aligned_alloc()
For compatibility with older systems use posix_memalign(). We can
switch to aligned_alloc() when we commit to C11 for multithreading.
2022-02-08 22:42:00 +01:00
Ondrej Zajicek (work)
ef614f2984 Netlink: Minor cleanup 2022-02-08 22:21:08 +01:00
Maria Matejka
935c066402 NEWS and version update 2022-02-07 22:36:57 +01:00
Maria Matejka
a6fc31f153 Blogpost about performance + data. 2022-02-07 22:35:41 +01:00
Ondrej Zajicek (work)
edc1a24017 Lib: Update alignment of slabs
Alignment of slabs should be at least sizeof(ptr) to avoid unaligned
pointers in slab structures. Fixme: Use proper way to choose alignment
for internal allocators.
2022-02-07 04:39:49 +01:00
Ondrej Zajicek (work)
53a2540687 Merge branch 'oz-trie-table' 2022-02-06 23:42:10 +01:00
Ondrej Zajicek (work)
24600c642a Trie: Fix trie format
After switching to 16-way tries, trie format ignored unaligned / internal
prefixes and only reported the primary prefix of a trie node.

Fix trie format by showing internal prefixes based on the 'local' bitmask
of a node. Also do basic (intra-node) reconstruction of prefix patterns
by finding common subtrees in 'local' bitmask.

In future, we could improve that by doing inter-node reconstruction, so
prefixes entered as one pattern for a subtree (e.g. 192.168.0.0/18+)
would be reported as such, like with aligned prefixes.
2022-02-06 23:27:13 +01:00
Ondrej Zajicek (work)
5a89edc6fd Nest: Implement locking of prefix tries during walks
The prune loop may may rebuild the prefix trie and therefore invalidate
walk state for asynchronous walks (used in 'show route in' cmd). Fix it
by adding locking that keeps the old trie in memory until current walks
are done.

In future this could be improved by rebuilding trie walk states (by
lookup for last found prefix) after the prefix trie rebuild.
2022-02-06 23:27:13 +01:00
Ondrej Zajicek (work)
de6318f70a Nest: Implement prefix trie pruning
When rtable is pruned and network fib nodes are removed, we also need to
prune prefix trie. Unfortunately, rebuilding prefix trie takes long time
(got about 400 ms for 1M networks), so must not be atomic, we have to
rebuild a new trie while current one is still active. That may require
some considerable amount of temporary memory, so we do that only if
we expect significant trie size reduction.
2022-02-06 23:27:13 +01:00
Ondrej Zajicek (work)
ba5aec94cd Trie: Add prefix counter
Add counter of prefixes stored in trie. Works only for 'restricted' tries
composed of explicit prefixes (pxlen == l == h), like ones used in rtables.
2022-02-06 23:27:13 +01:00
Ondrej Zajicek (work)
d0f9a77f64 Doc: Describe routing table options 2022-02-06 23:27:13 +01:00
Ondrej Zajicek (work)
1f2eb2aca8 BGP: Implement flowspec validation procedure
Implement flowspec validation procedure as described in RFC 8955 sec. 6
and RFC 9117. The Validation procedure enforces that only routers in the
forwarding path for a network can originate flowspec rules for that
network.

The patch adds new mechanism for tracking inter-table dependencies, which
is necessary as the flowspec validation depends on IP routes, and flowspec
rules must be revalidated when best IP routes change.

The validation procedure is disabled by default and requires that
relevant IP table uses trie, as it uses interval queries for subnets.
2022-02-06 23:27:13 +01:00
Ondrej Zajicek (work)
1ae42e5223 Nest: Add routing table configuration blocks
Allow to specify sorted flag, trie fla, and min/max settle time.

Also do not enable trie by default, it must be explicitly enabled.
2022-02-06 23:27:13 +01:00
Ondrej Zajicek (work)
fde1cff012 Nest: Add convenience functions to check rtable net type 2022-02-06 23:27:13 +01:00
Ondrej Zajicek (work)
61375bd0b3 Nest: Avoid unnecessary net_format() in 'show route' command
When output of 'show route' command was generated, the net_format() was
called for each network prematurely, even if the result was not needed.

Fix the code to call net_format() only when needed. This makes queries
that process many networks but show only few (e.g. 'show route where ..',
or 'show route count') much faster (like 5x - 10x faster).
2022-02-06 23:27:13 +01:00
Ondrej Zajicek (work)
9ac16df3d7 Nest: Add trie iteration code to 'show route'
Add trie iteration code to rt_show_cont() CLI hook and use it to
accelerate 'show route in <addr>' commands using interval queries.
2022-02-06 23:27:13 +01:00
Ondrej Zajicek (work)
ea97b89051 Nest: Implement 'show route in <addr>' command
Implement 'show route in <addr>' command, which shows all routes in
networks that are subnets of given network. Currently limited to IP
network types.
2022-02-06 23:27:13 +01:00
Ondrej Zajicek (work)
836a87b8ac Nest: Attach prefix trie to rtable for faster LPM and interval queries
Attach a prefix trie to IP/VPN/ROA tables. Use it for net_route() and
net_roa_check(). This leads to 3-5x speedups for IPv4 and 5-10x
speedup for IPv6 of these calls.

TODO:
 - Rebuild the trie during rt_prune_table()
 - Better way to avoid trie_add_prefix() in net_get() for existing tables
 - Make it configurable (?)
2022-02-06 23:27:13 +01:00
Maria Matejka
3f6462ad35 Dropping (end-of-life) Debian 8 automated tests 2022-02-04 17:04:18 +01:00
Maria Matejka
c9aa53eaf5 Build test default timeout raised to allow for tests on slow virtual machines 2022-02-04 16:47:39 +01:00
Maria Matejka
5a65ae45e5 Tamed harmless i368 warnings 2022-02-04 15:50:21 +01:00
Maria Matejka
cc73726620 Compilation fixes for CLang 2022-02-04 15:42:04 +01:00
Maria Matejka
fe840ddad9 Merge commit 'a9646efd40569f3a1d749bc1bd13219876b33a00' into sark-bgp-rebased 2022-02-04 15:26:36 +01:00
Maria Matejka
14bb6fd29a Merge commit 'bcb25084d31fdb90fcf1666f10e73fe0f863afc0' into sark-bgp-rebased 2022-02-04 15:24:28 +01:00
Maria Matejka
92e48894c3 Merge commit '75aceadaf746f8ed0acce0424f89903283dacf16' into sark-bgp-rebased 2022-02-04 15:21:16 +01:00
Maria Matejka
28a43d53e7 Merge commit '00410fd6c17697a5919cb32a44f7117dd3a0834a' into sark-bgp-rebased 2022-02-04 15:18:48 +01:00
Maria Matejka
d62a3d0274 Thread performance: Moved graph key to left top corner where it fits better 2022-02-04 15:18:44 +01:00
Maria Matejka
b554457e5e Thread documentation: Final version of chapter 3 2022-02-04 15:18:06 +01:00
Maria Matejka
765c940094 Thread documentation: Rewritten chapter 3 on loops and locks once again 2022-02-03 22:42:26 +01:00
Maria Matejka
216bcb7c68 Protocol limit restart/down must be callable from protocol context 2022-02-03 10:30:33 +01:00
Maria Matejka
d262695d4e BFD: direct notifications to protocol loops 2022-02-03 10:30:33 +01:00
Maria Matejka
09380db594 Neighbor prune fixup 2022-02-03 10:30:33 +01:00
Maria Matejka
c019008383 IO loop duration fixup 2022-02-03 10:30:33 +01:00
Maria Matejka
aca4c3fc8e BGP now runs in its own thread 2022-02-03 10:30:33 +01:00
Maria Matejka
fccaeb0141 BGP: Static global linpools replaced by private linpools 2022-02-03 10:30:33 +01:00
Maria Matejka
8447b24e59 Socket cork fixes 2022-02-03 10:30:33 +01:00
Maria Matejka
127862f626 Asynchronous neighbor notifications fixes 2022-02-03 10:30:33 +01:00
Maria Matejka
0f6ea95754 Explicitly storing and checking loop information in sockets 2022-02-03 10:30:33 +01:00
Maria Matejka
d37513a372 Neighbors: Locking and asynchronous notifications 2022-02-03 10:30:33 +01:00
Maria Matejka
c651cef737 Global interface list renamed to not clash with local lists 2022-02-03 10:30:33 +01:00
Maria Matejka
b6c9263543 Interfaces and neighbor notifications do properly enter protocol loops 2022-02-03 10:30:33 +01:00
Maria Matejka
b5155d5cea Page cleanup routines updated to allow nested birdloops 2022-02-03 10:30:33 +01:00
Maria Matejka
87512ccdff Route table fast prune fixup 2022-02-03 10:30:33 +01:00
Maria Matejka
f22bab9818 Babel: fixed interface pool removal 2022-02-03 10:30:33 +01:00
Maria Matejka
3cf5e0f144 Dropping a nonsensical assert which broke Babel 2022-02-03 10:03:37 +01:00
Maria Matejka
ee84ff14a1 Removing periodic wakeup of mainloop in debug version to search for notification issues 2022-02-03 10:03:37 +01:00