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 1D94543CAD; Thu, 14 Mar 2024 00:28:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 062E442E0E; Thu, 14 Mar 2024 00:28:38 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2050.outbound.protection.outlook.com [40.107.237.50]) by mails.dpdk.org (Postfix) with ESMTP id E529D42DCE for ; Thu, 14 Mar 2024 00:28:35 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n/v6R3I58lD4m4RUN214L+/jdLao0NDG0FEjhEOmqBwqCbbfWEJ0/I4pnSdhVNQFnSHfKI3iRaZUegosmNlZSQjTmFZDDx3ER6af0FG9IBkom4pAN3zKjx1OKWbrBlg1yX4x2j5mnIaFdRRFviNqWn/wPWeGI9R08v+6Z1acKnWYm62ITbG2FVuVuyLipQVwZlInvwcf9nMz3weUdAIecM6F165NySfEQVRSJEt9j6eNsJFJSSX3tDMYjJGBuSbitzxkMKD3GvFmSW89p+IVkeL6xmk6wE6bGBAtdSwwDU+6rjcEnFUqOmISvS1633Ictxsm2lTc9ORn8vSljuZ/Dg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0zUSvRxDE1Qu5mI5Ju3Lf+3c9luvKgcB2rIs+jYhZmc=; b=YoSXQ9oWk86N34v3dz8KkfEsLrvuztHgmitiPdvSlAgGzno+PJtvPjWzLeY+alGK7ZRIWuwqRpRcE8KdzGwC7WpHVZCOAaeOceE6tFsl9MP5UFEomjH3XU56Qdsjq6OIUitlbruAJu7dvmhZKjYPFF7TJaVZTKtY/VyazW1LE7gcCRwtJWXksX32bzOfG3vrkBXG8Dr/QWpWNTgqcr3/Qp1UpfKXplJxyUpq+7UWIOuDPRHEY2GfMz955DMhHyOykf4Oc5n2zZQTLqvHgLzDx0W3T5Et+amp1Bd+UQKil0gf7fFa/hPi+AMVV7r3hk2ZLvGEATIJ1IUnM3wwRnehlg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0zUSvRxDE1Qu5mI5Ju3Lf+3c9luvKgcB2rIs+jYhZmc=; b=fzeLp4h+ilJiVGEaV6cnw9yKzFdGdlIXstiONsfROxlf3GnqlCdmYIVfKkfU5xFT+kJo3PRT0u77DKW6xwVse8rFQ8Hfc1KQ535ZyWCHF4ut+mLIH1NDiL4Oy7EMscORzPjYQt4wcSVL93miwKkuNe+MYFR6YYD12dSPnFVPB58= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by SA1PR12MB8744.namprd12.prod.outlook.com (2603:10b6:806:38c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35; Wed, 13 Mar 2024 23:28:33 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3ec7:6339:1c14:c529]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3ec7:6339:1c14:c529%5]) with mapi id 15.20.7362.035; Wed, 13 Mar 2024 23:28:33 +0000 Message-ID: <3b26a6ce-ca07-453f-9817-55448e746f94@amd.com> Date: Wed, 13 Mar 2024 23:28:32 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 4/4] app/testpmd: enhance getopt_long usage Content-Language: en-US To: David Marchand Cc: dev@dpdk.org, Aman Singh , Yuying Zhang References: <20240308144841.3615262-1-david.marchand@redhat.com> <20240308144841.3615262-5-david.marchand@redhat.com> <25bb9521-97fb-4466-8aca-237060d738ca@amd.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps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FCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P265CA0318.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:390::17) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SA1PR12MB8744:EE_ X-MS-Office365-Filtering-Correlation-Id: 6c028de6-e066-4409-fd24-08dc43b54c8f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9wQmgNj+M8V+40cLyVr1x6hOrkesiMRFGEHLcRSV9vTEZ7/XX/73zrLH09hMAspAb7IOh8bBUHurc4KzIWEeygkQ9wXevCxmBXs6ID+WABj08axRJq9qr2AYAVwptdkJbbpMbxjKdDHLJtnrOp5ASBiBbt97lTxeO+q1vOxsZcriTiJD0uyOzXIF3g7rsiXu/vKf/LwhMwah5DHZ0+VJb97NDSiYlC3Y7lDBiHsBCn4ws1TS+QlumMwQHsBtZE55P7esNBdjgCd/nIlTfvMgnZOyyUHm0Zx0XcuJsjGin8z9L2+3i/bUvEmYFj7sAR6LSn34OdFZY3U/anTnxTcTIIXTSjXj1HpftsFiSlBBQDtkwZY24xrvO3f4WxR+sUuJbS/iPOnq4MsafjjRNTDzQJTnFvECqcnqwm2nz1Oh2PrnVZjA+lfRyg+McyB43f81OnaNBjCPRjNS3pwIWUoXD7Z9KB30Qkh/nqnE7BAL8xHiqQI52IwIFZIEw77DAUOyhKfQ2MKqU67jb3D+q2gs8J1zddWWeBByDBhGlFTEqQjeRTzQ94uUq9lFEWVTdfzRTSp0pDP7upt18Coufiihf8ySEmOqk5P8IwSpkXXttkzT4+sj2JbG+4gRnpp8xtsOvIJ9BAiSp1ENinBBmnAkCNv1nH7u70k134QrU+UE1/A= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(1800799015); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?OUN2b3BHbTRsNXRMV2lCR0s2cVlXeEhkNVd0R1F3Tm5NT0p1Rnk0dmViSERa?= =?utf-8?B?YXRjVExoSG1YL2VDZk5kaWZ5MUcxclRJRXY2QzIvUWlRQnB0STcvTzlBcy9W?= =?utf-8?B?aldCSHg0ZzBYUDZmNktVWndubWYwUzUvNTdhZGhsNm1rN2R6U2FaUFcyWm9t?= =?utf-8?B?T0VldjZDUmRpbmNzVFhvREI5SVRBeU1tMFZjSEVQaGI1UGx0Uk1UdCthVWlJ?= =?utf-8?B?Unk4QU5OeWJScG1Oc1AzYU40bktBQXpvaUpjWE1xZ1B4U0lGNlRuaWl1TWc5?= =?utf-8?B?RU5tZnVEbzY0WWJZVi80NXF6QjdnK25ZL3BxeWhycWdxZEpjTGcrSDR0UFZB?= =?utf-8?B?b0xZenVwQXJ6N1R0WE1QNWUzYmhpNFBnYm9TTzdPU2JKQjRENlBlRlBTaEt6?= =?utf-8?B?QlhzWmZXZ05IQmlYaWx5dUl5V2VJKzMxRXV2cEwrSkdVaWRIUlBEQmo3Z0cv?= =?utf-8?B?SjVoS0l3cFlJeVgxYlFSVFVpTHZaYWhwa0VPSy9NdjRWaElnWm95OTF4clEy?= =?utf-8?B?ZWQ1cXZzbTNDcmVJM242TkxkS090NEd0SW83NDlFOHYvQWhQZGdPdGRub05J?= =?utf-8?B?bjBiYnpkbG5BVlI5alkvbjVKR2hNMUt5U0JaK0hOaUdpUGE4eU5Zd0FiMnRN?= =?utf-8?B?OFY1Y21jeU1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DJRcVVSUTFENWtsNTJ1V0xqbUhGMnBMdWVjaEpsSE5jTEVyMzg2aUhlakJH?= =?utf-8?B?U2w5WWR5SE45RDFtV3Rrc3ZTbHBlQVBiYlZVUVlOWUc3YnBodEtXQkZjOUVk?= =?utf-8?B?NWtCYmRRY21nK1RndUZrcERQWWNKMkhBb3ZvcUxaWEVCQzQ4SExsMDJLT3dz?= =?utf-8?B?WW50b0hXaW5YU1YrdG1odUVzTHpuN2xjWDhpdFd5M2FmUWVVbi9QZ1lMWndK?= =?utf-8?B?S1hxWFhGTm5EOTZDTmxVS1IvMEZZYzZhazZZdEMvVmRjdjl3emJHTzNnVVJJ?= =?utf-8?B?OHpWRmxWeFlQV0JNd01LNlJ3WGpHT3NGLzYzZWdydVkvZTY5eFZRbjFmVy9k?= =?utf-8?B?dVFtTTQzM2JFYVVYa2g4bi9CdUhtYkJGWlNCZE1LUlNmWmdCS1VDU2cyTmI4?= =?utf-8?B?b0ZRMGJiT0FwQWREZk5STjRSLzNyM3NNR2tFby9WUHJrOWFmVnZvak41VlM0?= =?utf-8?B?dStXZUlKRC9lc09ZZG9qbW8vQlp5eFJRZ3FFdU5CR3p6eitnRVNYUFE2VHJP?= =?utf-8?Q?sUvEx/RLagXFKgLw5pgsi1eiv?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6c028de6-e066-4409-fd24-08dc43b54c8f X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Mar 2024 23:28:33.4460 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DEWgoyIlKqKfD1ee3WtWftcXH+fjp2IfG11iF3rf8IX5MluQSvqxNiE1eLf22WFk X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB8744 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 3/13/2024 5:20 PM, David Marchand wrote: > On Wed, Mar 13, 2024 at 5:51 PM David Marchand > wrote: >>> >>>> + { TESTPMD_OPT_ETH_PEERS_CONFIGFILE, 1, NULL, TESTPMD_OPT_ETH_PEERS_CONFIGFILE_NUM }, >>>> + { TESTPMD_OPT_ETH_PEER, 1, NULL, TESTPMD_OPT_ETH_PEER_NUM }, >>>> >>> >>> These long options are within "#ifdef RTE_LIB_CMDLINE" block, I don't >>> know why, I guess above two can work without cmdline library. >> >> Looking again at the options list, we have a nice mess in there... I >> had not realised. >> >> I think the only options that are conditional to RTE_LIB_CMDLINE should be: >> -i, -a, --cmdline-file. >> >> As I wrote above, leaving the -a/--auto-start option parsing out of >> RTE_LIB_CMDLINE is not an issue. >> So it would only leave -i/--interactive and --cmdline-file under >> RTE_LIB_CMDLINE. >> The rest can be moved out of RTE_LIB_CMDLINE. >> >> And reading your next comment about RTE_LIB_CMDLINE, I think we are in sync. > > Actually, the solution is even simpler... it is not possible to > disable the cmdline library. > testpmd won't compile without it (missing #ifdef RTE_LIB_CMDLINE in > different places). > > I'll drop all the #ifdef RTE_LIB_CMDLINE checks in a dedicated patch. > > +1 to this simplification.