From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 20939A09EF for ; Fri, 25 Dec 2020 06:09:21 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CB895CA60; Fri, 25 Dec 2020 06:09:19 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 0B374CA0A; Fri, 25 Dec 2020 06:09:15 +0100 (CET) IronPort-SDR: gu8L5OO2WJNTXkitlARBMf4zH6auTfxNnSI7JMxZ7hIrtTsSaHvZRVKeRVvehnFEfrqQ534T0R hyrfF5MC/gHw== X-IronPort-AV: E=McAfee;i="6000,8403,9845"; a="163917079" X-IronPort-AV: E=Sophos;i="5.78,447,1599548400"; d="scan'208";a="163917079" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2020 21:09:13 -0800 IronPort-SDR: gKWtGQrMz+6JIdN5/nwrj4pac8UzhpGaADMqNbcNPFvi/bMdCDcCfhXRvYnn+QFn8WRY36SH9w WJoE0zJjb+mQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,447,1599548400"; d="scan'208";a="562018190" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga005.jf.intel.com with ESMTP; 24 Dec 2020 21:09:13 -0800 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 24 Dec 2020 21:09:12 -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, 25 Dec 2020 13:09:10 +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, 25 Dec 2020 13:09:10 +0800 From: "Yu, DapengX" To: Stephen Hemminger CC: "Lu, Wenzhuo" , "Xing, Beilei" , "Iremonger, Bernard" , "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] app/testpmd: avoid exit without resource release Thread-Index: AQHW2aj5/CAd4DaR5Ey10dRM51y+NaoGm42AgACSPZA= Date: Fri, 25 Dec 2020 05:09:10 +0000 Message-ID: <5a697c3c06324bdbbe7b2bef265df4a4@intel.com> References: <20201224035748.67012-1-dapengx.yu@intel.com> <20201224190317.4bac8b59@hermes.local> In-Reply-To: <20201224190317.4bac8b59@hermes.local> 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.15 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 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]=20 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=20 > 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.