提交 0a837fe4 编写于 作者: P Peter Nørlund 提交者: David S. Miller

ipv4: Fix compilation errors in fib_rebalance

This fixes

net/built-in.o: In function `fib_rebalance':
fib_semantics.c:(.text+0x9df14): undefined reference to `__divdi3'

and

net/built-in.o: In function `fib_rebalance':
net/ipv4/fib_semantics.c:572: undefined reference to `__aeabi_ldivmod'

Fixes: 0e884c78 ("ipv4: L3 hash-based multipath")
Signed-off-by: NPeter Nørlund <pch@ordbogen.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0cdf5640
......@@ -569,8 +569,8 @@ static void fib_rebalance(struct fib_info *fi)
upper_bound = -1;
} else {
w += nexthop_nh->nh_weight;
upper_bound = DIV_ROUND_CLOSEST(2147483648LL * w,
total) - 1;
upper_bound = DIV_ROUND_CLOSEST_ULL((u64)w << 31,
total) - 1;
}
atomic_set(&nexthop_nh->nh_upper_bound, upper_bound);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册