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: <48456fc0-7832-4df1-8177-4346f74d3ccc@intel.com>
Date: Wed, 19 Feb 2025 15:45:02 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Thorsten Blum <thorsten.blum@...ux.dev>, Saeed Mahameed
	<saeedm@...dia.com>, Leon Romanovsky <leon@...nel.org>, Tariq Toukan
	<tariqt@...dia.com>, Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
	<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
	<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Yevgeny Kliteynik
	<kliteyn@...dia.com>, Mark Bloch <mbloch@...dia.com>, Itamar Gozlan
	<igozlan@...dia.com>
CC: <netdev@...r.kernel.org>, <linux-rdma@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net/mlx5: Use secs_to_jiffies() instead of
 msecs_to_jiffies()



On 2/19/2025 12:49 PM, Thorsten Blum wrote:
> Use secs_to_jiffies() and simplify the code.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>

nit: this is a cleanup which should have the net-next prefix applied,
since this doesn't fix any user visible behavior.

Otherwise, seems like an ok change.

> ---
>  drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c
> index 3dbd4efa21a2..19dce1ba512d 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c
> @@ -220,7 +220,7 @@ static int hws_bwc_queue_poll(struct mlx5hws_context *ctx,
>  			      bool drain)
>  {
>  	unsigned long timeout = jiffies +
> -				msecs_to_jiffies(MLX5HWS_BWC_POLLING_TIMEOUT * MSEC_PER_SEC);
> +				secs_to_jiffies(MLX5HWS_BWC_POLLING_TIMEOUT);
>  	struct mlx5hws_flow_op_result comp[MLX5HWS_BWC_MATCHER_REHASH_BURST_TH];

This looks like it violates RCT ordering now though.

Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>

Thanks,
Jake

>  	u16 burst_th = hws_bwc_get_burst_th(ctx, queue_id);
>  	bool got_comp = *pending_rules >= burst_th;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ