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 3D172A0A03 for ; Fri, 15 Jan 2021 06:50:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3064D140EF2; Fri, 15 Jan 2021 06:50:22 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 3713D140EE8; Fri, 15 Jan 2021 06:50:19 +0100 (CET) IronPort-SDR: QWkfA2tBfscnRC4HxlnTsCbMWFEHjazxJdaKP/5SfnmB1zndb295lf4IEEIZE8kYqEU9UTcv6d X6RA67R9HT8Q== X-IronPort-AV: E=McAfee;i="6000,8403,9864"; a="175923976" X-IronPort-AV: E=Sophos;i="5.79,348,1602572400"; d="scan'208";a="175923976" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2021 21:50:18 -0800 IronPort-SDR: oJi1hmmUM2i4ZEjtKOYk3IYcvdWFW1LrD4eKcCOv8Wg//wrqjpJAY33MiXuh6WQzj6H6ydYWuB QeD7O5LzMsoQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,348,1602572400"; d="scan'208";a="401179211" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga002.fm.intel.com with ESMTP; 14 Jan 2021 21:50:16 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) 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 21:50:15 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX610.amr.corp.intel.com (10.22.229.23) 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 21:50:14 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 14 Jan 2021 21:50:14 -0800 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.58) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Thu, 14 Jan 2021 21:50:13 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eRHZsNRQ78/bQDsMZD7Y4RpPdw/NUv2JLH4fpA3yy9B/Ru7KocfERvldyFgCXDbk+fa9ind4dxgDHqZbYbDW0jRU3qBQp+MeKvJDa/3TmSDZXNgaPcU/KRANLwT3LiU1sbnwQltEUETJj2fDndwfkYSp6NL34++m8EG2yWcGGWCxO94r0bpQExdIEJAoZMZSIlNLleJYy+uF+4BNekgx6H5A0PCNjNwCkgRrb9xnqB5TvYDlJ1eaE0R/TbnG9ZfhZshtjg+WyWAPreGpvDszRg8cbnxnonacNpuIbYBwhmq49t2/qWVE6Y4aA1xq8tqcU2Y2v1Ur6B9qsgFyKJLp9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EZkvZ07lismEIrX/F9wB4freKxkwkkMInqXoC0H5Pps=; b=XfYLIpJVyPyceouospdcPkDV1BwqDfp8iOZEvzKqCwirmQjtEZONz8NNR1wbVjwMs5zlDFrwohTRohkmiBZeQs2pE0w74cosPHJGUeqtVs27yh5T7UCGR6dKGmPwK0y0SScuSVzvQQX2DZb5r2wnKUQMhodlDXk8GbFpO0Ix32GFXQJ2JKzvEmuZ9d8cZ0rJcpvFNNnsduHGNg5j8I0y3i/cHp5pAO1WLWmjZkwh3uwbkPv3CUjMdSrr/44wuJuMPuigCp5ERdCUuB1VG5AQLr/1JyRMt+T/vH0NjMaeBe7rBzEDHlpYqoncaBJlYyRUJ0cGwV1IDOEfPhxc0TQzRg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EZkvZ07lismEIrX/F9wB4freKxkwkkMInqXoC0H5Pps=; b=fMv284Jrxk91H/BwS7h9ZAA38lCnsyCym357fvWMPuTLuGh9PSH9Ufvu6aixCycEpS8c750iBA7NBytUh/KK2EBVjqVAmrpUgea3QqlZJoOgKUTneFkTXz+LioO8tcJ9IMcImKmks339FODVvbwBhA6hXnjt67ahAipjDTUGVk8= Received: from MN2PR11MB3807.namprd11.prod.outlook.com (2603:10b6:208:f0::24) by MN2PR11MB4127.namprd11.prod.outlook.com (2603:10b6:208:13e::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.9; Fri, 15 Jan 2021 05:50:11 +0000 Received: from MN2PR11MB3807.namprd11.prod.outlook.com ([fe80::4d7f:d51:79bc:e596]) by MN2PR11MB3807.namprd11.prod.outlook.com ([fe80::4d7f:d51:79bc:e596%4]) with mapi id 15.20.3742.013; Fri, 15 Jan 2021 05:50:11 +0000 From: "Xing, Beilei" To: "Yu, DapengX" , "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: AQHW2aj+f4UhYZ/KGE+0hjyu6RUG2KoHIaqAgAAjKwCAIOTYAIAAI2iw Date: Fri, 15 Jan 2021 05:50:11 +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: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 03a763a6-bb15-42fc-fa00-08d8b9196c54 x-ms-traffictypediagnostic: MN2PR11MB4127: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mlc0wylP5o3OtUYAqIxISZja/OOcTWy9BSHydN54DOSJiOayATouxTit1KiBDcO5OZnT0jAyjvQrk9ckq1QNgMNM+5w76KMvJoHdKrNm7qSf9lWQ1mFUQrcTqidVxz5FYI2n/oz75si9KKg1AcAO5Cv47huPC2AMWeQFYsz5KmLWd36DUrIAYhS1ePQuIKW44oTRqa3sZvVMTJXw54LGZqGKmD4qeY+fm87y6Kl6Cj0VPAqZa9IF0CSQin4wDJtSwKkAGS8MUNcGbIKhNt70Sum/8/4+mlwGJoTes7QXMhtoVmvMbIn+ahRwi2YC8UiGxuZ18L4XB1pyLw3X23upbk8wqc7qkLCy9FdYtxNM+A55555cyIE+zInSfSaXiDcKPLEsSHzCV9Pfp/AfQC2Oig== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB3807.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(136003)(346002)(366004)(39860400002)(376002)(9686003)(478600001)(316002)(86362001)(8936002)(83380400001)(110136005)(53546011)(33656002)(8676002)(6506007)(76116006)(64756008)(66446008)(71200400001)(55016002)(26005)(66946007)(186003)(7696005)(52536014)(6636002)(4326008)(5660300002)(66476007)(54906003)(2906002)(66556008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?Je9EWxTXXKaKcVAzEia4WIQOvSNWOafEzew/CLqHSINWxO/qXsuOADm78hW0?= =?us-ascii?Q?di33+Tz1WgpED5uq/y4Fw7aaaRWg2dQ6uXoPMQw6R3jODpDTeu4qRJuhEOib?= =?us-ascii?Q?7PtS2q7MQRbBdq4vRbPMXbSL8qGOXG6iCI2svUgWxQhCNmkbM20HAOZ+LZyS?= =?us-ascii?Q?tnUJ3i78/cz2NfhSIwTLcMY9cYcJZeoPB0u+gHLjcDFduie2/00KXmdFr6Hk?= =?us-ascii?Q?2KX8pGCv23vnRqdJQSaUOziY703CaI3mpwRGeSk1wcITXN8kVu/x8ov2yI8w?= =?us-ascii?Q?f2UeWVpgAz6tvDc/RvlGxKu7Y+8liTbTzVFf7FtwQYdOT1Y5JY4xI79SQp1U?= =?us-ascii?Q?O2OEUleaZzmrzk9+23PgJxDZa2sFSRLRoDXCIZrOzZnI1gaQOo2lBJwGLMi3?= =?us-ascii?Q?V4hXnQw1VxPlkoN9air4ZQt5yX8UPjXvsD7z6tsEAbIL1E4N+KcwXUr5EBJl?= =?us-ascii?Q?XKEerYWJBnJpDFLuN73ajgVtFMa0wFLT0t6VFHLMlSEHfpeEMGniytPl6Nj+?= =?us-ascii?Q?NBvEUkKniDik6WDm/XHogg5mbznKxbJ53PWY6Mq+uKs4H0kjFU7b/OoKCGqt?= =?us-ascii?Q?R4F0x9WEogWJk6NfHM5lBxi/Cbu45pFDiy1Rqg5ywSquDBMt9jIFQJ5QXkuu?= =?us-ascii?Q?XtPL0m/g+AKR+jlEeTPBxd/ZFQPSaiux4ONUFudJR+iNiUXsU/Eg7J2EIhCe?= =?us-ascii?Q?SJp/d0o2tnx6kb/c5hPFAzKtEaYnTIbhdDRE6/AxQTcCIIaElZWpg+GencmB?= =?us-ascii?Q?jhwhMI1z9pJMQvdLfVHyIxV4R242Sj+pwesJw8IIb9FJ2sBvdn/t4RP2pLhz?= =?us-ascii?Q?R86zEex8ysBsow5u+NCiINwUaJDq5idCJZuh20Kl8f4U3ipbwXuQo8/4zDnn?= =?us-ascii?Q?wp369Xl0S6aSNf8pMr2O1x04+V0olgNWzM97zRn9znVgtYzGgxkXjF3ppp7E?= =?us-ascii?Q?uXVPwuom79Xkn2g4tAjMtTEE7YOVmmgptqV9aT6+M+s=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR11MB3807.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03a763a6-bb15-42fc-fa00-08d8b9196c54 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2021 05:50:11.4225 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: PwxqfgeCT8PDZAf6l3awM/gyhe8LFNRVhjP7awukBtBVrX/dpst4D2cF1ypW8RTpYOMvIOzspW8PL79GmnnYNw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4127 X-OriginatorOrg: intel.com 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" > -----Original Message----- > From: Yu, DapengX > Sent: Friday, January 15, 2021 11:29 AM > To: Lu, Wenzhuo ; Xing, Beilei > ; Iremonger, Bernard > Cc: Yu, DapengX ; Stephen Hemminger > ; dev@dpdk.org; stable@dpdk.org > Subject: RE: [dpdk-dev] [PATCH] app/testpmd: avoid exit without 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 comprehe= nsive > and generic solution(which will modify librte_cmdline, 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 > ; Iremonger, Bernard = ; > dev@dpdk.org; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] app/testpmd: avoid exit without resource > release >=20 > Hi Stephen, >=20 > 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 reso= urce >=20 > I am looking forward to more comments from other maintainers, since this > solution will modify librte_eal and librte_cmdline, but not just testpmd = 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 > ; Iremonger, Bernard = ; > dev@dpdk.org; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] app/testpmd: avoid exit without 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 > > cmdline resource release, terminal will not echo keyboard input. So > > add code to just show error message, but not exit testpmd when > > unexpected happens on starting packet forwarding in interactive mode. U= ser > 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