On 10/19/2018 3:07 AM, Thomas Monjalon wrote: > The function rte_eth_dev_detach() is freeing a port and its underlying > rte_device object. The issue is that we may have several ports > associated to the same rte_device. > > The right replacement is to free the port, and free the rte_device > if no more ports. > At ethdev level, the public function for port freeing is rte_eth_dev_close(). > The only miss is rte_eth_dev_release_port() to free all port resources. > > This patchset does a cleanup by moving as much ethdev data freeing > as possible in an unique function rte_eth_dev_release_port(), > and call this function in rte_eth_dev_close(). > The port is released on close only if the driver supports it. > > > Changes in v6: > - fix testpmd ports list iteration > - keep old behaviour > - add flag RTE_ETH_DEV_CLOSE_REMOVE to enable new behaviour (port release) > > Changes in v5: > - fix testpmd for detaching multi-ports device > - fix testpmd for detaching only stopped ports > - add a release note about closed port freeing and state > - fix some doxygen comments in rte_eth_dev_data > - improve doxygen of rte_eth_dev_release_port() > - fix data freeing in some drivers > > Changes in v4: > - do not free data fields which are not dynamically allocated blocks > - remove rte_eth_dev_release_port_secondary() > - remove testpmd check to detach without closing > > Changes in v3: > - free queues, MAC addresses and private structure > in rte_eth_dev_release_port. > > > Thomas Monjalon (5): > app/testpmd: allow detaching a port not closed > ethdev: fix doxygen comments of shared data fields > ethdev: free all common data when releasing port > ethdev: remove release function for secondary process > ethdev: complete closing of port > > Wisam Jaddo (1): > app/testpmd: update port list for multiple removals
Series applied to dpdk-next-net/master, thanks.