devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: Divya.Koppera@microchip.com, netdev@vger.kernel.org,
	hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net,
	kuba@kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org,
	richardcochran@gmail.com, linux-kernel@vger.kernel.org,
	UNGLinuxDriver@microchip.com, Madhuri.Sripada@microchip.com,
	Manohar.Puri@microchip.com
Subject: Re: [PATCH net-next 2/3] dt-bindings: net: micrel: Configure latency values and timestamping check for LAN8814 phy
Date: Wed, 9 Mar 2022 00:36:54 +0100	[thread overview]
Message-ID: <YifoltDp4/Fs+9op@lunn.ch> (raw)
In-Reply-To: <20220308221404.bwhujvsdp253t4g3@soft-dev3-1.localhost>

On Tue, Mar 08, 2022 at 11:14:04PM +0100, Horatiu Vultur wrote:
> The 03/08/2022 19:10, Andrew Lunn wrote:
> > 
> > > > So this is a function of the track length between the MAC and the PHY?
> > >
> > > Nope.
> > > This latency represents the time it takes for the frame to travel from RJ45
> > > module to the timestamping unit inside the PHY. To be more precisely,
> > > the timestamping unit will do the timestamp when it detects the end of
> > > the start of the frame. So it represents the time from when the frame
> > > reaches the RJ45 to when the end of start of the frame reaches the
> > > timestamping unit inside the PHY.
> > 
> > I must be missing something here. How do you measure the latency
> > difference for a 1 meter cable vs a 100m cable?
> 
> In the same way because the end result will be the same.

The latency from the RJ45 to the PHY will be the same. But the latency
from the link peer PHY to the local PHY will be much more, 500ns. In
order for this RJ45 to PHY delay to be meaningful, don't you also need
to know the length of the cable? Is there a configuration knob
somewhere for the cable length?

I'm assuming the ptp protocol does not try to measure the cable delay,
since if it did, there would be no need to know the RJ45-PHY delay, it
would be part of that.

> > Isn't this error all just in the noise?
> 
> I am not sure I follow this question.

At minimum, you expect to have a 1m cable. The RJ45-PHY track length
is maybe 2cm? So 2% of the overall length. So you are trying to
correct the error this 2% causes. If you have a 100m cable, 0.02% is
RJ45-PHY part that you are trying to correct the error on. These
numbers seem so small, it seems pointless. It only seems to make sense
if you know the length of the cable, and to an accuracy of a few cm.

   Andrew

  reply	other threads:[~2022-03-09  1:06 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-04  9:34 [PATCH net-next 0/3] Add support for 1588 in LAN8814 Divya Koppera
2022-03-04  9:34 ` [PATCH net-next 1/3] net: phy: micrel: Fix concurrent register access Divya Koppera
2022-03-04  9:34 ` [PATCH net-next 2/3] dt-bindings: net: micrel: Configure latency values and timestamping check for LAN8814 phy Divya Koppera
2022-03-04 12:50   ` Andrew Lunn
2022-03-04 13:55     ` Richard Cochran
2022-03-07  5:02       ` Divya.Koppera
2022-03-07  4:40     ` Divya.Koppera
2022-03-07 13:08       ` Andrew Lunn
2022-03-08 10:05         ` Divya.Koppera
2022-03-08 13:54           ` Andrew Lunn
2022-03-08 14:54             ` Richard Cochran
2022-03-08 15:43             ` Horatiu Vultur
2022-03-08 18:10               ` Andrew Lunn
2022-03-08 22:14                 ` Horatiu Vultur
2022-03-08 23:36                   ` Andrew Lunn [this message]
2022-03-09  1:46                     ` Richard Cochran
2022-03-09  1:58                       ` Richard Cochran
2022-03-09 13:24                     ` Horatiu Vultur
2022-03-09 14:55                       ` Russell King (Oracle)
2022-03-09 19:52                         ` Richard Cochran
2022-03-11 14:28                           ` Horatiu Vultur
2022-03-11 15:08                             ` Richard Cochran
2022-03-12 19:36                               ` Allan W. Nielsen
2022-03-13  2:41                                 ` Richard Cochran
2022-03-13  4:04                                 ` Richard Cochran
2022-03-11 15:21                           ` Woojung.Huh
2022-03-12  2:48                             ` Richard Cochran
2022-03-12 20:04                               ` Andrew Lunn
2022-03-13  2:46                                 ` Richard Cochran
2022-03-13 15:07                                   ` Andrew Lunn
2022-03-13 19:37                                     ` Allan W. Nielsen
2022-03-13 20:03                                       ` Richard Cochran
2022-03-13 20:07                                     ` Richard Cochran
2022-03-11 14:07                         ` Horatiu Vultur
2022-03-07 21:33   ` Rob Herring
2022-03-04  9:34 ` [PATCH net-next 3/3] net: phy: micrel: 1588 support " Divya Koppera
2022-03-04 13:06   ` Andrew Lunn
2022-03-07  4:58     ` Divya.Koppera
2022-03-07 13:19       ` Andrew Lunn
2022-03-04 13:46   ` Kurt Kanzenbach
2022-03-04 13:57     ` Richard Cochran
2022-03-04 12:50 ` [PATCH net-next 0/3] Add support for 1588 in LAN8814 patchwork-bot+netdevbpf
2022-03-04 13:06   ` Andrew Lunn
2022-03-04 13:21     ` David Miller
2022-03-04 13:47       ` Andrew Lunn
2022-03-04 14:37         ` David Miller
2022-03-04 14:06       ` Richard Cochran
2022-03-04 14:17         ` Andrew Lunn
2022-03-04 15:42           ` Richard Cochran
2022-03-17 12:16   ` Michael Walle
2022-03-17 14:05     ` Allan W. Nielsen
2022-03-17 14:38       ` Andrew Lunn
2022-03-17 19:30         ` Allan W. Nielsen

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=YifoltDp4/Fs+9op@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Divya.Koppera@microchip.com \
    --cc=Madhuri.Sripada@microchip.com \
    --cc=Manohar.Puri@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=hkallweit1@gmail.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=robh+dt@kernel.org \
    /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).