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 DE6DA45D51; Wed, 20 Nov 2024 11:32:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AEE1B40E36; Wed, 20 Nov 2024 11:32:41 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mails.dpdk.org (Postfix) with ESMTP id D601D402B5 for ; Wed, 20 Nov 2024 11:32:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1732098760; x=1763634760; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=yKOWXvAgGctyTmFo7gSsa5Z+FV569l3ih2MWCXEHYtQ=; b=Dat2VfZvV6vCRjByWvkmFSP6x2Bmq626vbx0S0VX3BwnaF8OojdMz3rk 1+4IlQ97V3hXMJ6kIKsNo9HxZkHPLYf9QKY9rONCeW40JljQcDvdZ3GRm KeLnQs5w9WNb6pGMFr0sjO10QzNLCNMUC4yAaflQ13OxuVD3dDkigdlf1 ki84lyzQgCiYJE78rDCWfyb2Hw+wJbvbASNCslEGfAiHbirxNn37/CwnU I0PJmIrv3YzDnRTghU7gA7x2eFpy68wveUD+6393vIAOb8RP/uP4c5BQS XlSdUmb/tpFCOsOUFgav+RPh2GVUDz5Ix7ty4zy9L+WSHsZ/w3FwZiWdI g==; X-CSE-ConnectionGUID: 5kaWSexzRhebHZfiVBsKDA== X-CSE-MsgGUID: wb/bLesgQKeoIO56XLE+LA== X-IronPort-AV: E=McAfee;i="6700,10204,11261"; a="31519725" X-IronPort-AV: E=Sophos;i="6.12,169,1728975600"; d="scan'208";a="31519725" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2024 02:32:38 -0800 X-CSE-ConnectionGUID: iciLWb/LTVKHt8iyatjtMA== X-CSE-MsgGUID: ouHD0tYxQQSmEJLKwISeNQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,169,1728975600"; d="scan'208";a="89673314" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmviesa007.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 20 Nov 2024 02:32:39 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 20 Nov 2024 02:32:38 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Wed, 20 Nov 2024 02:32:38 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.46) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 20 Nov 2024 02:32:30 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Ex+jYjW55wc11SsG400JoYjO1H1wTWqFHLiGAIzA9MHk86cI64MNQ0WFRxWbYhVyrtJSR5Uqv6V4NhvE4hzXd7nX6wryk0V+kI9wRqpzLQnd5t/9+QKU7vJqOP3LapFxYLSjP6rhHhN3R7yBIYdTvjDKjR95ozWBYICd15TQJvO3COIwNTxSJdYbC6uKBs3/dGbNalt2iftn7bYUSpM/bXfWBunyG7uctsiC4mVGRoYI7XjjQ/1xrvm6k1mJpejrYBUSbD6lmfCHYmQKTbYSQTAwllOnBYSzVEN+a5MFoPUimzz0yMjJzZh38cOnL9BWtl5V5es8qY6K2xnpWDua3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Fh5rJphj/ys2sx/ieBRiPkaRaM3oV4ssCvv5e1SNTuk=; b=huSbsxzH9z8L1JC6lFGLAoNGDYB4KgeSihTtCcUnEv8llSwt3tbPKt+uX6boxaD8J1LWvVplo/X5AWttAj1tMqmI9WUehC0q8eoCMH9rsn1oArUISBr9G9Y9FMn61KpLEjg8vkgfYknN4dj7G5oxGSuq/QDAdtASHKpd/1Iy/KU4yNCaiELE5LjX1qfjH7yLM8K5Rjnd49BVibxBJUxRlyKYHGi666QSnR/J9a/AZlB6bsP61M5jlv0ggiFP7ID4DgtNxl4jje+ySzWA6Twf9EOries9Rw3XVdYEBUe3flv+BepS/VrTPV9LHfKPEQCaITRGNeLGEdLMkjB9/xx0/A== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) by CYXPR11MB8689.namprd11.prod.outlook.com (2603:10b6:930:d8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.22; Wed, 20 Nov 2024 10:32:23 +0000 Received: from SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::5851:319:3da6:850b]) by SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::5851:319:3da6:850b%3]) with mapi id 15.20.8158.023; Wed, 20 Nov 2024 10:32:23 +0000 Message-ID: <7f31c048-281c-4879-a4c2-233ef73be80a@intel.com> Date: Wed, 20 Nov 2024 10:32:19 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v10 05/21] hash: remove use of VLAs for Windows built code To: Andre Muezerie , CC: Konstantin Ananyev References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1732072401-15962-1-git-send-email-andremue@linux.microsoft.com> <1732072401-15962-6-git-send-email-andremue@linux.microsoft.com> Content-Language: en-US From: "Medvedkin, Vladimir" In-Reply-To: <1732072401-15962-6-git-send-email-andremue@linux.microsoft.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DU2PR04CA0278.eurprd04.prod.outlook.com (2603:10a6:10:28c::13) To SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR11MB5772:EE_|CYXPR11MB8689:EE_ X-MS-Office365-Filtering-Correlation-Id: 24aa059c-46d8-4d2d-db01-08dd094e9eb1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?B?NWp2bzArUXptejdadldWbVpCM1hPSGdXRDZPbENqdHhPTVRSMkFQdW9nem1O?= =?utf-8?B?WnYrYzQ0YzhuYW8vNHFKV2RCcU5VNnNWQ0o4RXR2YmdKQ3R6S1Zha2tCUzhl?= =?utf-8?B?VWF0aEFOdVhuSTFCY0lBdXN2dDJjMDZGbGNkWjNBYVBTRUFFc2g3TXlzekdZ?= =?utf-8?B?Um1vOHV4MFIzQTJDMk1MSTVnZzduU2NjNFN5WjdiSlFwenRaRXNlWmd1NjZP?= =?utf-8?B?ZUNOK1pXS0JmTjBUZzQrK2UrZUpkekZPdWliUjJnRXBXQnA1dEx5Um9EbXF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WDlYWXU4Y01ibVVydjVyN0RD?= =?utf-8?B?cUZGdFJGOWw1L2EwV2g3aTUyeFlCTFZ4Sm1ONmNRWVpNNnh5SjQrZGZtY2ZD?= =?utf-8?B?Y0RTWWR0UXpKb3hxcUovTzU3RWRRMnFuM0lIMy9zamZiSGpyM0xxWXgzRHl0?= =?utf-8?B?bzlPbzRQRWg2dElyYkVvS0duVHdHYVpsdXcxRC9PcUtSLzVUQzFpWkpyOXAy?= =?utf-8?B?dDRhUGMvUkVnaUdmcHFiUmQxeVl2ckRoV3dVWDNXa3Ruemk2d3QxL1QvZktp?= =?utf-8?B?UEluUzFTSXhKRXhNQ256R0o3WGZjbmpPMEFWOGdsTW1nSVp3WWNGSDNQSEx0?= =?utf-8?B?KzI1TkVFK1pScVVjSDJzMkpCU0Q4bkhXd2JtUTQ5ZWtWcWEwei9xK0x1U0Ra?= =?utf-8?B?a0pEb09HT1ZFTGQ0Y1hTK2lhNng4ZUFpTEo0aVJ0UDNHaWcwNUdYT0xzUzRO?= =?utf-8?B?MDVxWFhNb3V4bzRrc3VyU01ibnRkM3h5YU5kTUxmOGpyU2x5SG4rUnM5NDlh?= =?utf-8?B?MmYzSnFTSzFxRWtqRXExdFp2NjFDQytacHVITFkvek1pa09QQUh1WC9ZNE4v?= =?utf-8?Q?nEsd584FQxZmrpAXaCJVxyy4u+JM0J2FatV1nIh?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5772.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?U3hlbkw4MFFnMFZkRGk3K3F5ckZHejI5VTExOE1lRHVNQjNJai9uRWlBcFl0?= =?utf-8?B?VGJLbFlqQkVTYlFSVjVFcXNkR0hhQzF5dDAydz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= =?utf-8?B?Qy9VUDlaaGUvUjJ6VFExL2Z4bm82TDBrL1FMekdKWGdxa1lPeThMdGtaME1H?= =?utf-8?B?ajEvQTdSdzN5cXcxYWZsSk9Sc1NNZ0FyMFFIdnl3OG11NXp0cS9KQ1ZVbVFj?= =?utf-8?B?b3ZMaWNlZjZYVUFqV0ZvbVBoSmdYdnpLTm1UMlRMNmpnRGdDbUhVc1JwNGVz?= =?utf-8?B?R1hYSXNFT3UzVVZ1Q1N3Y0x6ZGEzMWh4dVk1WEk1K0grQVZkOEVwTm44L2Rp?= =?utf-8?B?ZDlCQjRDVE4zTmRIV0MyYlRBOXkyRHN0aDM5b0ZQeC9OSk94ZDZKc3RvM0M0?= =?utf-8?B?eWc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 24aa059c-46d8-4d2d-db01-08dd094e9eb1 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5772.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2024 10:32:23.3625 (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: XfHUr9fMi9GC9rQcoOk+ylt8MqEaZSxu+2tMyTeFOJ9tsU0xT48cgLzn7ejACRuh96WKgvnHCKhLzp/RDgAuHAms3dqSxEbRzUser9fshfw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR11MB8689 X-OriginatorOrg: intel.com 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 Acked-by: Vladimir Medvedkin On 20/11/2024 03:13, Andre Muezerie wrote: > From: Konstantin Ananyev > > 1) ./lib/hash/rte_cuckoo_hash.c:2362:9 > : warning: ISO C90 forbids variable length array ‘positions’ > 2) ../lib/hash/rte_cuckoo_hash.c:2478:9 > : warning: ISO C90 forbids variable length array ‘positions’ > > Both rte_hash_lookup_bulk_data() and > rte_hash_lookup_with_hash_bulk_data() expect > @num_keys <= RTE_HASH_LOOKUP_BULK_MAX. > So, for both cases it should be safe to replace VLA with fixed size > array. > > Signed-off-by: Konstantin Ananyev > --- > lib/hash/rte_cuckoo_hash.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c > index 9575e8aa0c..fc93182efe 100644 > --- a/lib/hash/rte_cuckoo_hash.c > +++ b/lib/hash/rte_cuckoo_hash.c > @@ -2418,7 +2418,7 @@ rte_hash_lookup_bulk_data(const struct rte_hash *h, const void **keys, > (num_keys > RTE_HASH_LOOKUP_BULK_MAX) || > (hit_mask == NULL)), -EINVAL); > > - int32_t positions[num_keys]; > + int32_t positions[RTE_HASH_LOOKUP_BULK_MAX]; > > __rte_hash_lookup_bulk(h, keys, num_keys, positions, hit_mask, data); > > @@ -2534,7 +2534,7 @@ rte_hash_lookup_with_hash_bulk_data(const struct rte_hash *h, > (num_keys > RTE_HASH_LOOKUP_BULK_MAX) || > (hit_mask == NULL)), -EINVAL); > > - int32_t positions[num_keys]; > + int32_t positions[RTE_HASH_LOOKUP_BULK_MAX]; > > __rte_hash_lookup_with_hash_bulk(h, keys, sig, num_keys, > positions, hit_mask, data); -- Regards, Vladimir