From: Richard Cochran <richardcochran@gmail.com>
To: "Mintz, Yuval" <Yuval.Mintz@cavium.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"Kalluru, Sudarsana" <Sudarsana.Kalluru@cavium.com>
Subject: Re: [PATCH net-next v4 1/2] qed: Add infrastructure for PTP support.
Date: Sun, 12 Feb 2017 15:02:02 +0100 [thread overview]
Message-ID: <20170212140202.GA1702@localhost.localdomain> (raw)
In-Reply-To: <BL2PR07MB2306C87FF3E79B221675F5848D460@BL2PR07MB2306.namprd07.prod.outlook.com>
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
next prev parent reply other threads:[~2017-02-12 14:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-08 6:43 [PATCH net-next v4 0/2] qed*: Add support for PTP Sudarsana Kalluru
2017-02-08 6:43 ` [PATCH net-next v4 1/2] qed: Add infrastructure for PTP support Sudarsana Kalluru
2017-02-11 8:58 ` Richard Cochran
2017-02-11 11:16 ` Richard Cochran
2017-02-12 11:27 ` Mintz, Yuval
2017-02-12 11:52 ` Mintz, Yuval
2017-02-12 18:47 ` Richard Cochran
2017-02-12 14:02 ` Richard Cochran [this message]
2017-02-12 15:07 ` Mintz, Yuval
2017-02-12 15:53 ` Mintz, Yuval
2017-02-12 19:50 ` Richard Cochran
2017-02-13 9:48 ` FW: " Mintz, Yuval
2017-02-08 6:43 ` [PATCH net-next v4 2/2] qede: Add driver support for PTP Sudarsana Kalluru
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=20170212140202.GA1702@localhost.localdomain \
--to=richardcochran@gmail.com \
--cc=Sudarsana.Kalluru@cavium.com \
--cc=Yuval.Mintz@cavium.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.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).