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 3BFB343E8F; Wed, 17 Apr 2024 10:00:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BED9C40633; Wed, 17 Apr 2024 10:00:40 +0200 (CEST) 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 97954402BD for ; Wed, 17 Apr 2024 10:00:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HSJkOqRuwZ2QqrCAROLt56Upb5bxsec8tQKV1wvcmAmalSEsa6N1RRoSM5s/WKOZ553Cv2YPq6WXFsWV3UGiOMixPTP347k/JH7W10mHccVvPP0tADHj0FcRerkTcSzkbjEa+agVzdKmwpZXGXl/Hjo1nid+oG95xaZHYoGrKXBS8bPz6ZBi0JMeosirQ67D79nO3a6nEgIxMNfQSl2C5E+WI1laUCS0t7m+lGSVAOPsdp3/B3Qt1ELV156t78cSGPyKKD9dwkI9v9linhaodO4hOnM/Rc95qqnPwCZkuXMxVYjIcRB/3hXmE2G8sJdvQUb0ZUPG84LhGHTtZadTAw== 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=1sAZtQrh9kBxZsoPUD5+sA9iRVuh/qxxrrLkzNll1ZM=; b=g8nRp+/G2C88B6kt3zibuToEDd8yKIUD8PELFDQ9c2zHpEl+2B2CxbbY5kjAJPQBdNvhrJNtoNhARZFj93P/fYutLzYjPYM1+XYnYin37U6wlsdNljUXLtGMEBmYKjghWTq3CaVcrzPtdHat6UiSdrPymQIcEab1kqAtxw6h0hQknlP4LMW8vtcdP3GnZzTWFPbo8ktz5Egv9QPwk/z1Dt7IHNsfeBs0M72GmgW/WQPvnt0prUftjZ7NUpk+WrLsNsLR8qsVyA8QwUw4slRxzDn30zIjqMiIaDL8NvhsGUGLU+L29FPDiuSF3KP6cKW5gmTGG6d4vvT9ValLSwVcgQ== 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=1sAZtQrh9kBxZsoPUD5+sA9iRVuh/qxxrrLkzNll1ZM=; b=2djum2hsX508bDiHhZqorJwRvUq+QXxcLlnc2sk5wl0F79qIj/k/86IsHtkClw+VfEa2d9+NEle1yqLYgBon5qGD8w7WZgvSec+rJQ0uWOpwazGmq0QqTAxR3zA46X+xH8vTFvLj3WXY1nASvNiVT/+Gk/cXOYCPs22HnABCIZU= 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 MN6PR12MB8592.namprd12.prod.outlook.com (2603:10b6:208:478::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.37; Wed, 17 Apr 2024 08:00:36 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::282f:29d3:cac1:cde3]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::282f:29d3:cac1:cde3%7]) with mapi id 15.20.7452.049; Wed, 17 Apr 2024 08:00:36 +0000 Message-ID: <75154cd0-29c1-402c-a51a-d7e72b4c4fda@amd.com> Date: Wed, 17 Apr 2024 09:00:31 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 5/5] drivers/net: use RTE_DIM To: Stephen Hemminger Cc: dev@dpdk.org, Shepard Siegel , Ed Czeck , John Miller , Ajit Khaparde , Somnath Kotur , Jingjing Wu , Rosen Xu , Jiawen Wu , Harman Kalra , Jian Wang References: <20240416152124.69590-1-stephen@networkplumber.org> <20240416152124.69590-6-stephen@networkplumber.org> <5db982a1-b126-41a9-9641-c46e97d2e1bc@amd.com> <20240416103234.1b59ff6a@hermes.local> Content-Language: en-US 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 aXQgPGZlcnJ1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e cMh1CLUHXF1GlofpGbe1lj4KUJVse5g3qwV7i9VrseA8c4VIZewdIjkzAhmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20240416103234.1b59ff6a@hermes.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0378.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a3::30) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|MN6PR12MB8592:EE_ X-MS-Office365-Filtering-Correlation-Id: 9617abf2-990b-4c2e-bbf4-08dc5eb476e7 X-LD-Processed: 3dd8961f-e488-4e60-8e11-a82d994e183d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2pkv257Ta+qJn8sGCvxgikQXV77EyY/e33mqTBsxye4+k+23JuBAjZrsGgq9YaOqHzMLoWZ6BQXK298GdUpb7w+2MkFkpE/ruFv1LhwbzGnMUKfa0d4dqCeXx8x8E5Url3B5Z4hHR3LsjuiP1niW7INe1CFre8kZT21Luqt80kqe8XqFtS48OKwC8YJ0MYEt9rjX+OEinpw1DFBGdc12TW+92Lb11tkLaDRyKZ0V890VwOMyKWfg3O0HYHdU3kUNPbERKZO6XEvREW/0rxybUFav2fPRWhAJecZhbyp340RkvOOyH4SwaWW8n6YG3Y6ubt8qmScsyW5b60Ao3/izlJf1tvD6vn37KsUJwMlf7r8Y4SgTU2wcSbHW8bTI8xiVhGhMHUML65Q/cmpXP8i+2ytnymXRzUsNf5AuJQKqkpjX583sUiGMYDqI9WTYgs848EvMFqg8T8TxAVVF6zVPFkel+6SP1mPDptGoUGo6YPmI8uKfkPOoATmyGbD7BY9oi4PAkRzMZpKByFcHYiCloYkLOeKMd8i8clUu168wNOzxN0Bs7kXK57Kvta+oKRK/f2M+L+Lt+iDVbaZ4ONLRIwNgp37FORH2Ppavg5dKFCjdLtK/Z8oQK0ZDeezq2rYPHqQW2PRIV+iMN3oe/5X4kcRnGI8j+vDg0iOkSGpEAyI= 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)(366007)(376005)(7416005)(1800799015); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?c0VCT2RtMW93YlZkWm1waDFDTVd2M1V5bDdTejBQU2VOS2dkUWp1U25PMmNO?= =?utf-8?B?cUFyZjNWcXExSnh6MkRuUDRxNGNPUUcvUklhMHhSTjNJQU9UL2t6LzU1MWo1?= =?utf-8?B?Q1orQ1NIYjFLZ1JOUXU3MmJCNDlVSkxaK2dNbCtvYnd6ZTJ3RzUwQVgvUmtr?= =?utf-8?B?S1RYRytwa3RNQnZoNXIxMXlpNTdwSm1LemdRakhmYVRwK1JWNmdobWViNXVn?= =?utf-8?B?L0E5aGllRjBxRWpFOFpYTjhvaXRDdzVad3pESkFZa2xxTSsrNWN5bXdITE9W?= =?utf-8?B?anRVcmhla25xaU9DSGFZVHZ1TjVkUXdLSnEvMHdlbGtiSGYzWmRzd1RDNkdu?= =?utf-8?B?NUZTQng3d3JqSjNMWlRjUnlHbDM1QzNlZFB2UjliVU45Vm9qMGE4SFptZ3k5?= =?utf-8?B?bjg4eEZpUC9TU1paaFArMHRqdjg4cEY4d1Faa1E0ZzR0VVBkbVhBVFhrc1gz?= =?utf-8?B?RVlmWWYvOTY3ckhxRzZpbkFacHdaOVhhS2t0VFkxaExqYVcyQVIzQlB5UTF0?= =?utf-8?B?STcw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?utf-8?B?WFlaT3pud2x3V2laQ0NqV2wxV29iRy96alYxdmZVdC93UHBEeWFhM2ZaTHo4?= =?utf-8?B?Z0d0dmwzaVZSYTducnRNNm4zQWhZQStxa3B3cngyTzFhN3VqeTUvQlRKUXo5?= =?utf-8?B?QkJ3angxcVhuVmlTakwrT1NWMFVrUHI5RmgxMEIvbTJpZjI2WUVDZE9MTlFG?= =?utf-8?B?RGR1N0dEUDlVRjg1dWV3OVNCZCtzMVpZLzVMMTl3czVacE5Zc0FMNWMvWlZS?= =?utf-8?B?YWF0S25wQ0RndXd4VnY0Q1drWEhmNnJkdmNlMzlPV240OVN0Q0hUU2xtZWVp?= =?utf-8?B?UUUvaUxsUzFlYzVEeFpXblhKaU5KMytCT0JkQ1dIeGRwYnR0cUoyTTd0SkYw?= =?utf-8?B?SDk2MHNrOEFwd3o0ai9pRUNFakN4REYyVXZUT294RFc2T3ZyVGNaZ2txOUQy?= =?utf-8?B?R3hjZHgrQTV0QS9QdHEyV0pFdzBmMFlDZ0JrNjFPcWtibWJXcTRxLzNHa1pV?= =?utf-8?B?MkRrVktEbXRSVFpTTGl6UUdVbk9tdUdld3lkZ0d2Mjh6UE5kWUFIYTJaZWc0?= =?utf-8?B?Z1JOM09uTUlyTmJhSWNYSnRWaVcvVTNYTU9CZ2l0c0lsa1dSUXczUnpUblc2?= =?utf-8?B?ckxjREk4ZTloMUo5aGt4bW12NHRjOGh4MzFIS2txamFORlpTcjV4clRmSEVQ?= =?utf-8?Q?98rUkzbUe/gK99tJNFs++KEp5?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9617abf2-990b-4c2e-bbf4-08dc5eb476e7 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2024 08:00:36.3859 (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: /DwIWmL0XlAkaX0H1Ez5UM1j38E42X1VBvqh5IH/lgNAyN5GiOlkD10FOh7m1MGZ X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR12MB8592 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 4/16/2024 6:32 PM, Stephen Hemminger wrote: > On Tue, 16 Apr 2024 17:29:25 +0100 > Ferruh Yigit wrote: > >> On 4/16/2024 4:19 PM, Stephen Hemminger wrote: >>> Use RTE_DIM instead of computing directly with sizeof. >>> Patch automatically generated via cocci/rte_dim.cocci. >>> Code in base/ subdirectory manually excluded. >>> >>> Signed-off-by: Stephen Hemminger >>> >> >> Updated ones looks good to me, but I can see a few more, I don't know if >> you excluded base file one intentionally, >> searched as `git grep "sizeof.*\[0\]" drivers/net/` >> >> >> - >> drivers/net/bnxt/tf_core/cfa_tcam_mgr.h:28:#define ARRAY_SIZE(_array) >> (sizeof(_array) / sizeof(_array[0])) >> >> - > > For the drivers that choose to define and use ARRAY_SIZE() that is fine. > ack Although it can be updated as following, I don't think it differs `#define ARRAY_SIZE(_array) RTE_DIM(_array)` > Since base/ directories often come from other upstream repos, I ignored those. > ack > Something about the Intel drivers was causing warnings and the script would > not automatically change those. > ICE_NB_MBUF_XSTATS, I40E_NB_MBUF_XSTATS & ipn3ke_representor.c ones seems can be updated, manually maybe?