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 D22FB460FF; Thu, 23 Jan 2025 17:38:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6600440B8D; Thu, 23 Jan 2025 17:38:02 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 7A3C640261 for ; Thu, 23 Jan 2025 17:38:00 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id B9B242041587; Thu, 23 Jan 2025 08:37:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B9B242041587 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1737650279; bh=fH7ypQcYGOp17r/KSFS1gbj49pwGFaalN+A7eKVqwJA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YeH+0aBev7PBDMC3pxLpvsKL2htQuX8VOS2094Aadk8Ng44IIOq2efzeRYFZ12L7Z lvmRyZXeyeB3+APXVx+pu65z1Ms1WvIboOiILPymT/Z4rUsaT3iIGMwJ92V+sOf+07 vVN+DQpcNmpLKrPLpGGIAxqcHh8/4cBegW6unLvE= Date: Thu, 23 Jan 2025 08:37:59 -0800 From: Andre Muezerie To: Bruce Richardson Cc: David Marchand , dev@dpdk.org, konstantin.ananyev@huawei.com, thomas@monjalon.net Subject: Re: [PATCH v16 00/60] remove use of VLAs for Windows Message-ID: <20250123163759.GA29129@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736821958-3295-1-git-send-email-andremue@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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 Thu, Jan 23, 2025 at 12:43:04PM +0000, Bruce Richardson wrote: > On Thu, Jan 23, 2025 at 12:58:49PM +0100, David Marchand wrote: > > On Tue, Jan 14, 2025 at 3:32 AM Andre Muezerie > > wrote: > > > > > > As per guidance technical board meeting 2024/04/17. This series > > > removes the use of VLAs from code built for Windows for all 3 > > > toolchains. If there are additional opportunities to convert VLAs > > > to regular C arrays please provide the details for incorporation > > > into the series. > > > > > > MSVC does not support VLAs, replace VLAs with standard C arrays > > > or alloca(). alloca() is available for all toolchain/platform > > > combinations officially supported by DPDK. > > > > > > v16: > > > * remove -Wvla from drivers/common/mlx5/meson.build and > > > drivers/common/qat/meson.build > > > > > > v15: > > > * inverted some of the logic added during v14: > > > add -Wvla to meson build files in app and lib directories, adding > > > -Wno-vla to the few subdirectories which are not yet VLA free > > > > > > v14: > > > * add -Wvla to meson build for directories that are VLA free > > > under app, lib, drivers. This is to ensure that new VLAs are > > > not added to these directories in the future. > > > > Thanks for working on this topic. > > > > I see there is some back and forth on the topic of passing -Wvla. > > It would be less fragile to put a -Wla in a upper level meson.build > > (like config/meson.build for example), then disable explicitly in the > > parts that are not ready. > > > > Something like: > > diff --git a/config/meson.build b/config/meson.build > > index 6aaad6d8a4..be603bd45b 100644 > > --- a/config/meson.build > > +++ b/config/meson.build > > @@ -348,6 +348,17 @@ foreach arg: warning_flags > > endif > > endforeach > > > > +if cc.has_argument('-Wvla') > > + add_project_arguments('-Wvla', language: 'c') > > + if not is_windows > > + no_vla_cflag = '-Wno-vla' > > + else > > + no_vla_cflag = [] > > + endif > > +else > > + no_vla_cflag = [] > > +endif > > + > > Minor simplification suggestion, put "no_vla_cflag = []" outside the > conditionals at the start, as the default value. Save having multiple > copies of that assignment, and having to do "else" legs. > > /Bruce These look like great improvements. I especially like the idea of using -Wvla from the very top.