[PATCH v14 00/81] remove use of VLAs for Windows
Konstantin Ananyev
konstantin.ananyev at huawei.com
Mon Jan 13 13:11:03 CET 2025
> 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.
>
> 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.
>
> 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 (63):
> 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
> app/dumpcap: add compile warning about use of VLAs
> app/graph: add compile warning about use of VLAs
> app/test-cmdline: add compile warning about use of VLAs
> app/test-compress-perf: add compile warning about use of VLAs
> app/test-fib: add compile warning about use of VLAs
> app/test-gpudev: add compile warning about use of VLAs
> app/test-mldev: add compile warning about use of VLAs
> app/test-pipeline: add compile warning about use of VLAs
> app/test-regex: add compile warning about use of VLAs
> app/test-security-perf: add compile warning about use of VLAs
> lib/argparse: add compile warning about use of VLAs
> lib/bbdev: add compile warning about use of VLAs
> lib/bitratestats: add compile warning about use of VLAs
> lib/cfgfile: add compile warning about use of VLAs
> lib/cmdline: add compile warning about use of VLAs
> lib/compressdev: add compile warning about use of VLAs
> lib/cryptodev: add compile warning about use of VLAs
> lib/distributor: add compile warning about use of VLAs
> lib/dmadev: add compile warning about use of VLAs
> lib/efd: add compile warning about use of VLAs
> lib/fib: add compile warning about use of VLAs
> lib/gpudev: add compile warning about use of VLAs
> lib/gso: add compile warning about use of VLAs
> lib/ip_frag: add compile warning about use of VLAs
> lib/jobstats: add compile warning about use of VLAs
> lib/kvargs: add compile warning about use of VLAs
> lib/latencystats: add compile warning about use of VLAs
> lib/log: add compile warning about use of VLAs
> lib/lpm: add compile warning about use of VLAs
> lib/mbuf: add compile warning about use of VLAs
> lib/mempool: add compile warning about use of VLAs
> lib/meter: add compile warning about use of VLAs
> lib/metrics: add compile warning about use of VLAs
> lib/mldev: add compile warning about use of VLAs
> lib/net: add compile warning about use of VLAs
> lib/node: add compile warning about use of VLAs
> lib/pcapng: add compile warning about use of VLAs
> lib/pci: add compile warning about use of VLAs
> lib/port: add compile warning about use of VLAs
> lib/ptr_compress: add compile warning about use of VLAs
> lib/rawdev: add compile warning about use of VLAs
> lib/reorder: add compile warning about use of VLAs
> lib/rib: add compile warning about use of VLAs
> lib/ring: add compile warning about use of VLAs
> lib/sched: add compile warning about use of VLAs
> lib/security: add compile warning about use of VLAs
> lib/stack: add compile warning about use of VLAs
> lib/telemetry: add compile warning about use of VLAs
> lib/timer: add compile warning about use of VLAs
> drivers/baseband: add compile warning about use of VLAs
> drivers/bus: add compile warning about use of VLAs
> drivers/common: add compile warning about use of VLAs
> drivers/compress: add compile warning about use of VLAs
> drivers/gpu: add compile warning about use of VLAs
> drivers/mempool: add compile warning about use of VLAs
> drivers/ml: add compile warning about use of VLAs
> drivers/power: add compile warning about use of VLAs
> drivers/raw: add compile warning about use of VLAs
> drivers/regex: add compile warning about use of VLAs
> drivers/vdpa: add compile warning about use of VLAs
>
> 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
>
> app/dumpcap/meson.build | 8 +
> app/graph/meson.build | 8 +
> app/test-cmdline/meson.build | 8 +
> app/test-compress-perf/meson.build | 8 +
> app/test-fib/meson.build | 8 +
> app/test-gpudev/meson.build | 8 +
> app/test-mldev/meson.build | 8 +
> app/test-pipeline/meson.build | 8 +
> app/test-pmd/cmdline.c | 2 +-
> app/test-pmd/cmdline_flow.c | 15 +-
> app/test-pmd/config.c | 16 +-
> app/test-pmd/meson.build | 10 +-
> app/test-pmd/shared_rxq_fwd.c | 2 +-
> app/test-regex/meson.build | 8 +
> app/test-security-perf/meson.build | 8 +
> app/test/test.c | 2 +-
> app/test/test_bitset.c | 69 ++++---
> app/test/test_cmdline_string.c | 2 +-
> app/test/test_cryptodev.c | 34 ++--
> app/test/test_cryptodev_blockcipher.c | 4 +-
> app/test/test_cryptodev_crosscheck.c | 2 +-
> app/test/test_dmadev.c | 9 +-
> app/test/test_hash.c | 14 +-
> app/test/test_lcore_var_perf.c | 2 +-
> app/test/test_mempool.c | 25 +--
> app/test/test_reassembly_perf.c | 22 ++-
> app/test/test_reorder.c | 48 ++---
> app/test/test_service_cores.c | 9 +-
> app/test/test_thash.c | 7 +-
> config/meson.build | 4 +
> drivers/baseband/meson.build | 8 +
> drivers/bus/meson.build | 8 +
> drivers/common/idpf/idpf_common_rxtx.c | 2 +-
> drivers/common/idpf/idpf_common_rxtx_avx512.c | 6 +-
> drivers/common/meson.build | 8 +
> drivers/common/mlx5/meson.build | 1 +
> drivers/common/mlx5/mlx5_common.h | 4 +-
> drivers/common/mlx5/mlx5_devx_cmds.c | 7 +-
> drivers/common/nfp/meson.build | 8 +
> drivers/common/nitrox/meson.build | 8 +
> drivers/common/qat/meson.build | 8 +
> drivers/common/sfc_efx/meson.build | 1 +
> drivers/compress/meson.build | 8 +
> drivers/gpu/meson.build | 8 +
> drivers/mempool/meson.build | 8 +
> drivers/ml/meson.build | 8 +
> drivers/net/i40e/i40e_testpmd.c | 5 +-
> drivers/net/ice/ice_rxtx.c | 18 +-
> drivers/net/ice/ice_rxtx.h | 2 +
> drivers/net/ixgbe/ixgbe_ethdev.c | 21 +-
> drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 4 +-
> drivers/net/meson.build | 8 +
> drivers/net/mlx5/mlx5.c | 5 +-
> drivers/net/mlx5/mlx5_flow.c | 6 +-
> drivers/power/meson.build | 8 +
> drivers/raw/meson.build | 8 +
> drivers/regex/meson.build | 8 +
> drivers/vdpa/meson.build | 8 +
> lib/argparse/meson.build | 8 +
> lib/bbdev/meson.build | 8 +
> lib/bitratestats/meson.build | 8 +
> lib/cfgfile/meson.build | 8 +
> lib/cmdline/meson.build | 8 +
> lib/compressdev/meson.build | 8 +
> lib/cryptodev/meson.build | 8 +
> lib/distributor/meson.build | 8 +
> lib/dmadev/meson.build | 8 +
> lib/eal/common/eal_common_proc.c | 5 +-
> lib/eal/freebsd/include/rte_os.h | 1 +
> lib/eal/linux/eal_interrupts.c | 32 ++-
> lib/eal/linux/include/rte_os.h | 1 +
> lib/eal/meson.build | 8 +
> lib/eal/windows/include/rte_os.h | 1 +
> lib/efd/meson.build | 8 +
> lib/ethdev/meson.build | 8 +
> lib/ethdev/rte_ethdev.c | 183 +++++++++++-------
> lib/fib/meson.build | 8 +
> lib/gpudev/meson.build | 8 +
> lib/gro/meson.build | 8 +
> lib/gro/rte_gro.c | 42 ++--
> lib/gso/meson.build | 8 +
> lib/hash/meson.build | 8 +
> lib/hash/rte_cuckoo_hash.c | 4 +-
> lib/hash/rte_thash.c | 2 +-
> lib/hash/rte_thash.h | 7 +
> lib/hash/rte_thash_gf2_poly_math.c | 9 +-
> lib/ip_frag/meson.build | 8 +
> lib/jobstats/meson.build | 8 +
> lib/kvargs/meson.build | 8 +
> lib/latencystats/meson.build | 8 +
> lib/log/meson.build | 8 +
> lib/lpm/meson.build | 8 +
> lib/mbuf/meson.build | 8 +
> lib/mempool/meson.build | 2 +-
> lib/meter/meson.build | 8 +
> lib/metrics/meson.build | 8 +
> lib/mldev/meson.build | 8 +
> lib/net/meson.build | 8 +
> lib/node/meson.build | 8 +
> lib/pcapng/meson.build | 8 +
> lib/pci/meson.build | 8 +
> lib/port/meson.build | 8 +
> lib/ptr_compress/meson.build | 8 +
> lib/rawdev/meson.build | 8 +
> lib/rcu/meson.build | 8 +
> lib/rcu/rte_rcu_qsbr.c | 7 +-
> lib/rcu/rte_rcu_qsbr.h | 5 +
> lib/reorder/meson.build | 8 +
> lib/rib/meson.build | 8 +
> lib/ring/meson.build | 8 +
> lib/sched/meson.build | 8 +
> lib/security/meson.build | 8 +
> lib/stack/meson.build | 8 +
> lib/telemetry/meson.build | 8 +
> lib/timer/meson.build | 8 +
> 115 files changed, 950 insertions(+), 275 deletions(-)
>
> --
Series-Acked-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
> 2.47.0.vfs.0.3
More information about the dev
mailing list