On Tue, Feb 17, 2015 at 11:34:26AM +0100, Axel Holzinger wrote:
> as you Richard were the main force doing the work for adding hardware
> timestamping to the Linux kernel, could you enlight me how the association
> of a timestamp residing in kernel space (I guess in the ethernet device
> driver's domain) and a PTP message is handled by the kernel? I'm asking
> myself which PTP message fields actually are chosen to get the right
> timestamp for a message. Or is every network packet timestamped and the
> association is done by a hash or crc or something similar?

This is done differently in every driver, depending on the hardware.

Some hardware provides the time stamp "in band", for example in the
frame's buffer descriptor or in the frame data.  In this case, the
association is clear.

Other (worse) hardware provides the time stamp "out of band", separate
from the frame, in a time stamp fifo for example.  Sometimes there is
no fifo but rather a single register!  In these cases, the driver must
somehow match the time stamp with a frame.  Some hardware provides
various matching fields with the time stamp, like sequence number,
message type, or a hash over multiple fields.  It all depends on the
hardware.  If you look into various drivers, you will find functions
called match().  There you can see exactly what fields are used.

HTH
Richard

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to