tcpdump mailing list archives

Re: [RFC PATCH 0/2]: hw timestamp support


From: "Mcmillan, Scott A" <scott.a.mcmillan () intel com>
Date: Tue, 1 Jun 2010 07:44:55 -0700

Guy,

The response describing the difference between the "nic" and "raw" timestamps is 
http://article.gmane.org/gmane.network.tcpdump.devel/4592.

"How does "-j raw" differ from "-j nic"?  The NIC has its own clock source, that runs at a different rate than the
system clock (it a slight oversimplification to say 'the' system clock as a modern system has several
clocks).  When a packet is timestamped by the nic, the timestamp is in the NIC clock basis (the 'raw'
timestamp).  The 'raw' timestamp is not directly comparable to timestamps from any other clock source."

"In Linux, the NIC driver is responsible for maintaining the current offset and skew between the nic clock
and the system clock.  With the skew and offset, the 'raw' timestamp is transformed into the system clock
basis, yielding what I call the 'nic' timestamp source.  The 'nic' timestamp can be directly compared to
other timestamped events on the system, and with highly accurate time synchronization provided by PTP,
to other systems.  Linux stores both the 'raw' and the 'nic' timestamp as part of the packet metadata."

I should add that the two flavors of the hw timestamp are already present in Linux - I did not add this capability.  My 
kernel patch only allows the user to indicate what type of timestamp is preferred, and if available, use it, and if 
not, gracefully fall back to sw timestamps.  

The updated tcpdump patch I posted simplifies this situation by removing the option to select the "raw" timestamps.  

Thanks,
Scott

-----Original Message-----
From: tcpdump-workers-owner () lists tcpdump org [mailto:tcpdump-workers-owner () lists tcpdump org] On Behalf Of Guy 
Harris
Sent: Friday, May 28, 2010 10:30 PM
To: tcpdump-workers () lists tcpdump org
Subject: Re: [tcpdump-workers] [RFC PATCH 0/2]: hw timestamp support


On May 26, 2010, at 9:03 AM, Mcmillan, Scott A wrote:

Both the 'raw' and 'nic' timestamps are in the form of seconds since the Unix epoch, plus fractions of a second.  
Please see my response to Darren for more info on the difference between these two timestamp sources.

Which reply was that?  I saw a reply with

Darren,

Various flavors of timestamping are available on Intel NICs.  For example, the 82576 can timestamp PTP packets in hw, 
but not general purpose packets.  My guess is that the 82575 behaves like the 82576 with respect to hw timestamping, 
but I'm not sure. Please refer to the product docs.  

In the Linux driver, the PTP hw timestamping and general purpose packet timestamping paths have much in common. (see 
IGB_PER_PKT_TIMESTAMP in the Linux igb stable driver, http://sourceforge.net/projects/e1000/files/).  

Scott

Does that mean that the additional information is in the product documentation and/or the Linux driver code?-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: