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: <20170212140202.GA1702@localhost.localdomain>
Date:   Sun, 12 Feb 2017 15:02:02 +0100
From:   Richard Cochran <richardcochran@...il.com>
To:     "Mintz, Yuval" <Yuval.Mintz@...ium.com>
Cc:     "davem@...emloft.net" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "Kalluru, Sudarsana" <Sudarsana.Kalluru@...ium.com>
Subject: Re: [PATCH net-next v4 1/2] qed: Add infrastructure for PTP support.

On Sun, Feb 12, 2017 at 11:27:16AM +0000, Mintz, Yuval wrote:
> Richard, there are quite a bit of inaccuracies in the calculation here.

Where?

If you compare this algorithm with yours, you will discover that it
produces significantly lower error for ppm < 60.

> Your suggestion seems to:
>   a. Assume that the required period should be in ns, not in
>       16*ns units.
>   b. mishandles the +8/-8 in the calculation.
>   c. Doesn't seem to consider the upper bound on period.

Duh, you would have to convert the result into the proper form for the
HW register and add bounds checking.  I mean, that goes without saying.
The important fact is that your algorithm it not optimal for ppm < 60.

(I assumed that the -8 thing was a typical HW programming effect,
where you dial N-1 to get N.  The fact that you add 8 back in to
calculate the effective ppb confirms that assumption.  If this isn't
the case, then maybe you can see a way to adapt what I wrote.)

> One thing I still don't get is *why* we're trying to optimize this
> area of the code -

So you prefer using 21 64-bit divisions when using 8 produces better
results?

*You* need to explain the "why"...

Thanks,
Richard


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ