mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 22:29:23 +00:00
zebra: Add a nhe pointer to the route entry
Add a nexthop hash entry to the route_entry so that we can track the nhe with the route entry. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
3463f295e7
commit
f0cb8e16f0
@ -93,6 +93,8 @@ struct route_entry {
|
|||||||
/* Nexthop group from FIB (optional) */
|
/* Nexthop group from FIB (optional) */
|
||||||
struct nexthop_group fib_ng;
|
struct nexthop_group fib_ng;
|
||||||
|
|
||||||
|
struct nhg_hash_entry *nhe;
|
||||||
|
|
||||||
/* Tag */
|
/* Tag */
|
||||||
route_tag_t tag;
|
route_tag_t tag;
|
||||||
|
|
||||||
|
@ -158,7 +158,8 @@ bool zebra_nhg_hash_equal(const void *arg1, const void *arg2)
|
|||||||
*
|
*
|
||||||
* Avoiding code duplication hopefully.
|
* Avoiding code duplication hopefully.
|
||||||
*/
|
*/
|
||||||
static void zebra_nhg_lookup_get(struct hash *hash_table,
|
static struct nhg_hash_entry *
|
||||||
|
zebra_nhg_lookup_get(struct hash *hash_table,
|
||||||
struct nhg_hash_entry *lookup)
|
struct nhg_hash_entry *lookup)
|
||||||
{
|
{
|
||||||
struct nhg_hash_entry *nhe;
|
struct nhg_hash_entry *nhe;
|
||||||
@ -170,9 +171,7 @@ static void zebra_nhg_lookup_get(struct hash *hash_table,
|
|||||||
else
|
else
|
||||||
nhe->refcnt++;
|
nhe->refcnt++;
|
||||||
|
|
||||||
//re->ng = nhe->nhg;
|
return nhe;
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void zebra_nhg_find_id(uint32_t id, struct nexthop_group *nhg)
|
void zebra_nhg_find_id(uint32_t id, struct nexthop_group *nhg)
|
||||||
@ -194,7 +193,7 @@ void zebra_nhg_find(afi_t afi, struct nexthop_group *nhg,
|
|||||||
lookup.afi = afi;
|
lookup.afi = afi;
|
||||||
lookup.nhg = *nhg;
|
lookup.nhg = *nhg;
|
||||||
|
|
||||||
zebra_nhg_lookup_get(zrouter.nhgs, &lookup);
|
re->nhe = zebra_nhg_lookup_get(zrouter.nhgs, &lookup);
|
||||||
}
|
}
|
||||||
|
|
||||||
void zebra_nhg_release(afi_t afi, struct route_entry *re)
|
void zebra_nhg_release(afi_t afi, struct route_entry *re)
|
||||||
|
Loading…
Reference in New Issue
Block a user