netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: Jacob Keller <jacob.e.keller@intel.com>, petrm@nvidia.com
Cc: netdev@vger.kernel.org, Amit Cohen <amcohen@nvidia.com>,
	Petr Machata <petrm@nvidia.com>
Subject: Re: [PATCH net-next] mlxsw: update adjfine to use adjust_by_scaled_ppm
Date: Tue, 15 Nov 2022 11:23:53 +0200	[thread overview]
Message-ID: <Y3NaqWlpp15fYJfb@shredder> (raw)
In-Reply-To: <20221114213701.815132-1-jacob.e.keller@intel.com>

On Mon, Nov 14, 2022 at 01:37:01PM -0800, Jacob Keller wrote:
> The mlxsw adjfine implementation in the spectrum_ptp.c file converts
> scaled_ppm into ppb before updating a cyclecounter multiplier using the
> standard "base * ppb / 1billion" calculation.
> 
> This can be re-written to use adjust_by_scaled_ppm, directly using the
> scaled parts per million and reducing the amount of code required to
> express this calculation.
> 
> We still calculate the parts per billion for passing into
> mlxsw_sp_ptp_phc_adjfreq because this function requires the input to be in
> parts per billion.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Cc: Amit Cohen <amcohen@nvidia.com>
> Cc: Ido Schimmel <idosch@nvidia.com>
> Cc: Petr Machata <petrm@nvidia.com>

Thanks for the patch, code looks good to me.

Petr, please apply this patch to our tree for testing.

  reply	other threads:[~2022-11-15  9:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-14 21:37 [PATCH net-next] mlxsw: update adjfine to use adjust_by_scaled_ppm Jacob Keller
2022-11-15  9:23 ` Ido Schimmel [this message]
2022-11-15 13:56   ` Petr Machata
2022-11-16  8:01 ` Ido Schimmel
2022-11-16 20:20   ` Jakub Kicinski
2022-11-16 20:30 ` patchwork-bot+netdevbpf

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=Y3NaqWlpp15fYJfb@shredder \
    --to=idosch@nvidia.com \
    --cc=amcohen@nvidia.com \
    --cc=jacob.e.keller@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=petrm@nvidia.com \
    /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).