All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miroslav Lichvar <mlichvar@redhat.com>
To: netdev@vger.kernel.org
Cc: Richard Cochran <richardcochran@gmail.com>,
	Willem de Bruijn <willemb@google.com>
Subject: [PATCH v6 net-next 5/7] net: fix documentation of struct scm_timestamping
Date: Fri, 19 May 2017 17:52:39 +0200	[thread overview]
Message-ID: <20170519155241.15817-6-mlichvar@redhat.com> (raw)
In-Reply-To: <20170519155241.15817-1-mlichvar@redhat.com>

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: Miroslav Lichvar <mlichvar@redhat.com>
---
 Documentation/networking/timestamping.txt | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt
index ce11e3a..50eb0e5 100644
--- a/Documentation/networking/timestamping.txt
+++ b/Documentation/networking/timestamping.txt
@@ -322,7 +322,7 @@ struct scm_timestamping {
 };
 
 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].
 
 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
 optionally synchronize system time with a userspace PTP stack such
 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
 
 For transmit timestamps the outgoing packet is looped back to the
-- 
2.9.3

  parent reply	other threads:[~2017-05-19 15:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-19 15:52 [PATCH v6 net-next 0/7] Extend socket timestamping API Miroslav Lichvar
2017-05-19 15:52 ` [PATCH v6 net-next 1/7] net: define receive timestamp filter for NTP Miroslav Lichvar
2017-05-19 15:52 ` [PATCH v6 net-next 2/7] net: ethernet: update drivers to handle HWTSTAMP_FILTER_NTP_ALL Miroslav Lichvar
2017-05-19 15:52 ` [PATCH v6 net-next 3/7] net: add function to retrieve original skb device using NAPI ID Miroslav Lichvar
2017-05-19 15:52 ` [PATCH v6 net-next 4/7] net: add new control message for incoming HW-timestamped packets Miroslav Lichvar
2017-05-19 15:52 ` Miroslav Lichvar [this message]
2017-05-19 15:59   ` [PATCH v6 net-next 5/7] net: fix documentation of struct scm_timestamping Willem de Bruijn
2017-05-19 15:52 ` [PATCH v6 net-next 6/7] net: allow simultaneous SW and HW transmit timestamping Miroslav Lichvar
2017-05-19 16:00   ` Willem de Bruijn
2017-05-19 15:52 ` [PATCH v6 net-next 7/7] net: ethernet: update drivers to make both SW and HW TX timestamps Miroslav Lichvar
2017-05-19 20:15 ` [PATCH v6 net-next 0/7] Extend socket timestamping API Richard Cochran
2017-05-21 17:38 ` David Miller

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=20170519155241.15817-6-mlichvar@redhat.com \
    --to=mlichvar@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=willemb@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.