netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christopher Hall <christopher.s.hall@intel.com>
To: richardcochran@gmail.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	john.ronciak@intel.com, john.stultz@linaro.org,
	tglx@linutronix.de, christopher.s.hall@intel.com
Subject: [PATCH v2 0/1] Add PTP cross-timestamp to the PTP driver interface
Date: Thu,  2 Jul 2015 18:14:47 -0700	[thread overview]
Message-ID: <1435886088-13890-1-git-send-email-christopher.s.hall@intel.com> (raw)

This patch allows system and device time ("cross-timestamp") to be performed 
by the driver. Currently, the cross-timestamping is performed in the
PTP_SYS_OFFSET ioctl.  The PTP clock driver reads gettimeofday() and the 
gettime64() callback provided by the driver. The cross-timestamp is best 
effort where the latency between the capture of system time 
(getnstimeofday()) and the device time (driver callback) may be significant.

This patch adds an additional callback getsynctime64(). Which will be called 
when the driver is able to perform a more accurate, implementation specific 
cross-timestamping.  For example, future network devices that implement 
PCIE PTM will be able to precisely correlate the device clock with the system 
clock with virtually zero latency between captures.  This added callback can 
be used by the driver to expose this functionality.

The callback, getsynctime64(), will only be called when defined and
n_samples == 1 because the driver returns only 1 cross-timestamp where 
multiple samples cannot be chained together.

This patch also adds to the capabilities ioctl (PTP_CLOCK_GETCAPS), allowing 
applications to query whether or not drivers implement the getsynctime 
callback, providing more precise cross timestamping.

Christopher Hall (1):
  Added additional callback to ptp_clock_info:

 drivers/ptp/ptp_chardev.c        | 29 +++++++++++++++++++++--------
 include/linux/ptp_clock_kernel.h |  8 ++++++++
 include/uapi/linux/ptp_clock.h   |  4 +++-
 3 files changed, 32 insertions(+), 9 deletions(-)

-- 
1.9.1

             reply	other threads:[~2015-07-03  1:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-03  1:14 Christopher Hall [this message]
2015-07-03  1:14 ` [PATCH v2 1/1] Added additional callback to ptp_clock_info: Christopher Hall
2015-07-03  7:00   ` Richard Cochran
2015-07-06 20:44   ` Josh Cartwright
2015-07-08 11:54     ` Richard Cochran
2015-07-08 12:17       ` Josh Cartwright
2015-07-09 14:53         ` Richard Cochran
2015-07-03  6:49 ` [PATCH v2 0/1] Add PTP cross-timestamp to the PTP driver interface Richard Cochran

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=1435886088-13890-1-git-send-email-christopher.s.hall@intel.com \
    --to=christopher.s.hall@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=tglx@linutronix.de \
    /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).