summaryrefslogtreecommitdiff
path: root/nest/rt-table.c
AgeCommit message (Collapse)Author
2022-02-03Route table fast prune fixupMaria Matejka
2022-02-03Dropping a nonsensical assert which broke BabelMaria 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-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-24fixup of table reload bugMaria 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 table import-to-export announcement indirection to reduce pipe trafficMaria 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-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-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-13IGP metric getter refactoring to protocol callbackMaria Matejka
Direct protocol hooks for IGP metric inside nest/rt-table.c make the protocol API unnecessarily complex. Instead, we use a proper callback.
2021-10-13Route: moved rte_src pointer from rta to rteMaria Matejka
It is an auxiliary key in the routing table, not a route attribute.
2021-10-13Preference moved to RTA and set explicitly in protocolsMaria Matejka
2021-10-13Preexport: No route modification, no linpool neededMaria Matejka
2021-10-13Export table: Delay freeing of old stored route.Maria Matejka
This is needed to provide the protocols the full old route after filters when export table is enabled.
2021-04-19Internal route tables have a reduced cleanup routineMaria Matejka
This fixes an internal table cleanup bug introduced in ff397df7edcbe7a8abca5b419729b9c64c063847.
2021-03-30Routing table is now a resource allocated from its own poolMaria Matejka
This also fixes memory leaks from import/export tables being never cleaned up and freed.
2021-03-30Routing tables list iteration should use explicit node struct positionMaria Matejka
2021-02-10Nest: Automatic channel reloads based on RPKI changesOndrej Zajicek (work)
If there are roa_check() calls in channel filters, then the channel subscribes to ROA table notifications, which are sent when ROA tables are updated (subject to settle time) and trigger channel reload or refeed.
2020-12-29Nest: Read Babel metric as IGP metricJames Lu
(Minor syntactic changes by committer)
2020-12-07Nest: Per-channel debug flagsOndrej Zajicek (work)
The patch add support for per-channel debug flags, currently just 'states', 'routes', and 'filters'. Flag 'states' is used for channel state changes, remaining two for routes passed through the channel. The per-protocol debug flags 'routes'/'filters' still enable reporting of routes for all channels, to keep existing behavior. The patch causes minor changes in some log messages.
2020-11-15Nest: Fix crash in receive limit handling in import tableOndrej Zajicek (work)
Logging as a result of triggered receive limit in import table code accesset rte->net, which was not filed yet. Thanks to Pier Carlo Chiodi for the bugreport.
2020-07-16Nest: Keep route ordering during route updatesOndrej Zajicek (work)
Put new non-best routes to the end of list instead of the second position. Put updated routes to their old position. Position is changed just by best route selection.