Re: [chrony-dev] SW/HW timestamping on Linux

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


Yes, comp is an abbreviation for compensation. One will always an add and the other is always a subtract. This is because the timestamps are defined as being at the php layer (last bit of the SFD), but the timestamps are being taken at the mii layer. For inbound, the phy layer precedes the mii layer which means that the timestamp has to be adjusted backward in time, hence the subtract. For outbound, the phy later succeeds the mii layer which means that the timestamp has to be adjusted forward in time, hence the add. Have a look at the igb kernel driver or linuxptp for examples.

I understand the desire to keep everything consistent in terms of seconds. I am concerned that this will lead to a lot of errors on people’s part because the values are always going to be two digit microseconds or under. For 100Mb on an i354 (more compensation than an i210/i211) the values would be:

  hwtimestamp igb0 txcomp 0.000001188 rxcomp 0.000002566

And for the more common 1Gb:

  hwtimestamp igb0 txcomp 0.000000300 rxcomp 0.000000645

As networks get faster, these compensations will get smaller.

This is derived from the description used by linuxptp:

txcomp
Specifies the difference in nanoseconds between the actual transmission
time at the physical layer and the reported transmit time stamp. This
value will be added to transmit time stamps obtained from the network
card. The default is 0.
rxcomp
Specifies the difference in nanoseconds between the reported receive
time stamp and the actual reception time at the physical layer. This value
will be subtracted from receive time stamps obtained from the network
card. The default is 0.

Does this work for you?

Denny



> On Jan 5, 2017, at 03:53, Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
> 
> On Mon, Jan 02, 2017 at 10:54:16PM -0800, Denny Page wrote:
>> That would be great. For option names, I would suggest something like:
>> 
>>  hwtimestamp igb0 txcomp 178 rxcomp 448
>> 
>> txcomp is the number of nanoseconds to add to tx timestamps
>> rxcomp is the number of nanoseconds to subtract from rx timestamps
> 
> Ok, this looks doable.
> 
> comp as short for compensation? Why is one adding and the other
> substracting? Would it be ok with you if the values were specified in
> seconds to be consistent with other options?
> 
> If you could prepare a short description (or patch) for these options
> I could put in the man page, that would be great too :).
> 
> -- 
> Miroslav Lichvar
> 
> -- 
> To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
> For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
> Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.
> 


--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/