lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YkcOjlR++GwLWyT5@lunn.ch>
Date:   Fri, 1 Apr 2022 16:39:10 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     "Allan W. Nielsen" <allan.nielsen@...rochip.com>
Cc:     Horatiu Vultur <horatiu.vultur@...rochip.com>,
        netdev@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, hkallweit1@...il.com,
        linux@...linux.org.uk, Divya.Koppera@...rochip.com,
        davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
        richardcochran@...il.com, UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH net v2 0/3] net: phy: micrel: Remove latencies support
 lan8814

On Fri, Apr 01, 2022 at 04:11:20PM +0200, Allan W. Nielsen wrote:
> On 01.04.2022 14:57, Andrew Lunn wrote:
> > On Fri, Apr 01, 2022 at 01:05:19PM +0200, Horatiu Vultur wrote:
> > > Remove the latencies support both from the PHY driver and from the DT.
> > > The IP already has some default latencies values which can be used to get
> > > decent results. It has the following values(defined in ns):
> > > rx-1000mbit: 429
> > > tx-1000mbit: 201
> > > rx-100mbit:  2346
> > > tx-100mbit:  705
> > 
> > So one alternative option here is that ptp4l looks at
> > 
> > /sys/class/net/<ifname>/phydev/phy_id
> > 
> > to identify the PHY, listens to netlink messages to determine the link
> > speed and then applies the correction itself in user space. That gives
> > you a pretty generic solution, works for any existing PHY and pretty
> > much any existing kernel version.  And if you want board specific
> > values you can override them in the ptp4l configuration file.
>
> I think it is good to have both options. If you want PTP4L to compensate
> in user-space, do not call the tunable, if you want to HW to compensate,
> call the tunable (this is useful both for users using ptp4l and other
> ptpimplementations).
>
> If system behaves strange, it is easy to see what delays has been
> applied.

I don't actually think that is true. How wound i know that

> > > rx-1000mbit: 429
> > > tx-1000mbit: 201
> > > rx-100mbit:  2346
> > > tx-100mbit:  705

are the default values? I cannot just look at them and obviously see
they are not the default values. I would need to learn what the
default values are of every PHY in linux which allows the PHY to
perform a correction.

Are you also saying that ptp4l needs to read the values from the
driver, calculate the differ from the defaults, and then apply that
difference to the correction specified in the configuration file it
will apply in userspace?

Does the PTP API enforce mutual exclusion for a device? Can there be
multiple applications running on an interface, some which assume the
hardware is configured to perform corrections and some which will
apply the correction in user space?

Richard?

	Andrew


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ