Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Thorsten Blum <thorsten.blum@linux.dev>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>,
	Tariq Toukan <tariqt@nvidia.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Yevgeny Kliteynik <kliteyn@nvidia.com>,
	Mark Bloch <mbloch@nvidia.com>,
	Itamar Gozlan <igozlan@nvidia.com>
Cc: <netdev@vger.kernel.org>, <linux-rdma@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net/mlx5: Use secs_to_jiffies() instead of msecs_to_jiffies()
Date: Wed, 19 Feb 2025 15:45:02 -0800	[thread overview]
Message-ID: <48456fc0-7832-4df1-8177-4346f74d3ccc@intel.com> (raw)
In-Reply-To: <20250219205012.28249-2-thorsten.blum@linux.dev>



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@linux.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@intel.com>

Thanks,
Jake

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


  reply	other threads:[~2025-02-19 23:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19 20:49 [PATCH] net/mlx5: Use secs_to_jiffies() instead of msecs_to_jiffies() Thorsten Blum
2025-02-19 23:45 ` Jacob Keller [this message]
2025-02-20  7:13   ` Leon Romanovsky
2025-02-20 11:08     ` Thorsten Blum
2025-02-20 12:07       ` Leon Romanovsky
2025-02-20 21:56         ` Saeed Mahameed

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=48456fc0-7832-4df1-8177-4346f74d3ccc@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=igozlan@nvidia.com \
    --cc=kliteyn@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.com \
    --cc=thorsten.blum@linux.dev \
    /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