summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-01Hostcache update notification converted to an export hookMaria Matejka
Instead of synchronous notifications, we use the asynchronous export framework to notify also hostcache updates. This allows us to do the hostcache update and the subsequent next hop update notification without locking collisions.
2022-09-01Miscellaneous refactoringMaria Matejka
2022-09-01Table debug is now a per-table setting and has categories.Maria Matejka
2022-09-01Default tables are not created unless actually used.Maria Matejka
This allows for setting default table values at the beginning of config file before "master4" and "master6" tables are initialized.
2022-08-30Tables: Requesting prune only after export cleanupMaria Matejka
We can't free the network structures before the export has been cleaned up, therefore it makes more sense to request prune only after export cleanup. This change also reduces prune calls on table shutdown.
2022-08-05Merge branch 'backport' into thread-nextMaria Matejka
2022-08-05Merge commit '082905a8' into thread-nextMaria Matejka
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 '082905a8' into HEADMaria Matejka
2022-08-03rip_rte_better() uses the IGP_METRIC_UNKNOWN instead of protocol-specific ↵Maria Matejka
infinity
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-27Merge branch 'master' into backportOndrej Zajicek
2022-07-26Netlink: Restrict route replace for IPv6Ondrej Zajicek
Seems like the previous patch was too optimistic, as route replace is still broken even in Linux 4.19 LTS (but fixed in Linux 5.10 LTS) for: ip route add 2001:db8::/32 via fe80::1 dev eth0 ip route replace 2001:db8::/32 dev eth0 It ends with two routes instead of just the second. The issue is limited to direct and special type (e.g. unreachable) routes, the patch restricts route replace for cases when the new route is a regular route (with a next hop address).
2022-07-25Netlink: Simplify handling of IPv6 ECMP routesOndrej Zajicek
When IPv6 ECMP support first appeared in Linux kernel, it used different API than IPv4 ECMP. Individual next hops were updated and announced separately, instead of using RTA_MULTIPATH as in IPv4. This has several drawbacks and requires complex code to merge received notifications to one multipath route. When Linux came with IPv6 RTA_MULTIPATH support, the initial versions were somewhat buggy, so we kept using the old API for updates (splitting multipath routes to sequences of route updates), while accepting both old-style routes and RTA_MULTIPATH routes in scans / notifications. As IPv6 RTA_MULTIPATH support is here for a long time, this patch fully switches Netlink to the IPv6 RTA_MULTIPATH API and removes old complex code for handling individual next hop announces. The required Linux version is at least 4.11 for reliable operation. Thanks to Daniel Gröber for the original patch.
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-22Fixed a rarely used part of Babel: comparing two routes in table by their metricMaria Matejka
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