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 57A7DA0A03 for ; Fri, 15 Jan 2021 04:28:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4CCF9140EEF; Fri, 15 Jan 2021 04:28:41 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id C88B0140D54; Fri, 15 Jan 2021 04:28:37 +0100 (CET) IronPort-SDR: HXypqL3Ip/BmknyYeeCsg53ajAQu3lkmoPwMD7CQffqAxEmNcsZ13cmCcWlraIglRqxVbO0p9Q 7bsixojmX2Yg== X-IronPort-AV: E=McAfee;i="6000,8403,9864"; a="240035245" X-IronPort-AV: E=Sophos;i="5.79,348,1602572400"; d="scan'208";a="240035245" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2021 19:28:36 -0800 IronPort-SDR: cuZyhApHMbdsm5q/iT22thSoZLPtw+DAe5nLEAWmv0YQui3XLKDekx4uPTdxvaDeBdilfoCFPB B1G7VyHkOYgQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,348,1602572400"; d="scan'208";a="401150225" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga002.fm.intel.com with ESMTP; 14 Jan 2021 19:28:35 -0800 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by fmsmsx606.amr.corp.intel.com (10.18.126.86) 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 19:28:34 -0800 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by SHSMSX606.ccr.corp.intel.com (10.109.6.216) 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 11:28:32 +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 11:28:32 +0800 From: "Yu, DapengX" To: "Lu, Wenzhuo" , "Xing, Beilei" , "Iremonger, Bernard" CC: "Yu, DapengX" , Stephen Hemminger , "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] app/testpmd: avoid exit without resource release Thread-Index: AQHW2aj5/CAd4DaR5Ey10dRM51y+NaoGm42AgACSPZCAIPhQcA== Date: Fri, 15 Jan 2021 03:28:32 +0000 Message-ID: References: <20201224035748.67012-1-dapengx.yu@intel.com> <20201224190317.4bac8b59@hermes.local> <5a697c3c06324bdbbe7b2bef265df4a4@intel.com> In-Reply-To: <5a697c3c06324bdbbe7b2bef265df4a4@intel.com> 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 Wenzhuo, Beilei, Bernard I need testpmd app maintainers' comment : Do you prefer the simple solution in this patch or Stephen's comprehens= ive and generic solution(which will modify librte_cmdline, testpmd (and may= be rte_exit()))? So I can continue resolving the defect. Thanks! -----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 ; Iremonger, Bernard ; dev@dpdk.org; stable@d= pdk.org Subject: Re: [dpdk-dev] [PATCH] app/testpmd: avoid exit without resource re= lease Hi Stephen, Do you mean this solution? 1. support atexit() in librte_eal, other component can use it to register a= function to be called when rte_exit() is called. 2. in librte_cmdline, use atexit() to register a function to release resour= ce=20 I am looking forward to more comments from other maintainers, since this so= lution will modify librte_eal and librte_cmdline, but not just testpmd app. -----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 ; Iremonger, Bernard ; dev@dpdk.org; stable@d= pdk.org Subject: Re: [dpdk-dev] [PATCH] app/testpmd: avoid exit without resource re= lease On Thu, 24 Dec 2020 11:57:48 +0800 dapengx.yu@intel.com wrote: > From: YU DAPENG >=20 > 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 mode. Use= r can type "quit" > to exit testpmd later. >=20 > Fixes: 5a8fb55c48ab ("app/testpmd: support unidirectional > configuration") > Cc: stable@dpdk.org >=20 > Signed-off-by: YU DAPENG 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.