From: Stephane Grosjean <s.grosjean@peak-system.com>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: About timestamping and can-utils
Date: Thu, 06 Mar 2014 10:25:34 +0100 [thread overview]
Message-ID: <53183F0E.7050309@peak-system.com> (raw)
Hi linux-can team,
I've got one question about how timestamping is done now in linux-can,
regarding to HW timestamps.
In the early ages (~v3.4), the CAN hardware driver could set the
timestamp of an skb by itself and push it with the received CAN frame,
so that the application could get it using SO_TIMESTAMP socket option,
right?
Now, this "hardware" timestamp is to be copied into "hwstamp" field of
the "skb_hwtstamps(skb)" area.
But how does user application manage to get this hardware timestamp on
its side? AFAIK, the "candump" can-utils utility always reads and
displays the "network" timestamp (that is, always uses SO_TIMESTAMP
socket option). I had a quick look to the Kernel sources and tried to
find the links between things but it's not very clear to me: first idea
I tested was to set the SO_TIMESTAMPING socket option, but candump never
received any hw timestamp in the control messages he reads from the CAN
socket...
Any help would be appreciated.
Regards,
Stéphane
--
PEAK-System Technik GmbH, Otto-Roehm-Strasse 69, D-64293 Darmstadt
Geschaeftsleitung: A.Gach/U.Wilhelm,St.Nr.:007/241/13586 FA Darmstadt
HRB-9183 Darmstadt, Ust.IdNr.:DE 202220078, WEE-Reg.-Nr.: DE39305391
Tel.+49 (0)6151-817320 / Fax:+49 (0)6151-817329, info@peak-system.com
next reply other threads:[~2014-03-06 9:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 9:25 Stephane Grosjean [this message]
2014-03-06 9:56 ` About timestamping and can-utils Oliver Hartkopp
2014-03-06 11:03 ` Stephane Grosjean
2014-03-06 18:47 ` Oliver Hartkopp
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=53183F0E.7050309@peak-system.com \
--to=s.grosjean@peak-system.com \
--cc=linux-can@vger.kernel.org \
--cc=socketcan@hartkopp.net \
/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).