From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v6 0/6] ethdev port freeing Date: Mon, 22 Oct 2018 16:43:56 +0100 Message-ID: References: <20180907233929.21950-1-thomas@monjalon.net> <20181019020757.27698-1-thomas@monjalon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, ophirmu@mellanox.com, bernard.iremonger@intel.com, rahul.lakkireddy@chelsio.com To: Thomas Monjalon , arybchenko@solarflare.com Return-path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 9F9ED1B3F0 for ; Mon, 22 Oct 2018 17:43:59 +0200 (CEST) In-Reply-To: <20181019020757.27698-1-thomas@monjalon.net> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.