From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D2415A0A03 for ; Fri, 15 Jan 2021 07:05:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C24D2140EF7; Fri, 15 Jan 2021 07:05:53 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 2EF96140EEA; Fri, 15 Jan 2021 07:05:51 +0100 (CET) IronPort-SDR: FO5LPhooH7XfLDa+4LYKQ6xYIxRJ8oKJYyJX/o5JMWbAt4YUqK+V3h454RK+uMj/sLNbzieuiV kuxKUn0qQ6RA== X-IronPort-AV: E=McAfee;i="6000,8403,9864"; a="175925410" X-IronPort-AV: E=Sophos;i="5.79,348,1602572400"; d="scan'208";a="175925410" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2021 22:05:50 -0800 IronPort-SDR: XwjbWZg9rIQQcyji5qTTgrrpSryCAGpuDkg69sJUJ6BSsLaLFm8opxaMdKnWXW7/MaKfG77en7 9ycWCKT89n5Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,348,1602572400"; d="scan'208";a="569952086" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga006.fm.intel.com with ESMTP; 14 Jan 2021 22:05:50 -0800 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 14 Jan 2021 22:05:49 -0800 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by SHSMSX603.ccr.corp.intel.com (10.109.6.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 15 Jan 2021 14:05:47 +0800 Received: from shsmsx603.ccr.corp.intel.com ([10.109.6.143]) by SHSMSX603.ccr.corp.intel.com ([10.109.6.143]) with mapi id 15.01.1713.004; Fri, 15 Jan 2021 14:05:47 +0800 From: "Yu, DapengX" To: "Xing, Beilei" , "Lu, Wenzhuo" , "Iremonger, Bernard" CC: Stephen Hemminger , "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] app/testpmd: avoid exit without resource release Thread-Index: AQHW2aj5/CAd4DaR5Ey10dRM51y+NaoGm42AgACSPZCAIPhQcP//pQqAgACJoAA= Date: Fri, 15 Jan 2021 06:05:47 +0000 Message-ID: References: <20201224035748.67012-1-dapengx.yu@intel.com> <20201224190317.4bac8b59@hermes.local> <5a697c3c06324bdbbe7b2bef265df4a4@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] app/testpmd: avoid exit without resource release X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi Beilei, Thanks for your comments, I will prepare patch v2. -----Original Message----- From: Xing, Beilei=20 Sent: Friday, January 15, 2021 1:50 PM To: Yu, DapengX ; Lu, Wenzhuo ;= Iremonger, Bernard Cc: Stephen Hemminger ; dev@dpdk.org; stable@dp= dk.org Subject: RE: [dpdk-dev] [PATCH] app/testpmd: avoid exit without resource re= lease > -----Original Message----- > From: Yu, DapengX > Sent: Friday, January 15, 2021 11:29 AM > To: Lu, Wenzhuo ; Xing, Beilei=20 > ; Iremonger, Bernard=20 > > Cc: Yu, DapengX ; Stephen Hemminger=20 > ; dev@dpdk.org; stable@dpdk.org > Subject: RE: [dpdk-dev] [PATCH] app/testpmd: avoid exit without=20 > resource release >=20 > Hi Wenzhuo, Beilei, Bernard >=20 > I need testpmd app maintainers' comment : > Do you prefer the simple solution in this patch or Stephen's=20 > comprehensive and generic solution(which will modify librte_cmdline,=20 > testpmd (and maybe rte_exit()))? The patch just workarounds a specific case, the issue exits in many cases, = such as Rxonly mode and Rxq is 0. So It's better to investigate how to solve the generic problem according to= Stephen's comments. > So I can continue resolving the defect. >=20 > Thanks! >=20 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yu, DapengX > Sent: Friday, December 25, 2020 1:09 PM > To: Stephen Hemminger > Cc: Lu, Wenzhuo ; Xing, Beilei=20 > ; Iremonger, Bernard=20 > ; dev@dpdk.org; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] app/testpmd: avoid exit without=20 > resource release >=20 > Hi Stephen, >=20 > Do you mean this solution? > 1. support atexit() in librte_eal, other component can use it to=20 > register a function to be called when rte_exit() is called. > 2. in librte_cmdline, use atexit() to register a function to release=20 > resource >=20 > I am looking forward to more comments from other maintainers, since=20 > this solution will modify librte_eal and librte_cmdline, but not just tes= tpmd app. >=20 >=20 > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Friday, December 25, 2020 11:03 AM > To: Yu, DapengX > Cc: Lu, Wenzhuo ; Xing, Beilei=20 > ; Iremonger, Bernard=20 > ; dev@dpdk.org; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] app/testpmd: avoid exit without=20 > resource release >=20 > On Thu, 24 Dec 2020 11:57:48 +0800 > dapengx.yu@intel.com wrote: >=20 > > From: YU DAPENG > > > > In interactive mode, if testpmd exit by calling rte_exit without=20 > > cmdline resource release, terminal will not echo keyboard input. So=20 > > add code to just show error message, but not exit testpmd when=20 > > unexpected happens on starting packet forwarding in interactive=20 > > mode. User > can type "quit" > > to exit testpmd later. > > > > Fixes: 5a8fb55c48ab ("app/testpmd: support unidirectional > > configuration") > > Cc: stable@dpdk.org > > > > Signed-off-by: YU DAPENG >=20 > Sounds like a more generic problem with rte_exit and librte_cmdline. > Would it better to fix it in librte_cmdline by adding an atexit() handler= . >=20