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 EB6D943C9E; Wed, 13 Mar 2024 11:42:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD918427DA; Wed, 13 Mar 2024 11:42:46 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2058.outbound.protection.outlook.com [40.107.223.58]) by mails.dpdk.org (Postfix) with ESMTP id 401AA402B8 for ; Wed, 13 Mar 2024 11:42:43 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NdISPz5x8RvydX46dWzLyVvV1bzUXDC9zWsF/r6y2XSGNkkm/3JIId9Ty9hmse/HZpzHrSXLFfZDjkP1d1QXm8X/zOtbsypMAeLRuETOArBfsnUFlF0a3MJKrIxDOPqvpTucFW1/fpBT3LG8nID5DyzbQXd3O5c+vseqtXAnh8IwCmiveEReuVdpbK4J5SqM7Tt5HQ7uhIz2hU/X3PC5VEC1It2DqZFo7MlvsJ+mx7af04XctaygN5h13KJew1AMIqXhu8TincifjsyVMz2nXF3eimccX0sQgc9h2ip37pYd7xlvsnapwNDB+7+4J9JG5VCpjyxNL2Ykrob4IgtuIg== 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=9kuBRFI9CtzYL5Noa4HmPrOQImJEYedqMkZ4Oj+O8YI=; b=bQrwm4Ku8C0aQS+P9BdkXR2HzF6br6nAHWxmj1m96z7JffH0Bek7/Tafky/FD2fYMOH9e+3wB5gjMuEPTnjEQLQXWeSuIY9B7/eqa/rOH75n9dMcnu5F1d3wNi7Hwgfzxf329J74x9qEdZ+UfMyd6K4bQjnQ717XdedfIJtbi8rgga9cuR9aMB17iq7jUXa8AJQ/u6ubcSm4/Ip8xDZlabyp5Ny5gTn7IxKdUlzk/wlxBGb7mxxDvxiGbWVn9aeqBNq81g19hIgAgHLU4FrW0/XK3u8NtBvLAiylo2JFCbhwKj5wlDAKWFuDmu2M7LDEH10468nFGOs7Z0aRW3ntEw== 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=9kuBRFI9CtzYL5Noa4HmPrOQImJEYedqMkZ4Oj+O8YI=; b=4/vmlxmh8PNegnxtIWrCA/w+uXoP4zqfc1EWIauUnKjuRnFKmuBzrxhz98pJ3J4p43oI31auhBOpRfx/+Ahxozsmhpm7kl6GzzKI6kFOzH5JAkxAGB7etZB7CJqVx37uzjhxM+X3PK8wYuGlVDUN9Sk9mXo7MLGHwkFlJkX0AK4= 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 IA1PR12MB7520.namprd12.prod.outlook.com (2603:10b6:208:42f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.36; Wed, 13 Mar 2024 10:42:39 +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 10:42:39 +0000 Message-ID: <378f35ad-d1cc-4d55-aa1b-7a2aec582cd8@amd.com> Date: Wed, 13 Mar 2024 10:42:36 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/4] app/testpmd: check queue count for related options 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-4-david.marchand@redhat.com> <5d2efba1-ad6e-4e51-86bd-77d299b73697@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 AQIeAQIXgAIZARYhBEm7aY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5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P302CA0004.GBRP302.PROD.OUTLOOK.COM (2603:10a6:600:2c2::9) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|IA1PR12MB7520:EE_ X-MS-Office365-Filtering-Correlation-Id: abce069d-ebfa-4539-13ad-08dc434a4e0f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Czf8hew0BSESWgR0adG416y/aoKtQAMLxUlRoAOu0rR2fipQjZKZtMPD5Rw2cwposVBAdOdgdXkjXqCGltI00lwxW/JVouX9pzi+Kb1kidYzlkbBwti8R/3suqbzdydxWzynMPH3wKMpzttpuMy1/C/xceOTAYHK6PpnpUOtVWDSW1WNiVnJetCK9zVEhVKqgcvH2DcTkD4j/8ORKQ62cOMBmmTd7DCimifFJJ35oZFiC0cpxGEL7AuDR/Hf3F/PScOd/adtemh0jbD9p8zGAyAA2sfYcNpC3cSM2KRlIRTsNAiB2SEBqqBU0H3Vd030QYf8IMk5cSzYV9OVnTgwjNWT07TcUOydgH43c5yoD6D7YQcUZKS3LzsTH3Q3TZprsKZWez4bE1lrDMNOnIG1SntZDTcyt1V4vLd1L36UJUvd06lPmVmBNRp28yp13lziT4q32PZi8suRIesaH9KmGYEeHu0cteDjuFHN5N5CJKZLQ2/79rkgcjavdVRDCT/K82iBhf4zrXm8L4toHjgc1aRUYSgGUgLyq/XwZ+2cNQsE4sdiEciBx+plH/DPYclb9yvUr1f6XjNKjkz50UFk7u5nX0bOzh7cqtSyr20Fit4fKSP4Q58QQJCuXyFk+o2rL6NccNdERpRowQlBqRmK0pgzk/qWhNDUZzVcaVWgdus= 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)(1800799015)(376005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?T1A3eEVwK1VwdkhMUTFlUkZpL1J0WmIxZ3JudEE0bTN5RVdaZFQwSjViOUdm?= =?utf-8?B?dEdwWXBZdmJTYXJXaDBLSk9aU29MdjhEeGxscHZMM0RHRWFqdGNoY0YyREgx?= =?utf-8?B?ZTBLd3I1UG14Y0ZqNWkvVXhua0gzMXYvSGZhR0J6eXhlWmVsNVF2VjhoaDdF?= =?utf-8?B?TmFiMi9yT0twSzlCL1BLM3A4ajdZL1JIakI0QUNmZFJvZGlFTjkyekx1SlRn?= =?utf-8?B?RVFtTUtHQTN0Y2gxdCtEbHVKdnZ6ZHNzdUxsWng4T2tUMDF5b3I2V3ZrdWZy?= =?utf-8?B?bEFnYzB2NHNJTHcwMUg4UzZqUjRrQjZrbmt4QjF3RUxrTEZCRlc0aHRaMzVM?= =?utf-8?B?Q3ZNUFNPdmVSMUxQYWFvVkZyeGlxYWhHSUZDQnI4eldUbkdmb1B3aW9POVg4?= =?utf-8?B?MytGOVpRK3FEQm40VkdDRnMvdUhZZnpQR2pMZ1h2TUZHbGZZc2hSSmJkU2c4?= =?utf-8?B?VnBpb1orR212T1Mxdy9zZnJHajEzV3RrVFU1UmR3NzlTTEhPWW9iOG03cFhL?= =?utf-8?B?K3MyV1AvR0pxMzY3bEJySzF5OHBXRWRWbldKOU1GR29rNHR4RFBaRjJvM1Nz?= =?utf-8?B?UmVTQVBreEE0Vit2am5VSmJrY2VGVlhJT1REUXFVcGxVM2kxMDkrZ0lOYkNY?= =?utf-8?B?ekE1cDhmdGFFZzV5V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GYzMzV0UwdHl3ZmVmVDgvU2MzenFtQ2tVVjlYcy9LanhaODJkU1B1SGRO?= =?utf-8?B?RUdYWDhTRmYvalp0ejN2KytSVStqYnZRU3R5c2FQQ1pEVVhRYW9zbUZsOVRw?= =?utf-8?B?ZVIxdzJoR2piaWkrTjFzRzBGNkRTWTZoTGNCenBWclFyS2VwNFRRbTEyM2Vw?= =?utf-8?B?Y2o2SkRGWkI0UWpVT3pYUXIrcERDaGtuVHNURkRtN3JGd2lUL3NpeThGSVp6?= =?utf-8?B?aFg0dUFnYUU0NGl0Zjdab29GSXA5ZFVwVEJsWXlnTXlDekpHWVZOWmdhblFo?= =?utf-8?B?U3ZZSkdWcEtRTGhMbEI0NEZhWStld0hkU3kvSlhmMGlLSnRzb0FrZ2ErZGRy?= =?utf-8?B?dURTaFF5Q1htMVFPMzZILy9RbUR3bzhtRDV0ZW5IQzRqL05IdjczVXBoUFBp?= =?utf-8?B?ZFB2WW0xTStRQ1ROTHdxbUZHNllaWU5TbnlSSGdTSXByZ0crdjYrU2s0RXAz?= =?utf-8?B?YjU1TWUyZ0pBSGh3am5SaFVacldtWDhQMDMrNnA2cWE0MlZrMy9lTjBWR054?= =?utf-8?Q?6MVMzHSmFKgl9nGyugrCOhvfo?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: abce069d-ebfa-4539-13ad-08dc434a4e0f X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Mar 2024 10:42:39.6951 (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: /UuD067xArkQOYHudf5DGmzP+AcZ9wFSZsSXTfaroT5LTBytUXSjJmVLxtVBJTrX X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7520 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 7:37 AM, David Marchand wrote: > On Tue, Mar 12, 2024 at 5:59 PM Ferruh Yigit wrote: >> >> On 3/8/2024 2:48 PM, David Marchand wrote: >>> Checking the number of rxq/txq in the middle of option parsing is >>> confusing. Move the check where nb_rxq / nb_txq are modified. >>> >>> Signed-off-by: David Marchand >>> --- >>> app/test-pmd/parameters.c | 8 ++++---- >>> 1 file changed, 4 insertions(+), 4 deletions(-) >>> >>> diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c >>> index 8c21744009..271f0c995a 100644 >>> --- a/app/test-pmd/parameters.c >>> +++ b/app/test-pmd/parameters.c >>> @@ -1063,6 +1063,8 @@ launch_args_parse(int argc, char** argv) >>> rte_exit(EXIT_FAILURE, "rxq %d invalid - must be" >>> " >= 0 && <= %u\n", n, >>> get_allowed_max_nb_rxq(&pid)); >>> + if (!nb_rxq && !nb_txq) >>> + rte_exit(EXIT_FAILURE, "Either rx or tx queues should be non-zero\n"); >>> } >>> if (!strcmp(lgopts[opt_idx].name, "txq")) { >>> n = atoi(optarg); >>> @@ -1072,6 +1074,8 @@ launch_args_parse(int argc, char** argv) >>> rte_exit(EXIT_FAILURE, "txq %d invalid - must be" >>> " >= 0 && <= %u\n", n, >>> get_allowed_max_nb_txq(&pid)); >>> + if (!nb_rxq && !nb_txq) >>> + rte_exit(EXIT_FAILURE, "Either rx or tx queues should be non-zero\n"); >>> } >>> if (!strcmp(lgopts[opt_idx].name, "hairpinq")) { >>> n = atoi(optarg); >>> @@ -1098,10 +1102,6 @@ launch_args_parse(int argc, char** argv) >>> n + nb_rxq, >>> get_allowed_max_nb_rxq(&pid)); >>> } >>> - if (!nb_rxq && !nb_txq) { >>> - rte_exit(EXIT_FAILURE, "Either rx or tx queues should " >>> - "be non-zero\n"); >>> - } >>> if (!strcmp(lgopts[opt_idx].name, "hairpin-mode")) { >>> char *end = NULL; >>> unsigned int n; >> >> There is already a runtime check for queues [1], perhaps we can remove >> it altogether from arg parse. > > Good catch. > > This other check comes after parsing args, so I suspect it is just dead code. > I guess I'll change it into a rte_exit(EXIT_FAILURE..). > Is this what you propose? > I think that check is the main check for nb_rxq and nb_txq. The one you removed is for the 'hairpinq' parameter, which is not a very common usecase. But nb_rxq and nb_txq requirement is very common and it is protected in the main after parameter parsing. I am not suggesting adding 'rte_exit()' for that case, probably it will fail in some other part and error log can provide the required hint. And I am worried if it breaks some unexpected usecase with exit. I was just thinking the check can be removed from 'hairpinq' parameter. > >> >> Also I think the order of the 'hairpinq' and queue number parameter >> processing depends on order user provided, so this may not be very >> reliable anyway. > > Indeed. > >