* [RESEND PATCH net-next] net/mlx5: Use secs_to_jiffies() instead of msecs_to_jiffies()
@ 2025-02-21 8:53 Thorsten Blum
2025-02-23 10:35 ` Tariq Toukan
2025-02-25 2:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Thorsten Blum @ 2025-02-21 8:53 UTC (permalink / raw)
To: Saeed Mahameed, Leon Romanovsky, Tariq Toukan, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Yevgeny Kliteynik, Mark Bloch, Itamar Gozlan
Cc: Thorsten Blum, Jacob Keller, Saeed Mahameed, netdev, linux-rdma,
linux-kernel
Use secs_to_jiffies() and simplify the code.
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Saeed Mahameed <saeed@kernel.org>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
Resend with "net-next" in the title as suggested by Jacob and Saeed.
---
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];
u16 burst_th = hws_bwc_get_burst_th(ctx, queue_id);
bool got_comp = *pending_rules >= burst_th;
--
2.48.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [RESEND PATCH net-next] net/mlx5: Use secs_to_jiffies() instead of msecs_to_jiffies()
2025-02-21 8:53 [RESEND PATCH net-next] net/mlx5: Use secs_to_jiffies() instead of msecs_to_jiffies() Thorsten Blum
@ 2025-02-23 10:35 ` Tariq Toukan
2025-02-24 8:38 ` Somnath Kotur
2025-02-25 2:30 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Tariq Toukan @ 2025-02-23 10:35 UTC (permalink / raw)
To: Thorsten Blum, Saeed Mahameed, Leon Romanovsky, Tariq Toukan,
Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Yevgeny Kliteynik, Mark Bloch, Itamar Gozlan
Cc: Jacob Keller, Saeed Mahameed, netdev, linux-rdma, linux-kernel
On 21/02/2025 10:53, Thorsten Blum wrote:
> Use secs_to_jiffies() and simplify the code.
>
> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> Reviewed-by: Saeed Mahameed <saeed@kernel.org>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
> Resend with "net-next" in the title as suggested by Jacob and Saeed.
> ---
> 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);
secs_to_jiffies() is expanded to a significantly simpler code than
msecs_to_jiffies().
LGTM.
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
> struct mlx5hws_flow_op_result comp[MLX5HWS_BWC_MATCHER_REHASH_BURST_TH];
> u16 burst_th = hws_bwc_get_burst_th(ctx, queue_id);
> bool got_comp = *pending_rules >= burst_th;
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [RESEND PATCH net-next] net/mlx5: Use secs_to_jiffies() instead of msecs_to_jiffies()
2025-02-23 10:35 ` Tariq Toukan
@ 2025-02-24 8:38 ` Somnath Kotur
0 siblings, 0 replies; 4+ messages in thread
From: Somnath Kotur @ 2025-02-24 8:38 UTC (permalink / raw)
To: Tariq Toukan
Cc: Thorsten Blum, Saeed Mahameed, Leon Romanovsky, Tariq Toukan,
Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Yevgeny Kliteynik, Mark Bloch, Itamar Gozlan,
Jacob Keller, Saeed Mahameed, netdev, linux-rdma, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1698 bytes --]
On Sun, Feb 23, 2025 at 4:05 PM Tariq Toukan <ttoukan.linux@gmail.com> wrote:
>
>
>
> On 21/02/2025 10:53, Thorsten Blum wrote:
> > Use secs_to_jiffies() and simplify the code.
> >
> > Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> > Reviewed-by: Saeed Mahameed <saeed@kernel.org>
> > Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> > ---
> > Resend with "net-next" in the title as suggested by Jacob and Saeed.
> > ---
> > 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);
>
> secs_to_jiffies() is expanded to a significantly simpler code than
> msecs_to_jiffies().
>
> LGTM.
>
> Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
>
> > struct mlx5hws_flow_op_result comp[MLX5HWS_BWC_MATCHER_REHASH_BURST_TH];
> > u16 burst_th = hws_bwc_get_burst_th(ctx, queue_id);
> > bool got_comp = *pending_rules >= burst_th;
>
>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4212 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RESEND PATCH net-next] net/mlx5: Use secs_to_jiffies() instead of msecs_to_jiffies()
2025-02-21 8:53 [RESEND PATCH net-next] net/mlx5: Use secs_to_jiffies() instead of msecs_to_jiffies() Thorsten Blum
2025-02-23 10:35 ` Tariq Toukan
@ 2025-02-25 2:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-02-25 2:30 UTC (permalink / raw)
To: Thorsten Blum
Cc: saeedm, leon, tariqt, andrew+netdev, davem, edumazet, kuba,
pabeni, kliteyn, mbloch, igozlan, jacob.e.keller, saeed, netdev,
linux-rdma, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 21 Feb 2025 09:53:22 +0100 you wrote:
> Use secs_to_jiffies() and simplify the code.
>
> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> Reviewed-by: Saeed Mahameed <saeed@kernel.org>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
> Resend with "net-next" in the title as suggested by Jacob and Saeed.
>
> [...]
Here is the summary with links:
- [RESEND,net-next] net/mlx5: Use secs_to_jiffies() instead of msecs_to_jiffies()
https://git.kernel.org/netdev/net-next/c/8f3f4464ff08
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-02-25 2:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-21 8:53 [RESEND PATCH net-next] net/mlx5: Use secs_to_jiffies() instead of msecs_to_jiffies() Thorsten Blum
2025-02-23 10:35 ` Tariq Toukan
2025-02-24 8:38 ` Somnath Kotur
2025-02-25 2:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).