]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fix comments
authorIgor Putovny <igor.putovny@nic.cz>
Mon, 24 Feb 2025 11:38:08 +0000 (12:38 +0100)
committerIgor Putovny <igor.putovny@nic.cz>
Mon, 24 Feb 2025 11:38:08 +0000 (12:38 +0100)
proto/aggregator/aggregator.c
proto/aggregator/aggregator.h
proto/aggregator/trie.c

index 77ee8c69ef0f9efb81607e6a17c4f891767e4e57..da61bf183aaef450e8636231d396d1f09692461e 100644 (file)
@@ -23,7 +23,8 @@
  *
  * Aggregation of prefixes aggregates a given set of prefixes into another set
  * of prefixes. It offers a reduction in number of prefixes without changing
- * the routing semantics.
+ * the routing semantics. Aggregator is capable of processing incremental
+ * updates.
  *
  * The algorithm works with the assumption that there is a default route, that is,
  * the null prefix at the root node has a bucket.
@@ -63,7 +64,7 @@ aggregator_get_new_bucket_id(struct aggregator_proto *p)
 }
 
 /*
- * Insert @bucket to the list of bucket pointers in @p to position @bucket-ID
+ * Insert @bucket to the list of bucket pointers in @p to position @bucket.id
  */
 static void
 agregator_insert_bucket(struct aggregator_proto *p, struct aggregator_bucket *bucket)
index f48296fb7b6c98532a0946618ac275181cfafced..314b32cbf1514e00f9bcae37cf6482e49b2dfd8a 100644 (file)
@@ -1,9 +1,9 @@
 /*
  *     BIRD -- Aggregator Pseudoprotocol
  *
- *     (c) 2023--2024 Igor Putovny <igor.putovny@nic.cz>
- *     (c) 2023--2024 Maria Matejka <mq@ucw.cz>
- *     (c) 2024       CZ.NIC z.s.p.o.
+ *     (c) 2023--2025 Igor Putovny <igor.putovny@nic.cz>
+ *     (c) 2023--2025 Maria Matejka <mq@ucw.cz>
+ *     (c) 2025       CZ.NIC z.s.p.o.
  *
  *     Can be freely distributed and used under the terms of the GNU GPL.
  *
@@ -47,15 +47,15 @@ struct aggregator_route {
 
 struct aggregator_bucket {
   struct aggregator_bucket *next_hash;
-  struct rte *rte;                     /* Pointer to struct aggregator_route.rte */
-  struct rte_src *last_src;            /* Which src we announced the bucket last with */
+  struct rte *rte;                      /* Pointer to struct aggregator_route.rte */
+  struct rte_src *last_src;             /* Which src we announced the bucket last with */
   u32 count;
   u32 hash;
   u32 id;
   struct f_val aggr_data[0];
 };
 
-/* Structure containing information needed for route withdrawal */
+/* Information needed for route withdrawal */
 struct rte_withdrawal_item {
   struct rte_withdrawal_item *next;
   struct aggregator_bucket *bucket;
@@ -97,6 +97,7 @@ struct aggregator_proto {
 
   struct hmap bucket_id_map;
 
+  /* Route withdrawal */
   linpool *rte_withdrawal_pool;
   struct rte_withdrawal_item *rte_withdrawal_stack;
   int rte_withdrawal_count;
index bc31bf89c6b4f08b4fb982818ae80e8aba4a6333..b175d735405f9a07909c452f9222029f729dc6cc 100644 (file)
  * From a practical point of view, our implementation differs a little bit from
  * the algorithm as it was described in the original paper.
  * During first pass, the trie is normalized by adding new nodes so that every
- * node has either zero or two children. These nodes are used only for
- * computing of node's set of potential buckets from the sets of its children.
- * We can therefore afford to not add these nodes to save both time and memory.
- * Another change is performing the work previously done in the first pass
- * during second pass, saving one trie traversal.
+ * node has either zero or two children. We do not add these nodes to save both
+ * time and memory. Another difference is that work previously done in the first
+ * pass is now done during second pass, saving one traversal through the trie.
  */
 
 #undef LOCAL_DEBUG