diff options
author | Maria Matejka <mq@ucw.cz> | 2018-12-27 14:26:11 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2019-02-20 22:30:54 +0100 |
commit | 4c553c5a5b40c21ba67bd82455e79678b204cd07 (patch) | |
tree | 693d5744a125dc6dd6ed42124bf3a082cbf5503a /nest/config.Y | |
parent | 967b88d9388b3800efed45798542cd0b41f2b903 (diff) |
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.
Diffstat (limited to 'nest/config.Y')
-rw-r--r-- | nest/config.Y | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nest/config.Y b/nest/config.Y index aef5ed46..51fb0bd7 100644 --- a/nest/config.Y +++ b/nest/config.Y @@ -112,7 +112,7 @@ rtrid: idval: NUM { $$ = $1; } - | '(' term ')' { $$ = f_eval_int($2); } + | '(' term ')' { $$ = f_eval_int(f_postfixify($2)); } | IP4 { $$ = ip4_to_u32($1); } | SYM { if ($1->class == (SYM_CONSTANT | T_INT) || $1->class == (SYM_CONSTANT | T_QUAD)) @@ -732,7 +732,7 @@ CF_CLI(DUMP PROTOCOLS,,, [[Dump protocol information]]) { protos_dump_all(); cli_msg(0, ""); } ; CF_CLI(EVAL, term, <expr>, [[Evaluate an expression]]) -{ cmd_eval($2); } ; +{ cmd_eval(f_postfixify($2)); } ; CF_CLI_HELP(ECHO, ..., [[Control echoing of log messages]]) CF_CLI(ECHO, echo_mask echo_size, (all | off | { debug|trace|info|remote|warning|error|auth [, ...] }) [<buffer-size>], [[Control echoing of log messages]]) { @@ -790,7 +790,7 @@ proto_patt2: | TEXT { $$.ptr = $1; $$.patt = 1; } ; -dynamic_attr: IGP_METRIC { $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_INT, EA_GEN_IGP_METRIC); } ; +dynamic_attr: IGP_METRIC { $$ = f_new_dynamic_attr(EAF_TYPE_INT, 0, T_INT, EA_GEN_IGP_METRIC); } ; CF_CODE |