mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 18:37:06 +00:00
zebra: Document some data structures better
I keep getting confused about nhg_depends and nhg_dependents. So take a second and write them down for the next person. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
46179f6f3e
commit
5772319ef1
@ -79,13 +79,29 @@ struct nhg_hash_entry {
|
|||||||
|
|
||||||
uint32_t flags;
|
uint32_t flags;
|
||||||
|
|
||||||
/* Dependency tree for other entries.
|
/* Dependency trees for other entries.
|
||||||
* For instance a group with two
|
* For instance a group with two
|
||||||
* nexthops will have two dependencies
|
* nexthops will have two dependencies
|
||||||
* pointing to those nhg_hash_entries.
|
* pointing to those nhg_hash_entries.
|
||||||
*
|
*
|
||||||
* Using a rb tree here to make lookups
|
* Using a rb tree here to make lookups
|
||||||
* faster with ID's.
|
* faster with ID's.
|
||||||
|
*
|
||||||
|
* nhg_depends the RB tree of entries that this
|
||||||
|
* group contains.
|
||||||
|
*
|
||||||
|
* nhg_dependents the RB tree of entries that
|
||||||
|
* this group is being used by
|
||||||
|
*
|
||||||
|
* NHG id 3 with nexthops id 1/2
|
||||||
|
* nhg(3)->nhg_depends has 1 and 2 in the tree
|
||||||
|
* nhg(3)->nhg_dependents is empty
|
||||||
|
*
|
||||||
|
* nhg(1)->nhg_depends is empty
|
||||||
|
* nhg(1)->nhg_dependents is 3 in the tree
|
||||||
|
*
|
||||||
|
* nhg(2)->nhg_depends is empty
|
||||||
|
* nhg(3)->nhg_dependents is 3 in the tree
|
||||||
*/
|
*/
|
||||||
struct nhg_connected_tree_head nhg_depends, nhg_dependents;
|
struct nhg_connected_tree_head nhg_depends, nhg_dependents;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user