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 7918645D83; Sat, 23 Nov 2024 03:18:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20CD640298; Sat, 23 Nov 2024 03:18:27 +0100 (CET) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id E829140291 for ; Sat, 23 Nov 2024 03:18:25 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.163.44]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4XwFvS2Z14z2DhB3; Sat, 23 Nov 2024 10:16:20 +0800 (CST) Received: from kwepemk500009.china.huawei.com (unknown [7.202.194.94]) by mail.maildlp.com (Postfix) with ESMTPS id B5BE5140120; Sat, 23 Nov 2024 10:18:22 +0800 (CST) Received: from [10.67.121.161] (10.67.121.161) by kwepemk500009.china.huawei.com (7.202.194.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Sat, 23 Nov 2024 10:18:22 +0800 Message-ID: <12304a18-91cb-41eb-a961-cdd576d726a9@huawei.com> Date: Sat, 23 Nov 2024 10:18:21 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v12 04/21] ethdev: remove use of VLAs for Windows built code To: Konstantin Ananyev , Andre Muezerie , "dev@dpdk.org" References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1732225298-10322-1-git-send-email-andremue@linux.microsoft.com> <1732225298-10322-5-git-send-email-andremue@linux.microsoft.com> Content-Language: en-US From: fengchengwen In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemk500009.china.huawei.com (7.202.194.94) 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 2024/11/22 18:08, Konstantin Ananyev wrote: > > >> -----Original Message----- >> From: Fengchengwen >> Sent: Friday, November 22, 2024 1:33 AM >> To: Andre Muezerie ; dev@dpdk.org >> Cc: Konstantin Ananyev >> Subject: Re: [PATCH v12 04/21] ethdev: remove use of VLAs for Windows built code >> >> On 2024/11/22 5:41, Andre Muezerie wrote: >>> From: Konstantin Ananyev >>> >>> 1) ./lib/ethdev/rte_ethdev.c:3244:16 >>> : warning: ISO C90 forbids variable length array ‘xstats_names’ >>> 2) ./lib/ethdev/rte_ethdev.c:3345:17 >>> : warning: ISO C90 forbids variable length array ‘ids_copy’ >>> 3) ./lib/ethdev/rte_ethdev.c:3538:16 >>> : warning: ISO C90 forbids variable length array ‘xstats’ >>> 4) ./lib/ethdev/rte_ethdev.c:3554:17 >>> : warning: ISO C90 forbids variable length array ‘ids_copy’ >>> >>> For 1) and 3) - just replaced VLA with arrays allocated from heap. >>> As I understand xstats extraction belongs to control-path, so extra >>> calloc/free is hopefully acceptable. >>> Also ethdev xstats already doing that within >>> rte_eth_xstats_get_id_by_name(). >>> For 2) and 4) changed the code to use fixed size array and call >>> appropriate devops function several times, if needed. >> >> It will invoke PMD ops multi-times, I'm not sure whether all drivers >> impl correctly. > > Hmm..., but then there is a bug in the driver that has to be fixed, no? Yes, such bug need to be fixed. In this case, we maybe need more review on PMD's impl. > >> And it also belong control-path, so suggest use the call/free as 1&3 case. >> >