> -----Original Message-----
> From: Huang, Wei <wei.hu...@intel.com>
> Sent: Wednesday, January 26, 2022 11:30 AM
> To: dev@dpdk.org; Xu, Rosen <rosen...@intel.com>; Zhang, Qi Z
> <qi.z.zh...@intel.com>
> Cc: sta...@dpdk.org; Zhang, Tianfei <tianfei.zh...@intel.com>; Yigit, Ferruh
> <ferruh.yi...@intel.com>; Huang, Wei <wei.hu...@intel.com>
> Subject: [PATCH v1] raw/ifpga: fix ifpga devices cleanup function
>
> Use rte_dev_remove() to replace rte_rawdev_pmd_release() in
> ifpga_rawdev_cleanup(), resources occupied by ifpga raw devices such as
> threads can be released correctly.
>
> Fixes: f724a802 ("raw/ifpga: add miscellaneous APIs")
>
> Signed-off-by: Wei Huang <wei.hu...@intel.com>
> ---
> drivers/raw/ifpga/ifpga_rawdev.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/raw/ifpga/ifpga_rawdev.c
> b/drivers/raw/ifpga/ifpga_rawdev.c
> index fdf3c23..88c38aa 100644
> --- a/drivers/raw/ifpga/ifpga_rawdev.c
> +++ b/drivers/raw/ifpga/ifpga_rawdev.c
> @@ -1787,12 +1787,14 @@ int ifpga_rawdev_partial_reconfigure(struct
> rte_rawdev *dev, int port, void ifpga_rawdev_cleanup(void) {
> struct ifpga_rawdev *dev;
> + struct rte_rawdev *rdev;
> unsigned int i;
>
> for (i = 0; i < IFPGA_RAWDEV_NUM; i++) {
> dev = &ifpga_rawdevices[i];
> if (dev->rawdev) {
> - rte_rawdev_pmd_release(dev->rawdev);
> + rdev = dev->rawdev;
> + rte_dev_remove(rdev->device);
> dev->rawdev = NULL;
> }
> }
> --
It looks good for me.
Acked-by: Tianfei Zhang <tianfei.zh...@intel.com>