From: Richard Cochran <richardcochran@gmail.com>
To: Miroslav Lichvar <mlichvar@redhat.com>
Cc: netdev@vger.kernel.org, "Keller, Jacob E" <jacob.e.keller@intel.com>
Subject: Re: Improving accuracy of PHC readings
Date: Mon, 22 Oct 2018 15:48:02 -0700 [thread overview]
Message-ID: <20181022224802.5injr523fgw2c4qz@localhost> (raw)
In-Reply-To: <20181019095137.GG4407@localhost>
On Fri, Oct 19, 2018 at 11:51:37AM +0200, Miroslav Lichvar wrote:
> A solution to this would be a new driver function that wraps the
> latching register read with readings of the system clock and return
> three timestamps instead of one. For example:
>
> ktime_get_real_ts64(&sys_ts1);
> IXGBE_READ_REG(hw, IXGBE_SYSTIMR);
> ktime_get_real_ts64(&sys_ts2);
> phc_ts.tv_nsec = IXGBE_READ_REG(hw, IXGBE_SYSTIML);
> phc_ts.tv_sec = IXGBE_READ_REG(hw, IXGBE_SYSTIMH);
Makes sense...
> The extra timestamp doesn't fit the API of the PTP_SYS_OFFSET ioctl,
> so it would need to shift the timestamp it returns by the missing
> intervals (assuming the frequency offset between the PHC and system
> clock is small), or a new ioctl could be introduced that would return
> all timestamps in an array looking like this:
>
> [sys, phc, sys, sys, phc, sys, ...]
How about a new ioctl with number of trials as input and single offset
as output?
Then it would be up to the driver to implement the device-specific
loop.
Thanks,
Richard
next prev parent reply other threads:[~2018-10-23 7:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-19 9:51 Improving accuracy of PHC readings Miroslav Lichvar
2018-10-19 16:52 ` Keller, Jacob E
2018-10-22 22:48 ` Richard Cochran
2018-10-23 16:48 ` Miroslav Lichvar
2018-10-22 22:48 ` Richard Cochran [this message]
2018-10-23 14:07 ` Miroslav Lichvar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181022224802.5injr523fgw2c4qz@localhost \
--to=richardcochran@gmail.com \
--cc=jacob.e.keller@intel.com \
--cc=mlichvar@redhat.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).