summaryrefslogtreecommitdiff
path: root/nest
AgeCommit message (Collapse)Author
2021-12-07Fixed a race condition in channel aux table cleanupMaria Matejka
2021-12-01Faster shutdown and cleanups by freeing route attributes strictly from main loopMaria Matejka
2021-12-01Faster prune on table deletionMaria Matejka
2021-12-01Table prune routines request export announcements directlyMaria Matejka
2021-12-01fixed duplicate routes propagationMaria Matejka
2021-12-01Merge branch 'master' into HEADMaria Matejka
2021-12-01Page allocator moved from pools to IO loops.Maria Matejka
The resource pool system is highly hierarchical and keeping spare pages in pools leads to unnecessarily complex memory management. Loops have a flat hiearchy, at least for now, and it is therefore much easier to keep care of pages, especially in cases of excessive virtual memory fragmentation.
2021-11-30For safer memory allocations, resources are bound to loops.Maria Matejka
Also all loops have their basic resource pool for allocations which are auto-freed when the loop is stopping.
2021-11-27Memory statistics split into Effective and OverheadMaria Matejka
This feature is intended mostly for checking that BIRD's allocation strategies don't consume much memory space. There are some cases where withdrawing routes in a specific order lead to memory fragmentation and this output should give the user at least a notion of how much memory is actually used for data storage and how much memory is "just allocated" or used for overhead. Also raising the "system allocator overhead estimation" from 8 to 16 bytes; it is probably even more. I've found 16 as a local minimum in best scenarios among reachable machines. I couldn't find any reasonable method to estimate this value when BIRD starts up. This commit also fixes the inaccurate computation of memory overhead for slabs where the "system allocater overhead estimation" was improperly added to the size of mmap-ed memory.
2021-11-24fixup of table reload bugMaria Matejka
2021-11-24Directly mapped pages are kept for future use if temporarily not neededMaria Matejka
2021-11-23Fixed pipe reload/refeedMaria Matejka
2021-11-23Fixed channel export map confusionMaria Matejka
2021-11-22Higher settle times when route refresh in the source table is runningMaria Matejka
2021-11-22Corking also feed start to keep BIRD running when refeeds would easily cause ↵Maria Matejka
congestion
2021-11-22Route attribute cache is now lockless on read / clone.Maria Matejka
Lots of time was spent locking when accessing route attribute cache. This overhead should be now reduced to a minimum.
2021-11-22Route sources have their separate global lockMaria Matejka
2021-11-22VRF setting reduced to one argument, using default dummy iface for default vrfMaria Matejka
2021-11-22Route table import-to-export announcement indirection to reduce pipe trafficMaria Matejka
2021-11-22Pipe runs in parallel.Maria Matejka
2021-11-22Routing tables now have their own loops.Maria Matejka
This basically means that: * there are some more levels of indirection and asynchronicity, mostly in cleanup procedures, requiring correct lock ordering * all the internal table operations (prune, next hop update) are done without blocking the other parts of BIRD * the protocols may get their own loops very soon
2021-11-22Route subscription uses eventsMaria Matejka
2021-11-22Global table update pool removedMaria Matejka
2021-11-22Locking route attributes cacheMaria Matejka
To access route attribute cache from multiple threads at once, we have to lock the cache on writing. The route attributes data structures are safe to read unless somebody tries to tamper with the cache itself.
2021-11-22Route sources have an explicit ownerMaria Matejka
This commit prevents use-after-free of routes belonging to protocols which have been already destroyed, delaying also all the protocols' shutdown until all of their routes have been finally propagated through all the pipes down to the appropriate exports. The use-after-free was somehow hypothetic yet theoretically possible in rare conditions, when one BGP protocol authors a lot of routes and the user deletes that protocol by reconfiguring in the same time as next hop update is requested, causing rte_better() to be called on a not-yet-pruned network prefix while the owner protocol has been already freed. In parallel execution environments, this would happen an inter-thread use-after-free, causing possible heisenbugs or other nasty problems.
2021-11-22Table cork: Stop creating updates when there are too many pending.Maria Matejka
The corked procedure gets a callback when uncorked. Supported by table maintenance routines and also BGP.
2021-11-22Split route table event into separate eventsMaria Matejka
The former rt_event is dropped in favour of separate table events. This allows for selective corking of NHU and prune.
2021-11-22Converting the former BFD loop to a universal IO loop and protocol loop.Maria Matejka
There is a simple universal IO loop, taking care of events, timers and sockets. Primarily, one instance of a protocol should use exactly one IO loop to do all its work, as is now done in BFD. Contrary to previous versions, the loop is now launched and cleaned by the nest/proto.c code, allowing for a protocol to just request its own loop by setting the loop's lock order in config higher than the_bird. It is not supported nor checked if any protocol changed the requested lock order in reconfigure. No protocol should do it at all.
2021-11-22Route export is now asynchronous.Maria Matejka
To allow for multithreaded execution, we need to break the import-export chain and buffer the exports before actually processing them.
2021-11-22Better profylaction recursive route loopsMaria Matejka
In some specific configurations, it was possible to send BIRD into an infinite loop of recursive next hop resolution. This was caused by route priority inversion. To prevent priority inversions affecting other next hops, we simply refuse to resolve any next hop if the best route for the matching prefix is recursive or any other route with the same preference is recursive. Next hop resolution doesn't change route priority, therefore it is perfectly OK to resolve BGP next hops e.g. by an OSPF route, yet if the same (or covering) prefix is also announced by iBGP, by retraction of the OSPF route we would get a possible priority inversion.
2021-11-22Special table hooks rectified.Maria Matejka
* internal tables are now more standalone, having their own import and export hooks * route refresh/reload uses stale counter instead of stale flag, allowing to drop walking the table at the beginning * route modify (by BGP LLGR) is now done by a special refeed hook, reimporting the modified routes directly without filters
2021-11-22Table import and export are now explicit hooks.Maria Matejka
Channels have now included rt_import_req and rt_export_req to hook into the table instead of just one list node. This will (in future) allow for: * channel import and export bound to different tables * more efficient pipe code (dropping most of the channel code) * conversion of 'show route' to a special kind of export * temporary static routes from CLI The import / export states are also updated to the new algorithms.
2021-11-09Limit containmentMaria Matejka
2021-11-09Secondary and merged exports get a whole feed instead of traversing the ↵Maria Matejka
table structures directly
2021-11-09Route export: rejected by filter bitmapMaria Matejka
If a route has been rejected by filter, store that information to avoid repeated export filter runs on rejected routes.
2021-11-09Protocol stats split to import and exportMaria Matejka
2021-11-09Nest: Route generations and explicit tracking route propagion through pipesMaria Matejka
2021-11-09Refeed is done from export table when appropriateMaria Matejka
2021-11-09Recursive route nexthop updates now announced with valid new_best/old_best ↵Maria Matejka
information
2021-11-09Split route data structure to storage (ro) / manipulation (rw) structures.Maria Matejka
Routes are now allocated only when they are just to be inserted to the table. Updating a route needs a locally allocated route structure. Ownership of the attributes is also now not transfered from protocols to tables and vice versa but just borrowed which should be easier to handle in a multithreaded environment.
2021-11-09Extended route trace: logging Path IdentifiersMaria Matejka
2021-10-13Dropping the unused rte_same hookMaria Matejka
2021-10-13Dropping rte-local dumper entriesMaria Matejka
2021-10-13RIP fixup + dropping the tmp_attrs mechanism as obsoleteMaria Matejka
2021-10-13BGP: Moved the suppressed and stale flags to pflagsMaria Matejka
2021-10-13Kernel: Convert the rte-local attributes to extended attributes and flags to ↵Maria Matejka
pflags
2021-10-13Dropping the RTS_DUMMY temporary route storage.Maria Matejka
Kernel route sync is done by other ways now and this code is not used currently.
2021-10-13Babel: Convert the rte-local attributes to extended attributesMaria Matejka
2021-10-13OSPF: Convert the rte-local attributes to extended attributesMaria Matejka
2021-10-13RIP: convert the rte-local attributes to extended attributesMaria Matejka