Skip to content

Commit

Permalink
bgpd: Remove unused cumulative bandwidth variable
Browse files Browse the repository at this point in the history
Signed-off-by: Donald Sharp <[email protected]>
  • Loading branch information
donaldsharp committed Oct 12, 2023
1 parent dc8a5c5 commit ce7faa9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions bgpd/bgp_zebra.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit ce7faa9

Please sign in to comment.