From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0D841A04B1; Wed, 23 Sep 2020 22:50:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E58A31DB3C; Wed, 23 Sep 2020 22:50:17 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 0053B1DB26 for ; Wed, 23 Sep 2020 22:50:15 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 920725C00E7; Wed, 23 Sep 2020 16:50:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Wed, 23 Sep 2020 16:50:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= 2/bduUPpn81vpp3Nc9fR44OWmxLQNoagZAWq5zBYPQg=; b=jBE1r289h4OdZk68 14tOqPV/TRchgTkLauXpJdtQIXWei7203ATNlntjz4HbuHK07GcIXp0zE8ZHxty6 gP8b3DpOodm3sJtGRsFKwjjBgR3e3BCrIqUmyD6YVGW49b1+458iLL4iiNbdPcHh arIGTO2m4DGXkTjgupBGpVZv4fzYgZVJPRu1cjkHAjG0A0Tz6g1Dbyi4Z75MaF7D GCmA2rF7/MFPCwV081ntlGaXrFJ9PoH+KwptKphetkFeyrh7bmXiUnnXk0NfHoM4 fSfqCtNkzvQ8AExZ0V13r7s4cwoHrPPy0bhBSdvvLRcQNRVyUkSdAvE2uZ98xsyz W7odsw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=2/bduUPpn81vpp3Nc9fR44OWmxLQNoagZAWq5zBYP Qg=; b=VkPaiv7VffPrIjuBkFsEeXzxB3amsi9yERoDYigKmw/8yfxuuBIXpiGGF kr/7jHTbt8OCwCnXDeOZ4Gp2U5B+FBOqJWXnig2jVKSuP9CgtQ+8LUceVFm0/5C7 6rTt52tYtf/HFku/j8JKFgWrwPaTm4+uVS4bxdF1Go7ABaV/Sgo0LJkOOJpmH8u8 NuI+/fkuSXGa67NL0HiN6W4olkDHdZ/7zcQ3kSb7UYi2548/hL3IPjZdVlmQ0aT7 5B/+YqxU5IkrCcZOSHx4z+LwsCFhwVGUpEWbbUEGm74BqdUpL7HCFuR/yXF3DlD+ WNO1b0ZDncO6PU8Tu6d7qUpF/kOug== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeigdduheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id A6E303280066; Wed, 23 Sep 2020 16:50:14 -0400 (EDT) From: Thomas Monjalon To: Ferruh Yigit Cc: dev@dpdk.org, arybchenko@solarflare.com, Igor Russkikh , Pavel Belous , Anatoly Burakov Date: Wed, 23 Sep 2020 22:50:13 +0200 Message-ID: <7294375.m6gNBTsVzr@thomas> In-Reply-To: <75c03f9f-7073-7d67-b559-5f5d8564cb07@intel.com> References: <20200913220711.3768597-1-thomas@monjalon.net> <20200913220711.3768597-5-thomas@monjalon.net> <75c03f9f-7073-7d67-b559-5f5d8564cb07@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 04/20] net/atlantic: release port upon close X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 23/09/2020 18:42, Ferruh Yigit: > On 9/13/2020 11:06 PM, Thomas Monjalon wrote: > > The flag RTE_ETH_DEV_CLOSE_REMOVE is set so all port resources > > can be freed by rte_eth_dev_close(). > > > > Freeing of private port resources is moved > > from the ".remove(device)" to the ".dev_close(port)" operation. > > > > Signed-off-by: Thomas Monjalon > > <...> > > > @@ -721,12 +687,32 @@ atl_dev_set_link_down(struct rte_eth_dev *dev) > > static int > > atl_dev_close(struct rte_eth_dev *dev) > > { > > + struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev); > > + struct rte_intr_handle *intr_handle = &pci_dev->intr_handle; > > + struct aq_hw_s *hw; > > + > > PMD_INIT_FUNC_TRACE(); > > > > + if (rte_eal_process_type() != RTE_PROC_PRIMARY) > > + return -EPERM; > > Is this case an error, or should it return 0. In other drivers, I think I chose 0. > > + dev->dev_ops = NULL; > > + dev->rx_pkt_burst = NULL; > > + dev->tx_pkt_burst = NULL; > > What do you think moving above cleanup to 'rte_eth_dev_release_port()'? I asked myself the same question. I think we should but I propose to do this change in a different series.