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: <20170212184758.GA1703@localhost.localdomain>
Date:   Sun, 12 Feb 2017 19:47:58 +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:52:23AM +0000, Mintz, Yuval wrote:
> Just to clarify [since it's bit a meaningless otherwise] -
> this +8 is a HW-bug workaround.

Can you please explain exactly what the problem is?

Your code does

		period1 = div_s64(val * 1000000000, ppb);
		period1 -= 8;
		period1 >>= 4;

But correct rounding would be

		period1 = div_s64(val * 1000000000, ppb);
		period1 += 8;
		period1 >>= 4;

Thanks,
Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ