]> git.ipfire.org Git - thirdparty/bird.git/log
thirdparty/bird.git
22 months agoChannel: using a separate pool for export data
Maria Matejka [Thu, 12 Oct 2023 08:07:57 +0000 (10:07 +0200)] 
Channel: using a separate pool for export data

22 months agoMerge commit 'e2f08c382a2adbbbd94c5cd7d996ce9175e0fb9c' into HEAD
Maria Matejka [Thu, 12 Oct 2023 09:38:16 +0000 (11:38 +0200)] 
Merge commit 'e2f08c382a2adbbbd94c5cd7d996ce9175e0fb9c' into HEAD

22 months agoMerge commit '4972590e' into thread-next
Maria Matejka [Thu, 12 Oct 2023 07:29:51 +0000 (09:29 +0200)] 
Merge commit '4972590e' into thread-next

22 months agoBGP/BMP: fixed build with no bmp at all
Maria Matejka [Thu, 12 Oct 2023 08:57:55 +0000 (10:57 +0200)] 
BGP/BMP: fixed build with no bmp at all

22 months agoBGP: dropped bgp_fix_attr_flags() (useless remnant from previous versions)
Maria Matejka [Thu, 12 Oct 2023 07:29:09 +0000 (09:29 +0200)] 
BGP: dropped bgp_fix_attr_flags() (useless remnant from previous versions)

22 months agoMerge commit 'b20b6a9ad204f2648ed3d62720435bb21dfb947c' into thread-next
Maria Matejka [Wed, 11 Oct 2023 20:26:41 +0000 (22:26 +0200)] 
Merge commit 'b20b6a9ad204f2648ed3d62720435bb21dfb947c' into thread-next

22 months agoBGP/BMP: Moved temporary allocation checks to the freeing functions
Maria Matejka [Wed, 11 Oct 2023 20:23:34 +0000 (22:23 +0200)] 
BGP/BMP: Moved temporary allocation checks to the freeing functions

22 months agoMerge branch 'mq-bmp-to-merge-to-v3' into thread-next
Maria Matejka [Wed, 11 Oct 2023 20:06:18 +0000 (22:06 +0200)] 
Merge branch 'mq-bmp-to-merge-to-v3' into thread-next

22 months agoMerge commit '2d988f71a5c3caf3b56426a45d4d234c4fd4fce7' into thread-next
Maria Matejka [Wed, 11 Oct 2023 12:16:39 +0000 (14:16 +0200)] 
Merge commit '2d988f71a5c3caf3b56426a45d4d234c4fd4fce7' into thread-next

22 months agoMerge commit '6e908775' into thread-next
Maria Matejka [Wed, 11 Oct 2023 11:28:30 +0000 (13:28 +0200)] 
Merge commit '6e908775' into thread-next

22 months agoMerge branch 'mq-bmp-to-merge-to-v3' into HEAD
Maria Matejka [Tue, 10 Oct 2023 13:04:26 +0000 (15:04 +0200)] 
Merge branch 'mq-bmp-to-merge-to-v3' into HEAD

22 months agoNest: Use generic rte_announce() also for import tables
Ondrej Zajicek [Mon, 21 Aug 2023 02:17:21 +0000 (04:17 +0200)] 
Nest: Use generic rte_announce() also for import tables

Remove special rte_announce_in(), so we can use generic rte_announce()
for bot feed and notifications.

22 months agoConf: Improve handling of keywords
Ondrej Zajicek [Thu, 27 Apr 2023 16:20:49 +0000 (18:20 +0200)] 
Conf: Improve handling of keywords

For whatever reason, parser allocated a symbol for every parsed keyword
in each scope. That wasted time and memory. The effect is worsened with
recent changes allowing local scopes, so keywords often promote soft
scopes (with no symbols) to real scopes.

Do not allocate a symbol for a keyword. Take care of keywords that could
be promoted to symbols (kw_sym) and do it explicitly.

22 months agoConf: Fix symbol lookup
Ondrej Zajicek [Thu, 27 Apr 2023 15:09:00 +0000 (17:09 +0200)] 
Conf: Fix symbol lookup

The symbol table used just symbol name as a key, and used a trick with
active flag to find symbols in active scopes with one hash table lookup.

The disadvantage is that it can degenerate to O(n) for negative queries
in situations where are many symbols with the same name in different
scopes.

Thanks to Yanko Kaneti for the bugreport.

22 months agoChannel: Refeeding by an auxiliary request if needed.
Maria Matejka [Fri, 29 Sep 2023 14:24:50 +0000 (16:24 +0200)] 
Channel: Refeeding by an auxiliary request if needed.

If the protocol supports route refresh on export, we keep the stop-start
method of route refeed. This applies for BGP with ERR or with export
table on, for OSPF, Babel, RIP or Pipe.

For BGP without ERR or for future selective ROA reloads, we're adding an
auxiliary export request, doing the refeed while the main export request
is running, somehow resembling the original method of BIRD 2 refeed.

There is also a refeed request queue to keep track of different refeed
requests.

22 months agoBabel: Properly handle route refeed
Maria Matejka [Wed, 27 Sep 2023 14:47:25 +0000 (16:47 +0200)] 
Babel: Properly handle route refeed

22 months agoRIP: Properly handle route refeed
Maria Matejka [Wed, 27 Sep 2023 14:29:44 +0000 (16:29 +0200)] 
RIP: Properly handle route refeed

22 months agoBabel: Remove interfaces on shutdown
Maria Matejka [Mon, 25 Sep 2023 07:31:18 +0000 (09:31 +0200)] 
Babel: Remove interfaces on shutdown

This avoids calling interface timer between Babel going
PS_DOWN and finally cleaning up the resource pool.

22 months agoKernel: refeed routes and delete them from kernel before actual shutdown
Maria Matejka [Sun, 24 Sep 2023 20:20:27 +0000 (22:20 +0200)] 
Kernel: refeed routes and delete them from kernel before actual shutdown

22 months agoProtocols have now assigned startup phases
Maria Matejka [Sun, 24 Sep 2023 21:22:43 +0000 (23:22 +0200)] 
Protocols have now assigned startup phases

For now, there are 4 phases: Necessary (device), Connector (kernel, pipe), Generator (static, rpki) and Regular.
Started and reconfigured are from Necessary to Regular, shutdown backwards.

This way, kernel can flush routes before actually being shutdown.

22 months agoIface: trace log messages cleanup
Maria Matejka [Sun, 24 Sep 2023 20:20:01 +0000 (22:20 +0200)] 
Iface: trace log messages cleanup

22 months agoTable: Added some journal and export tracing
Maria Matejka [Sun, 24 Sep 2023 10:15:26 +0000 (12:15 +0200)] 
Table: Added some journal and export tracing

22 months agoTable: Fixed feed race condition
Maria Matejka [Sun, 24 Sep 2023 09:47:24 +0000 (11:47 +0200)] 
Table: Fixed feed race condition

The problem happened like this:

1. Single route for the given net in table
2. A feed is started
3. The route is deleted (from another thread)
4. The feed finds an empty net, exports nothing, ignores journal (here is bug)
5. The route is added
6. The export transitions from FEEDING to READY
7. While processing the journal, the route deletion and addition combines into noop.

This way routes mysteriously disappeared in specific cases of link instability.

Problem fixed by explicitly marking the empty-net journal entries as processed in step 4.

22 months agoExport: More strict export state checking on change
Maria Matejka [Tue, 15 Aug 2023 10:31:28 +0000 (12:31 +0200)] 
Export: More strict export state checking on change

22 months agoProperly consted routes inside table
Maria Matejka [Mon, 3 Jul 2023 18:38:24 +0000 (20:38 +0200)] 
Properly consted routes inside table

22 months agoFilter iterator accepts lines instead of filter
Maria Matejka [Sun, 2 Jul 2023 13:10:39 +0000 (15:10 +0200)] 
Filter iterator accepts lines instead of filter

22 months agoRenamed channel class pointers
Vojtech Vilimek [Thu, 14 Sep 2023 13:21:53 +0000 (15:21 +0200)] 
Renamed channel class pointers

The channel class pointers were strangely named , not .

22 months agoLogging: fixed size logfiles behaving as mmapped ringbuffers
Maria Matejka [Thu, 24 Aug 2023 15:00:54 +0000 (17:00 +0200)] 
Logging: fixed size logfiles behaving as mmapped ringbuffers

This variant of logging avoids calling write() for every log line,
allowing for waitless logging. This makes heavy logging less heavy
and more useful for race condition debugging.

22 months agoLogging limit enforcement moved into the rfile structure
Maria Matejka [Thu, 24 Aug 2023 13:38:44 +0000 (15:38 +0200)] 
Logging limit enforcement moved into the rfile structure

22 months agoLogging now doesn't lock with each message
Maria Matejka [Mon, 21 Aug 2023 16:44:10 +0000 (18:44 +0200)] 
Logging now doesn't lock with each message

The original logging routines were locking a common mutex. This led to
massive underperformance and unwanted serialization when heavily logging
due to lock contention. Now the logging is lockless, though still
serializing on write() syscalls to the same filedescriptor.

This change also brings in a persistent logging channel structures and
thus avoids writing into active configuration data structures during
regular run.

22 months agoThreads: added a generic method to run in all threads
Maria Matejka [Mon, 21 Aug 2023 18:56:19 +0000 (20:56 +0200)] 
Threads: added a generic method to run in all threads

22 months agoLogging: Abolished stdio in favor of write() to make the logging faster.
Maria Matejka [Wed, 16 Aug 2023 13:05:36 +0000 (15:05 +0200)] 
Logging: Abolished stdio in favor of write() to make the logging faster.

23 months agoCLI: Dropping the mechanism of echoing log messages
Maria Matejka [Tue, 15 Aug 2023 15:05:58 +0000 (17:05 +0200)] 
CLI: Dropping the mechanism of echoing log messages

This is better done by running tail -f on a logfile.

23 months agoBGP: When debug { routes } is set, updates considered as loop are logged
Maria Matejka [Thu, 14 Sep 2023 12:44:35 +0000 (14:44 +0200)] 
BGP: When debug { routes } is set, updates considered as loop are logged

23 months agoEnhanced tracing of route refresh state
Maria Matejka [Thu, 14 Sep 2023 12:40:33 +0000 (14:40 +0200)] 
Enhanced tracing of route refresh state

23 months agoHostentry application locking
Maria Matejka [Mon, 28 Aug 2023 13:36:40 +0000 (15:36 +0200)] 
Hostentry application locking

Due to a race condition between rta_apply_hostentry() and rt_update_hostentry(),
happening when a new route is inserted to a table, this commit makes it mandatory
to lock the next hop resolution table while resolving the next hop.

This may be slow, we'll fix it better in some future release

23 months agoConfig obstacles are lockless now
Maria Matejka [Mon, 21 Aug 2023 13:37:09 +0000 (15:37 +0200)] 
Config obstacles are lockless now

23 months agoBMP: Improve peer_down handling
Ondrej Zajicek [Mon, 21 Aug 2023 23:24:21 +0000 (01:24 +0200)] 
BMP: Improve peer_down handling

Move all bmp_peer_down() calls to one place and make it synchronous with
BGP session down, ensuring that BMP receives peer_down before route
withdraws from flushing.

Also refactor bmp_peer_down_() message generating code.

23 months agoBMP: Use generic channel feed instead of direct walk over rtable
Ondrej Zajicek [Mon, 21 Aug 2023 02:20:32 +0000 (04:20 +0200)] 
BMP: Use generic channel feed instead of direct walk over rtable

Now we use rt_notify() and channels for both feed and notifications,
in both import tables (pre-policy) and regular tables (post-policy).

Remove direct walk in bmp_route_monitor_snapshot().

23 months agoNest: Use generic rte_announce() also for import tables
Ondrej Zajicek [Mon, 21 Aug 2023 02:17:21 +0000 (04:17 +0200)] 
Nest: Use generic rte_announce() also for import tables

Remove special rte_announce_in(), so we can use generic rte_announce()
for bot feed and notifications.

23 months agoBMP: Fix route timestamps
Ondrej Zajicek [Fri, 18 Aug 2023 13:39:08 +0000 (15:39 +0200)] 
BMP: Fix route timestamps

23 months agoBMP: Refactor route monitoring
Ondrej Zajicek [Fri, 18 Aug 2023 01:53:58 +0000 (03:53 +0200)] 
BMP: Refactor route monitoring

 - Manage BMP state through bmp_peer, bmp_stream, bmp_table structures
 - Use channels and rt_notify() hook for route announcements
 - Add support for post-policy monitoring
 - Send End-of-RIB even when there is no routes
 - Remove rte_update_in_notify() hook from import tables
 - Update import tables to support channels
 - Add bmp_hack (no feed / no flush) flag to channels

2 years agoBMP: Remove useless buffer
Ondrej Zajicek [Tue, 1 Aug 2023 16:39:38 +0000 (18:39 +0200)] 
BMP: Remove useless buffer

2 years agoBMP: Simplify route monitoring hooks
Ondrej Zajicek [Tue, 1 Aug 2023 15:56:56 +0000 (17:56 +0200)] 
BMP: Simplify route monitoring hooks

No need for *_begin(), *_commit(), and *_end() hooks. The hook *_notify()
is sufficient for everything.

2 years agoBMP: Ensure that bmp_fire_tx() does nothing when not up
Ondrej Zajicek [Thu, 8 Jun 2023 03:10:05 +0000 (05:10 +0200)] 
BMP: Ensure that bmp_fire_tx() does nothing when not up

2 years agoBMP: Support multiple instances of BMP protocol
Ondrej Zajicek [Thu, 8 Jun 2023 02:56:41 +0000 (04:56 +0200)] 
BMP: Support multiple instances of BMP protocol

Add internal BMP functions with plicit bmp_proto *p as first argument,
which allows using TRACE() macro. Keep list of BMP instances and call
internal functions. Old BMP functions are wrappers that call internal
functions for all enabled BMP instances.

Extract End-of-RIB mark into separate function.

Based on patch from Michal Zagorski <mzagorsk@akamai.com>. Thanks!

2 years agoBMP: Fix bug in buffer resize
Ondrej Zajicek [Wed, 31 May 2023 16:32:53 +0000 (18:32 +0200)] 
BMP: Fix bug in buffer resize

The buffer code in bmp_buffer_grow(), reuse the MRT buffer handling code.

Based on comments by Michal Zagorski <mzagorsk@akamai.com>, Thanks!

2 years agoBMP: Proper reconfiguration and protocol status
Ondrej Zajicek [Wed, 31 May 2023 15:41:53 +0000 (17:41 +0200)] 
BMP: Proper reconfiguration and protocol status

Based on patches from Michal Zagorski <mzagorsk@akamai.com> co-authored
with Pawel Maslanka <pmaslank@akamai.com>. Thanks!

2 years agoBMP: Add station address check
Ondrej Zajicek [Tue, 30 May 2023 15:23:56 +0000 (17:23 +0200)] 
BMP: Add station address check

Also, do not initialize it to IPA_NONE4, use regular IPA_NONE.

2 years agoBMP: Add local address option
Michal Zagorski [Tue, 30 May 2023 15:09:25 +0000 (17:09 +0200)] 
BMP: Add local address option

Also remove unused local and ip_post_policy options.

Co-authored with Pawel Maslanka <pmaslank@akamai.com>.

Minor changes by committer.

2 years agoBMP: Minor formatting cleanups
Ondrej Zajicek [Tue, 30 May 2023 13:52:01 +0000 (15:52 +0200)] 
BMP: Minor formatting cleanups

Based on patches from Michal Zagorski <mzagorsk@akamai.com> co-authored
with Pawel Maslanka <pmaslank@akamai.com>. Thanks!

2 years agoBGP: Improve bgp_create_update_bmp()
Ondrej Zajicek [Tue, 30 May 2023 13:37:52 +0000 (15:37 +0200)] 
BGP: Improve bgp_create_update_bmp()

Fix issue with missing AF cap (e.g. IPv4 unicast when no capabilities
are announced).

Add Linpool save/restore action similar to bgp_create_update().

Based on patch from Michal Zagorski <mzagorsk@akamai.com> co-authored
with Pawel Maslanka <pmaslank@akamai.com>. Thanks!

2 years agoBFD: Fixed reconfiguration issues
Maria Matejka [Mon, 29 May 2023 17:32:26 +0000 (19:32 +0200)] 
BFD: Fixed reconfiguration issues

After converting BFD to the new IO loop system, reconfiguration never
really worked. Sadly, we missed this case in our testing suite so it
passed under the radar for quite a while.

Thanks to Andrei Dinu <andrei.dinu@digitalit.ro> for reporting and
isolating this issue.

2 years agoFixed abort when running in foreground but stdin is closed
Maria Matejka [Sat, 13 May 2023 18:33:35 +0000 (20:33 +0200)] 
Fixed abort when running in foreground but stdin is closed

A forgotten else-clause caused BIRD to treat some pseudo-random place in
memory as fd-pair. This was happening only on startup of the first
thread in group and the value there in memory was typically zero ... and
writing to stdin succeeded.

When running BIRD with stdin not present (like systemd does), it died on
this spurious write. Now it seems to work correctly.

Thanks to Daniel Suchy <danny@danysek.cz> for reporting.

http://trubka.network.cz/pipermail/bird-users/2023-May/016929.html

2 years agoNEWS and version update v3.0-alpha2
Maria Matejka [Thu, 11 May 2023 09:37:48 +0000 (11:37 +0200)] 
NEWS and version update

2 years agoFix use-after free in thread stopping code
Maria Matejka [Tue, 9 May 2023 21:31:47 +0000 (23:31 +0200)] 
Fix use-after free in thread stopping code

2 years agoBGP: fix listen socket cleanup
Maria Matejka [Mon, 8 May 2023 16:57:32 +0000 (18:57 +0200)] 
BGP: fix listen socket cleanup

2 years agoID Maps are checking whether their pool is locked
Maria Matejka [Mon, 8 May 2023 13:13:49 +0000 (15:13 +0200)] 
ID Maps are checking whether their pool is locked

2 years agoProperly protecting the route src global index by RCU read lock and atomic operations
Maria Matejka [Mon, 8 May 2023 11:09:02 +0000 (13:09 +0200)] 
Properly protecting the route src global index by RCU read lock and atomic operations

There was a bug occuring when one thread sought for a src by its global id
and another one was allocating another src with such an ID that it caused
route src global index reallocation. This brief moment of inconsistency
led to a rare use-after-free of the old global index block.

2 years agoThreads take loops faster
Maria Matejka [Sun, 7 May 2023 21:40:38 +0000 (23:40 +0200)] 
Threads take loops faster

2 years agoChannel: configurable feed block size
Maria Matejka [Sun, 7 May 2023 21:04:47 +0000 (23:04 +0200)] 
Channel: configurable feed block size

2 years agoBGP: proactively rehash prefix hash up to shorten collision lists
Maria Matejka [Sun, 7 May 2023 19:39:05 +0000 (21:39 +0200)] 
BGP: proactively rehash prefix hash up to shorten collision lists

2 years agoOLocks in BGP must be freed early
Maria Matejka [Sun, 7 May 2023 15:30:33 +0000 (17:30 +0200)] 
OLocks in BGP must be freed early

2 years agoIO Loop / Thread Groups Lock moved to level -attrs- to allow for page allocation...
Maria Matejka [Fri, 5 May 2023 18:35:55 +0000 (20:35 +0200)] 
IO Loop / Thread Groups Lock moved to level -attrs- to allow for page allocation while locked

2 years agoFixed loop movement to not collide on LTT_MOVE
Maria Matejka [Fri, 5 May 2023 14:08:50 +0000 (16:08 +0200)] 
Fixed loop movement to not collide on LTT_MOVE

2 years agoFix loop dropping routines
Maria Matejka [Fri, 5 May 2023 13:19:14 +0000 (15:19 +0200)] 
Fix loop dropping routines

2 years agoFixed a bug in hot page global storage
Maria Matejka [Fri, 5 May 2023 07:39:13 +0000 (09:39 +0200)] 
Fixed a bug in hot page global storage

The original algorithm was suffering from an ABA race condition:

A: fp = page_stack
B: completely allocates the same page and writes into it some data
A: unsuspecting, loads (invalid) next = fp->next
B: finishes working with the page and returns it back to page_stack
A: compare-exchange page_stack: fp => next succeeds and writes garbage
to page_stack

Fixed this by using an implicit spinlock in hot page allocator.

2 years agoDebug: keep a circular log of memory page operations
Maria Matejka [Wed, 3 May 2023 17:01:19 +0000 (19:01 +0200)] 
Debug: keep a circular log of memory page operations

2 years agoFixed cold page cache leak
Maria Matejka [Wed, 3 May 2023 16:59:52 +0000 (18:59 +0200)] 
Fixed cold page cache leak

The empty_pages pointer wasn't being propagated into the ->next pointer
when more empty_pages were to be stored

2 years agoHostentry: fix pool locking
Maria Matejka [Mon, 1 May 2023 12:20:27 +0000 (14:20 +0200)] 
Hostentry: fix pool locking

2 years agoLinpool state save and restore refactoring
Maria Matejka [Mon, 1 May 2023 13:10:53 +0000 (15:10 +0200)] 
Linpool state save and restore refactoring

2 years agoDebug: Explicit mprotect() on freed pages to better locate use-after-free bugs
Maria Matejka [Mon, 1 May 2023 12:21:26 +0000 (14:21 +0200)] 
Debug: Explicit mprotect() on freed pages to better locate use-after-free bugs

2 years agoPage allocator: indentation of messy ifdef blocks
Maria Matejka [Wed, 3 May 2023 19:39:36 +0000 (21:39 +0200)] 
Page allocator: indentation of messy ifdef blocks

2 years agoFirst try of loop balancing
Maria Matejka [Sun, 30 Apr 2023 20:17:42 +0000 (22:17 +0200)] 
First try of loop balancing

If a thread encounters timeout == 0 for poll, it considers itself
"busy" and with some hysteresis it tries to drop loops for others to
pick and thus better distribute work between threads.

2 years agoAllocation from linpools and slabs requires the appropriate lock to be taken
Maria Matejka [Fri, 28 Apr 2023 21:48:03 +0000 (23:48 +0200)] 
Allocation from linpools and slabs requires the appropriate lock to be taken

2 years agoLinpool flushes unused pages even on lp_restore()
Maria Matejka [Fri, 28 Apr 2023 10:32:41 +0000 (12:32 +0200)] 
Linpool flushes unused pages even on lp_restore()

2 years agoFixed race condition in hostentry allocation
Maria Matejka [Thu, 27 Apr 2023 10:38:50 +0000 (12:38 +0200)] 
Fixed race condition in hostentry allocation

2 years agoShow threads: Fixed problems with CLI buffer reallocation
Maria Matejka [Thu, 27 Apr 2023 09:02:02 +0000 (11:02 +0200)] 
Show threads: Fixed problems with CLI buffer reallocation

... by allocating all the output locally and then sending it out at
once.

2 years agoExplicitly counting loops and threads
Maria Matejka [Thu, 27 Apr 2023 08:42:11 +0000 (10:42 +0200)] 
Explicitly counting loops and threads

2 years agoLoop spent time refactored to separate structures and functions
Maria Matejka [Wed, 26 Apr 2023 20:24:42 +0000 (22:24 +0200)] 
Loop spent time refactored to separate structures and functions

2 years agoBMP: Use OPEN messages stored in BGP
Ondrej Zajicek [Mon, 1 May 2023 01:35:21 +0000 (03:35 +0200)] 
BMP: Use OPEN messages stored in BGP

The BMP protocol needs OPEN messages of established BGP sessions to
construct appropriate Peer Up messages. Instead of saving them internally
we use OPEN messages stored in BGP instances. This allows BMP instances
to be restarted or enabled later.

Because of this change, we can simplify BMP data structures. No need to
keep track of BGP sessions when we are not started. We have to iterate
over all (established) BGP sessions when the BMP session is established.
This is just a scaffolding now, but some kind of iteration would be
necessary anyway.

Also, the commit cleans up handling of msg/msg_length arguments to be
body/body_length consistently in both rx/tx and peer_up/peer_down calls.

2 years agoBGP: Save sent and received OPEN messages
Ondrej Zajicek [Fri, 28 Apr 2023 17:13:56 +0000 (19:13 +0200)] 
BGP: Save sent and received OPEN messages

These are necessary for BMP Peer UP message and it is better to keep them
in BGP than in BMP (so BMP could be restarted or added later).

2 years agoConf: Improve handling of keywords
Ondrej Zajicek [Thu, 27 Apr 2023 16:20:49 +0000 (18:20 +0200)] 
Conf: Improve handling of keywords

For whatever reason, parser allocated a symbol for every parsed keyword
in each scope. That wasted time and memory. The effect is worsened with
recent changes allowing local scopes, so keywords often promote soft
scopes (with no symbols) to real scopes.

Do not allocate a symbol for a keyword. Take care of keywords that could
be promoted to symbols (kw_sym) and do it explicitly.

2 years agoConf: Fix symbol lookup
Ondrej Zajicek [Thu, 27 Apr 2023 15:09:00 +0000 (17:09 +0200)] 
Conf: Fix symbol lookup

The symbol table used just symbol name as a key, and used a trick with
active flag to find symbols in active scopes with one hash table lookup.

The disadvantage is that it can degenerate to O(n) for negative queries
in situations where are many symbols with the same name in different
scopes.

Thanks to Yanko Kaneti for the bugreport.

2 years agoLoops track also locking time
Maria Matejka [Wed, 26 Apr 2023 17:34:29 +0000 (19:34 +0200)] 
Loops track also locking time

2 years agoIO loops now actually measuring their time (show threads all works)
Maria Matejka [Wed, 26 Apr 2023 17:10:52 +0000 (19:10 +0200)] 
IO loops now actually measuring their time (show threads all works)

2 years agoRefactoring of domains connected to pools
Maria Matejka [Mon, 24 Apr 2023 14:10:59 +0000 (16:10 +0200)] 
Refactoring of domains connected to pools

2 years agoFix of failing show threads command
Maria Matejka [Mon, 24 Apr 2023 09:35:05 +0000 (11:35 +0200)] 
Fix of failing show threads command

2 years agoMerge commit 'd61505b039bf0aa6697e28b2a4e07907c89ba1fb' into thread-next
Maria Matejka [Mon, 24 Apr 2023 08:40:53 +0000 (10:40 +0200)] 
Merge commit 'd61505b039bf0aa6697e28b2a4e07907c89ba1fb' into thread-next

2 years agoMerge branch 'mq-resource-locking' into thread-next
Maria Matejka [Mon, 24 Apr 2023 08:39:13 +0000 (10:39 +0200)] 
Merge branch 'mq-resource-locking' into thread-next

2 years agoRemoved duplicate version 3.0-alpha0 news
Maria Matejka [Mon, 24 Apr 2023 08:39:08 +0000 (10:39 +0200)] 
Removed duplicate version 3.0-alpha0 news

2 years agoResource pools are now bound with domains.
Maria Matejka [Fri, 21 Apr 2023 13:26:06 +0000 (15:26 +0200)] 
Resource pools are now bound with domains.

Memory allocation is a fragile part of BIRD and we need checking that
everybody is using the resource pools in an appropriate way. To assure
this, all the resource pools are associated with locking domains and
every resource manipulation is thoroughly checked whether the
appropriate locking domain is locked.

With transitive resource manipulation like resource dumping or mass free
operations, domains are locked and unlocked on the go, thus we require
pool domains to have higher order than their parent to allow for this
transitive operations.

Adding pool locking revealed some cases of insecure memory manipulation
and this commit fixes that as well.

2 years agoProtocols and tables now use the birdloop pools as primary
Maria Matejka [Sat, 22 Apr 2023 19:20:19 +0000 (21:20 +0200)] 
Protocols and tables now use the birdloop pools as primary

2 years agoResource pool closing has its dedicated function
Maria Matejka [Thu, 20 Apr 2023 19:08:38 +0000 (21:08 +0200)] 
Resource pool closing has its dedicated function

2 years agoSocket closing has its dedicated function
Maria Matejka [Thu, 20 Apr 2023 19:06:42 +0000 (21:06 +0200)] 
Socket closing has its dedicated function

2 years agoGlobal protocol list is typed to avoid typecast confusion
Maria Matejka [Wed, 19 Apr 2023 19:18:12 +0000 (21:18 +0200)] 
Global protocol list is typed to avoid typecast confusion

2 years agoTyped lists: added add_after() and unit tests
Maria Matejka [Wed, 19 Apr 2023 19:02:20 +0000 (21:02 +0200)] 
Typed lists: added add_after() and unit tests

2 years agoNEWS and version update v2.13
Ondrej Zajicek [Fri, 21 Apr 2023 18:24:43 +0000 (20:24 +0200)] 
NEWS and version update

2 years agoFilter: Disable some trie formatting tests
Ondrej Zajicek [Fri, 21 Apr 2023 17:29:17 +0000 (19:29 +0200)] 
Filter: Disable some trie formatting tests

Trie formatting works slightly different with 4-way tries than with
16-way ones, so these tests generated false error. Block them for now.

2 years agoAlpha0 news added v3.0-alpha1
Ondrej Filip [Fri, 21 Apr 2023 07:08:54 +0000 (09:08 +0200)] 
Alpha0 news added