mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 15:43:55 +00:00
bgpd: Only grab the confed path count if we are comparing it
This is just a small optimization but when calling path_info_cmp hundreds of millions of times this adds up. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
ed94fbfe5b
commit
e68550b8d8
@ -1133,9 +1133,9 @@ int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new,
|
||||
/* 4. AS path length check. */
|
||||
if (!CHECK_FLAG(bgp->flags, BGP_FLAG_ASPATH_IGNORE)) {
|
||||
int exist_hops = aspath_count_hops(existattr->aspath);
|
||||
int exist_confeds = aspath_count_confeds(existattr->aspath);
|
||||
|
||||
if (CHECK_FLAG(bgp->flags, BGP_FLAG_ASPATH_CONFED)) {
|
||||
int exist_confeds = aspath_count_confeds(existattr->aspath);
|
||||
int aspath_hops;
|
||||
|
||||
aspath_hops = aspath_count_hops(newattr->aspath);
|
||||
|
Loading…
Reference in New Issue
Block a user