On 4/30/2019 3:06 AM, Ye Xiaolong wrote: > Hi, Ferruh > > On 04/29, Ferruh Yigit wrote: >> On 4/26/2019 6:09 AM, Xiaolong Ye wrote: >>> Since 18.11, it is suggested that driver should release all its private >>> resources at the dev_close routine. So all resources previously released >>> in remove routine are now released at the dev_close routine, and the >>> dev_close routine will be called in driver remove routine in order to >>> support removing a device without closing its ports. >>> >>> Above behavior changes are supported by setting RTE_ETH_DEV_CLOSE_REMOVE >>> flag during probe stage. >>> >>> Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> >> >> <...> >> >>> @@ -936,14 +940,7 @@ rte_pmd_af_xdp_remove(struct rte_vdev_device *dev) >>> if (eth_dev == NULL) >>> return -1; >>> >>> - internals = eth_dev->data->dev_private; >>> - >>> - rte_ring_free(internals->umem->buf_ring); >>> - rte_memzone_free(internals->umem->mz); >>> - rte_free(internals->umem); >>> - >>> - rte_eth_dev_release_port(eth_dev); >> >> I thinks we should keep 'rte_eth_dev_release_port()' in '.remove()' path, >> the 'RTE_ETH_DEV_CLOSE_REMOVE' flag will take care of this in >> 'rte_eth_dev_close()' but still needed in '.remove()' path. >> > > remove() would call eth_dev_close which includes the > rte_eth_dev_release_port().
'eth_dev_close()' doesn't call the 'rte_eth_dev_release_port()', and it shouldn't really, am I missing something? > > Thanks, > Xiaolong > >>> - >>> + eth_dev_close(eth_dev); >>> >>> return 0; >>> } >>> >>