From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 45860374E for ; Sun, 27 May 2018 16:36:25 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 May 2018 07:36:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,448,1520924400"; d="scan'208";a="50825017" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 27 May 2018 07:36:24 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 27 May 2018 07:36:23 -0700 Received: from bgsmsx152.gar.corp.intel.com (10.224.48.50) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 27 May 2018 07:36:21 -0700 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.65]) by BGSMSX152.gar.corp.intel.com ([169.254.6.97]) with mapi id 14.03.0319.002; Sun, 27 May 2018 20:06:17 +0530 From: "Yang, Zhiyong" To: Yuanhan Liu , "luca.boccassi@gmail.com" CC: "Yao, Lei A" , "Iremonger, Bernard" , dpdk stable Thread-Topic: [dpdk-stable] patch 'app/testpmd: fix exit for virtio-user' has been queued to stable release 18.02.2 Thread-Index: AQHT8o83hnv9nIn17023KrunrRzI36RCoRKAgADBRLA= Date: Sun, 27 May 2018 14:36:16 +0000 Message-ID: References: <20180516101323.2234-2-luca.boccassi@gmail.com> <20180523121010.8385-1-luca.boccassi@gmail.com> <20180523121010.8385-43-luca.boccassi@gmail.com> <20180527041424.mncvuajgbogw6mhu@yuanhanliu-NB0.tencent.com> In-Reply-To: <20180527041424.mncvuajgbogw6mhu@yuanhanliu-NB0.tencent.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: timeout-no-action x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 14:36:26 -0000 Agreed with yuanhan, The patch doesn't resolve resource leakage issue excep= t virtio-user. rte_eal_cleanup is defined to do this, while it is not implemented complete= ly for now. > -----Original Message----- > From: Yuanhan Liu [mailto:yliu@fridaylinux.org] > Sent: Sunday, May 27, 2018 12:14 PM > To: luca.boccassi@gmail.com > Cc: Yang, Zhiyong ; Yao, Lei A ; > Iremonger, Bernard ; dpdk stable > > Subject: Re: [dpdk-stable] patch 'app/testpmd: fix exit for virtio-user' = has been > queued to stable release 18.02.2 >=20 > 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. >=20 > I'm late, but I'd suggest you to not include this patch, for >=20 > - it's a workaround >=20 > - it tries to "fix" an issue introduced in v18.05, for adding virtio-user > server mode. >=20 > --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 =3D=3D 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 =3D 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