From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 95576A0679 for ; Tue, 30 Apr 2019 09:55:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0134B5B12; Tue, 30 Apr 2019 09:55:35 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id E4EF6326C for ; Tue, 30 Apr 2019 09:55:34 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 4584522960; Tue, 30 Apr 2019 03:55:34 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 30 Apr 2019 03:55:34 -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=mesmtp; bh=egLEoSpYiic3Zcjf44dpM0pI/H3dCzwZKw+UK+AWuvU=; b=plQUUMMudyIj yG9A97bOTgd48/jbrCXevglCcDkX5a4xwA6GLKgfm82ApqFH37zdYAuX6ZGyHX2H wrn7xzpWs/Lrqr26E0myKeCHorrBLqu11VewW/x2qGXKqVAVvZ9x45m6LCau3sw/ RfVcFfXSRECYPTzXpARqgdk3hLApDwk= 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=fm2; bh=egLEoSpYiic3Zcjf44dpM0pI/H3dCzwZKw+UK+AWu vU=; b=rhvt5SLTc4wO7lvLngt2m9NhpkCC4i8McEDEI1jBIVZyW+SZAH5lC1WVw DOgQetU61mmLmW1sItvieGwFuH/k5CPFP2du4LdIJL57S+ZVdPIm7386oiDrPLG8 imvvqyJFhL+IhTgyzSKvvG5Y7eUWqD8BtUbrl/Uc6cXfEZjJRVFandtVJqBmj6yk QWCQA+Zhnzb7Px+dz+Br9fsfGcbLvyudbutsebqPb/T4uLBvRkxSxNATvutBeckc WU84AtxfXcwpaTDmHCFhZ1GfEBzX0yQmOLKu56fsf+9O4FQ7SipOfPd5qDDhDwXm BJ2VWFiEyhlStkA5IrFDvo8H2/sfg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrieefgdduvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeejjedrudefgedrvddtfedrudekgeenucfrrghrrghmpehmrghilhhfrhhomhepthhh ohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhushhtvghrufhiiigvpedt 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 173E4E44A1; Tue, 30 Apr 2019 03:55:32 -0400 (EDT) From: Thomas Monjalon To: Ferruh Yigit Cc: Xiaolong Ye , dev@dpdk.org Date: Tue, 30 Apr 2019 09:55:31 +0200 Message-ID: <1886342.GR0dOcdeod@xps> In-Reply-To: References: <20190426050912.109813-1-xiaolong.ye@intel.com> <8348310.0Lx1uY5diY@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v1 1/2] net/af_xdp: remove resources when port is closed 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" Message-ID: <20190430075531.u67PbKsCl8-pg_vntznEAdG88InEEPG5haLpmejZi44@z> 30/04/2019 09:33, Ferruh Yigit: > On 4/29/2019 11:34 PM, Thomas Monjalon wrote: > > 30/04/2019 00:28, Ferruh Yigit: > >> On 4/29/2019 9:14 PM, Thomas Monjalon wrote: > >>> 29/04/2019 19:00, Ferruh Yigit: > >>>> 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 > >>>> > >>>> <...> > >>>> > >>>>> @@ -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. > >>> > >>> I don't understand your comment. > >>> Calling the close function looks the right thing to do in "remove". > >> > >> No concern on calling the 'close'. > >> My comment was to keep 'rte_eth_dev_release_port()' which this patch removes. > > > > rte_eth_dev_release_port() is called in eth_dev_close(), isn't it? > > No, 'eth_dev_close()' is local 'dev_close()' ops, the one to clear driver > private resources. > I assume it is confused with 'rte_eth_dev_close()' ... > > >>>>> - > >>>>> + eth_dev_close(eth_dev); Ah yes, I overlooked it. Why not calling rte_eth_dev_close()?