RE: [PATCH v18 00/26] remove use of VLAs for Windows

2025-01-30 Thread Morten Brørup
> From: Andre Muezerie [mailto:andre...@linux.microsoft.com] > Sent: Thursday, 30 January 2025 22.55 > > 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 VL

Re: [PATCH v4 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-01-30 Thread Stephen Hemminger
On Thu, 30 Jan 2025 23:18:53 +0100 Ariel Otilibili wrote: > +static inline struct xdp_desc* Need space after xdp_desc to follow style used elsewhere in DPDK.

Re: [PATCH v3 2/2] net/af_xdp: Refactor af_xdp_tx_zc()

2025-01-30 Thread Ariel Otilibili
Hello Maryam, On Wed, Jan 29, 2025 at 6:58 PM Maryam Tahhan wrote: > > +static struct rte_mbuf * > > +maybe_kick_tx(struct pkt_tx_queue *txq, uint32_t *idx_tx, struct > rte_mbuf *mbuf) > > +{ > > + struct rte_mbuf *ret = mbuf; > > + > > + if (!xsk_ring_prod__reserve(&txq->tx, 1, idx_tx))

[PATCH v18 04/26] ethdev: remove use of VLAs for Windows built code

2025-01-30 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 v2] dts: add SUT cleanup to framework

2025-01-30 Thread Dean Marx
Add method cleanup_sut to framework that removes a DPDK source from a SUT node at the conclusion of a testrun. This will only run when the DPDK source is being copied from the DTS engine node during the testrun (when remote=false in the conf.yaml). Signed-off-by: Dean Marx --- dts/framework/runn

[PATCH v4 1/2] net/af_xdp: Fix use after free in af_xdp_tx_zc

2025-01-30 Thread Ariel Otilibili
tx_bytes is computed after both legs are tested. This might produce a use after memory free. The computation is now moved into each leg. Bugzilla ID: 1440 Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Signed-off-by: Ariel Otilibili Acked-by: Stephen Hemminger --- .mailmap

Re: [PATCH 1/2] net/af_xdp: fix use after free in af_xdp_tx_zc()

2025-01-30 Thread Ariel Otilibili
Hello Stephen, On Thu, Jan 30, 2025 at 7:24 PM Stephen Hemminger < step...@networkplumber.org> wrote: > Acked-by: Stephen Hemminger > Thanks for having looked into the patch; I have ACKed the fourth version by your name, https://inbox.dpdk.org/dev/20250130221853.789366-2-ariel.otilib...@6wind.co

[PATCH v4 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-01-30 Thread Ariel Otilibili
Both legs of the loop share the same logic: the common parts are about reserving and filling both address and length into the description. This is moved into reserve_and_fill(). Bugzilla ID: 1440 Suggested-by: Maryam Tahhan Signed-off-by: Ariel Otilibili --- drivers/net/af_xdp/rte_eth_af_xdp.c

[PATCH v4 0/2] Fix use after free, and refactor af_xdp_tx_zc

2025-01-30 Thread Ariel Otilibili
Hello, The series addresses Bugzilla ID 1440 in two steps; 1. Fix use after free. 2. Refactor af_xdp_tx_zc(). Thank you, --- v4 * redid the refactor (Maryam Tahhan) * marked the fix as acked (Stephen Hemminger) * updated .mailmap, my main e-mail is @6wind.com (https://inbox.dpdk.org/dev/2025011

[PATCH v18 20/26] hash: remove use of VLAs by using standard arrays

2025-01-30 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 | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/hash/rte_thash_gf2_poly_math.c b/lib/hash/rte_thash_gf2_poly_math.c index 1c6297

[PATCH v18 26/26] config: add -Wvla project-wide

2025-01-30 Thread Andre Muezerie
Add -Wvla project-wide so that VLAs are not allowed by default. This is to avoid new VLAs from being introduced. Meson files in directories which are not yet VLA-free have already been updated with -Wno-vla to avoid build breaks. Signed-off-by: Andre Muezerie --- config/meson.build | 1 + 1 fil

[PATCH v18 22/26] app: add no_vla_cflag to directories that are not VLA-free

2025-01-30 Thread Andre Muezerie
The no_vla_cflag is added to meson.build files in directories that are not yet VLA-free. Signed-off-by: Andre Muezerie --- app/pdump/meson.build| 2 ++ app/proc-info/meson.build| 2 ++ app/test-acl/meson.build | 2 ++ app/test-bbdev/meson.build | 2 ++ app/t

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

2025-01-30 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/intel/i40e/i40e_testpmd.c |

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

2025-01-30 Thread Andre Muezerie
1) MSVC does not support VLAs. Use standard fixed C arrays of maximum size required instead. 2) ../usr/lib/gcc/x86_64-redhat-linux/13/include/emmintrin.h:742:8: error: array subscript 9 is outside array bounds of 'uint64_t[16]' {aka 'long unsigned int[16]'} [-Werror=array-bounds=] 3695

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

2025-01-30 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 Acked-by: Chengwen Feng --- app/test-pmd/shared_rxq_fwd.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH v18 21/26] config: define no_vla_cflag

2025-01-30 Thread Andre Muezerie
We define no_vla_cflag in a top directory so that it can be used by meson.build files in lower directories that are not yet VLA-free. Signed-off-by: Andre Muezerie --- config/meson.build | 8 1 file changed, 8 insertions(+) diff --git a/config/meson.build b/config/meson.build index 6aa

[PATCH v18 24/26] lib: add no_vla_cflag to directories that are not VLA-free

2025-01-30 Thread Andre Muezerie
The no_vla_cflag is added to meson.build files in directories that are not yet VLA-free. Signed-off-by: Andre Muezerie --- lib/acl/meson.build| 2 ++ lib/bpf/meson.build| 2 ++ lib/dispatcher/meson.build | 2 ++ lib/eventdev/meson.build | 2 ++ lib/ipsec/meson.build |

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

2025-01-30 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 v18 16/26] common/mlx5: remove use of VLAs for Windows built code

2025-01-30 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 v18 25/26] examples: add no_vla_cflag to directories that are not VLA-free

2025-01-30 Thread Andre Muezerie
The no_vla_cflag is added to meson.build files in directories that are not yet VLA-free. Signed-off-by: Andre Muezerie --- examples/fips_validation/meson.build | 2 ++ examples/ip_fragmentation/meson.build | 1 + examples/ipsec-secgw/meson.build | 3 +++ examples/l2fwd-crypto/meson.build

[PATCH v18 13/26] test: remove use of VLAs for Windows built code

2025-01-30 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: Chengwen Feng --- app/test/test.c | 2 +-

[PATCH v18 11/26] net/ice: remove use of VLAs

2025-01-30 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 v18 12/26] app/testpmd: remove use of VLAs for Windows built

2025-01-30 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: Chengwen Feng --- app/test-pmd/cmdline.c | 2 +- app/test

[PATCH v18 23/26] drivers: add no_vla_cflag to directories that are not VLA-free

2025-01-30 Thread Andre Muezerie
The no_vla_cflag is added to meson.build files in directories that are not yet VLA-free. Signed-off-by: Andre Muezerie --- drivers/common/cnxk/meson.build | 2 ++ drivers/common/mlx5/meson.build | 2 ++ drivers/common/qat/meson.build | 2 ++ drivers/crypto/ccp/meson.build |

[PATCH v18 09/26] gro: remove use of VLAs

2025-01-30 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 v18 07/26] rcu: remove use of VLAs for Windows built code

2025-01-30 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 v18 14/26] common/idpf: remove use of VLAs for Windows built code

2025-01-30 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 v18 06/26] hash/thash: remove use of VLAs for Windows built

2025-01-30 Thread Andre Muezerie
From: Konstantin Ananyev 1) ./lib/hash/rte_thash.c:774:9 : warning: ISO C90 forbids variable length array ‘tmp_tuple’ The tuple can exceed sizeof(union rte_thash_tuple), for example if any tunneling header is used in the RSS hash calculation. The longest RSS hash key currently supported is

[PATCH v18 05/26] hash: remove use of VLAs for Windows built code

2025-01-30 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 v18 10/26] net/ixgbe: remove use of VLAs

2025-01-30 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 v18 00/26] remove use of VLAs for Windows

2025-01-30 Thread Andre Muezerie
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 VL

[PATCH v18 08/26] gro: fix overwrite unprocessed packets

2025-01-30 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 v18 03/26] eal/common: remove use of VLAs

2025-01-30 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 Acked-by: Stephen Hemminger --- lib/eal/common/eal_common

[PATCH v18 01/26] eal: include header required for alloca

2025-01-30 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/freebsd/include/rte_os.h | 1 + lib/eal/linux/include/rte_os.h | 1 + lib/eal/windows/include/rte_os.h | 1 + 3 files changed, 3 insertions(+) d

[PATCH v18 02/26] eal/linux: remove use of VLAs

2025-01-30 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

Re: [RFC PATCH 1/1] dts: add SUT cleanup to framework

2025-01-30 Thread Dean Marx
> My first question was why is there a need to pass all of dpdk_config through > from here all the way to cleanup_sut()? Is it sufficient to extract > dpdk_location from dpdk_config at the beginning here, and pass along just > dpdk_location? I can do that too if it's preferred, wasn't sure what

Re: [PATCH v2 3/3] trace: fix undefined behavior in register

2025-01-30 Thread David Marchand
On Thu, Jan 30, 2025 at 8:10 PM Stephen Hemminger wrote: > > On Thu, 30 Jan 2025 15:58:49 +0100 > David Marchand wrote: > > > Registering a tracepoint handler was resulting so far in undefined > > behavior at runtime. > > > > The RTE_TRACE_POINT_REGISTER() macro was casting the tracepoint handler

Re: [PATCH v2] net/ice: fix how ice driver handles flows

2025-01-30 Thread Medvedkin, Vladimir
Hi Bruce, On 30/01/2025 17:54, Bruce Richardson wrote: On Thu, Jan 30, 2025 at 04:14:42PM +, Vladimir Medvedkin wrote: Currently ICE PMD uses group attribute to select the appropriate HW engine to offload the flow. This behavior violates the rte_flow API, existing documentation/examples, an

Re: [PATCH 1/1] net/{octeon_ep,enetfec}: remove unused value

2025-01-30 Thread Ariel Otilibili-Anieli
Hello Stephen, On Thursday, January 30, 2025 19:39 CET, Stephen Hemminger wrote: > Fixed that and applied to next-net Thanks for having wrapped up the series; much appreciated. I now have the proper length in my git config. Have a good one, Ariel

[PATCH] net/ice: fix segmentation fault Rx function

2025-01-30 Thread Vladimir Medvedkin
Fix a typo in avx512 rx function, where accidentally the _mm_load_si128 argument was passed by value instead of a pointer. Fixes: 43fd3624fdfe ("drivers: replace GCC pragma with cast") Cc: andre...@linux.microsoft.com Signed-off-by: Vladimir Medvedkin --- drivers/net/intel/ice/ice_rxtx_vec_avx5

Re: [PATCH v2 3/3] trace: fix undefined behavior in register

2025-01-30 Thread Stephen Hemminger
On Thu, 30 Jan 2025 15:58:49 +0100 David Marchand wrote: > Registering a tracepoint handler was resulting so far in undefined > behavior at runtime. > > The RTE_TRACE_POINT_REGISTER() macro was casting the tracepoint handler > (which expects arguments) to a void (*)(void). > At runtime, calling

Re: [PATCH v4] net/gve: allocate RX QPL pages using malloc

2025-01-30 Thread Stephen Hemminger
On Thu, 9 Jan 2025 11:46:38 -0800 Joshua Washington wrote: > Kaligineedi > > Allocating QPL for an RX queue might fail if enough contiguous IOVA > memory cannot be allocated. This can commonly occur when using 2MB huge > pages because the 1024 4K buffers are allocated for each RX ring by > de

Re: [PATCH 1/1] net/{octeon_ep,enetfec}: remove unused value

2025-01-30 Thread Stephen Hemminger
On Wed, 18 Dec 2024 21:00:09 +0100 Ariel Otilibili wrote: > Coverity issue: 385414, 374016 > Fixes: c836a7ba33e ("net/octeon_ep: support mailbox between VF and PF") > Fixes: bb5b5bf1e5c ("net/enetfec: support queue configuration") > Signed-off-by: Ariel Otilibili > -- > Cc: sta...@dpdk.org > Cc:

Re: [PATCH v2 1/2] net: add ptype parse for tunnel packets

2025-01-30 Thread Stephen Hemminger
On Fri, 24 Jan 2025 17:43:31 +0800 Jie Hai wrote: > @@ -456,7 +550,6 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m, > ip6h = rte_pktmbuf_read(m, off, sizeof(*ip6h), &ip6h_copy); > if (unlikely(ip6h == NULL)) > return pkt_type; > - >

Re: [PATCH 1/2] net/af_xdp: fix use after free in af_xdp_tx_zc()

2025-01-30 Thread Stephen Hemminger
On Thu, 16 Jan 2025 20:56:38 +0100 Ariel Otilibili wrote: > tx_bytes is computed after both branches are tested. This might > produce a use after memory free. > > The computation is now moved into both branches. > > Bugzilla ID: 1440 > Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem ch

Re: [PATCH v2] net/ice: fix how ice driver handles flows

2025-01-30 Thread Bruce Richardson
On Thu, Jan 30, 2025 at 04:14:42PM +, Vladimir Medvedkin wrote: > Currently ICE PMD uses group attribute to select the appropriate HW engine > to offload the flow. This behavior violates the rte_flow API, existing > documentation/examples, and reveals hardware specific details. > > This patch

[PATCH] dma/idxd: add device ids for new HW versions

2025-01-30 Thread Bruce Richardson
Add in two extra PCI device id's for future HW versions to be supported by idxd driver. This aligns with the definitions present in kernel idxd driver [1]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/dma/idxd/registers.h#n9 Signed-off-by: Bruce Richardson

RE: [RFC PATCH] eventdev: adapter API to configure multiple Rx queues

2025-01-30 Thread Jerin Jacob
> -Original Message- > From: Naga Harish K, S V > Sent: Thursday, January 30, 2025 9:01 PM > To: Jerin Jacob ; Shijith Thotton ; > dev@dpdk.org > Cc: Pavan Nikhilesh Bhagavatula ; Pathak, Pravin > ; Hemant Agrawal ; > Sachin Saxena ; Mattias R_nnblom > ; Liang Ma ; > Mccarthy, Peter ; Va

[PATCH v2] net/ice: fix how ice driver handles flows

2025-01-30 Thread Vladimir Medvedkin
Currently ICE PMD uses group attribute to select the appropriate HW engine to offload the flow. This behavior violates the rte_flow API, existing documentation/examples, and reveals hardware specific details. This patch eliminates the use of the group attribute and runs each engine parser in the o

[PATCH] net/ice: fix how ice driver handles flows

2025-01-30 Thread Vladimir Medvedkin
Currently ICE PMD uses group attribute to select the appropriate HW engine to offload the flow. This behavior violates the rte_flow API, existing documentation/examples, and reveals hardware specific details. This patch eliminates the use of the group attribute and runs each engine parser in the o

RE: [RFC PATCH] eventdev: adapter API to configure multiple Rx queues

2025-01-30 Thread Naga Harish K, S V
> -Original Message- > From: Jerin Jacob > Sent: Wednesday, January 29, 2025 1:13 PM > To: Naga Harish K, S V ; Shijith Thotton > ; dev@dpdk.org > Cc: Pavan Nikhilesh Bhagavatula ; Pathak, > Pravin ; Hemant Agrawal > ; Sachin Saxena ; > Mattias R_nnblom ; Liang Ma > ; Mccarthy, Peter ; V

[PATCH v3 4/4] net/intel: allow building ice driver without iavf

2025-01-30 Thread Bruce Richardson
The ice PMD relies on a number of functions from the iavf base code, which can be got by linking against that iavf driver. However, since only three C files are necessary here, we can allow ice to be built independently of iavf by including the base files directly in cases where iavf is not part of

[PATCH v3 3/4] drivers: move iavf common folder to iavf net

2025-01-30 Thread Bruce Richardson
The common/iavf driver folder contains the base code for the iavf driver, which is also linked against by the ice driver and others. However, there is no need for this to be in common, and we can move it to the net/intel/iavf as a base code driver. This involves updating dependencies that were on c

[PATCH v3 2/4] net/idpf: re-enable unused variable warnings

2025-01-30 Thread Bruce Richardson
The idpf driver was being built with warnings disabled for unused variables. However, while the warning was being disabled in the base code directory, all suppressed warnings were in the main directory. Therefore, just remove the unused variables and re-enable the warnings. Signed-off-by: Bruce Ri

[PATCH v3 0/4] remove common iavf and idpf drivers

2025-01-30 Thread Bruce Richardson
The iavf and idpf common directories were used only to share code between multiple net drivers and did not need to be drivers in their own right, since it is just as easy to have a dependency from one net driver on another as a net driver on a common one. This patchset therefore aims to eliminate

[PATCH v3 1/4] drivers: merge common and net idpf drivers

2025-01-30 Thread Bruce Richardson
Rather than having some of the idpf code split out into the "common" directory, used by both a net/idpf and a net/cpfl driver, we can merge all idpf code together under net/idpf and have the cpfl driver depend on "net/idpf" rather than "common/idpf". Signed-off-by: Bruce Richardson --- devtools/

Re: [EXTERNAL] Re: [PATCH 1/2] lib/dmadev: eliminate undefined behavior

2025-01-30 Thread David Marchand
On Fri, Jan 24, 2025 at 12:13 PM David Marchand wrote: > > On Tue, Dec 10, 2024 at 1:58 AM fengchengwen wrote: > > > + @Chengwen Feng > > > > > > This kind of patten is not used other places like ethdev traces, Why we > > > need this kind of pattern in dmadev? > > > Looks like, it can be fixed b

[PATCH v2 1/3] trace: support expression for blob length

2025-01-30 Thread David Marchand
Support any expression as a blob length by using an intermediate variable in the trace point emitter itself. This also avoids any side effect on the passed variable. Signed-off-by: David Marchand --- Changes since v1: - removed code relying on arguments in "registering" rte_trace_point_emit_bl

[PATCH v2 3/3] trace: fix undefined behavior in register

2025-01-30 Thread David Marchand
Registering a tracepoint handler was resulting so far in undefined behavior at runtime. The RTE_TRACE_POINT_REGISTER() macro was casting the tracepoint handler (which expects arguments) to a void (*)(void). At runtime, calling this handler while registering resulted in reading the current stack wi

[PATCH v2 2/3] dmadev: avoid copies in tracepoints

2025-01-30 Thread David Marchand
No need to copy values in intermediate variables. Just use the right trace point emitters. Signed-off-by: David Marchand --- lib/dmadev/rte_dmadev_trace.h| 20 ++-- lib/dmadev/rte_dmadev_trace_fp.h | 12 2 files changed, 10 insertions(+), 22 deletions(-) diff --

[PATCH v4] mbuf: add raw free and alloc bulk functions

2025-01-30 Thread Morten Brørup
When putting an mbuf back into its mempool, there are certain requirements to the mbuf. Specifically, some of its fields must be initialized. These requirements are in fact invariants about free mbufs, held in mempools, and thus also apply when allocating an mbuf from a mempool. With this in mind,

[PATCH v17 21/25] config: define no_vla_cflag

2025-01-30 Thread Andre Muezerie
We define no_vla_cflag in a top directory so that it can be used by meson.build files in lower directories that are not yet VLA-free. Signed-off-by: Andre Muezerie --- config/meson.build | 8 1 file changed, 8 insertions(+) diff --git a/config/meson.build b/config/meson.build index 6aa

[DPDK/DTS Bug 1623] dts: add linting support for validating testsuite docstring (steps and verify sections)

2025-01-30 Thread bugzilla
https://bugs.dpdk.org/show_bug.cgi?id=1623 Bug ID: 1623 Summary: dts: add linting support for validating testsuite docstring (steps and verify sections) Product: DPDK Version: 25.03 Hardware: All OS: All

Re: [PATCH v16 00/60] remove use of VLAs for Windows

2025-01-30 Thread Andre Muezerie
On Wed, Jan 29, 2025 at 04:57:16PM +0100, David Marchand wrote: > On Thu, Jan 23, 2025 at 5:38 PM Andre Muezerie > wrote: > > > > 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

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

2025-01-30 Thread Andre Muezerie
1) MSVC does not support VLAs. Use standard fixed C arrays of maximum size required instead. 2) ../usr/lib/gcc/x86_64-redhat-linux/13/include/emmintrin.h:742:8: error: array subscript 9 is outside array bounds of 'uint64_t[16]' {aka 'long unsigned int[16]'} [-Werror=array-bounds=] 3695

[PATCH v17 22/25] app: add no_vla_cflag to directories that are not VLA-free

2025-01-30 Thread Andre Muezerie
The no_vla_cflag is added to meson.build files in directories that are not yet VLA-free. Signed-off-by: Andre Muezerie --- app/pdump/meson.build| 2 ++ app/proc-info/meson.build| 2 ++ app/test-acl/meson.build | 2 ++ app/test-bbdev/meson.build | 2 ++ app/t

[PATCH v17 24/25] lib: add no_vla_cflag to directories that are not VLA-free

2025-01-30 Thread Andre Muezerie
The no_vla_cflag is added to meson.build files in directories that are not yet VLA-free. Signed-off-by: Andre Muezerie --- lib/acl/meson.build| 2 ++ lib/bpf/meson.build| 2 ++ lib/dispatcher/meson.build | 2 ++ lib/eventdev/meson.build | 2 ++ lib/ipsec/meson.build |

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

2025-01-30 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/intel/i40e/i40e_testpmd.c |

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

2025-01-30 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 Acked-by: Chengwen Feng --- app/test-pmd/shared_rxq_fwd.c | 2 +- 1 file changed, 1 insertion(+)

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

2025-01-30 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 v17 25/25] config: add -Wvla project-wide

2025-01-30 Thread Andre Muezerie
Add -Wvla project-wide so that VLAs are not allowed by default. This is to avoid new VLAs from being introduced. Meson files in directories which are not yet VLA-free have already been updated with -Wno-vla to avoid build breaks. Signed-off-by: Andre Muezerie --- config/meson.build | 1 + 1 fil

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

2025-01-30 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 v17 23/25] drivers: add no_vla_cflag to directories that are not VLA-free

2025-01-30 Thread Andre Muezerie
The no_vla_cflag is added to meson.build files in directories that are not yet VLA-free. Signed-off-by: Andre Muezerie --- drivers/common/cnxk/meson.build | 2 ++ drivers/crypto/cnxk/meson.build | 2 ++ drivers/crypto/octeontx/meson.build | 2 ++ drivers/crypto/scheduler/meson.build |

[PATCH v17 20/25] hash: remove use of VLAs by using standard arrays

2025-01-30 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 | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/hash/rte_thash_gf2_poly_math.c b/lib/hash/rte_thash_gf2_poly_math.c index 1c6297

[PATCH v17 09/25] gro: remove use of VLAs

2025-01-30 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 v17 14/25] common/idpf: remove use of VLAs for Windows built code

2025-01-30 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 v17 11/25] net/ice: remove use of VLAs

2025-01-30 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 v17 08/25] gro: fix overwrite unprocessed packets

2025-01-30 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 v17 13/25] test: remove use of VLAs for Windows built code

2025-01-30 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: Chengwen Feng --- app/test/test.c | 2 +-

[PATCH v17 12/25] app/testpmd: remove use of VLAs for Windows built

2025-01-30 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: Chengwen Feng --- app/test-pmd/cmdline.c | 2 +- app/test

[PATCH v17 05/25] hash: remove use of VLAs for Windows built code

2025-01-30 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 v17 07/25] rcu: remove use of VLAs for Windows built code

2025-01-30 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 v17 10/25] net/ixgbe: remove use of VLAs

2025-01-30 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 v17 06/25] hash/thash: remove use of VLAs for Windows built

2025-01-30 Thread Andre Muezerie
From: Konstantin Ananyev 1) ./lib/hash/rte_thash.c:774:9 : warning: ISO C90 forbids variable length array ‘tmp_tuple’ The tuple can exceed sizeof(union rte_thash_tuple), for example if any tunneling header is used in the RSS hash calculation. The longest RSS hash key currently supported is

[PATCH v17 04/25] ethdev: remove use of VLAs for Windows built code

2025-01-30 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 v17 00/25] remove use of VLAs for Windows

2025-01-30 Thread Andre Muezerie
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 VL

[PATCH v17 02/25] eal/linux: remove use of VLAs

2025-01-30 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 v17 03/25] eal/common: remove use of VLAs

2025-01-30 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 Acked-by: Stephen Hemminger --- lib/eal/common/eal_common

[PATCH v17 01/25] eal: include header required for alloca

2025-01-30 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/freebsd/include/rte_os.h | 1 + lib/eal/linux/include/rte_os.h | 1 + lib/eal/windows/include/rte_os.h | 1 + 3 files changed, 3 insertions(+) d

Re: [PATCH v2 0/4] remove common iavf and idpf drivers

2025-01-30 Thread Bruce Richardson
On Thu, Jan 30, 2025 at 02:55:54PM +0100, David Marchand wrote: > Hello Bruce, > > On Thu, Jan 30, 2025 at 1:48 PM Bruce Richardson > wrote: > > > > The iavf and idpf common directories were used only to share code > > between multiple net drivers and did not need to be drivers in their own > > r

Re: [PATCH] dts: add sudo to linux link up

2025-01-30 Thread Luca Vizzarro
Reviewed-by: Luca Vizzarro

[PATCH] dts: add sudo to linux link up

2025-01-30 Thread Patrick Robb
Fixes: 41d133d6c62f ("dts: automatically bring up link on interfaces") Cc: pr...@iol.unh.edu Signed-off-by: Patrick Robb --- dts/framework/testbed_model/linux_session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dts/framework/testbed_model/linux_session.py b/dts/framew

Re: [PATCH v2 0/4] remove common iavf and idpf drivers

2025-01-30 Thread David Marchand
Hello Bruce, On Thu, Jan 30, 2025 at 1:48 PM Bruce Richardson wrote: > > The iavf and idpf common directories were used only to share code > between multiple net drivers and did not need to be drivers in their own > right, since it is just as easy to have a dependency from one net driver > on ano

[PATCH v2 2/4] net/idpf: re-enable unused variable warnings

2025-01-30 Thread Bruce Richardson
The idpf driver was being built with warnings disabled for unused variables. However, while the warning was being disabled in the base code directory, all suppressed warnings were in the main directory. Therefore, just remove the unused variables and re-enable the warnings. Signed-off-by: Bruce Ri

[PATCH v2 4/4] net/intel: allow building ice driver without iavf

2025-01-30 Thread Bruce Richardson
The ice PMD relies on a number of functions from the iavf base code, which can be got by linking against that iavf driver. However, since only three C files are necessary here, we can allow ice to be built independently of iavf by including the base files directly in cases where iavf is not part of

[PATCH v2 3/4] drivers: move iavf common folder to iavf net

2025-01-30 Thread Bruce Richardson
The common/iavf driver folder contains the base code for the iavf driver, which is also linked against by the ice driver and others. However, there is no need for this to be in common, and we can move it to the net/intel/iavf as a base code driver. This involves updating dependencies that were on c

[PATCH v2 1/4] drivers: merge common and net idpf drivers

2025-01-30 Thread Bruce Richardson
Rather than having some of the idpf code split out into the "common" directory, used by both a net/idpf and a net/cpfl driver, we can merge all idpf code together under net/idpf and have the cpfl driver depend on "net/idpf" rather than "common/idpf". Signed-off-by: Bruce Richardson --- doc/guide

[PATCH v2 0/4] remove common iavf and idpf drivers

2025-01-30 Thread Bruce Richardson
The iavf and idpf common directories were used only to share code between multiple net drivers and did not need to be drivers in their own right, since it is just as easy to have a dependency from one net driver on another as a net driver on a common one. This patchset therefore aims to eliminate

[PATCH v2] net/cnxk: fix of NIX send header L3 type

2025-01-30 Thread Rahul Bhansali
For small packets less than 55 bytes, SQ error interrupts are observed. When checksum offload flag is enabled and mbuf ol_flags are not set, then default L3 type will be set to IPv6 in vector processing. Based on this, HW will still validate for minimum header size and generate send header error if

RE: [EXTERNAL] Re: [v2 2/2] examples/vhost_crypto: add asymmetric support

2025-01-30 Thread Gowrishankar Muthukrishnan
Hi Maxime, > > static const struct rte_vhost_device_ops virtio_crypto_device_ops = { > > - .new_device = new_device, > > - .destroy_device = destroy_device, > > + .new_connection = new_device, > > + .destroy_connection = destroy_device, > It may be worth explaining in the commit messag

  1   2   >