From: Igor Putovny Date: Mon, 24 Feb 2025 11:38:08 +0000 (+0100) Subject: Fix comments X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89b3a54c58f2cb14a777ce6427ed6730cd5f6262;p=thirdparty%2Fbird.git Fix comments --- diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index 77ee8c69e..da61bf183 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -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) diff --git a/proto/aggregator/aggregator.h b/proto/aggregator/aggregator.h index f48296fb7..314b32cbf 100644 --- a/proto/aggregator/aggregator.h +++ b/proto/aggregator/aggregator.h @@ -1,9 +1,9 @@ /* * BIRD -- Aggregator Pseudoprotocol * - * (c) 2023--2024 Igor Putovny - * (c) 2023--2024 Maria Matejka - * (c) 2024 CZ.NIC z.s.p.o. + * (c) 2023--2025 Igor Putovny + * (c) 2023--2025 Maria Matejka + * (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; diff --git a/proto/aggregator/trie.c b/proto/aggregator/trie.c index bc31bf89c..b175d7354 100644 --- a/proto/aggregator/trie.c +++ b/proto/aggregator/trie.c @@ -61,11 +61,9 @@ * 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