User Manual

Driver FeaturesRev 2.0-3.0.0
Mellanox Technologies
68
4.6 Time-Stamping Service
Time stamping is the process of keeping track of the creation of a packet/ A time-stamping ser-
vice supports assertions of proof that a datum existed before a particular time. Incoming packets
are time-stamped before they are distributed on the PCI depending on the congestion in the PCI
buffers. Outgoing packets are time-stamped very close to placing them on the wire.
4.6.1 Enabling Time Stamping
Time-stamping is off by default and should be enabled before use.
To enable time stamping for a socket:
Call setsockopt() with SO_TIMESTAMPING and with the following flags:
To enable time stamping for a net device:
Admin privileged user can enable/disable time stamping through calling ioctl(sock, SIOCSHWT-
STAMP, &ifreq) with following values:
Send side time sampling:
Time Stamping is currently at beta level.
Please be aware that everything listed here is subject to change.
Time Stamping is currently supported in ConnectX®-3/ConnectX®-3 Pro adapter
cards only.
SOF_TIMESTAMPING_TX_HARDWARE: try to obtain send time stamp in hardware
SOF_TIMESTAMPING_TX_SOFTWARE: if SOF_TIMESTAMPING_TX_HARDWARE is off or
fails, then do it in software
SOF_TIMESTAMPING_RX_HARDWARE: return the original, unmodified time stamp
as generated by the hardware
SOF_TIMESTAMPING_RX_SOFTWARE: if SOF_TIMESTAMPING_RX_HARDWARE is off or
fails, then do it in software
SOF_TIMESTAMPING_RAW_HARDWARE: return original raw hardware time stamp
SOF_TIMESTAMPING_SYS_HARDWARE: return hardware time stamp transformed to
the system time base
SOF_TIMESTAMPING_SOFTWARE: return system time stamp generated in
software
SOF_TIMESTAMPING_TX/RX determine how time stamps are generated.
SOF_TIMESTAMPING_RAW/SYS determine how they are reported