Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[platform/kernel/linux-rpi.git] / net / ipv4 / fib_semantics.c
index 01ed221..589caaa 100644 (file)
@@ -601,17 +601,9 @@ static void fib_rebalance(struct fib_info *fi)
                atomic_set(&nexthop_nh->nh_upper_bound, upper_bound);
        } endfor_nexthops(fi);
 }
-
-static inline void fib_add_weight(struct fib_info *fi,
-                                 const struct fib_nh *nh)
-{
-       fi->fib_weight += nh->nh_weight;
-}
-
 #else /* CONFIG_IP_ROUTE_MULTIPATH */
 
 #define fib_rebalance(fi) do { } while (0)
-#define fib_add_weight(fi, nh) do { } while (0)
 
 #endif /* CONFIG_IP_ROUTE_MULTIPATH */
 
@@ -774,8 +766,8 @@ bool fib_metrics_match(struct fib_config *cfg, struct fib_info *fi)
  *                                     |
  *                                     |-> {local prefix} (terminal node)
  */
-static int fib_check_nh(struct fib_config *cfg, struct fib_info *fi,
-                       struct fib_nh *nh, struct netlink_ext_ack *extack)
+static int fib_check_nh(struct fib_config *cfg, struct fib_nh *nh,
+                       struct netlink_ext_ack *extack)
 {
        int err = 0;
        struct net *net;
@@ -1258,7 +1250,7 @@ struct fib_info *fib_create_info(struct fib_config *cfg,
                int linkdown = 0;
 
                change_nexthops(fi) {
-                       err = fib_check_nh(cfg, fi, nexthop_nh, extack);
+                       err = fib_check_nh(cfg, nexthop_nh, extack);
                        if (err != 0)
                                goto failure;
                        if (nexthop_nh->nh_flags & RTNH_F_LINKDOWN)
@@ -1275,7 +1267,6 @@ struct fib_info *fib_create_info(struct fib_config *cfg,
 
        change_nexthops(fi) {
                fib_info_update_nh_saddr(net, nexthop_nh);
-               fib_add_weight(fi, nexthop_nh);
        } endfor_nexthops(fi)
 
        fib_rebalance(fi);