summaryrefslogtreecommitdiff
path: root/zebra/zebra_nhg.h
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_nhg.h')
-rw-r--r--zebra/zebra_nhg.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/zebra/zebra_nhg.h b/zebra/zebra_nhg.h
index 0863d90a7e..6d2ab248f9 100644
--- a/zebra/zebra_nhg.h
+++ b/zebra/zebra_nhg.h
@@ -79,16 +79,34 @@ struct nhg_hash_entry {
uint32_t flags;
- /* Dependency tree for other entries.
+ /* Dependency trees for other entries.
* For instance a group with two
* nexthops will have two dependencies
* pointing to those nhg_hash_entries.
*
* Using a rb tree here to make lookups
* 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 thread *timer;
+
/*
* Is this nexthop group valid, ie all nexthops are fully resolved.
* What is fully resolved? It's a nexthop that is either self contained
@@ -130,6 +148,15 @@ struct nhg_hash_entry {
#define NEXTHOP_GROUP_PROTO_RELEASED (1 << 5)
/*
+ * When deleting a NHG notice that it is still installed
+ * and if it is, slightly delay the actual removal to
+ * the future. So that upper level protocols might
+ * be able to take advantage of some NHG's that
+ * are there
+ */
+#define NEXTHOP_GROUP_KEEP_AROUND (1 << 6)
+
+/*
* Track FPM installation status..
*/
#define NEXTHOP_GROUP_FPM (1 << 6)