From f51837ace6bfa357f45c6bb5f573fd61a3f1f039 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 21 Sep 2022 16:53:17 +0200 Subject: 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. --- filter/filter.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'filter/filter.c') 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 } } -- cgit v1.2.3