From: Andrew Lunn <andrew@lunn.ch>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "Vladimir Oltean" <vladimir.oltean@nxp.com>,
"Russell King (Oracle)" <linux@armlinux.org.uk>,
"Köry Maincent" <kory.maincent@bootlin.com>,
netdev@vger.kernel.org, glipus@gmail.com,
maxime.chevallier@bootlin.com, vadim.fedorenko@linux.dev,
richardcochran@gmail.com, gerhard@engleder-embedded.com,
thomas.petazzoni@bootlin.com, krzysztof.kozlowski+dt@linaro.org,
robh+dt@kernel.org
Subject: Re: [PATCH net-next RFC v4 2/5] net: Expose available time stamping layers to user space.
Date: Wed, 17 May 2023 21:46:43 +0200 [thread overview]
Message-ID: <2f89e35e-b1c9-4e08-9f60-73a96cc6e51a@lunn.ch> (raw)
In-Reply-To: <20230517121925.518473aa@kernel.org>
On Wed, May 17, 2023 at 12:19:25PM -0700, Jakub Kicinski wrote:
> On Fri, 12 May 2023 10:38:52 -0700 Jakub Kicinski wrote:
> > On Fri, 12 May 2023 13:29:11 +0300 Vladimir Oltean wrote:
> > > On Thu, May 11, 2023 at 04:16:25PM -0700, Jakub Kicinski wrote:
> > > > Oh, you should tell me, maybe off-list then. 'Cause I don't know any.
> > >
> > > I hope the examples given in private will make you reconsider the
> > > validity of my argument about DMA timestamps.
> >
> > I may have lost track of what the argument is. There are devices
> > which will provide a DMA stamp for Tx and Rx. We need an API that'll
> > inform the user about it.
> >
> > To be clear I'm talking about drivers which are already in the tree,
> > not opening the door for some shoddy new HW in.
>
> It dawned on me while reading a phylink discussion that I may have
> misunderstood the meaning of the MAC vs PHY time stamp sources.
> By the standard - stamping happens under the MAC, so MAC is
> the "right" place to stamp, not the PHY. And there can be multiple
> PHYs technically? Are we just using the MAC vs PHY thing as an
> implementation aid, to know which driver to send the request to?
>
> Shouldn't we use the clock ID instead?
As i said in an earlier thread, with a bit of a stretch, there could
be 7 places to take time stamps in the system. We need some sort of
identifier to indicate which of these stampers to use.
Is clock ID unique? In a switch, i think there could be multiple
stampers, one per MAC port, sharing one clock? So you actually need
more than a clock ID.
Also, 'By the standard - stamping happens under the MAC'. Which MAC?
There can be multple MAC's in the pipeline. MACSEC and rate adaptation
in the PHY are often implemented by the PHY having a MAC
reconstituting the frame from the bitstream and putting it into a
queue. Rate adaptation can then be performed by the PHY by sending
pause frames to the 'primary' MAC to slow it down. MACSEC in the PHY
takes frames in the queues and if they match a filter they get
encrypted. The PHY then takes the frame out of the queue and passes
them to a second MAC in the PHY which creates a bitstream and then to
a 'PHY' to generate signals for the line.
In this sort of setup, you obviously don't want the 'primary' MAC
doing the stamping. You want the MAC nearest to the line, or better
still the 'PHY' within the PHY just before the line.
Andrew
next prev parent reply other threads:[~2023-05-17 19:46 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-06 17:33 [PATCH net-next RFC v4 0/5] net: Make MAC/PHY time stamping selectable Köry Maincent
2023-04-06 17:33 ` [PATCH net-next RFC v4 1/5] net: ethtool: Refactor identical get_ts_info implementations Köry Maincent
2023-04-12 13:16 ` Vladimir Oltean
2023-04-12 13:49 ` Köry Maincent
2023-04-12 16:56 ` Richard Cochran
2023-04-06 17:33 ` [PATCH net-next RFC v4 2/5] net: Expose available time stamping layers to user space Köry Maincent
2023-04-07 1:46 ` Jakub Kicinski
2023-04-07 8:58 ` Köry Maincent
2023-04-07 14:26 ` Jakub Kicinski
2023-04-07 14:44 ` Jakub Kicinski
2023-05-17 19:58 ` Jacob Keller
2023-04-12 10:50 ` Michael Walle
2023-04-12 11:08 ` Vladimir Oltean
2023-04-12 11:12 ` Michael Walle
2023-04-12 12:19 ` Köry Maincent
2023-05-11 20:36 ` Vladimir Oltean
2023-05-11 20:50 ` Andrew Lunn
2023-05-11 20:55 ` Russell King (Oracle)
2023-05-11 21:02 ` Vladimir Oltean
2023-05-11 22:09 ` Jakub Kicinski
2023-05-11 23:07 ` Vladimir Oltean
2023-05-11 23:16 ` Jakub Kicinski
2023-05-12 10:29 ` Vladimir Oltean
2023-05-12 17:38 ` Jakub Kicinski
2023-05-17 19:19 ` Jakub Kicinski
2023-05-17 19:46 ` Andrew Lunn [this message]
2023-05-17 20:07 ` Jakub Kicinski
2023-09-04 15:22 ` Köry Maincent
2023-09-04 17:47 ` Richard Cochran
2023-09-05 18:47 ` Jakub Kicinski
2023-09-05 20:29 ` Andrew Lunn
2023-09-06 9:22 ` Köry Maincent
2023-09-07 9:29 ` Russell King (Oracle)
2023-05-19 13:28 ` Vladimir Oltean
2023-05-19 20:22 ` Jakub Kicinski
2023-05-22 3:56 ` Zulkifli, Muhammad Husaini
2023-05-22 20:04 ` Richard Cochran
2023-05-22 20:21 ` Jakub Kicinski
2023-05-23 3:54 ` Richard Cochran
2023-05-17 22:01 ` Jacob Keller
2023-05-17 22:13 ` Jacob Keller
2023-05-17 22:46 ` Richard Cochran
2023-05-18 23:23 ` Jacob Keller
2023-05-19 12:50 ` Andrew Lunn
2023-05-19 13:50 ` Richard Cochran
2023-05-19 15:18 ` Andrew Lunn
2023-04-08 14:06 ` Richard Cochran
2023-04-06 17:33 ` [PATCH net-next RFC v4 3/5] dt-bindings: net: phy: add timestamp preferred choice property Köry Maincent
2023-04-12 13:14 ` Vladimir Oltean
2023-04-12 13:44 ` Köry Maincent
2023-04-29 17:42 ` Vladimir Oltean
2023-05-02 9:10 ` Köry Maincent
2023-05-11 13:10 ` Vladimir Oltean
2023-05-11 13:25 ` Köry Maincent
2023-05-11 13:56 ` Vladimir Oltean
2023-05-11 14:22 ` Köry Maincent
2023-04-12 14:14 ` Krzysztof Kozlowski
2023-04-06 17:33 ` [PATCH net-next RFC v4 4/5] net: Let the active time stamping layer be selectable Köry Maincent
2023-04-07 1:47 ` Jakub Kicinski
2023-04-29 17:58 ` Vladimir Oltean
2023-05-02 11:05 ` Köry Maincent
2023-05-11 13:48 ` Vladimir Oltean
2023-05-11 15:36 ` Jakub Kicinski
2023-05-11 15:56 ` Vladimir Oltean
2023-05-11 16:25 ` Jakub Kicinski
2023-05-11 20:54 ` Vladimir Oltean
2023-05-11 23:08 ` Jakub Kicinski
2023-05-11 23:18 ` Vladimir Oltean
2023-05-11 23:35 ` Jakub Kicinski
2023-05-15 9:04 ` Köry Maincent
2023-05-16 19:28 ` Jakub Kicinski
2023-05-11 21:06 ` Russell King (Oracle)
2023-05-11 22:54 ` Jakub Kicinski
2023-05-17 22:19 ` Jacob Keller
2023-04-06 17:33 ` [PATCH net-next RFC v4 5/5] net: fix up drivers WRT phy time stamping Köry Maincent
2023-04-06 17:59 ` [PATCH net-next RFC v4 0/5] net: Make MAC/PHY time stamping selectable Köry Maincent
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=2f89e35e-b1c9-4e08-9f60-73a96cc6e51a@lunn.ch \
--to=andrew@lunn.ch \
--cc=gerhard@engleder-embedded.com \
--cc=glipus@gmail.com \
--cc=kory.maincent@bootlin.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=robh+dt@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=vadim.fedorenko@linux.dev \
--cc=vladimir.oltean@nxp.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).