2020-01-26 17:52:19

by Christophe JAILLET

[permalink] [raw]
Subject: [PATCH] net/mlx5: Remove a useless 'drain_workqueue()' call in 'mlx5e_ipsec_cleanup()'

'destroy_workqueue()' already calls 'drain_workqueue()', there is no need
to call it explicitly.

Signed-off-by: Christophe JAILLET <[email protected]>
---
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
index cf58c9637904..29626c6c9c25 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
@@ -433,7 +433,6 @@ void mlx5e_ipsec_cleanup(struct mlx5e_priv *priv)
if (!ipsec)
return;

- drain_workqueue(ipsec->wq);
destroy_workqueue(ipsec->wq);

ida_destroy(&ipsec->halloc);
--
2.20.1


2020-01-27 08:30:24

by Boris Pismenny

[permalink] [raw]
Subject: Re: [PATCH] net/mlx5: Remove a useless 'drain_workqueue()' call in 'mlx5e_ipsec_cleanup()'


On 1/26/2020 7:51 PM, Christophe JAILLET wrote:
> 'destroy_workqueue()' already calls 'drain_workqueue()', there is no need
> to call it explicitly.
>
> Signed-off-by: Christophe JAILLET <[email protected]>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
> index cf58c9637904..29626c6c9c25 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
> @@ -433,7 +433,6 @@ void mlx5e_ipsec_cleanup(struct mlx5e_priv *priv)
> if (!ipsec)
> return;
>
> - drain_workqueue(ipsec->wq);
> destroy_workqueue(ipsec->wq);
>
> ida_destroy(&ipsec->halloc);
LGTM

2020-02-11 21:44:52

by Saeed Mahameed

[permalink] [raw]
Subject: Re: [PATCH] net/mlx5: Remove a useless 'drain_workqueue()' call in 'mlx5e_ipsec_cleanup()'

On Mon, Jan 27, 2020 at 12:08 AM Boris Pismenny <[email protected]> wrote:
>
>
> On 1/26/2020 7:51 PM, Christophe JAILLET wrote:
> > 'destroy_workqueue()' already calls 'drain_workqueue()', there is no need
> > to call it explicitly.
> >
> > Signed-off-by: Christophe JAILLET <[email protected]>
> > ---
> > drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
> > index cf58c9637904..29626c6c9c25 100644
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
> > @@ -433,7 +433,6 @@ void mlx5e_ipsec_cleanup(struct mlx5e_priv *priv)
> > if (!ipsec)
> > return;
> >
> > - drain_workqueue(ipsec->wq);
> > destroy_workqueue(ipsec->wq);
> >
> > ida_destroy(&ipsec->halloc);
> LGTM

applied to net-next-mlx5
Thanks!