]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Remove unused cumulative bandwidth variable
authorDonald Sharp <sharpd@nvidia.com>
Fri, 29 Sep 2023 19:19:54 +0000 (15:19 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 12 Oct 2023 17:35:39 +0000 (13:35 -0400)
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_zebra.c

index 50835ff86c37b7e9160e4d1db1bc88ef85aaa516..212b7f398b4c3254433110fdbc73dfb19b0479a5 100644 (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];