[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070425.005845.113682267.yoshfuji@linux-ipv6.org>
Date: Wed, 25 Apr 2007 00:58:45 +0900 (JST)
From: YOSHIFUJI Hideaki / 吉藤英明
<yoshfuji@...ux-ipv6.org>
To: bunk@...sta.de
Cc: davem@...emloft.net, shemminger@...l.org, netdev@...r.kernel.org,
tglx@...utronix.de, yoshfuji@...ux-ipv6.org
Subject: Re: [net-2.6.22] [TCP]: Fix linkage errors.
In article <20070424155324.GL3468@...sta.de> (at Tue, 24 Apr 2007 17:53:24 +0200), Adrian Bunk <bunk@...sta.de> says:
> On Wed, Apr 25, 2007 at 12:17:43AM +0900, YOSHIFUJI Hideaki / 吉藤英明 wrote:
> > 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@...ux-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)
> >...
>
> Couldn't this be better solved by adding something like the following
> to include/linux/ktime.h ?
>
> static inline s64 ktime_to_us(const ktime_t kt)
> {
> return (s64) kt.tv.sec * USEC_PER_SEC + kt.tv.nsec / NSEC_PER_USEC;
> }
>
That will introduce same error, won't it?
--yoshfuji
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists