Maria Matejka
2e8e901262
Aggregator moved to a separate protocol
...
Also updated data structures and reconfigure.
Known bug: the hash doesn't take adata into account. Needs fixing!
2023-07-10 13:46:09 +02:00
Maria Matejka
8ccc4d0679
Aggregator: polishing of filter API
2023-06-23 11:28:19 +02:00
Igor Putovny
e9d9dc7561
Basic route aggregation
...
User can specify list of route attributes in the configuration file
and run route aggregation on the export side of the pipe protocol.
Routes are sorted and for every group of equivalent routes
new route is created and exported to the routing table.
It is also possible to specify filter which will run for every
route before aggregation.
Furthermore, it will be possible to set attributes of new routes
according to attributes of the aggregated routes.
This is a work in progress.
2023-06-23 09:43:38 +02:00
Maria Matejka
7b49ba1e65
Filter: The for loop uses the method system for type dispatch
2023-06-19 17:32:19 +02:00
Maria Matejka
c73343de67
Revert "Reducing filter stack size to allow for lesser thread stack size"
...
This reverts commit 2c13759136
.
2022-09-16 10:11:51 +02:00
Maria Matejka
2e5bfeb73a
Merge remote-tracking branch 'origin/master' into backport
2022-07-11 11:08:10 +02:00
Ondrej Zajicek (work)
a2527ee53d
Filter: Improve handling of stack frames in filter bytecode
...
When f_line is done, we have to pop the stack frame. The old code just
removed nominal number of args/vars. Change it to use stored ventry value
modified by number of returned values. This allows to allocate variables
on a stack frame during execution of f_lines instead of just at start.
But we need to know the number of returned values for a f_line. It is 1
for term, 0 for cmd. Store that to f_line during linearization.
2022-06-27 21:13:32 +02:00
Maria Matejka
2c13759136
Reducing filter stack size to allow for lesser thread stack size
2021-09-10 18:11:28 +02:00
Ondrej Zajicek (work)
ff2ca10cba
Filter: Add support for src/dst accessors for Flowspec and SADR
2019-12-09 04:23:01 +01:00
Ondrej Zajicek (work)
87512e9751
Filter: Improve typecheck error messages
2019-11-05 15:30:16 +01:00
Ondrej Zajicek (work)
ea0917bcba
Filter: Fix eval command
2019-09-24 00:18:48 +02:00
Maria Matejka
3782454e8d
Filter: Simpler filter context allocation
2019-07-15 15:46:36 +02:00
Maria Matejka
c0999a149c
Filter: Converted FI_PRINT and FI_PATHMASK_CONSTRUCT to VARARG
2019-07-15 15:12:18 +02:00
Maria Matejka
0da06b7103
Filter: lots of documentation
2019-07-15 13:19:01 +02:00
Maria Matejka
547be53b8c
Filter: Don't fail badly when trying to access non-existent route in config time
2019-07-15 12:03:13 +02:00
Ondrej Zajicek (work)
bfa15a642f
Filter: Minor cleanups
2019-07-10 16:47:17 +02:00
Maria Matejka
84ac62d396
Filter: CLI command to dump all the linearized filters
2019-07-03 08:27:56 +02:00
Maria Matejka
b40c0f028f
Filter: Pre-evaluation of constant expressions
2019-07-02 10:45:53 +02:00
Maria Matejka
a84b8b6ebb
Revert "Filter: Dropped the setter instructions in favor of direct result storage."
...
This reverts commit bd91338246
.
2019-06-19 14:09:57 +02:00
Maria Matejka
87c82334a7
Filter: removal of semantically insane consts in filter_commit
2019-06-13 14:24:48 +02:00
Maria Matejka
bd91338246
Filter: Dropped the setter instructions in favor of direct result storage.
...
This should help filter performance a bit.
2019-06-03 10:41:35 +02:00
Maria Matejka
aa6c5f4d92
Filter: Just a little comments in filter structure
2019-05-30 14:42:54 +02:00
Maria Matejka
1757a6fce5
Filter: Stacks moved to thread-local storage if available.
2019-05-29 21:03:52 +02:00
Jan Maria Matejka
6479e403ef
Filters: If somebody doesn't like _Thread_local, don't fail for now, just be a little slower.
...
When the parallel execution comes into place, we'll likely enforce this
C11 feature. It's much simpler and also faster than pthread_[sg]etspecific().
2019-05-23 11:27:24 +00:00
Jan Maria Matejka
96d757c13f
Filter: Store variables and function arguments on stack
2019-05-21 16:33:37 +00:00
Jan Maria Matejka
20c6ea70cc
Filter: Making the filter state thread local.
...
While having the filter code still reentrant if we really need,
the compiler can now do constant propagation and address the
thread local storage directly to save some computation time.
2019-05-20 17:53:10 +00:00
Maria Matejka
f249d0b84c
Filters: comparison of functions and filters caching
2019-02-26 16:44:24 +01:00
Maria Matejka
d1039926f5
Filter: Interpreter merged into the common m4 generator.
...
The config-time partial evaluation of constant expressions in filters is nearby.
2019-02-20 22:30:55 +01:00
Maria Matejka
ea4f55e3dc
Filter: More cleanup -- customized structures also in struct f_line_item
2019-02-20 22:30:55 +01:00
Maria Matejka
0b39b1cbb7
Conf: Symbol implementation converted from void pointers to union
...
... and consted some declarations.
2019-02-20 22:30:55 +01:00
Maria Matejka
132529ce89
Filter: merged filter compare functions into common M4 file
2019-02-20 22:30:55 +01:00
Maria Matejka
dd4d409551
Filter: Merged postfixify routine
2019-02-20 22:30:54 +01:00
Maria Matejka
de12cd18fb
Filter: Merged filter line item dumpers into common generated source
2019-02-20 22:30:54 +01:00
Maria Matejka
b256f24145
Filter: auto-generating enum-to-string
2019-02-20 22:30:54 +01:00
Maria Matejka
5289304519
Filter data manipulation functions separated to their file
2019-02-20 22:30:54 +01:00
Maria Matejka
4f082dfa89
Filter: merged filter instruction constructors, counting line size on instruction construct
2019-02-20 22:30:54 +01:00
Maria Matejka
8bdb05edb2
Filters: split the large filter.h file to smaller files.
...
This should be revised, there are still ugly things in the filter API.
2019-02-20 22:30:54 +01:00
Maria Matejka
c1e97169cd
Filter: M4 convertors polished a bit.
2019-02-20 22:30:54 +01:00
Maria Matejka
9b46748d5b
Filter: refactoring of instruction constructors
2019-02-20 22:30:54 +01:00
Maria Matejka
4c553c5a5b
Filter refactoring: dropped the recursion from the interpreter
...
This is a major change of how the filters are interpreted. If everything
works how it should, it should not affect you unless you are hacking the
filters themselves.
Anyway, this change should make a huge improvement in the filter performance
as previous benchmarks showed that our major problem lies in the
recursion itself.
There are also some changes in nest and protocols, related mostly to
spreading const declarations throughout the whole BIRD and also to
refactored dynamic attribute definitions. The need of these came up
during the whole work and it is too difficult to split out these
not-so-related changes.
2019-02-20 22:30:54 +01:00
Maria Matejka
967b88d938
Filter refactoring: The instructions are converted to the switch body by M4
2019-02-20 22:30:54 +01:00
Maria Matejka
8436040735
Filter refactoring: Drop the roa check specific f_inst
2019-02-20 22:30:54 +01:00
Maria Matejka
7f0ac73724
Filter refactoring: Changed arguments from separate unions to an array
2019-02-20 22:30:54 +01:00
Maria Matejka
224b77d4f7
Filter refactoring: Converted condition to three-args instruction
2019-02-20 22:30:54 +01:00
Maria Matejka
8e8b1fe48c
Filter refactoring: Some instructions eat up excessively much space.
2019-02-20 22:30:54 +01:00
Maria Matejka
a8740d6c09
Filter refactoring: indentation fix
2019-02-20 22:30:54 +01:00
Jan Maria Matejka
fc8df41ec6
Filter refactoring: The values are now saved on a custom stack.
...
This shall help with performance.
2019-02-20 22:30:54 +01:00
Jan Maria Matejka
7afa143886
Filter refactoring: Passing the resulting struct f_val as a pointer.
...
This also drops the multiplexing of errors with the f_val itself
together with the T_RETURN f_val type flag.
2019-02-20 22:30:54 +01:00
Jan Maria Matejka
f62a369fb4
Filter refactoring: Moved filter instruction definition to a separate file
2019-02-20 22:30:54 +01:00
Jan Maria Matejka
25566c6810
Filter refactoring: Moved the bitfield bit position formula to route.h
2019-02-20 22:30:54 +01:00