lkml.org 
[lkml]   [2005]   [Oct]   [26]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
/
DateWed, 26 Oct 2005 04:36:12 -0400
FromSteve Dickson <>
SubjectBad nsec conversion in svc_udp_recvfrom()
In patch-2.6.14-rc5 there is the following:
@@ -584,13 +583,16 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
         /* possibly an icmp error */
         dprintk("svc: recvfrom returned error %d\n", -err);
     }
-   if (skb->stamp.tv_sec == 0) {
-       skb->stamp.tv_sec = xtime.tv_sec;
-       skb->stamp.tv_usec = xtime.tv_nsec / NSEC_PER_USEC;
+   if (skb->tstamp.off_sec == 0) {
+       struct timeval tv;
+
+       tv.tv_sec = xtime.tv_sec;
+       tv.tv_usec = xtime.tv_nsec * 1000;
+       skb_set_timestamp(skb, &tv);
         /* Don't enable netstamp, sunrpc doesn't
            need that much accuracy */
     }
-   svsk->sk_sk->sk_stamp = skb->stamp;
+   skb_get_timestamp(skb, &svsk->sk_sk->sk_stamp);
     set_bit(SK_DATA, &svsk->sk_flags); /* there may be more data... */
     /*
Shouldn't tv.tv_usec = xtime.tv_nsec * 1000
be tv.tv_usec = xtime.tv_nsec / 1000 or possible
tv.tv_usec = xtime.tv_nsec / NSEC_PER_USEC ?
The was fixed by a previous patch
(see http://lkml.org/lkml/2005/8/1/251)
but now it seems to be broken again...

steved.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-10-26 06:38    [W:0.327 / U:0.050 seconds]
©2003-2008 Jasper Spaans