From: Kurt Kanzenbach <kurt@linutronix.de>
To: Richard Cochran <richardcochran@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>
Cc: Kamil Alkhouri <kamil.alkhouri@hs-offenburg.de>,
Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
devicetree@vger.kernel.org,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
ilias.apalodimas@linaro.org
Subject: Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping
Date: Wed, 14 Oct 2020 13:37:47 +0200 [thread overview]
Message-ID: <87eem111is.fsf@kurt> (raw)
In-Reply-To: <20201014110113.GA1646@hoboy>
[-- Attachment #1: Type: text/plain, Size: 2706 bytes --]
On Wed Oct 14 2020, Richard Cochran wrote:
> On Wed, Oct 14, 2020 at 12:57:47PM +0300, Vladimir Oltean wrote:
>> So the discussion is about how to have the cake and eat it at the same
>> time.
>
> And I wish for a pony. With sparkles. And a unicorn. And a rainbow.
>
>> Silicon vendors eager to follow the latest trends in standards are
>> implementing hybrid PTP clocks, where an unsynchronizable version of the
>> clock delivers MAC timestamps to the application stack, and a
>> synchronizable wrapper over that same clock is what gets fed into the
>> offloading engines, like the ones behind the tc-taprio and tc-gate
>> offload. Some of these vendors perform cross-timestamping (they deliver
>> a timestamp from the MAC with 2, or 3, or 4, timestamps, depending on
>> how many PHCs that MAC has wired to it), some don't, and just deliver a
>> single timestamp from a configurable source.
>
> Sounds like it will be nearly impossible to make a single tc-taprio
> framework that fits all the hardware variants.
Why? All the gate operations work on the synchronized clock. I assume
all Qbv capable switches have a synchronized clock?
It's just that some switches have multiple PHCs instead of a single
one. It seems to be quite common to have a free-running as well as a
synchronized clock. In order for a better(?) or more accurate(?) ptp
implementation they expose not a single but rather multiple timestamps
from all PHCs (-> cross-timestamping) to user space for the ptp event
messages. That's at least my very limited understanding.
>
>> The operating system is supposed to ??? in order to synchronize the
>> synchronizable clock to the virtual time retrieved via TIME_STATUS_NP
>> that you're talking about. The question is what to replace that ???
>> with, of course.
>
> You have a choice. Either you synchronize the local PHC to the global
> TAI time base or not. If you do synchronize the PHC, then everything
> (like the globally scheduled time slots) just works. If you decide to
> follow the nonsensical idea (following 802.1-AS) and leave the PHC
> free running, then you will have a difficult time scheduling those
> time windows.
>
> So it is all up to you.
>
>> I'm not an expert in kernel implementation either, but perhaps in the
>> light of this, you can revisit the idea that kernel changes will not be
>> needed (or explain more, if you still think they aren't).
>
> I am not opposed to kernel changes, but there must be:
>
> - A clear statement of the background context, and
> - an explanation of the issue to solved, and
> - a realistic solution that will support the wide variety of HW.
Agreed.
Thanks,
Kurt
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2020-10-14 11:37 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-04 11:29 [PATCH net-next v6 0/7] Hirschmann Hellcreek DSA driver Kurt Kanzenbach
2020-10-04 11:29 ` [PATCH net-next v6 1/7] net: dsa: Add tag handling for Hirschmann Hellcreek switches Kurt Kanzenbach
2020-10-04 11:56 ` Vladimir Oltean
2020-10-05 6:14 ` Kurt Kanzenbach
2020-10-04 11:29 ` [PATCH net-next v6 2/7] net: dsa: Add DSA driver " Kurt Kanzenbach
2020-10-04 12:56 ` Vladimir Oltean
2020-10-06 6:09 ` Kurt Kanzenbach
2020-10-06 9:20 ` Vladimir Oltean
2020-10-06 10:13 ` Kurt Kanzenbach
2020-10-06 11:32 ` Vladimir Oltean
2020-10-06 12:37 ` Vladimir Oltean
2020-10-06 13:23 ` Kurt Kanzenbach
2020-10-06 13:42 ` Vladimir Oltean
2020-10-06 14:05 ` Kurt Kanzenbach
2020-10-06 14:10 ` Vladimir Oltean
2020-10-06 13:56 ` Vladimir Oltean
2020-10-06 14:13 ` Kurt Kanzenbach
2020-10-11 12:29 ` Kurt Kanzenbach
2020-10-11 15:30 ` Vladimir Oltean
2020-10-12 5:37 ` Kurt Kanzenbach
2020-10-16 12:11 ` Kurt Kanzenbach
2020-10-16 15:43 ` Vladimir Oltean
2020-10-16 16:56 ` Florian Fainelli
2020-10-17 10:06 ` Kurt Kanzenbach
2020-10-17 15:57 ` Vladimir Oltean
2020-10-08 11:49 ` Vladimir Oltean
2020-10-09 5:58 ` Kurt Kanzenbach
2020-10-04 11:29 ` [PATCH net-next v6 3/7] net: dsa: hellcreek: Add PTP clock support Kurt Kanzenbach
2020-10-04 11:29 ` [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping Kurt Kanzenbach
2020-10-04 14:30 ` Vladimir Oltean
2020-10-06 6:27 ` Kurt Kanzenbach
2020-10-06 7:28 ` Vladimir Oltean
2020-10-06 13:30 ` Kurt Kanzenbach
2020-10-06 13:32 ` Vladimir Oltean
2020-10-06 13:56 ` Kurt Kanzenbach
2020-10-06 14:01 ` Vladimir Oltean
2020-10-07 10:39 ` Kurt Kanzenbach
2020-10-07 10:54 ` Vladimir Oltean
2020-10-08 8:34 ` Kurt Kanzenbach
2020-10-08 9:44 ` Vladimir Oltean
2020-10-08 10:01 ` Kurt Kanzenbach
2020-10-08 12:55 ` Kamil Alkhouri
2020-10-08 15:09 ` Vladimir Oltean
2020-10-12 12:53 ` Kamil Alkhouri
2020-10-12 21:42 ` Richard Cochran
2020-10-14 9:57 ` Vladimir Oltean
2020-10-14 11:01 ` Richard Cochran
2020-10-14 11:37 ` Kurt Kanzenbach [this message]
2020-10-04 11:29 ` [PATCH net-next v6 5/7] net: dsa: hellcreek: Add PTP status LEDs Kurt Kanzenbach
2020-10-04 11:29 ` [PATCH net-next v6 6/7] dt-bindings: Add vendor prefix for Hirschmann Kurt Kanzenbach
2020-10-04 11:29 ` [PATCH net-next v6 7/7] dt-bindings: net: dsa: Add documentation for Hellcreek switches Kurt Kanzenbach
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=87eem111is.fsf@kurt \
--to=kurt@linutronix.de \
--cc=andrew@lunn.ch \
--cc=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=ilias.apalodimas@linaro.org \
--cc=kamil.alkhouri@hs-offenburg.de \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=richardcochran@gmail.com \
--cc=robh+dt@kernel.org \
--cc=vivien.didelot@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).