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 DA04A46060; Fri, 10 Jan 2025 22:24:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 90EF14275D; Fri, 10 Jan 2025 22:24:53 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id C2BDA40684 for ; Fri, 10 Jan 2025 22:24:51 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id D4570203D5F0; Fri, 10 Jan 2025 13:24:50 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D4570203D5F0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736544290; bh=eGRRokp6sRtE/tgUwKLniLJjTwXl+iCyMEA6y5EdRys=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KMppLYluA5C9alZKHxeg72nrFpRWMwbc13PXpVwmTFW/YSGVO0t5iSwzduwCZnZzA 6n2+VT0HjbS73SNMuJUPeeg+IJ2gZUdpn2OYlIK6nnuDd5ggBFKrwv3WM1Wma+gfCZ ArIwPJhRV6+guqpne0djRc4u8LSXZ3ZHwHZTy8xA= Date: Fri, 10 Jan 2025 13:24:50 -0800 From: Andre Muezerie To: Konstantin Ananyev Cc: "dev@dpdk.org" , "thomas@monjalon.net" , "david.marchand@redhat.com" Subject: Re: [PATCH v13 00/21] remove use of VLAs for Windows Message-ID: <20250110212450.GA30324@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1736045218-15957-1-git-send-email-andremue@linux.microsoft.com> <53d15efde9454580a120c7775829ba6a@huawei.com> <20250110035820.GA18907@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <8624ce0535e24e8887eaed79809abf73@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8624ce0535e24e8887eaed79809abf73@huawei.com> 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 Fri, Jan 10, 2025 at 09:27:01AM +0000, Konstantin Ananyev wrote: > > > > On Wed, Jan 08, 2025 at 01:30:13PM +0000, Konstantin Ananyev 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. > > > > > > > > v13: > > > > * increase stack allocated buffer size in > > > > ipv4_reassembly_interleaved_flows_perf and > > > > ipv6_reassembly_interleaved_flows_perf to avoid > > > > STATUS_STACK_BUFFER_OVERRUN on Windows using MSVC > > > > > > > > v12: > > > > * update commit message for patch 06/21 to avoid warning > > > > > > > > v11: > > > > * add include stdlib.h for alloca() declaration on FreeBSD > > > > * zero-initialize array without code loop > > > > * increase maximum tuple length > > > > > > > > v10: > > > > * add ifdef to scope gcc's diagnostic error down to gcc only > > > > > > > > v9: > > > > * fix sender's email address > > > > * fix gcc's diagnostic error string to make clang happy > > > > > > > > v8: > > > > * rebase > > > > * reduce scope for disabling error "-Warray-bounds=" to only > > > > the place that needs it > > > > * remove parentesis around numbers from defines in test_bitset.c > > > > > > > > v7: > > > > * remove use of VLA from new file which sneaked in during review > > > > > > > > v6: > > > > * remove use of VLA from new test code added recently > > > > * fix title for patch 08/20 > > > > > > > > v5: > > > > * add patches for net/ice, net/ixgbe and gro > > > > from Konstantin Ananyev from > > > > https://patchwork.dpdk.org/project/dpdk/list/?series=31972&archive=both&state=* > > > > * address debug_autotest ASan failure > > > > * address array-bound error in bitset_autotest with gcc-13 > > > > > > > > v4: > > > > * rebase and adapt for changes made in main since v3 was sent > > > > * use fixed maximum array size instead of VLA when doable > > > > > > > > v3: > > > > * address checkpatch/check git log warnings (minor typos) > > > > > > > > v2: > > > > * replace patches for ethdev, hash, rcu and include new > > > > patches for eal from Konstantin Ananyev > > > > from https://patchwork.dpdk.org/project/dpdk/list/?series=31781 > > > > > > > > Andre Muezerie (3): > > > > test: remove use of VLAs for Windows built code in bitset tests > > > > app/testpmd: remove use of VLAs for Windows built code in > > > > shared_rxq_fwd > > > > hash: remove use of VLAs by using standard arrays > > > > > > > > Konstantin Ananyev (10): > > > > eal/linux: remove use of VLAs > > > > eal/common: remove use of VLAs > > > > ethdev: remove use of VLAs for Windows built code > > > > hash: remove use of VLAs for Windows built code > > > > hash/thash: remove use of VLAs for Windows built > > > > rcu: remove use of VLAs for Windows built code > > > > gro: fix overwrite unprocessed packets > > > > gro: remove use of VLAs > > > > net/ixgbe: remove use of VLAs > > > > net/ice: remove use of VLAs > > > > > > > > Tyler Retzlaff (8): > > > > eal: include header required for alloca > > > > app/testpmd: remove use of VLAs for Windows built > > > > test: remove use of VLAs for Windows built code > > > > common/idpf: remove use of VLAs for Windows built code > > > > net/i40e: remove use of VLAs for Windows built code > > > > common/mlx5: remove use of VLAs for Windows built code > > > > net/mlx5: remove use of VLAs for Windows built code > > > > build: enable vla warnings on Windows built code > > > > > > > > -- > > > > > > Series-Acked-by: Konstantin Ananyev > > > > > > One extra thing I would like to suggest: can we for each lib/driver/app/etc. > > > we made VLA free add an '-Wvla' option into corresponding meson.build? > > > To prevent people re-introducing VLA code. > > > > > > > 2.47.0.vfs.0.3 > > > > > > > Yes, I'll do so. It will add many small patches to the patchset though. I > > hope that is fine. > > That's ok with me, hope tree maintainers will not complain too. > Another possible option - combine it with particular lib changes, > i.e. patch that fixing VLA usage in lib/hash can also enable -Wvla for it, > and so on. > The previous patchset added -Wvla to the code being built on Windows. Your suggestion for adding -Wvla on Linux builds goes one step further and would give an earlier warning to people introducing VLAs in the code, which is a good thing. It also makes it easier to enable additional code in the Windows build in the future, as we will not be hitting so many VLAs anymore. Patchset v14 containing your suggestions was sent out. Let me know if you have further comments about it.