patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Zhang, Tianfei" <tianfei.zhang@intel.com>
To: "Huang, Wei" <wei.huang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>,
	"Xu, Rosen" <rosen.xu@intel.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>
Subject: RE: [PATCH v1] raw/ifpga: fix ifpga devices cleanup function
Date: Wed, 26 Jan 2022 06:57:06 +0000	[thread overview]
Message-ID: <BN9PR11MB5483D75FC4176EA694227E87E3209@BN9PR11MB5483.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220126032953.24695-1-wei.huang@intel.com>



> -----Original Message-----
> From: Huang, Wei <wei.huang@intel.com>
> Sent: Wednesday, January 26, 2022 11:30 AM
> To: dev@dpdk.org; Xu, Rosen <rosen.xu@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Cc: stable@dpdk.org; Zhang, Tianfei <tianfei.zhang@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Huang, Wei <wei.huang@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.huang@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.zhang@intel.com>

  reply	other threads:[~2022-01-26  6:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26  3:29 Wei Huang
2022-01-26  6:57 ` Zhang, Tianfei [this message]
2022-01-26  7:07 ` Xu, Rosen
2022-01-26  9:46   ` Zhang, Qi Z
2022-01-26 13:25 ` Ferruh Yigit
2022-01-27  8:57   ` Huang, Wei
2022-01-27 12:33     ` Ferruh Yigit
2022-01-28  6:44       ` Huang, Wei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN9PR11MB5483D75FC4176EA694227E87E3209@BN9PR11MB5483.namprd11.prod.outlook.com \
    --to=tianfei.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=rosen.xu@intel.com \
    --cc=stable@dpdk.org \
    --cc=wei.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).