From: Igor Putovny Date: Thu, 19 Sep 2024 15:12:15 +0000 (+0200) Subject: Remove settle timer X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af235e32e96f328e2565c12d44bacb4e830ca685;p=thirdparty%2Fbird.git Remove settle timer --- diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index 2efd70efe..1f60f1bc7 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -85,7 +85,6 @@ #include "nest/iface.h" #include "filter/filter.h" #include "proto/aggregator/aggregator.h" -#include "lib/settle.h" #include #include @@ -1029,19 +1028,6 @@ flush_aggregator(struct aggregator_proto *p) memset(p->bucket_list, 0, sizeof(p->bucket_list[0]) * p->bucket_list_size); } -static void -request_feed_on_settle_timer(struct settle *s) -{ - struct aggregator_proto *p = SKIP_BACK(struct aggregator_proto, p, s->tm.data); - - assert(PREFIX_AGGR == p->aggr_mode); - assert(p->root == NULL); - - times_update(&main_timeloop); - log("==== FEED START ===="); - channel_request_feeding(p->src); -} - static void trie_init(struct aggregator_proto *p); static void @@ -1443,17 +1429,6 @@ aggregator_rt_notify(struct proto *P, struct channel *src_ch, net *net, rte *new if (p->p.proto_state != PS_UP) return; - if (PREFIX_AGGR == p->aggr_mode) - { - assert(p->root == NULL); - - /* - * Don't kick settle timer during initial feed. That would cause - * cyclic calls to rt_notify() without receiving any new updates. - */ - if (!p->first_run) - settle_kick(&p->notify_settle); - } /* Find the objects for the old route */ if (old) @@ -1700,7 +1675,6 @@ aggregator_init(struct proto_config *CF) p->aggr_on_da_count = cf->aggr_on_da_count; p->aggr_on = cf->aggr_on; p->merge_by = cf->merge_by; - p->notify_settle_cf = cf->notify_settle_cf; p->logging = cf->logging; p->bucket_list = NULL; p->bucket_list_size = 0; @@ -1818,7 +1792,6 @@ aggregator_start(struct proto *P) { assert(p->trie_pool == NULL); p->trie_pool = lp_new(P->pool); - settle_init(&p->notify_settle, &p->notify_settle_cf, request_feed_on_settle_timer, p); assert(p->bucket_list == NULL); assert(p->bucket_list_size == 0); @@ -1843,8 +1816,6 @@ aggregator_shutdown(struct proto *P) { struct aggregator_proto *p = SKIP_BACK(struct aggregator_proto, p, P); - settle_cancel(&p->notify_settle); - assert(p->root == NULL); flush_aggregator(p); @@ -1856,8 +1827,6 @@ aggregator_cleanup(struct proto *P) { struct aggregator_proto *p = SKIP_BACK(struct aggregator_proto, p, P); - assert(!tm_active(&p->notify_settle.tm)); - /* * Linpools will be freed with other protocol resources but pointers * have to be erased because protocol may be started again @@ -1890,10 +1859,6 @@ aggregator_reconfigure(struct proto *P, struct proto_config *CF) TRACE(D_EVENTS, "Reconfiguring"); - /* Compare timer configuration */ - if (cf->notify_settle_cf.min != p->notify_settle_cf.min || cf->notify_settle_cf.max != p->notify_settle_cf.max) - return 0; - /* Compare numeric values (shortcut) */ if (cf->aggr_on_count != p->aggr_on_count) return 0; diff --git a/proto/aggregator/aggregator.h b/proto/aggregator/aggregator.h index deaa7aa28..201972091 100644 --- a/proto/aggregator/aggregator.h +++ b/proto/aggregator/aggregator.h @@ -16,7 +16,6 @@ #include "nest/bird.h" #include "nest/protocol.h" #include "lib/hash.h" -#include "lib/settle.h" #define BUCKET_LIST_INIT_SIZE 16 #define POTENTIAL_BUCKETS_BITMAP_SIZE 8 @@ -34,7 +33,6 @@ struct aggregator_config { uint aggr_on_da_count; struct aggr_item *aggr_on; const struct f_line *merge_by; - struct settle_config notify_settle_cf; int logging; }; @@ -81,8 +79,6 @@ struct aggregator_proto { uint addr_type; linpool *trie_pool; struct trie_node *root; - struct settle_config notify_settle_cf; - struct settle notify_settle; int before_count; int after_count; int internal_nodes; diff --git a/proto/aggregator/config.Y b/proto/aggregator/config.Y index 02d50dfa9..f73a6dfa2 100644 --- a/proto/aggregator/config.Y +++ b/proto/aggregator/config.Y @@ -11,7 +11,6 @@ CF_HDR #include "proto/aggregator/aggregator.h" -#include "lib/settle.h" CF_DEFINES @@ -45,11 +44,6 @@ aggregator_proto_start: proto_start AGGREGATOR AGGREGATOR_CFG->src->ra_mode = RA_OPTIMAL; AGGREGATOR_CFG->dst->ra_mode = RA_ANY; AGGREGATOR_CFG->logging = 0; - - AGGREGATOR_CFG->notify_settle_cf = (struct settle_config) { - .min = 10 MS_, - .max = 100 MS_, - }; }; aggregator_proto_item: @@ -97,7 +91,6 @@ aggregator_proto_item: $4->args++; AGGREGATOR_CFG->merge_by = $4; } - | RELOAD AFTER settle { AGGREGATOR_CFG->notify_settle_cf = $3; } | LOG ALL { AGGREGATOR_CFG->logging = 1; } ; @@ -155,16 +148,6 @@ aggr_item: } ; -/* Settle timer configuration */ -settle: - expr_us expr_us { - if ($1 > $2) - cf_error("Minimum settle time %t is bigger than maximum settle time %t", $1, $2); - $$.min = $1 MS_; - $$.max = $2 MS_; - } - ; - CF_CODE CF_END