[dpdk-dev] [PATCH_v4 3/3] regex/mlx5: fix redundancy in PCI remove function

Ori Kam orika at nvidia.com
Wed Jul 21 08:23:03 CEST 2021


Hi Michael,

> -----Original Message-----
> From: Michael Baum <michaelba at nvidia.com>
> Sent: Monday, July 12, 2021 10:07 AM
> In the PCI removal function, PMD releases all driver resources and cancels
> the regexdev registry.
> 
> However, regexdev registration is accidentally canceled twice.
> 
> Remove one of them.
> 
> Fixes: b34d816363b5 ("regex/mlx5: support rules import")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Michael Baum <michaelba at nvidia.com>
> ---
>  drivers/regex/mlx5/mlx5_regex.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/regex/mlx5/mlx5_regex.c
> b/drivers/regex/mlx5/mlx5_regex.c index f64dc2824c..1c5bf930ad 100644
> --- a/drivers/regex/mlx5/mlx5_regex.c
> +++ b/drivers/regex/mlx5/mlx5_regex.c
> @@ -290,8 +290,6 @@ mlx5_regex_pci_remove(struct rte_pci_device
> *pci_dev)
>  			rte_regexdev_unregister(priv->regexdev);
>  		if (priv->ctx)
>  			mlx5_glue->close_device(priv->ctx);
> -		if (priv->regexdev)
> -			rte_regexdev_unregister(priv->regexdev);
>  		rte_free(priv);
>  	}
>  	return 0;
> --
> 2.25.1

Acked-by: Ori Kam <orika at nvidia.com>
Thanks,
Ori



More information about the dev mailing list