We have now better methods how to measure overall performance
and this obsolete protocol has basically rotten away. If anybody
needs its features, feel free to revive it in future.
Introducing a new omnipotent internal API to just pass route updates
from whatever point wherever we want. In the next commit, we aim to
convert the main routing tables to this API, while also implementing the
rest of it (like feeding).
For now, it's just refactoring of this code and structures out of BGP.
To avoid needs for keeping local temporary references for attributes,
now one can use ea_lookup_tmp() to ensure that the attributes are
valid and stored until the task ends. After that, the attributes are
automatically unref'd and also deallocated if needed.
If cork occurred after some incoming data had been already processed,
BGP incorrectly processed them again after uncorking because it forgot
to store the actual socket state.
Now storing the socket state (done at the end of bgp_rx()) and
therefore the bug is fixed.
This commit makes the route chains in the tables atomic. This allows not
only standard exports but also feeds and bulk exports to be processed
without ever locking the table.
Design note: the overall data structures are quite brittle. We're using
RCU read-locks to keep track about readers, and we're indicating ongoing
work on the data structures by prepending a REF_OBSOLETE sentinel node
to make every reader go waiting.
All the operations are intended to stay inside nest/rt-table.c and it
may be even best to further refactor the code to hide the routing table
internal structure inside there. Nobody shall definitely write any
routines manipulating live routes in tables from outside.
This table uses lfjour to signalize changes both to TX packet generator
and to possibly external readers; to be enabled in following commits.
Prefix structures are now pointing to the tables' netindex
instead of copying net_addr. With proper referencing of netindex,
this allows us to allocate struct bgp_prefix from a slab.
Also export buckets now don't copy route attributes locally,
they use global attribute cache instead. This allows also export
buckets to have fixed length and therefore get allocated from a slab.
Finally, merged bgp_pending_tx back to bgp_channel. The split looked
like a good idea then. It isn't, the pending TX is an integral part of
BGP channel with no real reason for splitting.