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: <ac8f54ce-8348-432d-8714-9643fce3faa2@intel.com>
Date: Wed, 10 Sep 2025 14:33:59 +0200
From: Przemek Kitszel <przemyslaw.kitszel@...el.com>
To: Ivan Vecera <ivecera@...hat.com>
CC: <netdev@...r.kernel.org>, Prathosh Satish <Prathosh.Satish@...rochip.com>,
	Jiri Pirko <jiri@...nulli.us>, "David S. Miller" <davem@...emloft.net>, "Eric
 Dumazet" <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
	<pabeni@...hat.com>, Simon Horman <horms@...nel.org>, Jonathan Corbet
	<corbet@....net>, "open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
	"open list" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] dpll: zl3073x: Allow to use custom phase measure
 averaging factor

On 9/10/25 12:32, Ivan Vecera wrote:
> The DPLL phase measurement block uses an exponential moving average,
> calculated using the following equation:
> 
>                         2^N - 1                1
> curr_avg = prev_avg * --------- + new_val * -----
>                           2^N                 2^N
> 
> Where curr_avg is phase offset reported by the firmware to the driver,
> prev_avg is previous averaged value and new_val is currently measured
> value for particular reference.
> 
> New measurements are taken approximately 40 Hz or at the frequency of
> the reference (whichever is lower).
> 
> The driver currently uses the averaging factor N=2 which prioritizes
> a fast response time to track dynamic changes in the phase. But for
> applications requiring a very stable and precise reading of the average
> phase offset, and where rapid changes are not expected, a higher factor
> would be appropriate.
> 
> Add devlink device parameter phase_offset_avg_factor to allow a user
> set tune the averaging factor via devlink interface.
> 
> Tested-by: Prathosh Satish <Prathosh.Satish@...rochip.com>
> Signed-off-by: Ivan Vecera <ivecera@...hat.com>
> ---
>   Documentation/networking/devlink/zl3073x.rst |  4 ++
>   drivers/dpll/zl3073x/core.c                  |  6 +-
>   drivers/dpll/zl3073x/core.h                  |  8 ++-
>   drivers/dpll/zl3073x/devlink.c               | 67 ++++++++++++++++++++
>   4 files changed, 82 insertions(+), 3 deletions(-)
> 

looks good,
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>

> +static int
> +zl3073x_devlink_param_phase_avg_factor_validate(struct devlink *devlink, u32 id,
> +						union devlink_param_value val,
> +						struct netlink_ext_ack *extack)
> +{
> +	return (val.vu8 < 16) ? 0 : -EINVAL;

nit: redundant params, not worth respining



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ