[dpdk-dev] [PATCH v2 2/4] raw/ifpga/base: free resources when destroying ifpga device

Zhang, Tianfei tianfei.zhang at intel.com
Fri Oct 16 07:51:19 CEST 2020



> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit at intel.com>
> Sent: 2020年10月16日 2:57
> To: Zhang, Tianfei <tianfei.zhang at intel.com>; dev at dpdk.org; Xu, Rosen
> <rosen.xu at intel.com>; Huang, Wei <wei.huang at intel.com>
> Subject: Re: [dpdk-dev] [PATCH v2 2/4] raw/ifpga/base: free resources when
> destroying ifpga device
> 
> On 9/28/2020 2:40 AM, Tianfei zhang wrote:
> > From: Wei Huang <wei.huang at intel.com>
> >
> > Add two functions to complete the resources free work, one is
> > ifpga_adapter_destroy(), the other is ifpga_bus_uinit().
> > Then call opae_adapter_destroy() in ifpga_rawdev_destroy().
> >
> > Additional modifiction is removing opae_adapter_free() from
> 
> s/modifiction/modification
> 
> > ifpga_rawdev_destroy() because opae adapter will be released in
> > rte_rawdev_pmd_release().
> 
> I can see following call stack,
> 
> rte_rawdev_pmd_release()
>    rte_rawdev_close()
>      ifpga_rawdev_close()
> 
> In this path 'opae_adapter_free()' is not called, can you please confirm if opae
> adapter free is done.

opae_adapter_free() function is use to free the adapter data struct. But in rawdev framework,
the rte_rawdev_pmd_release() will release this adapter because the adapter will pointer to rawdev->dev_private when
we create the rawdev in ifpga_rawdev_create() . And in rte_rawdev_pmd_release(), it will free the rawdev->dev_private.

> 
> >
> > Signed-off-by: Wei Huang <wei.huang at intel.com>
> > Signed-off-by: Tianfei zhang <tianfei.zhang at intel.com>
> 
> <...>


More information about the dev mailing list