* [PATCH net] net/mlx5e: Fix unnecessary flow_block_cb_is_busy call
@ 2019-07-27 14:59 wenxu
2019-07-29 17:56 ` David Miller
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: wenxu @ 2019-07-27 14:59 UTC (permalink / raw)
To: netdev, saeedm
From: wenxu <wenxu@ucloud.cn>
When call flow_block_cb_is_busy. The indr_priv is guaranteed to
NULL ptr. So there is no need to call flow_bock_cb_is_busy.
Fixes: 0d4fd02e7199 ("net: flow_offload: add flow_block_cb_is_busy() and use it")
Signed-off-by: wenxu <wenxu@ucloud.cn>
---
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index 7f747cb..496d303 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -722,10 +722,6 @@ static void mlx5e_rep_indr_tc_block_unbind(void *cb_priv)
if (indr_priv)
return -EEXIST;
- if (flow_block_cb_is_busy(mlx5e_rep_indr_setup_block_cb,
- indr_priv, &mlx5e_block_cb_list))
- return -EBUSY;
-
indr_priv = kmalloc(sizeof(*indr_priv), GFP_KERNEL);
if (!indr_priv)
return -ENOMEM;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net] net/mlx5e: Fix unnecessary flow_block_cb_is_busy call
2019-07-27 14:59 [PATCH net] net/mlx5e: Fix unnecessary flow_block_cb_is_busy call wenxu
@ 2019-07-29 17:56 ` David Miller
2019-07-29 18:25 ` Saeed Mahameed
2019-07-29 21:30 ` Saeed Mahameed
2 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2019-07-29 17:56 UTC (permalink / raw)
To: wenxu; +Cc: netdev, saeedm
From: wenxu@ucloud.cn
Date: Sat, 27 Jul 2019 22:59:55 +0800
> From: wenxu <wenxu@ucloud.cn>
>
> When call flow_block_cb_is_busy. The indr_priv is guaranteed to
> NULL ptr. So there is no need to call flow_bock_cb_is_busy.
>
> Fixes: 0d4fd02e7199 ("net: flow_offload: add flow_block_cb_is_busy() and use it")
> Signed-off-by: wenxu <wenxu@ucloud.cn>
I need a review on this.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net/mlx5e: Fix unnecessary flow_block_cb_is_busy call
2019-07-27 14:59 [PATCH net] net/mlx5e: Fix unnecessary flow_block_cb_is_busy call wenxu
2019-07-29 17:56 ` David Miller
@ 2019-07-29 18:25 ` Saeed Mahameed
2019-07-29 20:53 ` David Miller
2019-07-29 21:30 ` Saeed Mahameed
2 siblings, 1 reply; 5+ messages in thread
From: Saeed Mahameed @ 2019-07-29 18:25 UTC (permalink / raw)
To: wenxu, netdev, davem
On Sat, 2019-07-27 at 22:59 +0800, wenxu@ucloud.cn wrote:
> From: wenxu <wenxu@ucloud.cn>
>
> When call flow_block_cb_is_busy. The indr_priv is guaranteed to
> NULL ptr. So there is no need to call flow_bock_cb_is_busy.
>
> Fixes: 0d4fd02e7199 ("net: flow_offload: add flow_block_cb_is_busy()
> and use it")
> Signed-off-by: wenxu <wenxu@ucloud.cn>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> index 7f747cb..496d303 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> @@ -722,10 +722,6 @@ static void mlx5e_rep_indr_tc_block_unbind(void
> *cb_priv)
> if (indr_priv)
> return -EEXIST;
>
> - if
> (flow_block_cb_is_busy(mlx5e_rep_indr_setup_block_cb,
> - indr_priv,
> &mlx5e_block_cb_list))
> - return -EBUSY;
> -
> indr_priv = kmalloc(sizeof(*indr_priv), GFP_KERNEL);
> if (!indr_priv)
> return -ENOMEM;
Indeed flow_block_cb_is_busy is redundant and will always return false
in this path.
This is net-next material.
Dave let me know if you want me to take it to my branch.
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net/mlx5e: Fix unnecessary flow_block_cb_is_busy call
2019-07-29 18:25 ` Saeed Mahameed
@ 2019-07-29 20:53 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2019-07-29 20:53 UTC (permalink / raw)
To: saeedm; +Cc: wenxu, netdev
From: Saeed Mahameed <saeedm@mellanox.com>
Date: Mon, 29 Jul 2019 18:25:26 +0000
> Dave let me know if you want me to take it to my branch.
Please do, thanks Saeed.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net/mlx5e: Fix unnecessary flow_block_cb_is_busy call
2019-07-27 14:59 [PATCH net] net/mlx5e: Fix unnecessary flow_block_cb_is_busy call wenxu
2019-07-29 17:56 ` David Miller
2019-07-29 18:25 ` Saeed Mahameed
@ 2019-07-29 21:30 ` Saeed Mahameed
2 siblings, 0 replies; 5+ messages in thread
From: Saeed Mahameed @ 2019-07-29 21:30 UTC (permalink / raw)
To: wenxu, netdev
On Sat, 2019-07-27 at 22:59 +0800, wenxu@ucloud.cn wrote:
> From: wenxu <wenxu@ucloud.cn>
>
> When call flow_block_cb_is_busy. The indr_priv is guaranteed to
> NULL ptr. So there is no need to call flow_bock_cb_is_busy.
>
> Fixes: 0d4fd02e7199 ("net: flow_offload: add flow_block_cb_is_busy()
> and use it")
> Signed-off-by: wenxu <wenxu@ucloud.cn>
Applied to net-next-mlx5 branch.
Thanks,
Saeed.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-07-29 21:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-27 14:59 [PATCH net] net/mlx5e: Fix unnecessary flow_block_cb_is_busy call wenxu
2019-07-29 17:56 ` David Miller
2019-07-29 18:25 ` Saeed Mahameed
2019-07-29 20:53 ` David Miller
2019-07-29 21:30 ` Saeed Mahameed
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).