summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-05Merge commit '534d0a4b' into thread-nextMaria Matejka
2022-08-05Merge commit '2e484f8d' into thread-nextMaria Matejka
2022-08-05Merge commit '971721c9' into thread-nextMaria Matejka
2022-08-05Merge commit '4d48ede5' into thread-nextMaria Matejka
2022-08-03Merge commit 'c7d0c5b2' into thread-nextMaria Matejka
2022-08-03Merge commit '18f66055' into thread-nextMaria Matejka
2022-08-03Merge commit '038fcf1c' into thread-nextMaria Matejka
It was necessary to update the code to match removal of rta, as well as existence of cached nested attribute lists.
2022-08-03Merge commit '97476e00' into thread-nextMaria Matejka
Had to fix route source locking inside BGP export table as we need to keep the route sources properly allocated until even last BGP pending update is sent out, therefore the export table printout is accurate.
2022-08-03BGP: The bucket/prefix hashes are now a resource to allow for proper cleanupMaria Matejka
2022-08-02Merge commit 'f0507f05ce57398e135651896dace4cb68eeed54' into thread-nextMaria Matejka
2022-08-02Merge branch 'ballygarvan' into HEADMaria Matejka
Replacing the old 3.0-alpha0 cork mechanism with another one inside the routing table. This version should be simpler and also quite clear what it does, why and when.
2022-08-02Revert "Split route table event into separate events"Maria Matejka
This reverts commit 445eeaf3df126af2c7b61e71c4f08a583eb4fa60.
2022-08-02Revert "Table cork: Stop creating updates when there are too many pending."Maria Matejka
This reverts commit 3b20722a1fc777c27ab2e0451d0ea3fee7fa81a2.
2022-08-02Also next hop update routines are corking themselves when congestion is detectedMaria Matejka
2022-08-02BGP: respecting table corkMaria Matejka
2022-08-02Route table cork: Indicate whether the export queues are congested.Maria Matejka
These routines detect the export congestion (as defined by configurable thresholds) and propagate the state to readers. There are no readers for now, they will be added in following commits.
2022-08-02Introducing basic RCU primitives for lock-less shared data structuresMaria Matejka
2022-08-01Fixed main birdloop init in unit testsMaria Matejka
Some unit tests weren't initializing the birdloop, trying to write the birdloop ping into stdin. Fixed this and also forced stdin close on startup of every test just to be sure that CI and local build behave the same in this. (CI was failing on this while local build not.)
2022-07-28Sending an event must also ping the target IO loopMaria Matejka
2022-07-28Moved the thread starting code to IO loop codeMaria Matejka
2022-07-28Merge commit '03bf6b90' into thread-nextMaria Matejka
2022-07-28Revert "Adding a generic cork mechanism for events"Maria Matejka
This reverts commit 6e841b3153565632b6753f6b1fe74850c37f2808.
2022-07-24Merge branch 'master' into backportOndrej Zajicek
2022-07-24KRT: Scan routing tables separetely on linux to avoid congestionOndrej Zajicek
Remove compile-time sysdep option CONFIG_ALL_TABLES_AT_ONCE, replace it with runtime ability to run either separate table scans or shared scan. On Linux, use separate table scans by default when the netlink socket option NETLINK_GET_STRICT_CHK is available, but retreat to shared scan when it fails. Running separate table scans has advantages where some routing tables are managed independently, e.g. when multiple routing daemons are running on the same machine, as kernel routing table modification performance is significantly reduced when the table is modified while it is being scanned. Thanks Daniel Gröber for the original patch and Toke Høiland-Jørgensen for suggestions.
2022-07-22Revert "Export table: Delay freeing of old stored route."Maria Matejka
This reverts commit cee0cd148c9b71bf47d007c850193b5fbf9486c1. This change is not needed in version 2 and the surrounding code has disappeared mostly in version 3.
2022-07-18Event lists rewritten to a single linked listMaria Matejka
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-18Merge commit '94eb0858' into thread-nextMaria Matejka
2022-07-18Merge commit 'a4451535' into thread-nextMaria Matejka
2022-07-18Fixed an annoying warning in ea_get_storage()Maria Matejka
2022-07-18Fixing build issues caused by a nonportable Makefile ruleMaria Matejka
2022-07-18Merge commit 'a845651b' into thread-nextMaria Matejka
2022-07-15Merge commit 'c70b3198' into thread-next [lots of conflicts]Maria Matejka
There were more conflicts that I'd like to see, most notably in route export. If a bisect identifies this commit with something related, it may be simply true that this commit introduces that bug. Let's hope it doesn't happen.
2022-07-14Fixed invalid routes handlingMaria Matejka
The invalid routes were filtered out before they could ever get exported, yet some of the routines need them available, e.g. for display or import reload. Now the invalid routes are properly exported and dropped in channel export routines instead.
2022-07-13Merge branch 'backport' into thread-nextMaria Matejka
2022-07-13Merge commit '2e5bfeb73ac25e236a24b6c1a88d0f2221ca303f' into thread-nextMaria Matejka
2022-07-13Merge commit 'd429bc5c841a8e9d4c81786973edfa56d20a407e' into thread-nextMaria Matejka
2022-07-13Merge commit '7e9cede1fd1878fb4c00e793bccd0ca6c18ad452' into thread-nextMaria Matejka
2022-07-13Fixed bug in repeated show route commandMaria Matejka
Introduced by 13ef5e53dd4a98c80261139b4c9ce4b1074cac40, the CLI was not properly cleaned up when the command finished, causing BIRD to not parse any other command after "show route".
2022-07-12Merge commit 'f18968f5' into thread-nextMaria Matejka
2022-07-12BGP: Minor improvements to BGP rolesOndrej Zajicek
Add support for bgp_otc in filters and warning for configuration inside confederations.
2022-07-12Merge commit '1df20989' into thread-nextMaria Matejka
2022-07-12Revert "Special table hooks rectified."Maria Matejka
This reverts commit 44f26c49f966ca842ff9af55468de0b98c44b73e.
2022-07-12Removing the rte_modify APIMaria Matejka
For BGP LLGR purposes, there was an API allowing a protocol to directly modify their stale routes in table before flushing them. This API was called by the table prune routine which violates the future locking requirements. Instead of this, BGP now requests a special route export and reimports these routes into the table, allowing for asynchronous execution without locking the table on export.
2022-07-12Route refresh in tables uses a stale counter.Maria Matejka
Until now, we were marking routes as REF_STALE and REF_DISCARD to cleanup old routes after route refresh. This needed a synchronous route table walk at both beginning and the end of route refresh routine, marking the routes by the flags. We avoid these walks by using a stale counter. Every route contains: u8 stale_cycle; Every import hook contains: u8 stale_set; u8 stale_valid; u8 stale_pruned; u8 stale_pruning; In base_state, stale_set == stale_valid == stale_pruned == stale_pruning and all routes' stale_cycle also have the same value. The route refresh looks like follows: + ----------- + --------- + ----------- + ------------- + ------------ + | | stale_set | stale_valid | stale_pruning | stale_pruned | | Base | x | x | x | x | | Begin | x+1 | x | x | x | ... now routes are being inserted with stale_cycle == (x+1) | End | x+1 | x+1 | x | x | ... now table pruning routine is scheduled | Prune begin | x+1 | x+1 | x+1 | x | ... now routes with stale_cycle not between stale_set and stale_valid are deleted | Prune end | x+1 | x+1 | x+1 | x+1 | + ----------- + --------- + ----------- + ------------- + ------------ + The pruning routine is asynchronous and may have high latency in high-load environments. Therefore, multiple route refresh requests may happen before the pruning routine starts, leading to this situation: | Prune begin | x+k | x+k | x -> x+k | x | ... or even | Prune begin | x+k+1 | x+k | x -> x+k | x | ... if the prune event starts while another route refresh is running. In such a case, the pruning routine still deletes routes not fitting between stale_set and and stale_valid, effectively pruning the remnants of all unpruned route refreshes from before: | Prune end | x+k | x+k | x+k | x+k | In extremely rare cases, there may happen too many route refreshes before any route prune routine finishes. If the difference between stale_valid and stale_pruned becomes more than 128 when requesting for another route refresh, the routine walks the table synchronously and resets all the stale values to a base state, while logging a warning.
2022-07-11BGP: Implement BGP rolesEugene Bogomazov
Implement BGP roles as described in RFC 9234. It is a mechanism for route leak prevention and automatic route filtering based on common BGP topology relationships. It defines role capability (controlled by 'local role' option) and OTC route attribute, which is used for automatic route filtering and leak detection. Minor changes done by commiter.
2022-07-11There are now no internal tables at all.Maria Matejka
2022-07-11Dropped the internal kernel protocol table for learnt routes.Maria Matejka
The learnt routes are now pushed all into the connected table, not only the best one. This shouldn't do any damage in well managed setups, yet it should be noted that it is a change of behavior. If anybody misses a feature which they implemented by misusing this internal learn table, let us know, we'll consider implementing it in a better way.
2022-07-11Export tables merged with BGP prefix hashMaria Matejka
Until now, if export table was enabled, Nest was storing exactly the route before rt_notify() was called on it. This was quite sloppy and spooky and it also wasn't reflecting the changes BGP does before sending. And as BGP is storing the routes to be sent anyway, we are simply keeping the already-sent routes in there to better rule out unneeded reexports. Some of the route attributes (IGP metric, preference) make no sense in BGP, therefore these will be probably replaced by something sensible. Also the nexthop shown in the short output is the BGP nexthop.
2022-07-11Hash: iterable now per partes by an iteratorMaria Matejka
It's now possible to pause iteration through hash. This requires struct hash_iterator to be allocated somewhere handy. The iteration itself is surrounded by HASH_WALK_ITER and HASH_WALK_ITER_END. Call HASH_WALK_ITER_PUT to ask for pausing; it may still do some more iterations until it comes to a suitable pausing point. The iterator must be initalized to an empty structure. No cleanup is needed if iteration is abandoned inbetween.
2022-07-11Do not try to check flowspec validity for piped routesMaria Matejka