From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id A6374B62 for ; Sun, 27 May 2018 14:37:38 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 080D8212C8; Sun, 27 May 2018 08:37:36 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 27 May 2018 08:37:36 -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=YVKMxvQnbtQ8SxVpe/c9o+wWU6 x2Mf4rSsPJZ98tEP8=; b=NuXak7bMIsUuIcF5hH9B1gdh562bx0s+3X3A70gKQf fm1Q27jeqFP/dubQUXcsKltndAuYvaCMnvN8u15JZQPiju82zGJ0NK8rp+97vxAF G9zSJaYUfpn1kv51VHmC+Tl06c2qqtPXNzbVuSsJ8bao9ZIYat3Cz17DNDU5FCIf Y= 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=YVKMxv QnbtQ8SxVpe/c9o+wWU6x2Mf4rSsPJZ98tEP8=; b=BsqiAMOKGnDS4mrT+s6Vzt eMgmkrbBQyrA/GM3oOUxxILymthseNO95XGEEUD9N/0PhvKNcFI2gwZVM4zCf24M n+ZQm2wRH/v4wbK3FqGF33/4xEEEoQ2beEfzdKTpZc1/R6P3yFjpFfXNAFbFVK00 AnGFUJEETyCgDJ0WBa5S7u66/6wJcIHWr3hy0tDiWxY1ShFIoV/Tj2zS/6bNUvDr 9RW9VeDzYCXtDzt9DHVgMr32IWezIN7zAyBqx2ojNFf2BXfiwULbMmrigEHNiWVz rYjbUmnL19UMQo/zUMbLPeCTT8mzGM+UI8e7GonTNoL+nvyZD+Jt0uV32rKfe7Tw == 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 (116.41.136.77.rev.sfr.net [77.136.41.116]) by mail.messagingengine.com (Postfix) with ESMTPA id 95D9510261; Sun, 27 May 2018 08:37:33 -0400 (EDT) From: Thomas Monjalon To: Yuanhan Liu Cc: Ferruh Yigit , Wenzhuo Lu , Jingjing Wu , dev@dpdk.org, Zhiyong Yang , Bernard Iremonger , Maxime Coquelin Date: Sun, 27 May 2018 14:37:28 +0200 Message-ID: <6066559.Wi7eJV5HDK@xps> In-Reply-To: <20180527040630.x3wrjsblyqbxk3bz@yuanhanliu-NB0.tencent.com> References: <20180522183509.66644-1-ferruh.yigit@intel.com> <20180527040630.x3wrjsblyqbxk3bz@yuanhanliu-NB0.tencent.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix failsafe PMD failure on exit 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: , X-List-Received-Date: Sun, 27 May 2018 12:37:39 -0000 27/05/2018 06:06, Yuanhan Liu: > On Tue, May 22, 2018 at 07:35:08PM +0100, Ferruh Yigit wrote: > > + /* > > + * This is a workaround to fix a virtio-user issue that > > + * requires to call clean-up routine to remove existing > > + * socket. > > I came across this patch while I was cherry-picking patches to 17.11.4 > release. And this patch seems wrong to me. Yes it is far from perfect. > Any particular reason why the socket removal can not be done in virtio-user > pmd, say at its close method? The socket is removed in the remove function of the driver. The right fix is to call the remove functions of all driver from the EAL cleanup function. We have decided of this last minute workaround for testpmd because we need it for testing convenience, but do not want to take any risk with a proper fix as it is really late for that. > > + * This workaround valid only for testpmd, needs a fix > > + * valid for all applications. > > + * TODO: Implement proper resource cleanup > > + */ > > + device = rte_eth_devices[pt_id].device; > > + if (device && !strcmp(device->driver->name, "net_virtio_user")) > > detach_port(pt_id); > > } > > } >