summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-06-08 15:31:28 +0200
committerMaria Matejka <mq@ucw.cz>2022-06-08 15:31:28 +0200
commit4364ee9b6f3764c971ab111bf7dc87477fd7272c (patch)
tree7659db681e5df6bee24eb580d02ab286d5855ee5 /filter
parentcae5979871ee7aa341334f8b1af6bafc60ee9692 (diff)
parent938742decc6e1d6d3a0375dd012b75172e747bbc (diff)
Merge commit '938742decc6e1d6d3a0375dd012b75172e747bbc' into haugesund
Diffstat (limited to 'filter')
-rw-r--r--filter/f-inst.c6
-rw-r--r--filter/filter.c23
2 files changed, 1 insertions, 28 deletions
diff --git a/filter/f-inst.c b/filter/f-inst.c
index 1690c9f6..9ff5f79a 100644
--- a/filter/f-inst.c
+++ b/filter/f-inst.c
@@ -212,7 +212,6 @@
* m4_dnl NEVER_CONSTANT-> don't generate pre-interpretation code at all
* m4_dnl ACCESS_RTE -> check that route is available, also NEVER_CONSTANT
* m4_dnl ACCESS_EATTRS -> pre-cache the eattrs; use only with ACCESS_RTE
- * m4_dnl f_rta_cow(fs) -> function to call before any change to route should be done
*
* m4_dnl If you are stymied, see FI_CALL or FI_CONSTANT or just search for
* m4_dnl the mentioned macros in this file to see what is happening there in wild.
@@ -577,8 +576,6 @@
ARG_ANY(1);
STATIC_ATTR;
ARG_TYPE(1, sa.type);
-
- f_rta_cow(fs);
{
union {
struct nexthop_adata nha;
@@ -741,8 +738,6 @@
if (da->type >= EAF_TYPE__MAX)
bug("Unsupported attribute type");
- f_rta_cow(fs);
-
switch (da->type) {
case T_OPAQUE:
case T_IFACE:
@@ -770,7 +765,6 @@
ACCESS_RTE;
ACCESS_EATTRS;
- f_rta_cow(fs);
ea_unset_attr(fs->eattrs, 1, da);
}
diff --git a/filter/filter.c b/filter/filter.c
index 124c9932..ad2fafe2 100644
--- a/filter/filter.c
+++ b/filter/filter.c
@@ -96,28 +96,7 @@ void (*bt_assert_hook)(int result, const struct f_line_item *assert);
static inline void f_cache_eattrs(struct filter_state *fs)
{
- fs->eattrs = &(fs->rte->attrs->eattrs);
-}
-
-/*
- * rta_cow - prepare rta for modification by filter
- */
-static void
-f_rta_cow(struct filter_state *fs)
-{
- if (!rta_is_cached(fs->rte->attrs))
- return;
-
- /*
- * Get shallow copy of rta. Fields eattrs and nexthops of rta are shared
- * with fs->old_rta (they will be copied when the cached rta will be obtained
- * at the end of f_run()), also the lock of hostentry is inherited (we
- * suppose hostentry is not changed by filters).
- */
- fs->rte->attrs = rta_do_cow(fs->rte->attrs, tmp_linpool);
-
- /* Re-cache the ea_list */
- f_cache_eattrs(fs);
+ fs->eattrs = &(fs->rte->attrs);
}
static struct tbf rl_runtime_err = TBF_DEFAULT_LOG_LIMITS;