summaryrefslogtreecommitdiff
path: root/nest/proto.c
AgeCommit message (Collapse)Author
2023-04-17IO: added a specific loop pickup group for BFD; to be done better in futureMaria Matejka
2023-04-04More efficient IO loop event execution to avoid long loopsMaria Matejka
If there are lots of loops in a single thread and only some of the loops are actually active, the other loops are now kept aside and not checked until they actually get some timers, events or active sockets. This should help with extreme loads like 100k tables and protocols. Also ping and loop pickup mechanism was allowing subtle race conditions. Now properly handling collisions between loop ping and pickup.
2023-04-04Route feed marks only the relevant pending exports as doneMaria Matejka
2023-04-04Moved channel export hooks to rt.h as the channel refactoring isn't going to ↵Maria Matejka
take place soon
2023-04-04Fixed use-after-free of old protocol name pointer copied into rte_owner ↵Maria Matejka
structure
2023-04-04Fixed unwanted reloads while reconfiguring protocols with import table onMaria Matejka
2023-04-04Fixed bad filter re-evaluation with import table if filtered->acceptedMaria Matejka
The import table feed wasn't resetting the table-specific route values like REF_FILTERED and thus made the route look like filtered even though it should have been re-evaluated as accepted.
2023-04-04Fixed channel stopping when reload is activeMaria Matejka
2023-04-04Fix obvious mistake in protocol debug dumpMaria Matejka
2023-04-04Reducing initial channel bitmap sizes to help extreme casesMaria Matejka
2023-04-04Interface subsystem lockingMaria Matejka
2023-04-04Proto: published protocol-loop connectionsMaria Matejka
2023-02-07Protocol shutdown/restart from limits is respecting the loopsMaria Matejka
2023-02-07Merge commit '0bb04d5390f21b0c96fc4894ba5d5510c541f0ef' into HEADMaria Matejka
2023-02-02Interface updates are asynchronousMaria Matejka
Instead of propagating interface updates as they are loaded from kernel, they are enqueued and all the notifications are called from a protocol-specific event. This change allows to break the locking loop between protocols and interfaces. Anyway, this change is based on v2 branch to keep the changes between v2 and v3 smaller.
2023-02-02Proto: Adding a list of associated neighborsMaria Matejka
This makes for safer and faster pruning and notifying as protocol now on its shutdown prunes only its neighbors and nothing else.
2023-02-02Moved interface list flush to device protocol cleanup hook.Maria Matejka
The interface list must be flushed when device protocol is stopped. This was done in a hardcoded specific hook inside generic protocol routines. The cleanup hook was originally used for table reference counting late cleanup, yet it can be also simply used for prettier interface list flush.
2023-01-25VRF setting reduced to one argument, using default dummy iface for default vrfMaria Matejka
2022-11-07Merge commit '8478de88' into thread-nextMaria Matejka
2022-11-07Merge commit '54430df9' into thread-nextMaria Matejka
2022-10-12Merge commit '53958809' into thread-nextMaria Matejka
2022-10-12Merge commit '4ba991f1' into thread-nextMaria Matejka
2022-10-12BGP refeed and reload with Adj-RIB-In/Out is done without route refreshMaria Matejka
2022-10-12Fixed BGP reload limitsMaria Matejka
2022-10-12Fixed export hook stopping in some corner cases.Maria Matejka
Notably, it's in a corked state and also when refeed is pending.
2022-10-05Fixed previously untested paths in RPKIMaria Matejka
2022-10-03Nest: Add channel config flag to distinguish new or copyOndrej Zajicek
It is useful to distinguish whehter channel config returned from channel_config_get() was allocated new, or existing from template. Caller may want to initialize new ones.
2022-10-03BGP: Do not assume that all channels are struct bgp_channelOndrej Zajicek
In principle, the channel list is a list of parent struct proto and can contain general structures of type struct channel, That is useful e.g. for adding MPLS channels to BGP.
2022-09-20Merge commit 'adf37d8e' into thread-nextMaria Matejka
2022-09-18Merge commit '4f3fa162' into HEADMaria Matejka
2022-09-09Created a dedicated settle timer structureMaria Matejka
2022-09-08Table access is now locked.Maria Matejka
2022-09-05Exporter routine refactoring to allow for nicer table lockingMaria Matejka
2022-09-01Added an indirection to the export announcement routineMaria Matejka
There are performance reasons for this, mostly that we don't want to ping the table service routine with every import.
2022-09-01ROA subscriptions are also converted to export requests.Maria Matejka
By this, the requesting channels do the timers in their own loops, avoiding unnecessary synchronization when the central timer went off. This is of course less effective for now, yet it allows to easily implement selective reloads in future.
2022-09-01Miscellaneous refactoringMaria 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-03Merge commit 'c7d0c5b2' into thread-nextMaria Matejka
2022-08-02Merge commit 'f0507f05ce57398e135651896dace4cb68eeed54' into thread-nextMaria Matejka
2022-07-28Moved the thread starting code to IO loop codeMaria Matejka
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-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-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-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-11Show route uses the export request also for one-net queriesMaria Matejka
2022-06-27Fixed new route comparisonMaria Matejka
2022-06-24Allowed optimized exporting of a subprefix treeMaria Matejka
Added an option for export filter to allow for prefiltering based on the prefix. Routes outside the given prefix are completely ignored. Config is simple: export in <net> <filter>;
2022-06-24Table export generalized to allow for exporting from non-tablesMaria Matejka
2022-06-20Import tables are stored as an attribute layer inside the main tables.Maria Matejka
The separate import tables were too memory-greedy, there is no need for them being stored as full-sized tables.