[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87zgcsl3pv.fsf@nvidia.com>
Date: Tue, 15 Nov 2022 14:56:54 +0100
From: Petr Machata <petrm@...dia.com>
To: Ido Schimmel <idosch@...dia.com>
CC: Jacob Keller <jacob.e.keller@...el.com>, <netdev@...r.kernel.org>,
"Amit Cohen" <amcohen@...dia.com>, Petr Machata <petrm@...dia.com>
Subject: Re: [PATCH net-next] mlxsw: update adjfine to use adjust_by_scaled_ppm
Ido Schimmel <idosch@...dia.com> writes:
> 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@...el.com>
>> Cc: Amit Cohen <amcohen@...dia.com>
>> Cc: Ido Schimmel <idosch@...dia.com>
>> Cc: Petr Machata <petrm@...dia.com>
>
> Thanks for the patch, code looks good to me.
>
> Petr, please apply this patch to our tree for testing.
Applied. Jacob, we'll let you know tomorrow whether it exploded.
Powered by blists - more mailing lists