bgpd: Remove unused cumulative bandwidth variable

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2023-09-29 15:19:54 -04:00
parent 3e73271653
commit c18d7ddd78

View file

@ -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];