]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Rename
authorIgor Putovny <igor.putovny@nic.cz>
Wed, 12 Jun 2024 15:27:05 +0000 (17:27 +0200)
committerIgor Putovny <igor.putovny@nic.cz>
Wed, 12 Jun 2024 15:27:05 +0000 (17:27 +0200)
proto/aggregator/aggregator.c
proto/aggregator/aggregator.h
proto/aggregator/config.Y

index a46c78274ef225459481a27d220494800ec14e84..dd8e0b56040be21e8342a3fdbb452e6b04e6a67c 100644 (file)
@@ -900,7 +900,7 @@ run_aggregation(struct aggregator_proto *p)
 }
 
 static void
-flush_trie(struct aggregator_proto *p)
+flush_aggregator(struct aggregator_proto *p)
 {
   lp_flush(p->bucket_pool);
   lp_flush(p->route_pool);
@@ -929,7 +929,7 @@ aggregate_on_feed_end(struct channel *C)
   if (C == p->src)
   {
     run_aggregation(p);
-    flush_trie(p);
+    flush_aggregator(p);
     p->root = NULL;
 
     if (p->first_run)
@@ -1497,7 +1497,7 @@ aggregator_rt_notify(struct proto *P, struct channel *src_ch, net *net, rte *new
   }
 
   assert(p->root != NULL);
-  settle_kick(&p->aggr_timer);
+  settle_kick(&p->notify_settle);
 }
 
 static int
@@ -1555,7 +1555,7 @@ aggregator_init(struct proto_config *CF)
   p->aggr_on = cf->aggr_on;
   p->net_present = cf->net_present;
   p->merge_by = cf->merge_by;
-  p->aggr_timer_cf = cf->aggr_timer_cf;
+  p->notify_settle_cf = cf->notify_settle_cf;
 
   P->rt_notify = aggregator_rt_notify;
   P->preexport = aggregator_preexport;
@@ -1652,7 +1652,7 @@ aggregator_start(struct proto *P)
   p->first_run = 1;
   p->aggr_done = 0;
 
-  settle_init(&p->aggr_timer, &p->aggr_timer_cf, aggregate_on_settle_timer, p);
+  settle_init(&p->notify_settle, &p->notify_settle_cf, aggregate_on_settle_timer, p);
 
   return PS_UP;
 }
@@ -1678,7 +1678,7 @@ aggregator_shutdown(struct proto *P)
   }
   HASH_WALK_END;
 
-  settle_cancel(&p->aggr_timer);
+  settle_cancel(&p->notify_settle);
 
   assert(p->root != NULL);
   p->root = NULL;
@@ -1695,7 +1695,7 @@ aggregator_reconfigure(struct proto *P, struct proto_config *CF)
   TRACE(D_EVENTS, "Reconfiguring");
 
   /* Compare timer configuration */
-  if (cf->aggr_timer_cf.min != p->aggr_timer_cf.min || cf->aggr_timer_cf.max != p->aggr_timer_cf.max)
+  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) */
index d6cda91e8559a9232840bf0421a28b3f9e85eeff..8c27d4bf646f988e1102cc5f597226539140d166 100644 (file)
@@ -28,7 +28,7 @@ struct aggregator_config {
   struct aggr_item *aggr_on;
   int net_present;
   const struct f_line *merge_by;
-  struct settle_config aggr_timer_cf;
+  struct settle_config notify_settle_cf;
 };
 
 struct aggregator_route {
@@ -74,8 +74,8 @@ struct aggregator_proto {
   uint addr_type;
   linpool *trie_pool;
   struct trie_node *root;
-  struct settle_config aggr_timer_cf;
-  struct settle aggr_timer;
+  struct settle_config notify_settle_cf;
+  struct settle notify_settle;
   int before_count;
   int after_count;
   int aggr_done;
index 4d6651c2ce1ac356e10f7f18ce2b71b396d5d530..6483151b6379e2e64f0f16531bae229f5d1f51c5 100644 (file)
@@ -38,7 +38,7 @@ aggregator_proto_start: proto_start AGGREGATOR
   AGGREGATOR_CFG->dst = channel_config_new(NULL, "destination", 0, this_proto);
   AGGREGATOR_CFG->src->ra_mode = AGGREGATOR_CFG->dst->ra_mode = RA_ANY;
 
-  AGGREGATOR_CFG->aggr_timer_cf = (struct settle_config) {
+  AGGREGATOR_CFG->notify_settle_cf = (struct settle_config) {
     .min = 10 MS_,
     .max = 100 MS_,
   };
@@ -84,7 +84,7 @@ aggregator_proto_item:
    $4->args++;
    AGGREGATOR_CFG->merge_by = $4;
  }
- | RELOAD AFTER settle { AGGREGATOR_CFG->aggr_timer_cf = $3; }
+ | RELOAD AFTER settle { AGGREGATOR_CFG->notify_settle_cf = $3; }
 ;
 
 aggregator_proto_opts: /* empty */ | aggregator_proto_opts aggregator_proto_item ';' ;