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 9FB6343CEC; Wed, 20 Mar 2024 02:14:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 22FCC4029F; Wed, 20 Mar 2024 02:14:59 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2040.outbound.protection.outlook.com [40.107.243.40]) by mails.dpdk.org (Postfix) with ESMTP id DA64B40298 for ; Wed, 20 Mar 2024 02:14:57 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IG7aWkpyqEVh3lFCu0Ubv/RQ26ptlc4QtEwoIwio523aSq5GJVhLTWPWqG6GUobo8zR6pygt24FJQEQNFbjg2lo1v8f8ZAW/7DoH+eE0XC1FnMJEitkBWbXtS4YcK8CNb1zTvR44ciXtyYVIgCj7svQ4KTY2mEEEEh6GOds3kjIrdYhw3Ys05eOJEoWSIjhXyQ8xjvLu1t0EoGmUbIDgIeCbHa+Aan6rtn17mq+ZZG0UzJ9zEJhYoOTt9pbrciHu/CyxfqEGQ+bss7THRFnH35u2upBq5V+UuPjrUZgQW0fgiiWmw9Foxfpdfws3Cg0xAlT1mSbEMfmI8RxmJsfB7w== 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=2Re0HVciVuCJ4rUwzVMI15TTlTeiYASTuT50bluDQE0=; b=BL1wFrrZTCvyaPpO9B9HzFUccLM1hCkTguDLaZpRWZiNaV9mDfPK7zae1gt1LhOB7y7CvFH6MwW2DGia43LpndozyQRCZLiMvKcpCHuGjitAMroVAEY5v6zPysptr4oGDA2k3TEBihuuJOowbTp3qhw6ujDtKDJHkMHEaE2AwVjrqVfGO+aS7dSpqHbTtk46AwhE5q0MVH1hZurK7/Nbwanyx/JlXZC3WBLRwBCaRraqzYUJEisp39QPPCLV4orcD80qHM2jFlnJAQhNpALXxqrvzbml8Ontxv1iSD6GQ5gq5S+cZd0JgUslmOEqS6h2RFHUuufsrQ510HnaWTvTEQ== 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=2Re0HVciVuCJ4rUwzVMI15TTlTeiYASTuT50bluDQE0=; b=uBK5vVa5ZFoOFhb/3juI27xsk6H83x1gXgv6lMScMk97yPjDI0QxDjI7+dIVmTvFt+taYVbZFhY2Viy/jW2Rd5gBwCV6x2YcLn5woJLrriBzM21KAUgzNM2Th8Dsa/GMuE6SPcQbIQ2W9LvQnRlVOYgNcK5HPQSIiyBqEfQ0vBE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from PH7PR12MB8596.namprd12.prod.outlook.com (2603:10b6:510:1b7::6) by PH7PR12MB9253.namprd12.prod.outlook.com (2603:10b6:510:30d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.26; Wed, 20 Mar 2024 01:14:55 +0000 Received: from PH7PR12MB8596.namprd12.prod.outlook.com ([fe80::cd84:2b5d:c8e2:9214]) by PH7PR12MB8596.namprd12.prod.outlook.com ([fe80::cd84:2b5d:c8e2:9214%6]) with mapi id 15.20.7386.025; Wed, 20 Mar 2024 01:14:55 +0000 Content-Type: multipart/alternative; boundary="------------i0XFvXADMraJlvoGJ3sB6405" Message-ID: Date: Wed, 20 Mar 2024 06:44:47 +0530 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] app/dma-perf: calrify incorrect NUMA config From: "Varghese, Vipin" To: fengchengwen , dev@dpdk.org, konstantin.ananyev@huawei.com Cc: ferruh.yigit@amd.com, neerav.parikh@amd.com References: <20240306150204.1375-1-vipin.varghese@amd.com> <20240311060053.137-1-vipin.varghese@amd.com> <6ee9b198-4419-2016-a05b-4e1711d946a7@huawei.com> Content-Language: en-US In-Reply-To: X-ClientProxiedBy: PN2PR01CA0195.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:e8::20) To PH7PR12MB8596.namprd12.prod.outlook.com (2603:10b6:510:1b7::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR12MB8596:EE_|PH7PR12MB9253:EE_ X-MS-Office365-Filtering-Correlation-Id: c1f11a46-dad3-4d42-0dca-08dc487b26c2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6GQOXqK0pXSmO8T4Cd1YwWng4W/COcRIK3YfWH6bUBT6FhkECzSUEsQOEkYafgtyn9wxxMQVZpO1finQBxzzNshWj2nG3rmgJ8TxMTwSgkHHYmtvbWVuvdVuLJbJBa0oQBmv/au+XLPfNRMMr6hkZNaEA/wNstM8AAp/gi4dWDslLvaMWVhvxNO6et9NCXirQF6S9LMqCpD0Uj2zIMOe2Ph9tlC+dPKwBgA6dypoEAIYL1a54duGeIvkQ2LSZ1YCH1SHnqRj2Y9qDFXAzxEb0h+KTfT9LYyhmGrOFbnVcqd4OhedCbnnm1G2riZWKpzwbNCRWn/1QHATy00pIkHAdZyKo+OkxVfQJ+Vi63cx7GZl/YOtFqnUOgBn2YjKofJ9R/42+YLcy0MI793LrR/PJVM5BAH9AevKAW/hf6AzKUARx7uVHvsc3vmTKvKAuXd2NO85QJ0R72ksottVc5sAfTOQq7/zQkHCeX5b2f3PIh5nAynZCKWXoybYlIACTDYpGYsXAmQbPaTME0Kx7V9As5Mm5sJMWco54BYwpLD+4JdLsDBBAZmVOmm3pH76r05LCALSWeIAOVyx9xFxh7J8ibJPL23S5oxOtr+F96jigXg= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR12MB8596.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(366007)(376005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?anVDS3MyYTBKbU9MQjNJaDVJdXNxZjYvYVVkVzVuZHZaeXAxN0l6TElkdVJG?= =?utf-8?B?NlVBKzczYTNNL1lDeERmNFMzMFVjUy91MkQ3Y2FUNzhGdTlrb0VyWjBqUlpo?= =?utf-8?B?My9uUnFzLzZGbzRVRDNybFZ5b1BlRWZxRWdHbE9HakxNYUN5L3F2R1h4cVg5?= =?utf-8?B?RTJuK29KbDh4MUFJVVVnVFVnNFd0NExSUGZnODN5QlV0QnJiZUxkckJqZFNE?= =?utf-8?B?NSt2T3FBRmM4SDNvNHJIZENISHl3QXZvMGViZVdZRWpYdUxCRmpobXRSWVV4?= =?utf-8?B?ZGM0dXp3M0lTZVNOSHl1bnRBNm1nV0xJR05DZERqNUVvdDNsdlZKVi8vb3Q1?= =?utf-8?B?WVoydS9JQzJyL1VVUnptTVNUZmhkVnlycG1MT09BMnZiYnl1bmlzanJGaDhU?= =?utf-8?B?QjhlQlExL0RlTEsrYk9SZHpDVE54N0VNVHk3TzlaSVI4M2NKR1lNRTZ5WU0r?= =?utf-8?B?Z0daemxaQ2hsRHhlYkU3dEs1c3paK1htdHdhTGRVZGIweHBPYjdVc0NLVW9z?= =?utf-8?B?VjRQbFY5ZDhocm1xaUpiMEdPUEQyQlBqeWlvQUpJK0M0QkpzRktTN3kxdU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cmVIcHpmakhHT3hXak5T?= =?utf-8?B?YkxDRVZiOEVYNTNvRmZBckRkd01GS3ZMWUlBNURBVVJFU0FyRFBUaXpFUWxL?= =?utf-8?B?UWFEcHcwQTllSDByRkxMdkIrMUs0MXZ6RDhOdjB1WW82djl4YkNwZC80cnZk?= =?utf-8?B?RmMyTWoxUGtuSmI0TnM1MHBmTlVIbWhncmtXNnU5QlBrTXFOY2MyMHRwaXlX?= =?utf-8?B?cGw5M0FlQmNjOVZzTy92K2RWc1EwMzBvOUE1MWROdVR4aUpKb1JtSDVSTC9B?= =?utf-8?B?dWxLWWVCNGxZVFJ4d3dxK0Q3RkVlcU1xek5NSm0vVDVaTExYQmRSVjNKR3Ex?= =?utf-8?B?QzVSdC9sV3JsVWF3OENlL2ZpZzJxcDZZd2pxaW5qbE9FSjNsSk40MlA0VmNM?= =?utf-8?B?c3ViczdJVUVhWk8xWnJkbGxkR0lWV2c3WGJTTEI2a3ovc2xiNVZONHZrR1ZX?= =?utf-8?B?WnNldmVzSVdpM0ZhUW5mYzNuZEwvNDUxUGdkbzFxemt2WDBOQnBBVnY3QzJ6?= =?utf-8?B?RDNycUEwbEFiS2xnVTVUUSt4bkJHVlcvcDYxbHFNL3dROEpodHhjUW5FQ1Fv?= =?utf-8?B?emx3VzJJVGxHeEZqcDQxSk0vZjNNL09VVS9Pdk11WUtJQzlJZERFQ3pRaUNJ?= =?utf-8?Q?10cjK96+V37UEwNmCsxVn7PK3?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c1f11a46-dad3-4d42-0dca-08dc487b26c2 X-MS-Exchange-CrossTenant-AuthSource: PH7PR12MB8596.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2024 01:14:55.1768 (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: Qz6vk/+ZQtUaMPTOoKScLRM9OH3wPQijfVq5FSj2VLMiEmpP7zDNKa+wtsDzEIv5Tw8sxl6m6BPlidTa7sQpJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB9253 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 --------------i0XFvXADMraJlvoGJ3sB6405 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Thank you Konstantin for the reply, Adding back the comments as it is not reflected the mail thread >>> diff --git a/app/test-dma-perf/benchmark.c b/app/test-dma-perf/benchmark.c >>> index 9b1f58c78c..b6d0dbe4c0 100644 >>> --- a/app/test-dma-perf/benchmark.c >>> +++ b/app/test-dma-perf/benchmark.c >>> @@ -311,9 +311,14 @@ setup_memory_env(struct test_configure *cfg, struct rte_mbuf ***srcs, >>> uint32_t nr_buf = cfg->nr_buf; >>> >>> nr_sockets = rte_socket_count(); >>> - if (cfg->src_numa_node >= nr_sockets || >>> - cfg->dst_numa_node >= nr_sockets) { >>> - printf("Error: Source or destination numa exceeds the acture numa nodes.\n"); >>> + >>> + bool isSrcNumaIncorrect = (cfg->src_numa_node >= nr_sockets); >>> + bool isDstNumaIncorrect = (cfg->dst_numa_node >= nr_sockets); >> The naming style needs to be adjusted, how about >> bool is_src_numa_exceed, is_dst_numa_exceed; > > Ok, the naming convention used by me is `CamelCase`. One suggested > from your end is `snake_case`. > > Does DPDK has a constrain it can not use CamelCase. > [KA] Please refer to: https://doc.dpdk.org/guides/contributing/coding_style.html In particular: 1.5.4. Variable Declarations In declarations, do not put any whitespace between asterisks and adjacent tokens, except for tokens that are identifiers related to types. (These identifiers are the names of basic types, type qualifiers, and typedef-names other than the one being declared.) Separate these identifiers from asterisks using a single space. For example: int *x; /* no space after asterisk */ int * const x; /* space after asterisk when using a type qualifier */ · All externally-visible variables should have an rte_ prefix in the name to avoid namespace collisions. · Do not use uppercase letters - either in the form of ALL_UPPERCASE, or CamelCase - in variable names. Lower-case letters and underscores only. [VV] Thank you for the clarification, I mistook this is applicable only to `All externally-visible variables`and not for `static` functions. > --------------i0XFvXADMraJlvoGJ3sB6405 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Thank you Konstantin for the reply, Adding back the comments as it is not reflected the mail thread

<snipped> 

diff --git a/app/test-dma-perf/benchmark.c b/app/test-dma-perf/benchmark.c
index 9b1f58c78c..b6d0dbe4c0 100644
--- a/app/test-dma-perf/benchmark.c
+++ b/app/test-dma-perf/benchmark.c
@@ -311,9 +311,14 @@ setup_memory_env(struct test_configure *cfg, struct rte_mbuf ***srcs,
      uint32_t nr_buf = cfg->nr_buf;

      nr_sockets = rte_socket_count();
-     if (cfg->src_numa_node >= nr_sockets ||
-             cfg->dst_numa_node >= nr_sockets) {
-             printf("Error: Source or destination numa exceeds the acture numa nodes.\n");
+
+     bool isSrcNumaIncorrect = (cfg->src_numa_node >= nr_sockets);
+     bool isDstNumaIncorrect = (cfg->dst_numa_node >= nr_sockets);
The naming style needs to be adjusted, how about
bool is_src_numa_exceed, is_dst_numa_exceed;

Ok, the naming convention used by me is `CamelCase`. One suggested from your end is `snake_case`.

Does DPDK has a constrain it can not use CamelCase.

[KA]

Please refer to:

https://doc.dpdk.org/guides/contributing/coding_style.html

In particular:
1.5.4. Variable Declarations
In declarations, do not put any whitespace between asterisks and adjacent tokens, except for tokens that are identifiers related to types. (These identifiers are the names of basic types, type qualifiers, and typedef-names other than the one being declared.) Separate these identifiers from asterisks using a single space.
For example:
int *x;         /* no space after asterisk */
int * const x;  /* space after asterisk when using a type qualifier */
·         All externally-visible variables should have an rte_ prefix in the name to avoid namespace collisions.
·         Do not use uppercase letters - either in the form of ALL_UPPERCASE, or CamelCase - in variable names. Lower-case letters and underscores only.

[VV] Thank you for the clarification, I mistook this is applicable only to `All externally-visible variables`and not for `static` functions.
<snipped>

          
--------------i0XFvXADMraJlvoGJ3sB6405--