[PATCH v4 00/19] remove use of VLAs for Windows

2024-11-04 Thread Andre Muezerie
/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 (2): test: remove use of VLAs for Windows built code in bitset tests

[PATCH v4 03/19] eal/common: remove use of VLAs

2024-11-04 Thread Andre Muezerie
From: Konstantin Ananyev 1) ../lib/eal/common/eal_common_proc.c:695:15 : warning: variable length array used As msg->num_fds should not exceed RTE_MP_MAX_FD_NUM, replaced it with fixed size array. Signed-off-by: Konstantin Ananyev --- lib/eal/common/eal_common_proc.c | 5 +++-- 1 file cha

[PATCH v4 10/19] test: remove use of VLAs for Windows built code

2024-11-04 Thread Andre Muezerie
From: 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 --- app/test/test.c | 2 +- app/test/test_cmdline_s

[PATCH v4 07/19] rcu: remove use of VLAs for Windows built code

2024-11-04 Thread Andre Muezerie
From: Konstantin Ananyev 1) ./lib/rcu/rte_rcu_qsbr.c:359:9 : warning: ISO C90 forbids variable length array ‘data’ [-Wvla] 2) ./lib/rcu/rte_rcu_qsbr.c:422:9 : warning: ISO C90 forbids variable length array ‘data’ [-Wvla] In both cases we allocate VLA for one element from RCU deferred que

[PATCH v4 11/19] common/idpf: remove use of VLAs for Windows built code

2024-11-04 Thread Andre Muezerie
From: 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 --- drivers/common/idpf/idpf_common_rxtx.c| 2 +- drivers/common/i

[PATCH v4 04/19] ethdev: remove use of VLAs for Windows built code

2024-11-04 Thread Andre Muezerie
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 forbid

[PATCH v4 08/19] gro: remove use of VLAs for Windows built code

2024-11-04 Thread Andre Muezerie
From: 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/gro/rte_gro.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletio

[PATCH v4 02/19] eal/linux: remove use of VLAs

2024-11-04 Thread Andre Muezerie
From: Konstantin Ananyev 1) ./lib/eal/linux/eal_interrupts.c:1073:16 : warning: ISO C90 forbids variable length array ‘events’ eal_intr_handle_interrupts() is called by eal_intr_thread_main() so it seems ok to simply alloc space for events from heap and reuse the same buffer through the life

[PATCH v4 06/19] hash/thash: remove use of VLAs for Windows built

2024-11-04 Thread Andre Muezerie
From: Konstantin Ananyev 1) ./lib/hash/rte_thash.c:774:9 : warning: ISO C90 forbids variable length array ‘tmp_tuple’ >From my understanding, tuple size here should never exceed sizeof(union rte_thash_tuple), so it should be safe to replace VLA with fixed size array. Signed-off-by: Konstant

[PATCH v4 01/19] eal: include header required for alloca

2024-11-04 Thread Andre Muezerie
From: Tyler Retzlaff Include alloca.h for Linux and malloc.h for Windows to get declaration of alloca(). Signed-off-by: Tyler Retzlaff --- lib/eal/linux/include/rte_os.h | 1 + lib/eal/windows/include/rte_os.h | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/eal/linux/include/rte_os

[PATCH v4 05/19] hash: remove use of VLAs for Windows built code

2024-11-04 Thread Andre Muezerie
From: Konstantin Ananyev 1) ./lib/hash/rte_cuckoo_hash.c:2362:9 : warning: ISO C90 forbids variable length array ‘positions’ 2) ../lib/hash/rte_cuckoo_hash.c:2478:9 : warning: ISO C90 forbids variable length array ‘positions’ Both rte_hash_lookup_bulk_data() and rte_hash_lookup_with_hash

[PATCH v4 18/19] test: remove use of VLAs for Windows built code in bitset tests

2024-11-04 Thread Andre Muezerie
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: Andre Muezerie --- app/test/test_bitset.c | 55 +++-- app/test

[PATCH v4 09/19] app/testpmd: remove use of VLAs for Windows built

2024-11-04 Thread Andre Muezerie
From: 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 --- app/test-pmd/cmdline.c | 2 +- app/test-pmd/cmdline_flow.c | 15

[PATCH v4 15/19] common/mlx5: remove use of VLAs for Windows built code

2024-11-04 Thread Andre Muezerie
From: 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 --- drivers/common/mlx5/mlx5_common.h| 4 ++-- drivers/common/mlx5/mlx

[PATCH v4 14/19] net/ixgbe: remove use of VLAs for Windows built code

2024-11-04 Thread Andre Muezerie
From: 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 --- drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++-- drivers/net/ixgbe

[PATCH v4 16/19] net/mlx5: remove use of VLAs for Windows built code

2024-11-04 Thread Andre Muezerie
From: 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 --- drivers/net/mlx5/mlx5.c | 5 ++--- drivers/net/mlx5/mlx5_flow.c |

[PATCH v4 12/19] net/i40e: remove use of VLAs for Windows built code

2024-11-04 Thread Andre Muezerie
From: 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 --- drivers/net/i40e/i40e_testpmd.c | 5 ++--- 1 file changed, 2 insertion

[PATCH v4 19/19] app/testpmd: remove use of VLAs for Windows built code in shared_rxq_fwd

2024-11-04 Thread Andre Muezerie
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: Andre Muezerie --- app/test-pmd/shared_rxq_fwd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v4 17/19] build: enable vla warnings on Windows built code

2024-11-04 Thread Andre Muezerie
From: Tyler Retzlaff MSVC does not support optional C11 VLAs. When building for Windows enable -Wvla so that mingw and clang also fail if a VLA is used. Signed-off-by: Tyler Retzlaff --- config/meson.build | 4 1 file changed, 4 insertions(+) diff --git a/config/meson.build b/config/meso

[PATCH v4 13/19] net/ice: remove use of VLAs for Windows built code

2024-11-04 Thread Andre Muezerie
From: 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 --- drivers/net/ice/ice_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 d

Re: [PATCH v4 02/19] eal/linux: remove use of VLAs

2024-11-05 Thread Andre Muezerie
On Tue, Nov 05, 2024 at 09:19:25AM +0100, David Marchand wrote: > Hello Andre, > > Thanks for taking over this series. > > On Tue, Nov 5, 2024 at 4:18 AM Andre Muezerie > wrote: > > > > From: Konstantin Ananyev > > > > 1) ./lib/eal/linux/eal_inter

Re: [PATCH v4 18/19] test: remove use of VLAs for Windows built code in bitset tests

2024-11-05 Thread Andre Muezerie
On Tue, Nov 05, 2024 at 09:32:36AM +0100, David Marchand wrote: > On Tue, Nov 5, 2024 at 4:19 AM Andre Muezerie > wrote: > > > > MSVC does not support VLAs, replace VLAs with standard C arrays > > or alloca(). alloca() is available for all toolchain/platform > > com

[PATCH v4] doc: modernize build instructions on Windows

2024-10-30 Thread Andre Muezerie
default to producing 32-bit binaries. Recommend instructing the developer prompt to produce 64-bit binaries when that is the case. Signed-off-by: Andre Muezerie --- v4: - Clarified that "32-bit binaries" were refering to the Windows environment. - Added clarifying commit me

Re: [PATCH 00/16] remove use of VLAs for Windows built code

2024-11-01 Thread Andre Muezerie
On Mon, Oct 07, 2024 at 10:15:46AM -0700, Stephen Hemminger wrote: > On Wed, 17 Apr 2024 16:41:43 -0700 > Tyler Retzlaff 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 addi

[PATCH v5] doc: modernize build instructions on Windows

2024-10-30 Thread Andre Muezerie
default to producing 32-bit binaries. Recommend instructing the developer prompt to produce 64-bit binaries when that is the case. Signed-off-by: Andre Muezerie --- v5: - Added new line at end of file build_dpdk.rst v4: - Clarified that "32-bit binaries" was refering to the Windows e

[PATCH] doc: enhanced build instructions on Windows

2024-10-25 Thread Andre Muezerie
Signed-off-by: Andre Muezerie --- .mailmap | 1 + doc/guides/windows_gsg/build_dpdk.rst | 16 +++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.mailmap b/.mailmap index 5290420..60db768 100644 --- a/.mailmap +++ b/.mailmap @@ -98,6

[PATCH v3] doc: enhance build instructions on Windows

2024-10-28 Thread Andre Muezerie
Enhance build instructions on Windows Signed-off-by: Andre Muezerie --- v3: - Recommended Meson version to use and removed mention about old bug. - Set VS developer prompt to produce 64 bit binaries if needed. v2: - provide Meson version that works .mailmap | 1

Re: [PATCH v5] doc: modernize build instructions on Windows

2024-11-11 Thread Andre Muezerie
On Mon, Nov 11, 2024 at 03:11:03PM +0100, Thomas Monjalon wrote: > 31/10/2024 04:08, Andre Muezerie: > > -Required version is Meson 0.57. > > - > > -Versions starting from 0.58 are unusable with LLVM toolchain > > -because of a `Meson issue > > <https://git

[PATCH v7 00/21] remove use of VLAs for Windows

2024-11-11 Thread Andre Muezerie
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: re

[PATCH v7 02/21] eal/linux: remove use of VLAs

2024-11-11 Thread Andre Muezerie
From: Konstantin Ananyev 1) ./lib/eal/linux/eal_interrupts.c:1073:16 : warning: ISO C90 forbids variable length array ‘events’ MSVC does not support VLAs. Use alloca() to allocate the memory on the stack. 2) ./lib/eal/linux/eal_interrupts.c:1319:16 : warning: ISO C90 forbids variable le

[PATCH v7 04/21] ethdev: remove use of VLAs for Windows built code

2024-11-11 Thread Andre Muezerie
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 forbid

[PATCH v7 05/21] hash: remove use of VLAs for Windows built code

2024-11-11 Thread Andre Muezerie
From: Konstantin Ananyev 1) ./lib/hash/rte_cuckoo_hash.c:2362:9 : warning: ISO C90 forbids variable length array ‘positions’ 2) ../lib/hash/rte_cuckoo_hash.c:2478:9 : warning: ISO C90 forbids variable length array ‘positions’ Both rte_hash_lookup_bulk_data() and rte_hash_lookup_with_hash

[PATCH v7 03/21] eal/common: remove use of VLAs

2024-11-11 Thread Andre Muezerie
From: Konstantin Ananyev 1) ../lib/eal/common/eal_common_proc.c:695:15 : warning: variable length array used As msg->num_fds should not exceed RTE_MP_MAX_FD_NUM, replaced it with fixed size array. Signed-off-by: Konstantin Ananyev --- lib/eal/common/eal_common_proc.c | 5 +++-- 1 file cha

[PATCH v7 01/21] eal: include header required for alloca

2024-11-11 Thread Andre Muezerie
From: Tyler Retzlaff Include alloca.h for Linux and malloc.h for Windows to get declaration of alloca(). Signed-off-by: Tyler Retzlaff --- lib/eal/linux/include/rte_os.h | 1 + lib/eal/windows/include/rte_os.h | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/eal/linux/include/rte_os

[PATCH v7 11/21] net/ice: remove use of VLAs

2024-11-11 Thread Andre Muezerie
From: Konstantin Ananyev ../drivers/net/ice/ice_rxtx.c:1871:29: warning: variable length array used [-Wvla] Here VLA is used as a temp array for mbufs that will be used as a split RX data buffers. As at any given time only one thread can do RX from particular queue, at rx_queue_setup() we ca

[PATCH v7 16/21] common/mlx5: remove use of VLAs for Windows built code

2024-11-11 Thread Andre Muezerie
From: 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 --- drivers/common/mlx5/mlx5_common.h| 4 ++-- drivers/common/mlx5/mlx

[PATCH v7 06/21] hash/thash: remove use of VLAs for Windows built

2024-11-11 Thread Andre Muezerie
From: Konstantin Ananyev 1) ./lib/hash/rte_thash.c:774:9 : warning: ISO C90 forbids variable length array ‘tmp_tuple’ >From my understanding, tuple size here should never exceed sizeof(union rte_thash_tuple), so it should be safe to replace VLA with fixed size array. Signed-off-by: Konstant

[PATCH v7 08/21] gro: fix overwrite unprocessed packets

2024-11-11 Thread Andre Muezerie
From: Konstantin Ananyev gro_vxlan_tcp4_tbl_timeout_flush() is called without taking into account that first entries in pkts[] can be already occupied by un-processed packets. Fixes: 74080d7dcf31 ("gro: support IPv6 for TCP") Cc: sta...@dpdk.org Signed-off-by: Konstantin Ananyev Acked-by: Ferr

[PATCH v7 07/21] rcu: remove use of VLAs for Windows built code

2024-11-11 Thread Andre Muezerie
From: Konstantin Ananyev 1) ./lib/rcu/rte_rcu_qsbr.c:359:9 : warning: ISO C90 forbids variable length array ‘data’ [-Wvla] 2) ./lib/rcu/rte_rcu_qsbr.c:422:9 : warning: ISO C90 forbids variable length array ‘data’ [-Wvla] In both cases we allocate VLA for one element from RCU deferred que

[PATCH v7 10/21] net/ixgbe: remove use of VLAs

2024-11-11 Thread Andre Muezerie
From: Konstantin Ananyev 1) ../drivers/net/ixgbe/ixgbe_ethdev.c:3556:46: warning: variable length array used [-Wvla] 2) ../drivers/net/ixgbe/ixgbe_ethdev.c:3739:23: warning: variable length array used [-Wvla] 3) ../drivers/net/ixgbe/ixgbe_rxtx_vec_common.h:17:24: warning: variable len

[PATCH v7 17/21] net/mlx5: remove use of VLAs for Windows built code

2024-11-11 Thread Andre Muezerie
From: 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 --- drivers/net/mlx5/mlx5.c | 5 ++--- drivers/net/mlx5/mlx5_flow.c |

[PATCH v7 09/21] gro: remove use of VLAs

2024-11-11 Thread Andre Muezerie
From: Konstantin Ananyev ../lib/gro/rte_gro.c:182:34: warning: variable length array used [-Wvla] ../lib/gro/rte_gro.c:363:34: warning: variable length array used [-Wvla] In both cases the pattern is the same: we use unprocess_pkts[nb_pkts] to collect un-used by GRO packets, and then cop

[PATCH v7 12/21] app/testpmd: remove use of VLAs for Windows built

2024-11-11 Thread Andre Muezerie
From: 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 --- app/test-pmd/cmdline.c | 2 +- app/test-pmd/cmdline_flow.c | 15

[PATCH v7 14/21] common/idpf: remove use of VLAs for Windows built code

2024-11-11 Thread Andre Muezerie
From: 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 Acked-by: Bruce Richardson --- drivers/common/idpf/idpf_common_rxtx.c

[PATCH v7 13/21] test: remove use of VLAs for Windows built code

2024-11-11 Thread Andre Muezerie
From: 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 --- app/test/test.c | 2 +- app/test/test_cmdline_s

[PATCH v7 19/21] test: remove use of VLAs for Windows built code in bitset tests

2024-11-11 Thread Andre Muezerie
ray-bounds=] 3695 742 | *__P = __B; Compile with -Wno-array-bounds to avoid false positives when using gcc version 11 or newer (gcc compiler bug/limitation). Signed-off-by: Andre Muezerie --- app/test/meson.build| 5 +++ app/test/test_bitset.c | 55 ++

[PATCH v7 21/21] hash: remove use of VLAs by using standard arrays

2024-11-11 Thread Andre Muezerie
MSVC does not support VLAs, replace VLAs with standard C arrays. Signed-off-by: Andre Muezerie --- lib/hash/rte_thash_gf2_poly_math.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/hash/rte_thash_gf2_poly_math.c b/lib/hash/rte_thash_gf2_poly_math.c index

[PATCH v7 15/21] net/i40e: remove use of VLAs for Windows built code

2024-11-11 Thread Andre Muezerie
From: 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 Reviewed-by: Bruce Richardson --- drivers/net/i40e/i40e_testpmd.c | 5 ++-

[PATCH v7 20/21] app/testpmd: remove use of VLAs for Windows built code in shared_rxq_fwd

2024-11-11 Thread Andre Muezerie
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: Andre Muezerie --- app/test-pmd/shared_rxq_fwd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v7 18/21] build: enable vla warnings on Windows built code

2024-11-11 Thread Andre Muezerie
From: Tyler Retzlaff MSVC does not support optional C11 VLAs. When building for Windows enable -Wvla so that mingw and clang also fail if a VLA is used. Signed-off-by: Tyler Retzlaff --- config/meson.build | 4 1 file changed, 4 insertions(+) diff --git a/config/meson.build b/config/meso

Re: [PATCH v5 08/20] net/ice: remove use of VLAs for Windows built code

2024-11-08 Thread Andre Muezerie
write unprocessed packets > https://patchwork.dpdk.org/project/dpdk/patch/20240523162604.2600-2-konstantin.v.anan...@yandex.ru/ > Yes, I made a mistake. I'll fix it in v6 alonmg with other small changes. > > > > On Thu, Nov 07, 2024 at 04:44:39PM -08

Re: [PATCH v5 08/20] net/ice: remove use of VLAs for Windows built code

2024-11-08 Thread Andre Muezerie
On Fri, Nov 08, 2024 at 08:51:00AM +, Bruce Richardson wrote: > Title for this patch is incorrect. Does it belong merged with the next > patch in series? Indeed, I used the wrong title for this patch. I'll fix it in v6. > > On Thu, Nov 07, 2024 at 04:44:39PM -0800, And

[PATCH v6 15/20] net/i40e: remove use of VLAs for Windows built code

2024-11-08 Thread Andre Muezerie
From: 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 Reviewed-by: Bruce Richardson --- drivers/net/i40e/i40e_testpmd.c | 5 ++-

[PATCH v6 20/20] app/testpmd: remove use of VLAs for Windows built code in shared_rxq_fwd

2024-11-08 Thread Andre Muezerie
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: Andre Muezerie --- app/test-pmd/shared_rxq_fwd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v6 18/20] build: enable vla warnings on Windows built code

2024-11-08 Thread Andre Muezerie
From: Tyler Retzlaff MSVC does not support optional C11 VLAs. When building for Windows enable -Wvla so that mingw and clang also fail if a VLA is used. Signed-off-by: Tyler Retzlaff --- config/meson.build | 4 1 file changed, 4 insertions(+) diff --git a/config/meson.build b/config/meso

[PATCH v6 12/20] app/testpmd: remove use of VLAs for Windows built

2024-11-08 Thread Andre Muezerie
From: 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 --- app/test-pmd/cmdline.c | 2 +- app/test-pmd/cmdline_flow.c | 15

[PATCH v6 11/20] net/ice: remove use of VLAs

2024-11-08 Thread Andre Muezerie
From: Konstantin Ananyev ../drivers/net/ice/ice_rxtx.c:1871:29: warning: variable length array used [-Wvla] Here VLA is used as a temp array for mbufs that will be used as a split RX data buffers. As at any given time only one thread can do RX from particular queue, at rx_queue_setup() we ca

[PATCH v6 09/20] gro: remove use of VLAs

2024-11-08 Thread Andre Muezerie
From: Konstantin Ananyev ../lib/gro/rte_gro.c:182:34: warning: variable length array used [-Wvla] ../lib/gro/rte_gro.c:363:34: warning: variable length array used [-Wvla] In both cases the pattern is the same: we use unprocess_pkts[nb_pkts] to collect un-used by GRO packets, and then cop

[PATCH v6 10/20] net/ixgbe: remove use of VLAs

2024-11-08 Thread Andre Muezerie
From: Konstantin Ananyev 1) ../drivers/net/ixgbe/ixgbe_ethdev.c:3556:46: warning: variable length array used [-Wvla] 2) ../drivers/net/ixgbe/ixgbe_ethdev.c:3739:23: warning: variable length array used [-Wvla] 3) ../drivers/net/ixgbe/ixgbe_rxtx_vec_common.h:17:24: warning: variable len

[PATCH v6 19/20] test: remove use of VLAs for Windows built code in bitset tests

2024-11-08 Thread Andre Muezerie
ray-bounds=] 3695 742 | *__P = __B; Compile with -Wno-array-bounds to avoid false positives when using gcc version 11 or newer (gcc compiler bug/limitation). Signed-off-by: Andre Muezerie --- app/test/meson.build| 5 +++ app/test/test_bitset.c | 55 ++

[PATCH v6 06/20] hash/thash: remove use of VLAs for Windows built

2024-11-08 Thread Andre Muezerie
From: Konstantin Ananyev 1) ./lib/hash/rte_thash.c:774:9 : warning: ISO C90 forbids variable length array ‘tmp_tuple’ >From my understanding, tuple size here should never exceed sizeof(union rte_thash_tuple), so it should be safe to replace VLA with fixed size array. Signed-off-by: Konstant

[PATCH v6 13/20] test: remove use of VLAs for Windows built code

2024-11-08 Thread Andre Muezerie
From: 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 --- app/test/test.c | 2 +- app/test/test_cmdline_s

[PATCH v6 16/20] common/mlx5: remove use of VLAs for Windows built code

2024-11-08 Thread Andre Muezerie
From: 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 --- drivers/common/mlx5/mlx5_common.h| 4 ++-- drivers/common/mlx5/mlx

[PATCH v6 07/20] rcu: remove use of VLAs for Windows built code

2024-11-08 Thread Andre Muezerie
From: Konstantin Ananyev 1) ./lib/rcu/rte_rcu_qsbr.c:359:9 : warning: ISO C90 forbids variable length array ‘data’ [-Wvla] 2) ./lib/rcu/rte_rcu_qsbr.c:422:9 : warning: ISO C90 forbids variable length array ‘data’ [-Wvla] In both cases we allocate VLA for one element from RCU deferred que

[PATCH v6 17/20] net/mlx5: remove use of VLAs for Windows built code

2024-11-08 Thread Andre Muezerie
From: 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 --- drivers/net/mlx5/mlx5.c | 5 ++--- drivers/net/mlx5/mlx5_flow.c |

[PATCH v6 14/20] common/idpf: remove use of VLAs for Windows built code

2024-11-08 Thread Andre Muezerie
From: 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 Acked-by: Bruce Richardson --- drivers/common/idpf/idpf_common_rxtx.c

[PATCH v6 02/20] eal/linux: remove use of VLAs

2024-11-08 Thread Andre Muezerie
From: Konstantin Ananyev 1) ./lib/eal/linux/eal_interrupts.c:1073:16 : warning: ISO C90 forbids variable length array ‘events’ MSVC does not support VLAs. Use alloca() to allocate the memory on the stack. 2) ./lib/eal/linux/eal_interrupts.c:1319:16 : warning: ISO C90 forbids variable le

[PATCH v6 08/20] gro: fix overwrite unprocessed packets

2024-11-08 Thread Andre Muezerie
From: Konstantin Ananyev gro_vxlan_tcp4_tbl_timeout_flush() is called without taking into account that first entries in pkts[] can be already occupied by un-processed packets. Fixes: 74080d7dcf31 ("gro: support IPv6 for TCP") Cc: sta...@dpdk.org Signed-off-by: Konstantin Ananyev Acked-by: Ferr

[PATCH v6] doc: modernize build instructions on Windows

2024-11-11 Thread Andre Muezerie
default to producing 32-bit binaries. Recommend instructing the developer prompt to produce 64-bit binaries when that is the case. Signed-off-by: Andre Muezerie --- .mailmap | 1 + doc/guides/windows_gsg/build_dpdk.rst | 20 +++- 2 files changed, 16

[PATCH] doc: enhance build instructions on windows

2024-10-25 Thread Andre Muezerie
* Updated about old Meson issue * Added instruction to get developer prompt Andre Muezerie (1): doc: enhanced build instructions on Windows .mailmap | 1 + doc/guides/windows_gsg/build_dpdk.rst | 16 +++- 2 files changed, 12 insertions(+), 5 deletions

[PATCH] rcu: shift 64-bit constant to avoid implicit 32 to 64 bit conversion

2024-11-12 Thread Andre Muezerie
o shift a 64-bit number instead of shifting a 32-bit number and then having the compiler to convert the result implicitly to 64 bits. UINT64_C was used in the fix as it is the portable way to define a 64-bit constant (ULL suffix is architecture dependent). Signed-off-by: Andre Muezerie ---

[PATCH] mempool: enable code to be compiled with MSVC compiler

2024-11-12 Thread Andre Muezerie
The issues that were preventing mempool from getting compiled with MSVC were fixed, so now it should not be excluded from the build anymore. Signed-off-by: Andre Muezerie --- lib/mempool/meson.build | 6 -- 1 file changed, 6 deletions(-) diff --git a/lib/mempool/meson.build b/lib/mempool

[PATCH] argparse: enable code to be compiled with MSVC compiler

2024-11-12 Thread Andre Muezerie
The issues that were preventing argparser from getting compiled with MSVC were fixed, so now it should not be excluded from the compilation anymore. Signed-off-by: Andre Muezerie --- lib/argparse/meson.build | 6 -- 1 file changed, 6 deletions(-) diff --git a/lib/argparse/meson.build b/lib

[PATCH v2] rcu: shift 64-bit constant to avoid implicit 32 to 64 bit conversion

2024-11-13 Thread Andre Muezerie
bugfix: (1 << id), where id = thread_id & 0x3f, was wrong when thread_id > 0x1f. Fixes: 64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism") Signed-off-by: Andre Muezerie Reviewed-by: Honnappa Nagarahalli Reviewed-by: Morten Brørup --- lib/rcu/rte_rcu_qsbr.

[PATCH v6 00/20] remove use of VLAs for Windows

2024-11-08 Thread Andre Muezerie
ray 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 (2): test: re

[PATCH v6 04/20] ethdev: remove use of VLAs for Windows built code

2024-11-08 Thread Andre Muezerie
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 forbid

[PATCH v6 03/20] eal/common: remove use of VLAs

2024-11-08 Thread Andre Muezerie
From: Konstantin Ananyev 1) ../lib/eal/common/eal_common_proc.c:695:15 : warning: variable length array used As msg->num_fds should not exceed RTE_MP_MAX_FD_NUM, replaced it with fixed size array. Signed-off-by: Konstantin Ananyev --- lib/eal/common/eal_common_proc.c | 5 +++-- 1 file cha

[PATCH v6 05/20] hash: remove use of VLAs for Windows built code

2024-11-08 Thread Andre Muezerie
From: Konstantin Ananyev 1) ./lib/hash/rte_cuckoo_hash.c:2362:9 : warning: ISO C90 forbids variable length array ‘positions’ 2) ../lib/hash/rte_cuckoo_hash.c:2478:9 : warning: ISO C90 forbids variable length array ‘positions’ Both rte_hash_lookup_bulk_data() and rte_hash_lookup_with_hash

[PATCH v6 01/20] eal: include header required for alloca

2024-11-08 Thread Andre Muezerie
From: Tyler Retzlaff Include alloca.h for Linux and malloc.h for Windows to get declaration of alloca(). Signed-off-by: Tyler Retzlaff --- lib/eal/linux/include/rte_os.h | 1 + lib/eal/windows/include/rte_os.h | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/eal/linux/include/rte_os

[PATCH v2 1/2] doc: enhanced build instructions on Windows

2024-10-25 Thread Andre Muezerie
Signed-off-by: Andre Muezerie --- .mailmap | 1 + doc/guides/windows_gsg/build_dpdk.rst | 16 +++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.mailmap b/.mailmap index 5290420..60db768 100644 --- a/.mailmap +++ b/.mailmap @@ -98,6

[PATCH v2 2/2] doc: provide Meson version that works

2024-10-25 Thread Andre Muezerie
Signed-off-by: Andre Muezerie --- doc/guides/windows_gsg/build_dpdk.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/guides/windows_gsg/build_dpdk.rst b/doc/guides/windows_gsg/build_dpdk.rst index c5fad81..76bfc22 100644 --- a/doc/guides/windows_gsg/build_dpdk.rst

[PATCH v2 0/2] doc: enhance build instructions on windows

2024-10-25 Thread Andre Muezerie
* Updated about old Meson issue * Added instruction to get developer prompt --- v2: - provide Meson version that works Andre Muezerie (2): doc: enhanced build instructions on Windows doc: provide Meson version that works .mailmap | 1 + doc/guides/windows_gsg

[PATCH v5 13/20] test: remove use of VLAs for Windows built code

2024-11-07 Thread Andre Muezerie
From: 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 --- app/test/test.c | 2 +- app/test/test_cmdline_s

[PATCH v5 12/20] app/testpmd: remove use of VLAs for Windows built

2024-11-07 Thread Andre Muezerie
From: 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 --- app/test-pmd/cmdline.c | 2 +- app/test-pmd/cmdline_flow.c | 15

[PATCH v5 00/20] remove use of VLAs for Windows

2024-11-07 Thread Andre Muezerie
or 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 (2): test: remove use of VLAs for Windows built code in bitset tests app/testpmd: remove use of

[PATCH v5 02/20] eal/linux: remove use of VLAs

2024-11-07 Thread Andre Muezerie
From: Konstantin Ananyev 1) ./lib/eal/linux/eal_interrupts.c:1073:16 : warning: ISO C90 forbids variable length array ‘events’ MSVC does not support VLAs. Use alloca() to allocate the memory on the stack. 2) ./lib/eal/linux/eal_interrupts.c:1319:16 : warning: ISO C90 forbids variable le

[PATCH v5 05/20] hash: remove use of VLAs for Windows built code

2024-11-07 Thread Andre Muezerie
From: Konstantin Ananyev 1) ./lib/hash/rte_cuckoo_hash.c:2362:9 : warning: ISO C90 forbids variable length array ‘positions’ 2) ../lib/hash/rte_cuckoo_hash.c:2478:9 : warning: ISO C90 forbids variable length array ‘positions’ Both rte_hash_lookup_bulk_data() and rte_hash_lookup_with_hash

[PATCH v5 03/20] eal/common: remove use of VLAs

2024-11-07 Thread Andre Muezerie
From: Konstantin Ananyev 1) ../lib/eal/common/eal_common_proc.c:695:15 : warning: variable length array used As msg->num_fds should not exceed RTE_MP_MAX_FD_NUM, replaced it with fixed size array. Signed-off-by: Konstantin Ananyev --- lib/eal/common/eal_common_proc.c | 5 +++-- 1 file cha

[PATCH v5 01/20] eal: include header required for alloca

2024-11-07 Thread Andre Muezerie
From: Tyler Retzlaff Include alloca.h for Linux and malloc.h for Windows to get declaration of alloca(). Signed-off-by: Tyler Retzlaff --- lib/eal/linux/include/rte_os.h | 1 + lib/eal/windows/include/rte_os.h | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/eal/linux/include/rte_os

[PATCH v5 08/20] net/ice: remove use of VLAs for Windows built code

2024-11-07 Thread Andre Muezerie
From: Konstantin Ananyev gro_vxlan_tcp4_tbl_timeout_flush() is called without taking into account that first entries in pkts[] can be already occupied by un-processed packets. Fixes: 74080d7dcf31 ("gro: support IPv6 for TCP") Cc: sta...@dpdk.org Signed-off-by: Konstantin Ananyev Acked-by: Ferr

[PATCH v5 04/20] ethdev: remove use of VLAs for Windows built code

2024-11-07 Thread Andre Muezerie
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 forbid

[PATCH v5 09/20] gro: remove use of VLAs

2024-11-07 Thread Andre Muezerie
From: Konstantin Ananyev ../lib/gro/rte_gro.c:182:34: warning: variable length array used [-Wvla] ../lib/gro/rte_gro.c:363:34: warning: variable length array used [-Wvla] In both cases the pattern is the same: we use unprocess_pkts[nb_pkts] to collect un-used by GRO packets, and then cop

[PATCH v5 14/20] common/idpf: remove use of VLAs for Windows built code

2024-11-07 Thread Andre Muezerie
From: 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 --- drivers/common/idpf/idpf_common_rxtx.c| 2 +- drivers/common/i

[PATCH v5 11/20] net/ice: remove use of VLAs

2024-11-07 Thread Andre Muezerie
From: Konstantin Ananyev ../drivers/net/ice/ice_rxtx.c:1871:29: warning: variable length array used [-Wvla] Here VLA is used as a temp array for mbufs that will be used as a split RX data buffers. As at any given time only one thread can do RX from particular queue, at rx_queue_setup() we ca

[PATCH v5 10/20] net/ixgbe: remove use of VLAs

2024-11-07 Thread Andre Muezerie
From: Konstantin Ananyev 1) ../drivers/net/ixgbe/ixgbe_ethdev.c:3556:46: warning: variable length array used [-Wvla] 2) ../drivers/net/ixgbe/ixgbe_ethdev.c:3739:23: warning: variable length array used [-Wvla] 3) ../drivers/net/ixgbe/ixgbe_rxtx_vec_common.h:17:24: warning: variable len

[PATCH v5 07/20] rcu: remove use of VLAs for Windows built code

2024-11-07 Thread Andre Muezerie
From: Konstantin Ananyev 1) ./lib/rcu/rte_rcu_qsbr.c:359:9 : warning: ISO C90 forbids variable length array ‘data’ [-Wvla] 2) ./lib/rcu/rte_rcu_qsbr.c:422:9 : warning: ISO C90 forbids variable length array ‘data’ [-Wvla] In both cases we allocate VLA for one element from RCU deferred que

[PATCH v5 17/20] net/mlx5: remove use of VLAs for Windows built code

2024-11-07 Thread Andre Muezerie
From: 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 --- drivers/net/mlx5/mlx5.c | 5 ++--- drivers/net/mlx5/mlx5_flow.c |

[PATCH v5 06/20] hash/thash: remove use of VLAs for Windows built

2024-11-07 Thread Andre Muezerie
From: Konstantin Ananyev 1) ./lib/hash/rte_thash.c:774:9 : warning: ISO C90 forbids variable length array ‘tmp_tuple’ >From my understanding, tuple size here should never exceed sizeof(union rte_thash_tuple), so it should be safe to replace VLA with fixed size array. Signed-off-by: Konstant

[PATCH v5 16/20] common/mlx5: remove use of VLAs for Windows built code

2024-11-07 Thread Andre Muezerie
From: 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 --- drivers/common/mlx5/mlx5_common.h| 4 ++-- drivers/common/mlx5/mlx

[PATCH v5 18/20] build: enable vla warnings on Windows built code

2024-11-07 Thread Andre Muezerie
From: Tyler Retzlaff MSVC does not support optional C11 VLAs. When building for Windows enable -Wvla so that mingw and clang also fail if a VLA is used. Signed-off-by: Tyler Retzlaff --- config/meson.build | 4 1 file changed, 4 insertions(+) diff --git a/config/meson.build b/config/meso

  1   2   3   4   5   6   7   8   9   10   >