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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210929145535.GA29729@hoboy.vegasvil.org>
Date:   Wed, 29 Sep 2021 07:55:35 -0700
From:   Richard Cochran <richardcochran@...il.com>
To:     Lars-Peter Clausen <lars@...afoo.de>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Claudiu Beznea <claudiu.beznea@...rochip.com>,
        netdev@...r.kernel.org
Subject: Re: [PATCH] net: macb: ptp: Switch to gettimex64() interface

On Wed, Sep 29, 2021 at 02:07:39PM +0200, Lars-Peter Clausen wrote:
> The macb PTP support currently implements the `gettime64` callback to allow
> to retrieve the hardware clock time. Update the implementation to provide
> the `gettimex64` callback instead.
> 
> The difference between the two is that with `gettime64` a snapshot of the
> system clock is taken before and after invoking the callback. Whereas
> `gettimex64` expects the callback itself to take the snapshots.
> 
> To get the time from the macb Ethernet core multiple register accesses have
> to be done. Only one of which will happen at the time reported by the
> function. This leads to a non-symmetric delay and adds a slight offset
> between the hardware and system clock time when using the `gettime64`
> method. This offset can be a few 100 nanoseconds. Switching to the
> `gettimex64` method allows for a more precise correlation of the hardware
> and system clocks and results in a lower offset between the two.
> 
> On a Xilinx ZynqMP system `phc2sys` reports a delay of 1120 ns before and
> 300 ns after the patch. With the latter being mostly symmetric.
> 
> Signed-off-by: Lars-Peter Clausen <lars@...afoo.de>

Please put me on CC for future PTP patches, thanks.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ