netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-2.6.22] [TCP]: Fix linkage errors.
@ 2007-04-24 15:17 YOSHIFUJI Hideaki / 吉藤英明
  2007-04-24 15:53 ` Adrian Bunk
  0 siblings, 1 reply; 18+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-04-24 15:17 UTC (permalink / raw)
  To: davem; +Cc: shemminger, netdev

Recent ktime_t changes had introduced linkage errors.

| WARNING: "__divdi3" [net/ipv4/tcp_veno.ko] undefined!
| WARNING: "__divdi3" [net/ipv4/tcp_vegas.ko] undefined!
| WARNING: "__divdi3" [net/ipv4/tcp_lp.ko] undefined!
| WARNING: "__divdi3" [net/ipv4/tcp_illinois.ko] undefined!

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

---
diff --git a/net/ipv4/tcp_illinois.c b/net/ipv4/tcp_illinois.c
index 8e31659..0cec615 100644
--- a/net/ipv4/tcp_illinois.c
+++ b/net/ipv4/tcp_illinois.c
@@ -87,10 +87,12 @@ static void tcp_illinois_acked(struct sock *sk, u32 pkts_acked, ktime_t last)
 {
 	struct illinois *ca = inet_csk_ca(sk);
 	u32 rtt;
+	struct timeval tv;
 
 	ca->acked = pkts_acked;
 
-	rtt = ktime_to_ns(net_timedelta(last)) / NSEC_PER_USEC;
+	tv = ktime_to_timeval(net_timedelta(last));
+	rtt = tv.tv_sec * USEC_PER_SEC + tv.tv_usec;
 
 	/* ignore bogus values, this prevents wraparound in alpha math */
 	if (rtt > RTT_MAX)
diff --git a/net/ipv4/tcp_lp.c b/net/ipv4/tcp_lp.c
index b4e062a..0b990ea 100644
--- a/net/ipv4/tcp_lp.c
+++ b/net/ipv4/tcp_lp.c
@@ -265,8 +265,10 @@ static void tcp_lp_pkts_acked(struct sock *sk, u32 num_acked, ktime_t last)
 {
 	struct tcp_sock *tp = tcp_sk(sk);
 	struct lp *lp = inet_csk_ca(sk);
+	struct timeval tv;
 
-	tcp_lp_rtt_sample(sk,  ktime_to_ns(net_timedelta(last)) / NSEC_PER_USEC);
+	tv = ktime_to_timeval(net_timedelta(last));
+	tcp_lp_rtt_sample(sk, tv.tv_sec * USEC_PER_SEC + tv.tv_usec);
 
 	/* calc inference */
 	if (tcp_time_stamp > tp->rx_opt.rcv_tsecr)
diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c
index 0f0ee7f..c13dc16 100644
--- a/net/ipv4/tcp_vegas.c
+++ b/net/ipv4/tcp_vegas.c
@@ -116,9 +116,11 @@ void tcp_vegas_pkts_acked(struct sock *sk, u32 cnt, ktime_t last)
 {
 	struct vegas *vegas = inet_csk_ca(sk);
 	u32 vrtt;
+	struct timeval tv;
 
 	/* Never allow zero rtt or baseRTT */
-	vrtt = (ktime_to_ns(net_timedelta(last)) / NSEC_PER_USEC) + 1;
+	tv = ktime_to_timeval(net_timedelta(last));
+	vrtt = tv.tv_sec * USEC_PER_SEC + tv.tv_usec;
 
 	/* Filter to find propagation delay: */
 	if (vrtt < vegas->baseRTT)
diff --git a/net/ipv4/tcp_veno.c b/net/ipv4/tcp_veno.c
index 0b50d06..a439c49 100644
--- a/net/ipv4/tcp_veno.c
+++ b/net/ipv4/tcp_veno.c
@@ -73,9 +73,11 @@ static void tcp_veno_pkts_acked(struct sock *sk, u32 cnt, ktime_t last)
 {
 	struct veno *veno = inet_csk_ca(sk);
 	u32 vrtt;
+	struct timeval tv;
 
 	/* Never allow zero rtt or baseRTT */
-	vrtt = (ktime_to_ns(net_timedelta(last)) / NSEC_PER_USEC) + 1;
+	tv = ktime_to_timeval(net_timedelta(last));
+	vrtt = tv.tv_sec * USEC_PER_SEC + tv.tv_usec;
 
 	/* Filter to find propagation delay: */
 	if (vrtt < veno->basertt)

-- 
YOSHIFUJI Hideaki @ USAGI Project  <yoshfuji@linux-ipv6.org>
GPG-FP  : 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

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

end of thread, other threads:[~2007-04-24 23:21 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-24 15:17 [net-2.6.22] [TCP]: Fix linkage errors YOSHIFUJI Hideaki / 吉藤英明
2007-04-24 15:53 ` Adrian Bunk
2007-04-24 15:58   ` YOSHIFUJI Hideaki / 吉藤英明
2007-04-24 16:10     ` YOSHIFUJI Hideaki / 吉藤英明
2007-04-24 16:38       ` Eric Dumazet
2007-04-24 17:04         ` [PATCH] Fix build errors on 32bit platforms with new ktime Stephen Hemminger
2007-04-24 18:19           ` Adrian Bunk
2007-04-24 18:48           ` Eric Dumazet
2007-04-24 21:54             ` David Miller
2007-04-24 21:55           ` YOSHIFUJI Hideaki / 吉藤英明
2007-04-24 21:57             ` Stephen Hemminger
2007-04-24 22:12               ` Eric Dumazet
2007-04-24 22:29                 ` Stephen Hemminger
2007-04-24 22:15               ` Thomas Gleixner
2007-04-24 22:49                 ` YOSHIFUJI Hideaki / 吉藤英明
2007-04-24 23:22                   ` David Miller
2007-04-24 16:03   ` [net-2.6.22] [TCP]: Fix linkage errors Eric Dumazet
2007-04-24 18:17     ` Adrian Bunk

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).