mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 19:10:35 +00:00
zebra: Add some basic flags to the zebra nexthop group
We need to track if a nexthop group is valid and installed, so create some basic flags to track this. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
21be136402
commit
c8ee3cdb39
@ -36,6 +36,21 @@ struct nhg_hash_entry {
|
|||||||
|
|
||||||
uint32_t refcnt;
|
uint32_t refcnt;
|
||||||
uint32_t dplane_ref;
|
uint32_t dplane_ref;
|
||||||
|
|
||||||
|
uint32_t flags;
|
||||||
|
/*
|
||||||
|
* Is this nexthop group valid, ie all nexthops are fully resolved.
|
||||||
|
* What is fully resolved? It's a nexthop that is either self contained
|
||||||
|
* and correct( ie no recursive pointer ) or a nexthop that is recursively
|
||||||
|
* resolved and correct.
|
||||||
|
*/
|
||||||
|
#define NEXTHOP_GROUP_VALID 0x1
|
||||||
|
/*
|
||||||
|
* Has this nexthop group been installed? At this point in time, this
|
||||||
|
* means that the data-plane has been told about this nexthop group
|
||||||
|
* and it's possible usage by a route entry.
|
||||||
|
*/
|
||||||
|
#define NEXTHOP_GROUP_INSTALLED 0x2
|
||||||
};
|
};
|
||||||
|
|
||||||
void zebra_nhg_init(void);
|
void zebra_nhg_init(void);
|
||||||
|
@ -1118,8 +1118,11 @@ static void show_nexthop_group_cmd_helper(struct vty *vty,
|
|||||||
if (nhe->vrf_id != zvrf->vrf->vrf_id)
|
if (nhe->vrf_id != zvrf->vrf->vrf_id)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
vty_out(vty, "Group: %u RefCnt: %u afi: %d\n", nhe->dplane_ref,
|
vty_out(vty,
|
||||||
nhe->refcnt, nhe->afi);
|
"Group: %u RefCnt: %u afi: %d Valid: %d Installed: %d\n",
|
||||||
|
nhe->dplane_ref, nhe->refcnt, nhe->afi,
|
||||||
|
nhe->flags & NEXTHOP_GROUP_VALID,
|
||||||
|
nhe->flags & NEXTHOP_GROUP_INSTALLED);
|
||||||
|
|
||||||
for (ALL_NEXTHOPS(nhe->nhg, nhop)) {
|
for (ALL_NEXTHOPS(nhe->nhg, nhop)) {
|
||||||
vty_out(vty, " ");
|
vty_out(vty, " ");
|
||||||
|
Loading…
Reference in New Issue
Block a user