From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by dpdk.org (Postfix) with ESMTP id BDC41DE0 for ; Tue, 29 May 2018 12:24:19 +0200 (CEST) Received: by mail-wr0-f195.google.com with SMTP id j1-v6so24570490wrm.1 for ; Tue, 29 May 2018 03:24:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:mime-version; bh=uL4nPAZEloJ2TSDcCUfKdn2MqBekI6J92tOCqevyt3o=; b=NMazN0WkUrmJuDFNCSYiLVmd5h4e9icZvXZFPjsEnN7czdxA5dDA/uVoUCcrC1dv7f VBMcZ+MvrirdqMaf6WRVgjPalSwOcI37NwnHPAi4R79pf44PQPyykH+GFVHXjHPtAoik /VPX9ymN0I/kTSH/vq8xrBIsM9u5IlPC0FcneMzR8GBIcGZpGXdpFIi1/Y6kEmzfT+KS ossF7aZ/+AZnm3lfM5Cjo3Jcu5y3YmD3VqKrt5KPy2JiR6cNeEggo/pyqJ0S127YHl8o DkYmSaAO680f4xyFpT01ibHqPsAjj8ARZO5U94CHl5zfOjv96s1QPcoiXe7mb4+t0X1I D/9g== X-Gm-Message-State: ALKqPwfYbMca+8qb+4nJ4Ebjm5KthKwFDWyiARlfWYGBr899WhK+9uiH otRM65qGp4LgEDdvlueYvOM= X-Google-Smtp-Source: AB8JxZoUiXOehsz+ibQifwP2ZpC2bFy2S92C/WZKZW84k2171Bu2BzMxGw0KcECyOSFztFH11ghKuA== X-Received: by 2002:adf:f8c7:: with SMTP id f7-v6mr11857072wrq.237.1527589459417; Tue, 29 May 2018 03:24:19 -0700 (PDT) Received: from localhost ([32.112.155.38]) by smtp.gmail.com with ESMTPSA id q13-v6sm10850077wmc.29.2018.05.29.03.24.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 03:24:17 -0700 (PDT) Message-ID: <1527589457.6997.25.camel@debian.org> From: Luca Boccassi To: "Yang, Zhiyong" , Yuanhan Liu Cc: "Yao, Lei A" , "Iremonger, Bernard" , dpdk stable Date: Tue, 29 May 2018 11:24:17 +0100 In-Reply-To: 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> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6-1+deb9u1 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: Tue, 29 May 2018 10:24:19 -0000 On Sun, 2018-05-27 at 14:36 +0000, Yang, Zhiyong wrote: > Agreed with yuanhan, The patch doesn't resolve resource leakage issue > except virtio-user. > rte_eal_cleanup is defined to do this, while it is not implemented > completely=C2=A0=C2=A0for now. Ok, I will revert it, thanks. > > -----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 > ntel.com>; > > 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, > > >=20 > > > FYI, your patch has been queued to stable release 18.02.2 > > >=20 > > > 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 > > =C2=A0 server mode. > >=20 > > --yliu > > >=20 > > > Thanks. > > >=20 > > > Luca Boccassi > > >=20 > > > --- > > > > From 8e96cf1276094a75ad0d3fd32912c672489e9811 Mon Sep 17 > > > > 00:00:00 > > > > 2001 > > >=20 > > > From: Zhiyong Yang > > > Date: Fri, 18 May 2018 17:59:37 +0800 > > > Subject: [PATCH] app/testpmd: fix exit for virtio-user > > >=20 > > > [ upstream commit 124909d7e1bf299c959b58c2db7c5fbd7abbb7c0 ] > > >=20 > > > 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. > > >=20 > > > 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. > > >=20 > > > 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. > > >=20 > > > Fixes: af75078fece3 ("first public release") > > > Fixes: bd8f50a45d0f ("net/virtio-user: support server mode") > > >=20 > > > Signed-off-by: Zhiyong Yang > > > Tested-by: Lei Yao > > > Acked-by: Bernard Iremonger > > > --- > > > =C2=A0app/test-pmd/testpmd.c | 13 +++++++++++++ > > > =C2=A01 file changed, 13 insertions(+) > > >=20 > > > 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)=C2=A0=C2=A0void > > > =C2=A0pmd_test_exit(void) > > > =C2=A0{ > > > + struct rte_device *device; > > > =C2=A0 portid_t pt_id; > > >=20 > > > =C2=A0 if (test_done =3D=3D 0) > > > @@ -1963,6 +1964,18 @@ pmd_test_exit(void) > > > =C2=A0 fflush(stdout); > > > =C2=A0 stop_port(pt_id); > > > =C2=A0 close_port(pt_id); > > > + > > > + /* > > > + =C2=A0* This is a workaround to fix a virtio- > > > user issue that > > > + =C2=A0* requires to call clean-up routine to > > > remove existing > > > + =C2=A0* socket. > > > + =C2=A0* This workaround valid only for > > > testpmd, needs a fix > > > + =C2=A0* valid for all applications. > > > + =C2=A0* TODO: Implement proper resource > > > cleanup > > > + =C2=A0*/ > > > + device =3D rte_eth_devices[pt_id].device; > > > + if (device && !strcmp(device->driver- > > > >name, > >=20 > > "net_virtio_user")) > > > + detach_port(pt_id); > > > =C2=A0 } > > > =C2=A0 } > > > =C2=A0 printf("\nBye...\n"); > > > -- > > > 2.14.2 --=20 Kind regards, Luca Boccassi