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 12F7645D79; Fri, 22 Nov 2024 02:33:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B089143252; Fri, 22 Nov 2024 02:33:15 +0100 (CET) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mails.dpdk.org (Postfix) with ESMTP id D5DE042FA3 for ; Fri, 22 Nov 2024 02:33:13 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.88.234]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Xvcxp6GFSz1k09w; Fri, 22 Nov 2024 09:31:10 +0800 (CST) Received: from kwepemk500009.china.huawei.com (unknown [7.202.194.94]) by mail.maildlp.com (Postfix) with ESMTPS id B2DAE1400CB; Fri, 22 Nov 2024 09:33:11 +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; Fri, 22 Nov 2024 09:33:11 +0800 Message-ID: Date: Fri, 22 Nov 2024 09:33:10 +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: Andre Muezerie , CC: Konstantin Ananyev 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: <1732225298-10322-5-git-send-email-andremue@linux.microsoft.com> 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 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. And it also belong control-path, so suggest use the call/free as 1&3 case.