RE: [PATCH 02/16] hash: remove use of VLAs for Windows built code

2024-04-17 Thread Morten Brørup
> - int32_t positions[num_keys]; > + int32_t *positions = alloca(sizeof(int32_t) * num_keys); A general comment, using this patch as an example... I wonder if adding const has any effect on the compilers' optimizers: int32_t * const positions = alloca(sizeof(int32_t) * num_keys); Perhap

[PATCH 02/16] hash: remove use of VLAs for Windows built code

2024-04-17 Thread Tyler Retzlaff
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. Signed-off-by: Tyler Retzlaff --- lib/hash/rte_cuckoo_hash.c | 4 ++-- lib/hash/rte_thash.c | 2 +- 2 files changed, 3 in