netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] tcp: cdg: use div_u64()
@ 2015-06-12 15:24 Kenneth Klette Jonassen
  2015-06-14 19:58 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Kenneth Klette Jonassen @ 2015-06-12 15:24 UTC (permalink / raw)
  To: netdev; +Cc: Kenneth Klette Jonassen

Fixes cross-compile to mips.

Signed-off-by: Kenneth Klette Jonassen <kennetkl@ifi.uio.no>
---
Fixes build error for mips-allyesconfig:

  net/built-in.o: In function `tcp_cdg_cong_avoid':
>> tcp_cdg.c:(.text+0x217774): undefined reference to `__udivdi3'

https://lists.01.org/pipermail/kbuild-all/2015-June/010142.html
---
 net/ipv4/tcp_cdg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/tcp_cdg.c b/net/ipv4/tcp_cdg.c
index a52ce2d..8c6fd3d 100644
--- a/net/ipv4/tcp_cdg.c
+++ b/net/ipv4/tcp_cdg.c
@@ -145,7 +145,7 @@ static void tcp_cdg_hystart_update(struct sock *sk)
 		return;
 
 	if (hystart_detect & HYSTART_ACK_TRAIN) {
-		u32 now_us = local_clock() / NSEC_PER_USEC;
+		u32 now_us = div_u64(local_clock(), NSEC_PER_USEC);
 
 		if (ca->last_ack == 0 || !tcp_is_cwnd_limited(sk)) {
 			ca->last_ack = now_us;
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-14 19:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-12 15:24 [PATCH net-next] tcp: cdg: use div_u64() Kenneth Klette Jonassen
2015-06-14 19:58 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).