From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 8259F1B05; Tue, 22 May 2018 21:48:39 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1700A21BDE; Tue, 22 May 2018 15:48:39 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 22 May 2018 15:48:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=V8+bf8xrwVNvDSTnESIUSTpf0t 8jXYQgpcOr12ws3h0=; b=fIXPwKEVfmlrVgDCoJYNB9nU7dhlJey0jArXLX1jjM Ef44HisPISK5/AFcoLoE6isUYzDbNybbCRxT19g6WCj5rIkCOcqLrkpfPxztCaN+ O34YNxYxycGRYyeOp+qbNLcBYm1k33RjWGmKbp/RikP+ui1FgyxaxYc1vGNFiHId 4= 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-sender:x-me-sender:x-sasl-enc; s=fm2; bh=V8+bf8 xrwVNvDSTnESIUSTpf0t8jXYQgpcOr12ws3h0=; b=HwFFuLeCaO1SsLpE4itpAW sM+Ao1T6dI4tNUR4ZVZvLov3XysabxVe68W4TkURTFP6Hky5X+1bZUHzZnvTnxdR kzGjkzHfumNdvGLPKg11+w4oKEmSVnBYpO7WDbTPyMcSPYcOOgv4xokHISOSpkYC QQ+ky23GFCy76w/GcInPQ/EC3wafdJn5txFJzlud06pkEevvGY5JEP1orwRpDptt T2DHiVERhpY6HSZLM/knC82ABwO2LBKa61bpw40Je9QmzE5s15QE1D4DYshb7y4I sgtxw2TE565v2lBTFQ1J6B8H8w6A0KS4Zhr+uvighjw+Iw+KPqb79iwyyqBfgEog == X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id C148BE4115; Tue, 22 May 2018 15:48:37 -0400 (EDT) From: Thomas Monjalon To: Ferruh Yigit Cc: "Yang, Zhiyong" , dev@dpdk.org, Matan Azrad , "Iremonger, Bernard" , "Yao, Lei A" , "maxime.coquelin@redhat.com" , "Bie, Tiwei" , "stable@dpdk.org" , Harry Van Haaren Date: Tue, 22 May 2018 21:48:37 +0200 Message-ID: <3059388.qb94XYSleL@xps> In-Reply-To: <45bf17fa-fb43-7917-8cf6-63864f9d2c4c@intel.com> References: <20180518095937.28710-1-zhiyong.yang@intel.com> <9489790.cv73CZovxU@xps> <45bf17fa-fb43-7917-8cf6-63864f9d2c4c@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] app/testpmd: fix pmd_test_exit function for vdevs X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 19:48:39 -0000 22/05/2018 20:38, Ferruh Yigit: > On 5/22/2018 2:12 PM, Thomas Monjalon wrote: > > Any update to improve this workaround? > > > > 21/05/2018 18:38, Thomas Monjalon: > >> 21/05/2018 18:32, Ferruh Yigit: > >>> On 5/21/2018 11:54 AM, Thomas Monjalon wrote: > >>>> 19/05/2018 16:19, Thomas Monjalon: > >>>>> 18/05/2018 18:29, Ferruh Yigit: > >>>>>> On 5/18/2018 4:55 PM, Matan Azrad wrote: > >>>>>>> Hi all > >>>>>>> > >>>>>>> While this patch also applied I don't understand it. > >>>>>>> Is it mandatory for each PMD to free all its resources in dev_close()? > >>>>>>> Or it should be done by the rte_device remove function? > >>>>>>> > >>>>>>> If the resource cleanup should be done by the remove function I think it > >>>>>>> should be called for all the devices (pci, vdev, etc). > >>>>>>> > >>>>>>> Is there an exit function for EAL to clean rte_eal_init()? If no, looks like we need it... > >>>>>> > >>>>>> Hi Matan, > >>>>>> > >>>>>> I believe there is a gap in resource cleanup. > >>>>>> dev_close() it not for resource cleanup, it should be in PMD remove() functions, > >>>>>> and PMDs have it. The problem is remove path is not called in application exit. > >>>>>> > >>>>>> As far as I know there is no simple API to clean the resources, having it may > >>>>>> help application to do the cleanup. > >>>>>> > >>>>>> I have seen the rte_eal_cleanup() API by Harry, that can be extended to cover > >>>>>> PMD resource cleanup if there is enough motivation for it. > >>>>> > >>>>> Yes, EAL resources should be removed by the function rte_eal_cleanup(). > >>>>> And ethdev ports must be removed by rte_eth_dev_close(). > >>>> > >>>> This patch is relying on rte_eth_dev_detach() to remove the EAL device. > >>>> It should be done in rte_eal_cleanup(). > >>>> > >>>> I am concerned that this patch is workarounding a miss in rte_eal_cleanup, > >>>> and takes a different action only for vdev. It is a bad example. > >>> > >>> Indeed it does workaround, but it is needed to fix a defect in virtio-user. > >> > >> The defect is still in virtio-user after this patch. > >> To make this workaround acceptable, you need: > >> 1/ add the virtio-user known issue in release notes > >> 2/ add a FIXME comment in testpmd code explaining the workaround > >> 3/ commit to work on rte_eal_cleanup() in 18.08 > > I have submitted following patch [1], can it cover 2/ for the v18.05-rc5? > > [1] > https://dpdk.org/dev/patchwork/patch/40350/ Yes, it covers item 2/. Thanks