Subject: Re: [RFC] support for IEEE 1588

From: Stephen Hemminger <[email-masked]>
Date: Thu, 3 Jul 2008 16:24:28 -0700

On Fri, 4 Jul 2008 01:47:11 +0300
Octavian Purdila <[email-masked]> wrote:

> 
> Hi everybody,
> 
> IEEE 1588 Precision Time Protocol [1] requires hardware timestamping support 
> for both RX and TX frames. It seems that in Linux we do not have the support 
> required for this protocol to be implemented. 
> 
> Any feedback on the approach we are planing to take is greatly appreciated. We 
> will follow with a patch at some point, but I just want to check with you 
> gurus early, to avoid potential design flaws. If a patch is preferred for 
> commenting on, then please ignore this and will come back later with the 
> patch.
> 
> 1. RX path
> - add a new field in skb to keep the hardware stamp (hwstamp)
> - add a new socket flag to enable RX stamping 
> - add a new control message to retrieve the hwstamp from the skb to user-space 
> application (for UDP and maybe PF_PACKET)

The existing skb timestamp is there, and if the hardware supports it, it could
be updated by the device driver  I had a version of sky2 that did just that
but never fully pushed it upstream because of available time and testing issues.

The API's are already there (and used) for timestamping; don't invent
new ones.