diff options
| author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-05-13 18:13:02 -0700 |
|---|---|---|
| committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-10-25 11:13:39 -0400 |
| commit | a15d4c0089a6b8f59932df39357725feadfb9f91 (patch) | |
| tree | 7c01135c0cdb13b8da63225b7761d6762cb5dfd8 /zebra/zebra_rib.c | |
| parent | 0c8215cbab59480616fe31d8a81323070a21137b (diff) | |
zebra: Abstract the RB nodes/add dependents tree
Create a nhg_depenents tree that will function as a way
to get back pointers for NHE's depending on it.
Abstract the RB nodes into nhg_connected for both depends and
dependents. This same struct is used for both.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 957b7e14f4..7015ff77de 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -2638,7 +2638,7 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p, struct route_node *rn; struct route_entry *same = NULL; struct nhg_hash_entry *nhe = NULL; - struct nhg_depends_head nhg_depends = {0}; + struct nhg_connected_head nhg_depends = {0}; /* Default to route afi */ afi_t nhg_afi = afi; int ret = 0; @@ -2667,7 +2667,7 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p, struct nexthop lookup = {0}; struct nhg_hash_entry *depend = NULL; - zebra_nhg_depends_head_init(&nhg_depends); + zebra_nhg_connected_head_init(&nhg_depends); for (ALL_NEXTHOPS_PTR(re->ng, nh)) { lookup = *nh; @@ -2675,7 +2675,7 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p, lookup.next = NULL; /* Use the route afi here, since a single nh */ depend = zebra_nhg_find_nexthop(&lookup, afi); - zebra_nhg_depends_head_add(&nhg_depends, depend); + zebra_nhg_connected_head_add(&nhg_depends, depend); } /* change the afi for group */ @@ -2698,7 +2698,7 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p, EC_ZEBRA_TABLE_LOOKUP_FAILED, "Zebra failed to find or create a nexthop hash entry for id=%u in a route entry", re->nhe_id); - zebra_nhg_depends_free(&nhg_depends); + zebra_nhg_connected_head_free(&nhg_depends); } |
