mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 16:42:32 +00:00
Merge pull request #6833 from donaldsharp/pcount_selected
bgpd: Add to neighbor prefix-counts the count of best path selected
This commit is contained in:
commit
5a45d61308
@ -11651,6 +11651,7 @@ enum bgp_pcounts {
|
|||||||
PCOUNT_VALID,
|
PCOUNT_VALID,
|
||||||
PCOUNT_ALL,
|
PCOUNT_ALL,
|
||||||
PCOUNT_COUNTED,
|
PCOUNT_COUNTED,
|
||||||
|
PCOUNT_BPATH_SELECTED,
|
||||||
PCOUNT_PFCNT, /* the figure we display to users */
|
PCOUNT_PFCNT, /* the figure we display to users */
|
||||||
PCOUNT_MAX,
|
PCOUNT_MAX,
|
||||||
};
|
};
|
||||||
@ -11664,6 +11665,7 @@ static const char *const pcount_strs[] = {
|
|||||||
[PCOUNT_VALID] = "Valid",
|
[PCOUNT_VALID] = "Valid",
|
||||||
[PCOUNT_ALL] = "All RIB",
|
[PCOUNT_ALL] = "All RIB",
|
||||||
[PCOUNT_COUNTED] = "PfxCt counted",
|
[PCOUNT_COUNTED] = "PfxCt counted",
|
||||||
|
[PCOUNT_BPATH_SELECTED] = "PfxCt Best Selected",
|
||||||
[PCOUNT_PFCNT] = "Useable",
|
[PCOUNT_PFCNT] = "Useable",
|
||||||
[PCOUNT_MAX] = NULL,
|
[PCOUNT_MAX] = NULL,
|
||||||
};
|
};
|
||||||
@ -11704,6 +11706,8 @@ static void bgp_peer_count_proc(struct bgp_dest *rn, struct peer_pcounts *pc)
|
|||||||
pc->count[PCOUNT_VALID]++;
|
pc->count[PCOUNT_VALID]++;
|
||||||
if (!CHECK_FLAG(pi->flags, BGP_PATH_UNUSEABLE))
|
if (!CHECK_FLAG(pi->flags, BGP_PATH_UNUSEABLE))
|
||||||
pc->count[PCOUNT_PFCNT]++;
|
pc->count[PCOUNT_PFCNT]++;
|
||||||
|
if (CHECK_FLAG(pi->flags, BGP_PATH_SELECTED))
|
||||||
|
pc->count[PCOUNT_BPATH_SELECTED]++;
|
||||||
|
|
||||||
if (CHECK_FLAG(pi->flags, BGP_PATH_COUNTED)) {
|
if (CHECK_FLAG(pi->flags, BGP_PATH_COUNTED)) {
|
||||||
pc->count[PCOUNT_COUNTED]++;
|
pc->count[PCOUNT_COUNTED]++;
|
||||||
|
Loading…
Reference in New Issue
Block a user