]> git.ipfire.org Git - thirdparty/bird.git/log
thirdparty/bird.git
3 years agoMerge commit '7e9cede1fd1878fb4c00e793bccd0ca6c18ad452' into thread-next
Maria Matejka [Wed, 13 Jul 2022 10:02:34 +0000 (12:02 +0200)] 
Merge commit '7e9cede1fd1878fb4c00e793bccd0ca6c18ad452' into thread-next

3 years agoFixed bug in repeated show route command
Maria Matejka [Wed, 13 Jul 2022 09:19:00 +0000 (11:19 +0200)] 
Fixed bug in repeated show route command

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".

3 years agoMerge commit 'f18968f5' into thread-next
Maria Matejka [Tue, 12 Jul 2022 13:05:04 +0000 (15:05 +0200)] 
Merge commit 'f18968f5' into thread-next

3 years agoMerge commit '1df20989' into thread-next
Maria Matejka [Tue, 12 Jul 2022 12:46:17 +0000 (14:46 +0200)] 
Merge commit '1df20989' into thread-next

3 years agoRevert "Special table hooks rectified."
Maria Matejka [Tue, 12 Jul 2022 12:46:06 +0000 (14:46 +0200)] 
Revert "Special table hooks rectified."

This reverts commit 44f26c49f966ca842ff9af55468de0b98c44b73e.

3 years agoRemoving the rte_modify API
Maria Matejka [Tue, 12 Jul 2022 10:40:18 +0000 (12:40 +0200)] 
Removing the rte_modify API

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.

3 years agoRoute refresh in tables uses a stale counter.
Maria Matejka [Tue, 12 Jul 2022 08:36:10 +0000 (10:36 +0200)] 
Route refresh in tables uses a stale counter.

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.

3 years agoThere are now no internal tables at all.
Maria Matejka [Mon, 11 Jul 2022 15:08:59 +0000 (17:08 +0200)] 
There are now no internal tables at all.

3 years agoDropped the internal kernel protocol table for learnt routes.
Maria Matejka [Mon, 11 Jul 2022 15:04:52 +0000 (17:04 +0200)] 
Dropped the internal kernel protocol table for learnt routes.

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.

3 years agoExport tables merged with BGP prefix hash
Maria Matejka [Mon, 20 Jun 2022 17:10:49 +0000 (19:10 +0200)] 
Export tables merged with BGP prefix hash

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.

3 years agoHash: iterable now per partes by an iterator
Maria Matejka [Wed, 29 Jun 2022 11:22:40 +0000 (13:22 +0200)] 
Hash: iterable now per partes by an iterator

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.

3 years agoDo not try to check flowspec validity for piped routes
Maria Matejka [Wed, 29 Jun 2022 10:51:07 +0000 (12:51 +0200)] 
Do not try to check flowspec validity for piped routes

3 years agoFixed bad import table attributes freeing
Maria Matejka [Tue, 28 Jun 2022 10:57:18 +0000 (12:57 +0200)] 
Fixed bad import table attributes freeing

3 years agoAttribute lists split to storage headers and data to save BGP memory
Maria Matejka [Tue, 28 Jun 2022 08:51:00 +0000 (10:51 +0200)] 
Attribute lists split to storage headers and data to save BGP memory

3 years agoShow route uses the export request also for one-net queries
Maria Matejka [Mon, 27 Jun 2022 17:53:06 +0000 (19:53 +0200)] 
Show route uses the export request also for one-net queries

3 years agoMerge version 2.0.10 into backport
Maria Matejka [Sun, 10 Jul 2022 12:19:24 +0000 (14:19 +0200)] 
Merge version 2.0.10 into backport

3 years agoMoved nexthop + hostentry display to other eattrs
Maria Matejka [Mon, 27 Jun 2022 11:39:28 +0000 (13:39 +0200)] 
Moved nexthop + hostentry display to other eattrs

3 years agoRoute attribute display now normalizes ea_lists.
Maria Matejka [Mon, 27 Jun 2022 10:44:11 +0000 (12:44 +0200)] 
Route attribute display now normalizes ea_lists.

This is needed to display every attribute only once with overlay
attribute lists recently introduced.

3 years agoFixed new route comparison
Maria Matejka [Mon, 27 Jun 2022 10:32:15 +0000 (12:32 +0200)] 
Fixed new route comparison

3 years agoFixed displaying BGP and RIP attributes after recent reworks
Maria Matejka [Mon, 27 Jun 2022 10:14:05 +0000 (12:14 +0200)] 
Fixed displaying BGP and RIP attributes after recent reworks

3 years agoFixed minor bugs in handling some route attributes
Maria Matejka [Mon, 27 Jun 2022 09:04:57 +0000 (11:04 +0200)] 
Fixed minor bugs in handling some route attributes

3 years agoFixed undefined attribute handling
Maria Matejka [Sun, 26 Jun 2022 12:48:55 +0000 (14:48 +0200)] 
Fixed undefined attribute handling

3 years agoThe show-route CLI command now uses the route export API
Maria Matejka [Fri, 24 Jun 2022 13:27:26 +0000 (15:27 +0200)] 
The show-route CLI command now uses the route export API

In the multithreaded environment, it is not supposed that anybody
traverses the routing table as the CLI show-route was doing. Now the
routing table traversal is gone and CLI won't hold the table locked
while computing filters.

3 years agoFixed forgotten preference handling in filters
Maria Matejka [Sun, 26 Jun 2022 12:11:08 +0000 (14:11 +0200)] 
Fixed forgotten preference handling in filters

3 years agoAllowed optimized exporting of a subprefix tree
Maria Matejka [Wed, 22 Jun 2022 10:45:42 +0000 (12:45 +0200)] 
Allowed optimized exporting of a subprefix tree

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>;

3 years agoTable export generalized to allow for exporting from non-tables
Maria Matejka [Mon, 20 Jun 2022 19:29:10 +0000 (21:29 +0200)] 
Table export generalized to allow for exporting from non-tables

3 years agoImport tables are stored as an attribute layer inside the main tables.
Maria Matejka [Thu, 16 Jun 2022 21:24:56 +0000 (23:24 +0200)] 
Import tables are stored as an attribute layer inside the main tables.

The separate import tables were too memory-greedy, there is no need for
them being stored as full-sized tables.

3 years agoRoute attribute storage keeps the previous layers
Maria Matejka [Thu, 16 Jun 2022 21:24:53 +0000 (23:24 +0200)] 
Route attribute storage keeps the previous layers

3 years agoShowing the nexthop resolution target in import tables
Maria Matejka [Thu, 16 Jun 2022 10:39:08 +0000 (12:39 +0200)] 
Showing the nexthop resolution target in import tables

3 years agoNEWS and version update v2.0.10
Ondrej Zajicek [Thu, 16 Jun 2022 00:58:37 +0000 (02:58 +0200)] 
NEWS and version update

3 years agoMerge commit '938742decc6e1d6d3a0375dd012b75172e747bbc' into haugesund
Maria Matejka [Wed, 8 Jun 2022 13:31:28 +0000 (15:31 +0200)] 
Merge commit '938742decc6e1d6d3a0375dd012b75172e747bbc' into haugesund

3 years agoMerge commit '950775f6fa3d569a9d7cd05e33538d35e895d688' into haugesund
Maria Matejka [Wed, 8 Jun 2022 09:47:49 +0000 (11:47 +0200)] 
Merge commit '950775f6fa3d569a9d7cd05e33538d35e895d688' into haugesund

There were quite a lot of conflicts in flowspec validation code which
ultimately led to some code being a bit rewritten, not only adapted from
this or that branch, yet it is still in a limit of a merge.

3 years agoFixing FlowSpec validation for v3 internal API
Maria Matejka [Tue, 7 Jun 2022 10:18:23 +0000 (12:18 +0200)] 
Fixing FlowSpec validation for v3 internal API

Validation is called internally from route table at the same place where
nexthop resolution is done. Also accounting for rte->sender semantics
change (not a channel but the import hook instead).

3 years agoIPv4 flowspec literals should reject IPv6 prefices in a well-behaved way
Maria Matejka [Tue, 7 Jun 2022 08:35:48 +0000 (10:35 +0200)] 
IPv4 flowspec literals should reject IPv6 prefices in a well-behaved way

When writing flow4 { dst 2001:db8::dead:beef/128; }, BIRD crashed on an
not-well-debuggable segfault as it tried to copy the whole 128-bit
prefix into an IPv4-sized memory.

3 years agoBabel: Do not try to remove multicast seqno request objects from neighbour list
Ondrej Zajicek [Sun, 5 Jun 2022 02:03:43 +0000 (04:03 +0200)] 
Babel: Do not try to remove multicast seqno request objects from neighbour list

The Babel seqno request code keeps track of which seqno requests are
outstanding for a neighbour by putting them onto a per-neighbour list. When
reusing a seqno request, it will try to remove this node, but if the seqno
request in question was a multicast request with no neighbour attached this
will result in a crash because it tries to remove a list node that wasn't
added to any list.

Fix this by making the list remove conditional. Also fix neighbor removal
which were changing seqno requests to multicast ones instead of removing
them.

Fixes: ebd5751cdeb4 ("Babel: Seqno requests are properly decoupled from
neighbors when the underlying interface disappears").

Based on the patch from Toke Høiland-Jørgensen <toke@toke.dk>,
bug reported by Stefan Haller <stefan.haller@stha.de>, thanks.

3 years agoIO: Improve resolution of latency debugging messages
Ondrej Zajicek [Sat, 4 Jun 2022 15:54:08 +0000 (17:54 +0200)] 
IO: Improve resolution of latency debugging messages

3 years agoNest: Improve GC strategy for rtables
Ondrej Zajicek [Sat, 4 Jun 2022 15:34:57 +0000 (17:34 +0200)] 
Nest: Improve GC strategy for rtables

Use timer (configurable as 'gc period') to schedule routing table
GC/pruning to ensure that prune is done on time but not too often.

Randomize GC timers to avoid concentration of GC events from different
tables in one loop cycle.

Fix a bug that caused minimum inter-GC interval be 5 us instead of 5 s.

Make default 'gc period' adaptive based on number of routing tables,
from 10 s for small setups to 600 s for large ones.

In marge multi-table RS setup, the patch improved time of flushing
a downed peer from 20-30 min to <2 min and removed 40s latencies.

3 years agoMerge commit '4fe9881d625f10e44109a649e369a413bd98de71' into haugesund
Maria Matejka [Tue, 31 May 2022 10:51:34 +0000 (12:51 +0200)] 
Merge commit '4fe9881d625f10e44109a649e369a413bd98de71' into haugesund

3 years agoMerge commit 'f15f2fcee7eeb5a100bd204a0e67018e25953420' into haugesund
Maria Matejka [Mon, 30 May 2022 15:36:36 +0000 (17:36 +0200)] 
Merge commit 'f15f2fcee7eeb5a100bd204a0e67018e25953420' into haugesund

3 years agoMerge commit 'f2e725a76882ba6b75c3ce4fb3c760bd83462410' into haugesund
Maria Matejka [Mon, 30 May 2022 15:27:03 +0000 (17:27 +0200)] 
Merge commit 'f2e725a76882ba6b75c3ce4fb3c760bd83462410' into haugesund

3 years agoMerge commit '1c30b689ddd032ef8000fb7836348a48ba3184ff' into haugesund
Maria Matejka [Mon, 30 May 2022 15:26:25 +0000 (17:26 +0200)] 
Merge commit '1c30b689ddd032ef8000fb7836348a48ba3184ff' into haugesund

3 years agoMerge commit '702c04fbef222e802ca4dfac645dc75ede522db6' into haugesund
Maria Matejka [Mon, 30 May 2022 15:18:46 +0000 (17:18 +0200)] 
Merge commit '702c04fbef222e802ca4dfac645dc75ede522db6' into haugesund

3 years agoMerge commit '337c04c45e1472d6d9b531a3c55f1f2d30ebf308' into haugesund
Maria Matejka [Mon, 30 May 2022 15:18:03 +0000 (17:18 +0200)] 
Merge commit '337c04c45e1472d6d9b531a3c55f1f2d30ebf308' into haugesund

3 years agoMerge commit 'd8661a4397e4576ac404661b192dd99d928e7890' into haugesund
Maria Matejka [Mon, 30 May 2022 15:11:30 +0000 (17:11 +0200)] 
Merge commit 'd8661a4397e4576ac404661b192dd99d928e7890' into haugesund

3 years agoMerge commit '17f91f9e6e70f7e3f29502e854823c0d48571eaa' into haugesund
Maria Matejka [Mon, 30 May 2022 14:59:24 +0000 (16:59 +0200)] 
Merge commit '17f91f9e6e70f7e3f29502e854823c0d48571eaa' into haugesund

3 years agoMerge commit '165156beeb2926472bbceca3c103aacc3f81a8cc' into haugesund
Maria Matejka [Mon, 30 May 2022 14:53:18 +0000 (16:53 +0200)] 
Merge commit '165156beeb2926472bbceca3c103aacc3f81a8cc' into haugesund

3 years agoMerge commit 'cf07d8ad79273a3bbf0617c17e438602e4b64ece' into haugesund
Maria Matejka [Mon, 30 May 2022 14:52:38 +0000 (16:52 +0200)] 
Merge commit 'cf07d8ad79273a3bbf0617c17e438602e4b64ece' into haugesund

3 years agoMerge commit '1d309c4ce6e95b68c64a8f007f6dd2f1830a5707' into haugesund
Maria Matejka [Mon, 30 May 2022 14:48:17 +0000 (16:48 +0200)] 
Merge commit '1d309c4ce6e95b68c64a8f007f6dd2f1830a5707' into haugesund

3 years agoMerge commit 'ef4313e1667a8745c8d8813ac78342ec7c035895' into haugesund
Maria Matejka [Mon, 30 May 2022 14:47:30 +0000 (16:47 +0200)] 
Merge commit 'ef4313e1667a8745c8d8813ac78342ec7c035895' into haugesund

3 years agoMerge commit 'f2f3163f6c3fba7f9ef03640d7b2f6323873d2cc' into haugesund
Maria Matejka [Mon, 30 May 2022 14:41:15 +0000 (16:41 +0200)] 
Merge commit 'f2f3163f6c3fba7f9ef03640d7b2f6323873d2cc' into haugesund

3 years agoMerge commit 'de86040b2cf4ec9bfbb64f0e208a19d4d7e51adc' into haugesund
Maria Matejka [Mon, 30 May 2022 14:21:48 +0000 (16:21 +0200)] 
Merge commit 'de86040b2cf4ec9bfbb64f0e208a19d4d7e51adc' into haugesund

3 years agoMerge commit '3fb70b26faca6788aa0bdf1d558414f9f777c6cd' into haugesund
Maria Matejka [Mon, 30 May 2022 14:21:02 +0000 (16:21 +0200)] 
Merge commit '3fb70b26faca6788aa0bdf1d558414f9f777c6cd' into haugesund

3 years agoMerge commit 'ef6a903e6f44b467f9606018446095521ad01ef1' into haugesund
Maria Matejka [Mon, 30 May 2022 14:20:35 +0000 (16:20 +0200)] 
Merge commit 'ef6a903e6f44b467f9606018446095521ad01ef1' into haugesund

3 years agoMerge commit '0e1e632f70b74cf111f08175ab3634db2f962579' into haugesund
Maria Matejka [Mon, 30 May 2022 13:43:45 +0000 (15:43 +0200)] 
Merge commit '0e1e632f70b74cf111f08175ab3634db2f962579' into haugesund

3 years agoMerge commit '0d0f6554a5c233bf2bf830ae319191c4b1808d49' into haugesund
Maria Matejka [Mon, 30 May 2022 13:43:13 +0000 (15:43 +0200)] 
Merge commit '0d0f6554a5c233bf2bf830ae319191c4b1808d49' into haugesund

3 years agoMerge commit '80272d4b64a38ee6f04a1c4e8566cac3a2293176' into haugesund
Maria Matejka [Mon, 30 May 2022 13:39:32 +0000 (15:39 +0200)] 
Merge commit '80272d4b64a38ee6f04a1c4e8566cac3a2293176' into haugesund

3 years agoMerge commit 'cd9550b24487ac7327b0234fd825f4214fdf7b16' into haugesund
Maria Matejka [Mon, 30 May 2022 13:38:24 +0000 (15:38 +0200)] 
Merge commit 'cd9550b24487ac7327b0234fd825f4214fdf7b16' into haugesund

3 years agoMerge commit '652be92a21f5575e5f74f6abe98eb4200b86776c' into haugesund
Maria Matejka [Mon, 30 May 2022 13:36:54 +0000 (15:36 +0200)] 
Merge commit '652be92a21f5575e5f74f6abe98eb4200b86776c' into haugesund

3 years agoMerge commit '98fd158e28d89f10ee7a41b4f6a14fbd0021ef35' into haugesund
Maria Matejka [Mon, 30 May 2022 13:35:29 +0000 (15:35 +0200)] 
Merge commit '98fd158e28d89f10ee7a41b4f6a14fbd0021ef35' into haugesund

3 years agoMerge commit 'd39ef961d1dde230c55fcc931b53f44cb34a1e63' into haugesund
Maria Matejka [Mon, 30 May 2022 13:32:11 +0000 (15:32 +0200)] 
Merge commit 'd39ef961d1dde230c55fcc931b53f44cb34a1e63' into haugesund

3 years agoMerge commit '4a23ede2b056a41456790cc20a0c3d92a7137693' into haugesund
Maria Matejka [Mon, 30 May 2022 13:31:19 +0000 (15:31 +0200)] 
Merge commit '4a23ede2b056a41456790cc20a0c3d92a7137693' into haugesund

3 years agoMerge commit 'ebd807c0b8eb0b7a3dc3371cd4c87ae886c00885' into haugesund
Maria Matejka [Mon, 30 May 2022 13:27:46 +0000 (15:27 +0200)] 
Merge commit 'ebd807c0b8eb0b7a3dc3371cd4c87ae886c00885' into haugesund

3 years agoMerge remote-tracking branch 'origin/master' into haugesund-to-2.0
Maria Matejka [Mon, 30 May 2022 13:20:21 +0000 (15:20 +0200)] 
Merge remote-tracking branch 'origin/master' into haugesund-to-2.0

3 years agoMerge commit '9eec503b251c3388579032b300d32640403d8612' into haugesund-to-2.0
Maria Matejka [Mon, 30 May 2022 13:20:05 +0000 (15:20 +0200)] 
Merge commit '9eec503b251c3388579032b300d32640403d8612' into haugesund-to-2.0

3 years agoMerge commit '692055e3df6cc9f0d428d3b0dd8cdd8e825eb6f4' into haugesund-to-2.0
Maria Matejka [Mon, 30 May 2022 13:17:52 +0000 (15:17 +0200)] 
Merge commit '692055e3df6cc9f0d428d3b0dd8cdd8e825eb6f4' into haugesund-to-2.0

3 years agoMerge commit '3a6eda995ecfcebff3130d86ee3baeab12a41335' into haugesund
Maria Matejka [Mon, 30 May 2022 13:15:19 +0000 (15:15 +0200)] 
Merge commit '3a6eda995ecfcebff3130d86ee3baeab12a41335' into haugesund

3 years agoSquashing the route attribute structure into one level.
Maria Matejka [Mon, 30 May 2022 10:03:03 +0000 (12:03 +0200)] 
Squashing the route attribute structure into one level.

For now, all route attributes are stored as eattrs in ea_list. This
should make route manipulation easier and it also allows for a layered
approach of route attributes where updates from filters will be stored
as an overlay over the previous version.

3 years agoRoute destination field merged with nexthop attribute; splitting flowspec validation...
Maria Matejka [Sun, 15 May 2022 16:09:30 +0000 (18:09 +0200)] 
Route destination field merged with nexthop attribute; splitting flowspec validation result out.

As there is either a nexthop or another destination specification
(or othing in case of ROAs and Flowspec), it may be merged together.
This code is somehow quirky and should be replaced in future by better
implementation of nexthop.

Also flowspec validation result has its own attribute now as it doesn't
have anything to do with route nexthop.

3 years agoCI: Remove broken FreeBSD builds
Ondrej Zajicek [Fri, 27 May 2022 14:07:24 +0000 (16:07 +0200)] 
CI: Remove broken FreeBSD builds

We currently do not have FreeBSD CI workers.

3 years agoMoved hostentry to eattr
Maria Matejka [Sun, 15 May 2022 13:53:35 +0000 (15:53 +0200)] 
Moved hostentry to eattr

3 years agoMoved nexthop from struct rta to extended attribute.
Maria Matejka [Thu, 5 May 2022 16:08:37 +0000 (18:08 +0200)] 
Moved nexthop from struct rta to extended attribute.

This doesn't do anything more than to put the whole structure inside
adata. The overall performance is certainly going downhill; we'll
optimize this later.

Anyway, this is one of the latest items inside rta and in several
commits we may drop rta completely and move to eattrs-only routes.

3 years agoBGP: Display neighbor port on show protocol
Ondrej Zajicek [Sat, 21 May 2022 14:21:34 +0000 (16:21 +0200)] 
BGP: Display neighbor port on show protocol

3 years agoRPKI: Display cache server port on show protocol
Ondrej Zajicek [Sat, 21 May 2022 14:03:08 +0000 (16:03 +0200)] 
RPKI: Display cache server port on show protocol

Thanks to Luiz Amaral for the idea.

3 years agoRPKI: Implement VRF support
Luiz Amaral [Thu, 19 May 2022 17:43:59 +0000 (19:43 +0200)] 
RPKI: Implement VRF support

3 years agoBGP: Improve tx performance during feed/flush
Ondrej Zajicek [Sun, 15 May 2022 13:05:13 +0000 (15:05 +0200)] 
BGP: Improve tx performance during feed/flush

The prefix hash table in BGP used the same hash function as the rtable.
When a batch of routes are exported during feed/flush to the BGP, they
all have similar hash values, so they are all crowded in a few slots in
the BGP prefix table (which is much smaller - around the size of the
batch - and uses higher bits from hash values), making it much slower due
to excessive collisions. Use a different hash function to avoid this.

Also, increase the batch size to fill 4k BGP packets and increase minimum
BGP bucket and prefix hash sizes to avoid back and forth resizing during
flushes.

This leads to order of magnitude faster flushes (on my test data).

3 years agoAll outstanding MPLS label stacks are stored as adata
Maria Matejka [Thu, 5 May 2022 17:28:56 +0000 (19:28 +0200)] 
All outstanding MPLS label stacks are stored as adata

3 years agoMoved route source attribute (RTS_*) to eattrs
Maria Matejka [Wed, 4 May 2022 12:41:51 +0000 (14:41 +0200)] 
Moved route source attribute (RTS_*) to eattrs

3 years agoRemoving the route scope attribute. Use custom attributes instead.
Maria Matejka [Wed, 4 May 2022 10:41:54 +0000 (12:41 +0200)] 
Removing the route scope attribute. Use custom attributes instead.

The route scope attribute was used for simple user route marking. As
there is a better tool for this (custom attributes), the old and limited
way can be dropped.

3 years agoMoved route preference to eattrs
Maria Matejka [Wed, 20 Apr 2022 10:24:26 +0000 (12:24 +0200)] 
Moved route preference to eattrs

3 years agoJoined the RTA igp_metric and EA igp_metric attributes
Maria Matejka [Wed, 20 Apr 2022 08:25:14 +0000 (10:25 +0200)] 
Joined the RTA igp_metric and EA igp_metric attributes

3 years agoRemoved forgotten remnants of unused enum rtc
Maria Matejka [Wed, 4 May 2022 10:33:01 +0000 (12:33 +0200)] 
Removed forgotten remnants of unused enum rtc

3 years agoConf: Allowing keyword redefinition
Maria Matejka [Wed, 4 May 2022 10:24:30 +0000 (12:24 +0200)] 
Conf: Allowing keyword redefinition

Some tokens are both keywords and symbols. For now, we allow only
specific keywords to be redefined; in future, more of the keywords may
be added to this category.

The redefinable keywords must be specified in any .Y file as follows:

  toksym: THE_KEYWORD ;

See proto/bgp/config.Y for an example.

Also dropped a lot of unused terminals.

3 years agoMoved advertising router info (FROM attribute) to eattrs
Maria Matejka [Wed, 20 Apr 2022 11:56:04 +0000 (13:56 +0200)] 
Moved advertising router info (FROM attribute) to eattrs

3 years agoExplicit definition structures of route attributes
Maria Matejka [Sat, 19 Mar 2022 15:23:42 +0000 (16:23 +0100)] 
Explicit definition structures of route attributes

Changes in internal API:

* Every route attribute must be defined as struct ea_class somewhere.
* Registration of route attributes known at startup must be done by
  ea_register_init() from protocol build functions.
* Every attribute has now its symbol registered in a global symbol table
  defined as SYM_ATTRIBUTE
* All attribute ID's are dynamically allocated.
* Attribute value custom formatting hook is defined in the ea_class.
* Attribute names are the same for display and filters, always prefixed
  by protocol name.

Also added some unit testing code for filters with route attributes.

3 years agoConf: Symbols are properly scoped
Maria Matejka [Mon, 2 May 2022 18:29:03 +0000 (20:29 +0200)] 
Conf: Symbols are properly scoped

Now there is a persistent root symbol scope and all scopes have their
symbol hashes to store local symbols and not leak any symbol out.

3 years agoReplaced boilerplate eattr allocation by ea_set_attr()
Maria Matejka [Thu, 14 Apr 2022 16:32:19 +0000 (18:32 +0200)] 
Replaced boilerplate eattr allocation by ea_set_attr()

3 years agoEnforcing certain data structure explicit paddings.
Maria Matejka [Thu, 14 Apr 2022 14:51:18 +0000 (16:51 +0200)] 
Enforcing certain data structure explicit paddings.

Implicit paddings have undefined values in C. We want the eattr blocks
to be comparable by memcmp and eattrs settable directly by structrure
literals. This check ensures that all paddings in eattr and bval are
explicit and therefore zeroed in all literals.

3 years agoLocal route attributes are always allocated from tmp_linpool
Maria Matejka [Sun, 10 Apr 2022 17:15:18 +0000 (19:15 +0200)] 
Local route attributes are always allocated from tmp_linpool

3 years agoFilters always allocate from tmp_linpool
Maria Matejka [Sun, 10 Apr 2022 16:55:15 +0000 (18:55 +0200)] 
Filters always allocate from tmp_linpool

3 years agoAttribute list normalization cleanup
Maria Matejka [Sun, 10 Apr 2022 12:11:46 +0000 (14:11 +0200)] 
Attribute list normalization cleanup

3 years agoComplex route attributes are data structures, shall be in lib also
Maria Matejka [Thu, 31 Mar 2022 17:22:07 +0000 (19:22 +0200)] 
Complex route attributes are data structures, shall be in lib also

3 years agoSplitting route data structures out to lib
Maria Matejka [Thu, 31 Mar 2022 17:09:38 +0000 (19:09 +0200)] 
Splitting route data structures out to lib

3 years agoFIB is a data structure generic enough to be in lib
Maria Matejka [Thu, 31 Mar 2022 17:00:00 +0000 (19:00 +0200)] 
FIB is a data structure generic enough to be in lib

3 years agoUnified attribute and filter types
Maria Matejka [Sat, 26 Mar 2022 10:56:02 +0000 (11:56 +0100)] 
Unified attribute and filter types

This commit removes the EAF_TYPE_* namespace completely and also for
route attributes, filter-based types T_* are used. This simplifies
fetching and setting route attributes from filters.

Also, there is now union bval which serves as an universal value holder
instead of private unions held separately by eattr and filter code.

3 years agoOpaque types are named opaque also in filters
Maria Matejka [Sat, 26 Mar 2022 11:40:46 +0000 (12:40 +0100)] 
Opaque types are named opaque also in filters

3 years agoImplicit ROA check converted to explicit filter instruction sequence
Maria Matejka [Sat, 19 Mar 2022 15:38:32 +0000 (16:38 +0100)] 
Implicit ROA check converted to explicit filter instruction sequence

3 years agoProtocols use EA_LITERAL_* to set attributes
Maria Matejka [Sun, 10 Apr 2022 17:31:50 +0000 (19:31 +0200)] 
Protocols use EA_LITERAL_* to set attributes

3 years agoMoved filter value union to lib
Maria Matejka [Thu, 31 Mar 2022 17:29:17 +0000 (19:29 +0200)] 
Moved filter value union to lib

3 years agoFilters: removing adata_empty() duplicating lp_alloc_adata()
Maria Matejka [Sat, 26 Mar 2022 14:05:03 +0000 (15:05 +0100)] 
Filters: removing adata_empty() duplicating lp_alloc_adata()

3 years agoSpecial attribute types for enums
Maria Matejka [Sat, 26 Mar 2022 11:37:41 +0000 (12:37 +0100)] 
Special attribute types for enums