netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: davem@davemloft.net, jakub.kicinski@netronome.com,
	f.fainelli@gmail.com, vivien.didelot@gmail.com, andrew@lunn.ch,
	netdev@vger.kernel.org
Subject: Re: [PATCH net 2/2] net: dsa: Deny PTP on master if switch supports it
Date: Fri, 27 Dec 2019 09:51:26 -0800	[thread overview]
Message-ID: <20191227175126.GE1435@localhost> (raw)
In-Reply-To: <20191227004435.21692-3-olteanv@gmail.com>

On Fri, Dec 27, 2019 at 02:44:35AM +0200, Vladimir Oltean wrote:
> Why? Well, in short, the PTP API in place today is a bit rudimentary and
> relies on applications to retrieve the TX timestamps by polling the
> error queue and looking at the cmsg structure. But there is no timestamp
> identification of any sorts (except whether it's HW or SW), you don't
> know how many more timestamps are there to come, which one is this one,
> from whom it is, etc.

IOW, you can only get one HW time stamp from the stack.  This is a
fundamental limitation of the so_timestamping API.  If user space
really wanted multiple HW and SW time stamps, then some new way would
have to be invented, but it would be lots of work.

IMHO, as a practical matter, multiple time stamps would be interesting
from a profiling point of view, but less so for synchronization
applications.

> So it is a fact of life that PTP timestamping on the DSA master is
> incompatible with timestamping on the switch MAC. And if the switch
> supports PTP, taking the timestamps from the switch MAC is highly
> preferable anyway, due to the fact that those don't contain the queuing
> latencies of the switch. So just disallow PTP on the DSA master if there
> is any PTP-capable switch attached.

I agreed that MAC time stamps are not very useful when there is a PTP
switch in front.

Acked-by: Richard Cochran <richardcochran@gmail.com>

      reply	other threads:[~2019-12-27 17:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-27  0:44 [PATCH net 0/2] The DSA TX timestamping situation Vladimir Oltean
2019-12-27  0:44 ` [PATCH net 1/2] gianfar: Fix TX timestamping with stacked (DSA and PHY) drivers Vladimir Oltean
2019-12-27 18:00   ` Richard Cochran
2019-12-27  0:44 ` [PATCH net 2/2] net: dsa: Deny PTP on master if switch supports it Vladimir Oltean
2019-12-27 17:51   ` Richard Cochran [this message]

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=20191227175126.GE1435@localhost \
    --to=richardcochran@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --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).