linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* About timestamping and can-utils
@ 2014-03-06  9:25 Stephane Grosjean
  2014-03-06  9:56 ` Oliver Hartkopp
  0 siblings, 1 reply; 4+ messages in thread
From: Stephane Grosjean @ 2014-03-06  9:25 UTC (permalink / raw)
  To: Oliver Hartkopp; +Cc: linux-can@vger.kernel.org

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-03-06 18:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-06  9:25 About timestamping and can-utils Stephane Grosjean
2014-03-06  9:56 ` Oliver Hartkopp
2014-03-06 11:03   ` Stephane Grosjean
2014-03-06 18:47     ` Oliver Hartkopp

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).