]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Revert "Replace uint with u32" ip-aggregator-prefix
authorIgor Putovny <igor.putovny@nic.cz>
Tue, 29 Apr 2025 12:44:37 +0000 (14:44 +0200)
committerIgor Putovny <igor.putovny@nic.cz>
Tue, 29 Apr 2025 13:01:15 +0000 (15:01 +0200)
This reverts commit e0f228bd98fde24458779e48658c999df92813f2.

proto/aggregator/aggregator.c
proto/aggregator/aggregator.h

index e8759b9eac93cf4ec423f1e6be9ab74fe3b8ecd4..55fc327441ed9358f6deb04e4d67e8ba77e04548 100644 (file)
@@ -217,7 +217,7 @@ aggregator_rta_set_static_attr(struct rta *rta, const struct rta *old, struct f_
 static int
 aggregator_same_val_list(const struct f_val *v1, const struct f_val *v2, uint len)
 {
-  for (u32 i = 0; i < len; i++)
+  for (uint i = 0; i < len; i++)
     if (!val_same(&v1[i], &v2[i]))
       return 0;
 
@@ -250,7 +250,7 @@ aggregator_bucket_update(struct aggregator_proto *p, struct aggregator_bucket *b
   rta->eattrs = eal;
 
   /* Seed the attributes from aggregator rule */
-  for (u32 i = 0; i < p->aggr_on_count; i++)
+  for (uint i = 0; i < p->aggr_on_count; i++)
   {
     if (p->aggr_on[i].type == AGGR_ITEM_DYNAMIC_ATTR)
     {
@@ -545,7 +545,7 @@ aggregator_rt_notify(struct proto *P, struct channel *src_ch, net *net, rte *new
     struct aggregator_bucket *tmp_bucket = allocz(sizeof(*tmp_bucket) + sizeof(tmp_bucket->aggr_data[0]) * p->aggr_on_count);
     ASSERT_DIE(tmp_bucket->id == 0);
 
-    for (u32 val_idx = 0; val_idx < p->aggr_on_count; val_idx++)
+    for (uint val_idx = 0; val_idx < p->aggr_on_count; val_idx++)
     {
       int type = p->aggr_on[val_idx].type;
       struct f_val *pos = &tmp_bucket->aggr_data[val_idx];
@@ -606,7 +606,7 @@ aggregator_rt_notify(struct proto *P, struct channel *src_ch, net *net, rte *new
     u64 haux = 0;
     mem_hash_init(&haux);
 
-    for (u32 i = 0; i < p->aggr_on_count; i++)
+    for (uint i = 0; i < p->aggr_on_count; i++)
     {
       mem_hash_mix_num(&haux, tmp_bucket->aggr_data[i].type);
 
@@ -1013,7 +1013,7 @@ aggregator_reconfigure(struct proto *P, struct proto_config *CF)
     return 0;
 
   /* Compare aggregator rule */
-  for (u32 i = 0; i < p->aggr_on_count; i++)
+  for (uint i = 0; i < p->aggr_on_count; i++)
   {
     switch (cf->aggr_on[i].type)
     {
index 22fe611bfca686c408c0bfb94acc227be71af6f5..bce497f748d524548ba18766773ea3e6aef6e0b2 100644 (file)
@@ -29,8 +29,8 @@ struct aggregator_config {
   struct proto_config c;
   struct channel_config *src, *dst;
   struct aggr_item *aggr_on;
-  u32 aggr_on_count;
-  u32 aggr_on_da_count;
+  uint aggr_on_count;
+  uint aggr_on_da_count;
   const struct f_line *merge_by;
   enum aggregation_mode aggr_mode;
   bool logging;
@@ -77,8 +77,8 @@ struct aggregator_proto {
 
   /* Aggregator rule */
   struct aggr_item *aggr_on;
-  u32 aggr_on_count;
-  u32 aggr_on_da_count;
+  uint aggr_on_count;
+  uint aggr_on_da_count;
 
   /* Merge filter */
   const struct f_line *merge_by;
@@ -87,7 +87,7 @@ struct aggregator_proto {
   /* Aggregation trie */
   struct trie_node *root;
   struct slab *trie_slab;
-  u32 addr_type;
+  uint addr_type;
   int bitmap_size;
   bool initial_feed;
   bool logging;