summaryrefslogtreecommitdiff
path: root/filter/filter.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-09-21 16:53:17 +0200
committerMaria Matejka <mq@ucw.cz>2022-09-21 17:48:31 +0200
commitf51837ace6bfa357f45c6bb5f573fd61a3f1f039 (patch)
treeb9255e3c4291007a34020c703ea98cdc2b11bab2 /filter/filter.c
parent05c63ae734f4dcfeb479e4bd69550f6ce4fef1d7 (diff)
Caching eattrs in filters is not needed anymore.
After flattening the route attribute structure, the ea_list ** is derivable from rte * by arithmetics. Caching the derived value doesn't help performance and therefore is removed as unnecessary.
Diffstat (limited to 'filter/filter.c')
-rw-r--r--filter/filter.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/filter/filter.c b/filter/filter.c
index 9a94545c..0aff4d30 100644
--- a/filter/filter.c
+++ b/filter/filter.c
@@ -76,9 +76,6 @@ struct filter_state {
/* The route we are processing. This may be NULL to indicate no route available. */
struct rte *rte;
- /* Cached pointer to ea_list */
- struct ea_list **eattrs;
-
/* Buffer for log output */
struct buffer buf;
@@ -94,11 +91,6 @@ void (*bt_assert_hook)(int result, const struct f_line_item *assert);
#define f_stack_init(fs) ( _f_stack_init(fs, v, 128), _f_stack_init(fs, e, 128) )
-static inline void f_cache_eattrs(struct filter_state *fs)
-{
- fs->eattrs = &(fs->rte->attrs);
-}
-
static struct tbf rl_runtime_err = TBF_DEFAULT_LOG_LIMITS;
/**
@@ -164,8 +156,6 @@ interpret(struct filter_state *fs, const struct f_line *line, struct f_val *val)
#define falloc(size) tmp_alloc(size)
#define fpool tmp_linpool
-#define ACCESS_EATTRS do { if (!fs->eattrs) f_cache_eattrs(fs); } while (0)
-
#include "filter/inst-interpret.c"
#undef res
#undef v1
@@ -174,7 +164,6 @@ interpret(struct filter_state *fs, const struct f_line *line, struct f_val *val)
#undef runtime
#undef falloc
#undef fpool
-#undef ACCESS_EATTRS
}
}