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: <878rhuj78u.fsf@nvidia.com>
Date:   Sun, 22 Jan 2023 18:48:49 -0800
From:   Rahul Rameshbabu <rrameshbabu@...dia.com>
To:     Richard Cochran <richardcochran@...il.com>
Cc:     Jakub Kicinski <kuba@...nel.org>,
        Jacob Keller <jacob.e.keller@...el.com>,
        Saeed Mahameed <saeed@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Paolo Abeni <pabeni@...hat.com>,
        Eric Dumazet <edumazet@...gle.com>,
        Saeed Mahameed <saeedm@...dia.com>, netdev@...r.kernel.org,
        Tariq Toukan <tariqt@...dia.com>,
        Gal Pressman <gal@...dia.com>,
        Vincent Cheng <vincent.cheng.xh@...esas.com>
Subject: Re: [net-next 03/15] net/mlx5: Add adjphase function to support
 hardware-only offset control

On Sun, 22 Jan, 2023 18:22:58 -0800 Richard Cochran <richardcochran@...il.com> wrote:
> On Sun, Jan 22, 2023 at 01:11:57PM -0800, Rahul Rameshbabu wrote:
>
>> The way NVIDIA devices internally handle adjphase is to adjust the
>> frequency for a short period of time to make the small time offset
>> adjustments smooth (using some internal calculations) where the time
>> offset "nudge" is applied but frequency is also adjusted to prevent
>> immediate drift after that time adjustment.
>
> Whatever floats your boat.
>
>> However, we aren't sure if
>> this is the only approach possible to achieve accurate corrections for
>> small offset adjustments with adjphase,
>
> Typically one would implement a PI controller.
>
>> so I would suggest that the
>> documentation be updated to state something discussing that adjphase is
>> expected to support small jumps in offset precisely without necessarily
>> bringing up frequency manipulation potentially done to achieve this.
>
> Sorry if the docs aren't clear.  (However, the use of NTP timex
> ADJ_FREQUENCY and ADJ_OFFSET really should be clear to everyone
> familiar with NTP.)
>
> Bottom line: PHC that offers adjphase should implement a clock servo.

adjphase/ADJ_OFFSET is a servo implemented in the kernel space/offloaded
to the device. That makes sense.

Another question then is can adjtime/ADJ_SETOFFSET make use of this
servo implementation on the device or is there a strict expectation that
adjtime/ADJ_SETOFFSET is purely a function that adds the offset to the
current current time? If adjphase is implemented by a driver, should
ADJ_SETOFFSET try to make use of it in the ptp stack if the offset
provided is supported by the adjphase implementation?

This question was asked earlier in the mailing thread.

>
> Thanks,
> Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ