From: Vladimir Oltean <olteanv@gmail.com>
To: kuba@kernel.org, davem@davemloft.net, netdev@vger.kernel.org
Cc: richardcochran@gmail.com, sorganov@gmail.com, linux-doc@vger.kernel.org
Subject: [PATCH net-next 3/3] docs: networking: timestamping: add a set of frequently asked questions
Date: Fri, 17 Jul 2020 19:10:27 +0300 [thread overview]
Message-ID: <20200717161027.1408240-4-olteanv@gmail.com> (raw)
In-Reply-To: <20200717161027.1408240-1-olteanv@gmail.com>
These are some questions I had while trying to explain the behavior of
some drivers with respect to software timestamping. Answered with the
help of Richard Cochran.
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
---
Documentation/networking/timestamping.rst | 26 +++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/Documentation/networking/timestamping.rst b/Documentation/networking/timestamping.rst
index 4004c5d2771d..e01ec01179fe 100644
--- a/Documentation/networking/timestamping.rst
+++ b/Documentation/networking/timestamping.rst
@@ -791,3 +791,29 @@ The correct solution to this problem is to implement the PHY timestamping
requirements in the MAC driver found broken, and submit as a bug fix patch to
netdev@vger.kernel.org. See :ref:`Documentation/process/stable-kernel-rules.rst
<stable_kernel_rules>` for more details.
+
+3.4 Frequently asked questions
+------------------------------
+
+Q: When should drivers set SKBTX_IN_PROGRESS?
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+When the interface they represent offers both ``SOF_TIMESTAMPING_TX_HARDWARE``
+and ``SOF_TIMESTAMPING_TX_SOFTWARE``.
+Originally, the network stack could deliver either a hardware or a software
+time stamp, but not both. This flag prevents software timestamp delivery.
+This restriction was eventually lifted via the ``SOF_TIMESTAMPING_OPT_TX_SWHW``
+option, but still the original behavior is preserved as the default.
+
+Q: Should drivers that don't offer SOF_TIMESTAMPING_TX_SOFTWARE call skb_tx_timestamp()?
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The ``skb_clone_tx_timestamp()`` function from its body helps with propagation
+of TX timestamps from PTP PHYs, and the required placement of this call is the
+same as for software TX timestamping.
+Additionally, since PTP is broken on ports with timestamping PHYs and unmet
+requirements, the consequence is that any driver which may be ever coupled to
+a timestamping-capable PHY in ``netdev->phydev`` should call at least
+``skb_clone_tx_timestamp()``. However, calling the higher-level
+``skb_tx_timestamp()`` instead achieves the same purpose, but also offers
+additional compliance to ``SOF_TIMESTAMPING_TX_SOFTWARE``.
--
2.25.1
next prev parent reply other threads:[~2020-07-17 16:10 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-17 16:10 [PATCH net-next 0/3] Document more PTP timestamping known quirks Vladimir Oltean
2020-07-17 16:10 ` [PATCH net-next 1/3] docs: networking: timestamping: rename last section to "Known bugs" Vladimir Oltean
2020-07-17 22:05 ` Jacob Keller
2020-07-17 16:10 ` [PATCH net-next 2/3] docs: networking: timestamping: add one more known issue Vladimir Oltean
2020-07-17 23:08 ` Jacob Keller
2020-07-18 11:36 ` Vladimir Oltean
2020-07-17 16:10 ` Vladimir Oltean [this message]
2020-07-17 23:12 ` [PATCH net-next 3/3] docs: networking: timestamping: add a set of frequently asked questions Jacob Keller
2020-07-18 11:35 ` Vladimir Oltean
2020-07-20 18:54 ` Jacob Keller
2020-07-20 21:05 ` Vladimir Oltean
2020-07-20 21:45 ` Jacob Keller
2020-07-20 22:13 ` Vladimir Oltean
2020-07-21 0:21 ` Richard Cochran
2020-07-21 19:51 ` Vladimir Oltean
2020-07-22 3:25 ` Richard Cochran
2020-07-25 21:32 ` Vladimir Oltean
2020-07-21 17:16 ` Jacob Keller
2020-07-21 0:15 ` Richard Cochran
2020-07-17 21:13 ` [PATCH net-next 0/3] Document more PTP timestamping known quirks Sergey Organov
2020-07-17 21:57 ` Vladimir Oltean
2020-07-17 23:13 ` Jacob Keller
2020-07-18 10:54 ` Sergey Organov
2020-07-18 11:30 ` Vladimir Oltean
2020-07-18 13:35 ` Sergey Organov
2020-07-18 11:21 ` Sergey Organov
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=20200717161027.1408240-4-olteanv@gmail.com \
--to=olteanv@gmail.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=sorganov@gmail.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 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).