Thread (34 messages) 34 messages, 6 authors, 2007-03-09

Re: CLOCK_MONOTONIC datagram timestamps by the kernel

From: Stephen Hemminger <hidden>
Date: 2007-02-28 18:22:34

On Wed, 28 Feb 2007 14:37:49 +0100
John [off-list ref] wrote:
John wrote:
quoted
I know it's possible to have Linux timestamp incoming datagrams as soon
as they are received, then for one to retrieve this timestamp later with
an ioctl command or a recvmsg call.
Has it ever been proposed to modify struct skb_timeval to hold 
nanosecond stamps instead of just microsecond stamps? Then make the 
improved precision somehow available to user space.
I am playing with a couple of possible future changes.
1. Change skb timestamp to be a timespec instead of timeval, for ABI
   compatiablity the existing SO_TIMESTAMP has to stay microseconds,
   but add a new SO_TIMESPEC to get the nanosecond version.

   The change gets non trivial because of other uses of timestamp (like vegas)
   so I gave up for now.

2. Use hardware receive timestamp in Yukon2 to put actual receive time
   into skb timestamp.  Works, but still figuring out how to manage
   clock skew/resync.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help