Commit 0a837fe4 authored by Peter Nørlund's avatar Peter Nørlund Committed by 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: default avatarPeter Nørlund <pch@ordbogen.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0cdf5640
...@@ -569,7 +569,7 @@ static void fib_rebalance(struct fib_info *fi) ...@@ -569,7 +569,7 @@ static void fib_rebalance(struct fib_info *fi)
upper_bound = -1; upper_bound = -1;
} else { } else {
w += nexthop_nh->nh_weight; w += nexthop_nh->nh_weight;
upper_bound = DIV_ROUND_CLOSEST(2147483648LL * w, upper_bound = DIV_ROUND_CLOSEST_ULL((u64)w << 31,
total) - 1; total) - 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment