summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_zebra.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-09-29 21:19:54 +0200
committerDonald Sharp <sharpd@nvidia.com>2023-10-12 19:35:39 +0200
commitc18d7ddd78ea976b79b4719c8d795fa376fbb213 (patch)
tree062ea870b634a1a9d2f9538dc3a2826d392ace81 /bgpd/bgp_zebra.c
parentbgpd: Just pass down the Bandwidth unmodified so that Zebra can use it (diff)
downloadfrr-c18d7ddd78ea976b79b4719c8d795fa376fbb213.tar.xz
frr-c18d7ddd78ea976b79b4719c8d795fa376fbb213.zip
bgpd: Remove unused cumulative bandwidth variable
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_zebra.c')
-rw-r--r--bgpd/bgp_zebra.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 50835ff86..212b7f398 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -1207,7 +1207,7 @@ static bool update_ipv6nh_for_route_install(int nh_othervrf, struct bgp *nh_bgp,
}
static bool bgp_zebra_use_nhop_weighted(struct bgp *bgp, struct attr *attr,
- uint64_t tot_bw, uint32_t *nh_weight)
+ uint32_t *nh_weight)
{
/* zero link-bandwidth and link-bandwidth not present are treated
* as the same situation.
@@ -1249,7 +1249,6 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p,
int nh_othervrf = 0;
bool nh_updated = false;
bool do_wt_ecmp;
- uint64_t cum_bw = 0;
uint32_t nhg_id = 0;
bool is_add;
uint32_t ttl = 0;
@@ -1333,8 +1332,6 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p,
/* Determine if we're doing weighted ECMP or not */
do_wt_ecmp = bgp_path_info_mpath_chkwtd(bgp, info);
- if (do_wt_ecmp)
- cum_bw = bgp_path_info_mpath_cumbw(info);
/* EVPN MAC-IP routes are installed with a L3 NHG id */
if (bgp_evpn_path_es_use_nhg(bgp, info, &nhg_id)) {
@@ -1376,7 +1373,7 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p,
*/
if (do_wt_ecmp) {
if (!bgp_zebra_use_nhop_weighted(bgp, mpinfo->attr,
- cum_bw, &nh_weight))
+ &nh_weight))
continue;
}
api_nh = &api.nexthops[valid_nh_count];