Commit 67953d47 authored by Miroslav Lichvar's avatar Miroslav Lichvar Committed by David S. Miller

net: fix documentation of struct scm_timestamping

The scm_timestamping struct may return multiple non-zero fields, e.g.
when both software and hardware RX timestamping is enabled, or when the
SO_TIMESTAMP(NS) option is combined with SCM_TIMESTAMPING and a false
software timestamp is generated in the recvmsg() call in order to always
return a SCM_TIMESTAMP(NS) message.

CC: Richard Cochran <richardcochran@gmail.com>
CC: Willem de Bruijn <willemb@google.com>
Signed-off-by: default avatarMiroslav Lichvar <mlichvar@redhat.com>
Acked-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aad9c8c4
...@@ -322,7 +322,7 @@ struct scm_timestamping { ...@@ -322,7 +322,7 @@ struct scm_timestamping {
}; };
The structure can return up to three timestamps. This is a legacy The structure can return up to three timestamps. This is a legacy
feature. Only one field is non-zero at any time. Most timestamps feature. At least one field is non-zero at any time. Most timestamps
are passed in ts[0]. Hardware timestamps are passed in ts[2]. are passed in ts[0]. Hardware timestamps are passed in ts[2].
ts[1] used to hold hardware timestamps converted to system time. ts[1] used to hold hardware timestamps converted to system time.
...@@ -331,6 +331,12 @@ a HW PTP clock source, to allow time conversion in userspace and ...@@ -331,6 +331,12 @@ a HW PTP clock source, to allow time conversion in userspace and
optionally synchronize system time with a userspace PTP stack such optionally synchronize system time with a userspace PTP stack such
as linuxptp. For the PTP clock API, see Documentation/ptp/ptp.txt. as linuxptp. For the PTP clock API, see Documentation/ptp/ptp.txt.
Note that if the SO_TIMESTAMP or SO_TIMESTAMPNS option is enabled
together with SO_TIMESTAMPING using SOF_TIMESTAMPING_SOFTWARE, a false
software timestamp will be generated in the recvmsg() call and passed
in ts[0] when a real software timestamp is missing. This happens also
on hardware transmit timestamps.
2.1.1 Transmit timestamps with MSG_ERRQUEUE 2.1.1 Transmit timestamps with MSG_ERRQUEUE
For transmit timestamps the outgoing packet is looped back to the For transmit timestamps the outgoing packet is looped back to the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment