> -----Original Message----- > From: Ferruh Yigit <[email protected]> > Sent: 2020年10月16日 2:57 > To: Zhang, Tianfei <[email protected]>; [email protected]; Xu, Rosen > <[email protected]>; Huang, Wei <[email protected]> > 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 <[email protected]> > > > > 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 <[email protected]> > > Signed-off-by: Tianfei zhang <[email protected]> > > <...>

