net/mlx5: Use secs_to_jiffies() instead of msecs_to_jiffies()
Subsystems (4)
PATCH RESEND 1/1 net/mlx5: Use secs_to_jiffies() instead of msecs_to_jiffies()
Use secs_to_jiffies() and simplify the code.
---
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(-)
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c +1 -1
@@ -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;
Signature · 1 line
2.48.1
Quoted 16 lines · Thorsten Blum
Use
secs_to_jiffies()and simplify the code.Reviewed-by Jacob Keller <[email protected]>Reviewed-by Saeed Mahameed <[email protected]>Signed-off-by Thorsten Blum <[email protected]>---
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(-)drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c +0
-0
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c static int hws_bwc_queue_poll(struct mlx5hws_context *ctx, · line 223
Quoted 5 lines
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c +1
-1@@ -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.
Quoted 3 lines
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c +0
-0struct 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;
Somnath Kotur
Reviewed-byQuoted 29 lines · Tariq Toukan
Quoted 16 lines · Thorsten Blum
Use
secs_to_jiffies()and simplify the code.Reviewed-by Jacob Keller <[email protected]>Reviewed-by Saeed Mahameed <[email protected]>Signed-off-by Thorsten Blum <[email protected]>---
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(-)drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c +0
-0drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c static int hws_bwc_queue_poll(struct mlx5hws_context *ctx, · line 223
Quoted 5 lines
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c +1
-1@@ -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 thanmsecs_to_jiffies().
Quoted 4 lines
LGTM.
Reviewed-by Tariq Toukan <[email protected]>
Quoted 6 lines
Quoted 4 lines
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c +0
-0struct 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;
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Fri, 21 Feb 2025 09:53:22 +0100 you wrote:
Use
secs_to_jiffies()and simplify the code.Reviewed-by Jacob Keller <[email protected]>Reviewed-by Saeed Mahameed <[email protected]>Signed-off-by Thorsten Blum <[email protected]>---
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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html