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 95846AABA for ; Sat, 2 Jun 2018 07:02:01 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1691121AF9; Sat, 2 Jun 2018 01:02:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 02 Jun 2018 01:02:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=ksMjX6/Y8V0vJFGmI1um1wXg5RZGNewVtPlxcaZjI7k=; b=UVLoMfkU abW8gzTPE9a2YxAmti4BmvhVAJk8TlEjhQ4PwI/LINe4HhbmtCYEtmpLswY65A9P iotJwpT6VLpMbmds0YCG4LMHMPnm720K9HKu5jLAsWMz6RqM8UkqNZYAOwTiqHLB I8kLem8MgRtN3p02s1mzCeIWSIQSVwjHq07MGRehcwBUr/aIJ8Z3DrIHRWA9Bp9d QrmluqcHM/Gf5hjE60HBHVDAenWoP6cm4mI+0Zhc2RKLiPnT8qjAYWJcK/VejvaE iosALH8zNg/t4CQ1/4aV0RcveIYvx9So7J1LWvChcGOOf5gOmBMtHTWlw0DIyzQ8 nS6NOzrbxM7jlw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=ksMjX6/Y8V0vJFGmI1um1wXg5RZGN ewVtPlxcaZjI7k=; b=j82LGFxn9VmkNhIW9eaQ3RIoTiQCafSoZX4aRrO6ynS5u 4+3of4iYWVC9nvN1OFHQSlFajirdT9EN5LT+8UwVuLRrxFTuPkBZzLQwuhbJxe8z FMOssmVmw9kaBKt+GXeYNG1VCP92RaCY0l6XIPl5ReD2ZvCJ3boE7RG4jP5fSiGG 1TPUZ1nDhERHtwEI0OjHMjyFnpdUr5e8bwQlIIn8pGkqsnl1uo37aGemInAUQ+1m Px4gaSazedncSwwixH0ow+kaPg8Ri8Tx9r1C4YfvwYgFoG9f7gIY3BPvaP9sueKY D2Dwc73iZYq+uTgCLB0V84jx4KOQebl5lZ+LxnYxA== X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from yuanhanliu-NB0 (unknown [223.74.148.12]) by mail.messagingengine.com (Postfix) with ESMTPA id 6707EE40A3; Sat, 2 Jun 2018 01:01:59 -0400 (EDT) Date: Sat, 2 Jun 2018 13:01:35 +0800 From: Yuanhan Liu To: Thomas Monjalon Cc: Ferruh Yigit , Wenzhuo Lu , Jingjing Wu , dev@dpdk.org, Zhiyong Yang , Bernard Iremonger , Maxime Coquelin Message-ID: <20180602050135.a3p2uttxuomr2w2v@yuanhanliu-NB0.tencent.com> References: <20180522183509.66644-1-ferruh.yigit@intel.com> <20180527040630.x3wrjsblyqbxk3bz@yuanhanliu-NB0.tencent.com> <6066559.Wi7eJV5HDK@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6066559.Wi7eJV5HDK@xps> User-Agent: NeoMutt/20170113 (1.7.2) 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: Sat, 02 Jun 2018 05:02:01 -0000 On Sun, May 27, 2018 at 02:37:28PM +0200, Thomas Monjalon wrote: > 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. If there must be a workaround, I would do it at virtio-user pmd. --yliu > > > > > + * 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); > > > } > > > } > > > > > >