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 2E407239 for ; Sun, 27 May 2018 06:14:58 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A82D021B7C; Sun, 27 May 2018 00:14:57 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 27 May 2018 00:14:57 -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= fm2; bh=cNiAB5W5E4Ep6rZKW/N09WRlGkkywv2lffug0IXzZhs=; b=m9xnp4W/ slb2JXujGq1lYnJnz6n0fGahFUyPKMphcLXm/GS4LzgkT5GMSG24qej4ExPT5FmC 4T6T1UlaVF1mVNnsqG+a/31WqKMe+wzuczRFX+oCMg3w5+KsJu9Z88JV1SYrvcXT xODa9pHanbD+okiZhTZ1Y+rkgQd5B/3dND74tqnv/lqMiMS1c+fht4YF1dEsJAKm mvc0UWYeAuJyLMpS4tPhq+bZBe4ZwUSBNkzXtgt2D07byBzRSsvxf2o0wXTmbLYU tpK/1PKODAPMREIpLFhu1cb1Kbg9gQ29kemLS8Rmrc49qCNdUInShhf+q4lzuQRC +Ilbbnv3tNH7dA== 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=cNiAB5W5E4Ep6rZKW/N09WRlGkkyw v2lffug0IXzZhs=; b=cHIHlpHCJ5qmyU0hE3rBD3WUyNikCa4IvvxLNgq3LR3a/ XxpuimFJp4FdmFLuyQXjEF2wio5E6G8XmiViudwQJLJBx0VKMEiH0ufdSpo/zoNQ HFsfL4YxRW4M9mM9TdESDEWwUrUgfxWHcYUmVYm0A58a1s5G/+I/dnp6G8D1i55W O7ppvmGmvowyQAD9qYIo6pz5hm3QgJRAlGcA5mtosITNHkUacGji/hwhDym73LH/ YXIvzv3J/bXpAjAMZaFUtyL25pbGE+LMADQ7+wd5hDXP9GiFSBHVWsaa8OYzqvuv Mjjp5FhZuOMLn3NrSkQlkPfOWsdyA2y9LeZZvZEIg== 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.22]) by mail.messagingengine.com (Postfix) with ESMTPA id D9EE110261; Sun, 27 May 2018 00:14:56 -0400 (EDT) Date: Sun, 27 May 2018 12:14:25 +0800 From: Yuanhan Liu To: luca.boccassi@gmail.com Cc: Zhiyong Yang , Lei Yao , Bernard Iremonger , dpdk stable Message-ID: <20180527041424.mncvuajgbogw6mhu@yuanhanliu-NB0.tencent.com> References: <20180516101323.2234-2-luca.boccassi@gmail.com> <20180523121010.8385-1-luca.boccassi@gmail.com> <20180523121010.8385-43-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180523121010.8385-43-luca.boccassi@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-stable] patch 'app/testpmd: fix exit for virtio-user' has been queued to stable release 18.02.2 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: Sun, 27 May 2018 04:14:58 -0000 On Wed, May 23, 2018 at 01:09:54PM +0100, luca.boccassi@gmail.com wrote: > Hi, > > FYI, your patch has been queued to stable release 18.02.2 > > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. > It will be pushed if I get no objections before 05/25/18. So please > shout if anyone has objections. I'm late, but I'd suggest you to not include this patch, for - it's a workaround - it tries to "fix" an issue introduced in v18.05, for adding virtio-user server mode. --yliu > > Thanks. > > Luca Boccassi > > --- > >From 8e96cf1276094a75ad0d3fd32912c672489e9811 Mon Sep 17 00:00:00 2001 > From: Zhiyong Yang > Date: Fri, 18 May 2018 17:59:37 +0800 > Subject: [PATCH] app/testpmd: fix exit for virtio-user > > [ upstream commit 124909d7e1bf299c959b58c2db7c5fbd7abbb7c0 ] > > For vdev, just calling rte_eth_dev_close() isn't enough to free all > the resources allocated during device probe, e.g. for virtio-user, > virtio_user_pmd_remove(), i.e. the remove() method of a vdev driver, > needs to be called to unlink the socket file created during device > probe. So this patch calls the rte_eth_dev_detach() for vdev when > quitting testpmd. > > vdevs detach on testpmd exit implemented as workaround to fix > a virtio-user issue. The issue was virtio-user cleanup is not > called and existing socket file not cleaned up which will fail > next run. > > Added a comment that this workaround should be converted to a proper > cleanup, not something specific to virtio-user, and not something > specific to vdev and testpmd. > > Fixes: af75078fece3 ("first public release") > Fixes: bd8f50a45d0f ("net/virtio-user: support server mode") > > Signed-off-by: Zhiyong Yang > Tested-by: Lei Yao > Acked-by: Bernard Iremonger > --- > app/test-pmd/testpmd.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > index 05a68a068..98e0a9dc6 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -1951,6 +1951,7 @@ detach_port(portid_t port_id) > void > pmd_test_exit(void) > { > + struct rte_device *device; > portid_t pt_id; > > if (test_done == 0) > @@ -1963,6 +1964,18 @@ pmd_test_exit(void) > fflush(stdout); > stop_port(pt_id); > close_port(pt_id); > + > + /* > + * This is a workaround to fix a virtio-user issue that > + * requires to call clean-up routine to remove existing > + * socket. > + * 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); > } > } > printf("\nBye...\n"); > -- > 2.14.2