[Linuxptp-devel] Frequency offset computation

2015-11-11 Thread Bassam Alsanie
There is something I need to understand in the ptp4l implementation in order to implement my custom clock driver correctly. Regards clockajd::clockadj_set_freq(... double freq); What does the 'freq' parameter above represent? Does the freq parameter above represent the requested ppb, or the requ

Re: [Linuxptp-devel] Frequency offset computation

2015-11-11 Thread Bassam Alsanie
I need to make my homework first. After looking into the function adjtimes things made more sense to me. The missing piece in my understand for now that the timex.freq unit is in ppm and its long, so no fractions for the ppb. After I looked into the kernel module igb_ptp.c it has a function to adju

Re: [Linuxptp-devel] Frequency offset computation

2015-11-12 Thread Richard Cochran
On Wed, Nov 11, 2015 at 02:37:28PM -0600, Bassam Alsanie wrote: > I need to make my homework first. > After looking into the function adjtimes things made more sense to me. > The missing piece in my understand for now that the timex.freq unit is in > ppm and its long, so no fractions for the ppb.

Re: [Linuxptp-devel] Frequency offset computation

2015-11-12 Thread Bassam Alsanie
On Thu, Nov 12, 2015 at 2:08 AM, Richard Cochran wrote: > On Wed, Nov 11, 2015 at 02:37:28PM -0600, Bassam Alsanie wrote: > > I need to make my homework first. > > After looking into the function adjtimes things made more sense to me. > > The missing piece in my understand for now that the timex.

Re: [Linuxptp-devel] Frequency offset computation

2015-11-12 Thread Richard Cochran
On Thu, Nov 12, 2015 at 10:15:04AM -0600, Bassam Alsanie wrote: > and my custom clock I can compute the frequency shift as the following: > > __u16 fraction = ((__u64) tx.freq & 0x); > __u16 integer = (__u64) tx.freq >> 16; > __u64 requestedPpb = (integer * 1000) + fraction; > >

Re: [Linuxptp-devel] Frequency offset computation

2015-11-12 Thread Bassam Alsanie
On Thu, Nov 12, 2015 at 11:16 AM, Richard Cochran wrote: > On Thu, Nov 12, 2015 at 10:15:04AM -0600, Bassam Alsanie wrote: > > and my custom clock I can compute the frequency shift as the following: > > > > __u16 fraction = ((__u64) tx.freq & 0x); > > __u16 integer = (__u64) tx.f

Re: [Linuxptp-devel] Frequency offset computation

2015-11-12 Thread Keller, Jacob E
On Thu, 2015-11-12 at 14:37 -0600, Bassam Alsanie wrote: I will be going over the PHC APIs and some of the kernel PHC modules to get deeper understand. Just to let you know why my questions seem little bit weird. I am working on developing a user mode framework for to accessing the hardware (for

Re: [Linuxptp-devel] Frequency offset computation

2015-11-12 Thread Richard Cochran
On Thu, Nov 12, 2015 at 02:37:53PM -0600, Bassam Alsanie wrote: > I will be going over the PHC APIs and some of the kernel PHC modules to get > deeper understand. > Just to let you know why my questions seem little bit weird. I am working > on developing a user mode framework for to accessing the h

Re: [Linuxptp-devel] Frequency offset computation

2015-11-13 Thread alsanie80
Sent from my T-Mobile 4G LTE Device Original message From: Richard Cochran Date: 11/13/2015 1:56 AM (GMT-06:00) To: Bassam Alsanie Cc: linuxptp-devel@lists.sourceforge.net Subject: Re: [Linuxptp-devel] Frequency offset computation On Thu, Nov 12, 2015 at 02:37:53PM