提交 c7c3e591 编写于 作者: D David Ahern 提交者: David S. Miller

net: ipv4: remove fib_weight

fib_weight in fib_info is set but not used. Remove it and the
helpers for setting it.
Signed-off-by: NDavid Ahern <dsahern@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 fadad670
...@@ -122,9 +122,6 @@ struct fib_info { ...@@ -122,9 +122,6 @@ struct fib_info {
#define fib_rtt fib_metrics->metrics[RTAX_RTT-1] #define fib_rtt fib_metrics->metrics[RTAX_RTT-1]
#define fib_advmss fib_metrics->metrics[RTAX_ADVMSS-1] #define fib_advmss fib_metrics->metrics[RTAX_ADVMSS-1]
int fib_nhs; int fib_nhs;
#ifdef CONFIG_IP_ROUTE_MULTIPATH
int fib_weight;
#endif
struct rcu_head rcu; struct rcu_head rcu;
struct fib_nh fib_nh[0]; struct fib_nh fib_nh[0];
#define fib_dev fib_nh[0].nh_dev #define fib_dev fib_nh[0].nh_dev
......
...@@ -601,17 +601,9 @@ static void fib_rebalance(struct fib_info *fi) ...@@ -601,17 +601,9 @@ static void fib_rebalance(struct fib_info *fi)
atomic_set(&nexthop_nh->nh_upper_bound, upper_bound); atomic_set(&nexthop_nh->nh_upper_bound, upper_bound);
} endfor_nexthops(fi); } 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 */ #else /* CONFIG_IP_ROUTE_MULTIPATH */
#define fib_rebalance(fi) do { } while (0) #define fib_rebalance(fi) do { } while (0)
#define fib_add_weight(fi, nh) do { } while (0)
#endif /* CONFIG_IP_ROUTE_MULTIPATH */ #endif /* CONFIG_IP_ROUTE_MULTIPATH */
...@@ -1275,7 +1267,6 @@ struct fib_info *fib_create_info(struct fib_config *cfg, ...@@ -1275,7 +1267,6 @@ struct fib_info *fib_create_info(struct fib_config *cfg,
change_nexthops(fi) { change_nexthops(fi) {
fib_info_update_nh_saddr(net, nexthop_nh); fib_info_update_nh_saddr(net, nexthop_nh);
fib_add_weight(fi, nexthop_nh);
} endfor_nexthops(fi) } endfor_nexthops(fi)
fib_rebalance(fi); fib_rebalance(fi);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册