[PATCH v2] eventdev/eth_tx: fix runtime parameter test

2023-05-01 Thread Naga Harish K S V
TX adapter capability check logic is simplified. The UT has been updated to skip the test, if the API to set runtime parameters is not supported. Fixes: 1d176c7add08581 ("eventdev/eth_tx: support runtime set/get parameters") Signed-off-by: Naga Harish K S V --- app/test/test_event_eth_tx_adapte

[PATCH] eventdev/eth_tx: fix runtime parameter set API

2023-05-01 Thread Naga Harish K S V
TX adapter capability check logic is simplified. Fixes: 1d176c7add08581 ("eventdev/eth_tx: support runtime set/get parameters") Signed-off-by: Naga Harish K S V --- lib/eventdev/rte_event_eth_tx_adapter.c | 33 + 1 file changed, 6 insertions(+), 27 deletions(-) diff --g

RE: [PATCH 0/7] replace rte atomics with GCC builtin atomics

2023-05-01 Thread Honnappa Nagarahalli
> -Original Message- > From: Tyler Retzlaff > Sent: Monday, May 1, 2023 10:38 PM > To: Honnappa Nagarahalli > Cc: Morten Brørup ; Stephen Hemminger > ; dev@dpdk.org; Ruifeng Wang > ; tho...@monjalon.net; nd > Subject: Re: [PATCH 0/7] replace rte atomics with GCC builtin atomics > >

Re: [PATCH 0/7] replace rte atomics with GCC builtin atomics

2023-05-01 Thread Tyler Retzlaff
On Wed, Mar 22, 2023 at 11:06:08AM -0700, Tyler Retzlaff wrote: > On Wed, Mar 22, 2023 at 05:38:12PM +, Honnappa Nagarahalli wrote: > > > > > > > -Original Message- > > > From: Morten Brørup > > > Sent: Wednesday, March 22, 2023 12:08 PM > > > To: Honnappa Nagarahalli ; Tyler Retzl

[PATCH v8 10/14] eal: expand most macros to empty when using MSVC

2023-05-01 Thread Tyler Retzlaff
For now expand a lot of common rte macros empty. The catch here is we need to test that most of the macros do what they should but at the same time they are blocking work needed to bootstrap of the unit tests. Later we will return and provide (where possible) expansions that work correctly for msv

[PATCH v8 14/14] eal: do not define typeof macro when building with MSVC

2023-05-01 Thread Tyler Retzlaff
When building with MSVC do not assume typeof is a macro and don't define a typeof macro that conflicts with C23 typeof keyword. Signed-off-by: Tyler Retzlaff Acked-by: Morten Brørup --- lib/eal/include/rte_common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/eal/include/rte_common

[PATCH v8 09/14] eal: hide typedefs based on GCC vector extensions

2023-05-01 Thread Tyler Retzlaff
When compiling with MSVC don't expose typedefs based on GCC vector extensions. Signed-off-by: Tyler Retzlaff Acked-by: Morten Brørup --- lib/eal/include/generic/rte_vect.h | 4 1 file changed, 4 insertions(+) diff --git a/lib/eal/include/generic/rte_vect.h b/lib/eal/include/generic/rte_v

[PATCH v8 11/14] eal: exclude exposure of rte atomic APIs for MSVC builds

2023-05-01 Thread Tyler Retzlaff
It's discouraged to use rte_atomics APIs instead standard APIs should be used from C11. Since MSVC is a new toolchain/platform combination block visibility of the rte_atomic APIs from day 1. Signed-off-by: Tyler Retzlaff Acked-by: Morten Brørup --- lib/eal/include/generic/rte_atomic.h | 7 +

[PATCH v8 13/14] eal: always define MSVC as little endian

2023-05-01 Thread Tyler Retzlaff
The MSVC compiler does not target big endian platforms so define little endian always. Signed-off-by: Tyler Retzlaff Acked-by: Morten Brørup --- lib/eal/include/generic/rte_byteorder.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/eal/include/generic/rte_byteorder.h b/lib/eal/inclu

[PATCH v8 06/14] eal: use prefetch intrinsics

2023-05-01 Thread Tyler Retzlaff
Inline assembly is not supported for MSVC x64 instead use _mm_prefetch and _mm_cldemote intrinsics. Signed-off-by: Tyler Retzlaff Acked-by: Bruce Richardson Acked-by: Morten Brørup Acked-by: Konstantin Ananyev --- lib/eal/x86/include/rte_prefetch.h | 25 + 1 file chang

[PATCH v8 08/14] eal: hide GCC extension based alignment markers

2023-05-01 Thread Tyler Retzlaff
When compiling with MSVC don't expose typedefs used as alignment markers. Signed-off-by: Tyler Retzlaff Acked-by: Morten Brørup --- lib/eal/include/rte_common.h | 4 1 file changed, 4 insertions(+) diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h index 15765b4..2f4

[PATCH v8 05/14] eal: use umonitor umwait and tpause intrinsics

2023-05-01 Thread Tyler Retzlaff
Inline assembly is not supported for MSVC x64 instead use _umonitor, _umwait and _tpause intrinsics. Signed-off-by: Tyler Retzlaff Acked-by: Morten Brørup Acked-by: Konstantin Ananyev --- lib/eal/x86/rte_power_intrinsics.c | 12 1 file changed, 12 insertions(+) diff --git a/lib/e

[PATCH v8 12/14] telemetry: avoid expanding versioned symbol macros on MSVC

2023-05-01 Thread Tyler Retzlaff
Windows does not support versioned symbols. Fortunately Windows also doesn't have an exported stable ABI. Export rte_tel_data_add_array_int -> rte_tel_data_add_array_int_24 and rte_tel_data_add_dict_int -> rte_tel_data_add_dict_int_v24 functions. Windows does have a way to achieve similar version

[PATCH v8 07/14] eal: use byte swap intrinsics

2023-05-01 Thread Tyler Retzlaff
Inline assembly is not supported for MSVC x64 instead expand use _byteswap_u{ushort,ulong,uint64} intrinsics instead. Signed-off-by: Tyler Retzlaff Acked-by: Morten Brørup --- lib/eal/include/generic/rte_byteorder.h | 11 +++ lib/eal/x86/include/rte_byteorder.h | 4 2 files ch

[PATCH v8 04/14] eal: use cpuid and cpuidex intrinsics

2023-05-01 Thread Tyler Retzlaff
Inline assembly is not supported for MSVC x64 instead use __cpuid and __cpuidex intrinsics. Signed-off-by: Tyler Retzlaff Acked-by: Morten Brørup --- lib/eal/x86/rte_cpuflags.c | 4 lib/eal/x86/rte_cpuid.h | 7 +++ lib/eal/x86/rte_cycles.c | 36

[PATCH v8 00/14] msvc integration changes

2023-05-01 Thread Tyler Retzlaff
In accordance with draft plan http://mails.dpdk.org/archives/web/2023-February/002023.html introduces conditionally compiled code to enable building with MSVC that _does not_ require C99/C11 meaning it can be integrated now. This series covers minimal changes for item #2 in draft plan for EAL depe

[PATCH v8 02/14] eal: use rtm and xtest intrinsics

2023-05-01 Thread Tyler Retzlaff
Inline assembly is not supported for MSVC x64. Convert code to use _xend, _xabort and _xtest intrinsics. Signed-off-by: Tyler Retzlaff Acked-by: Bruce Richardson Acked-by: Konstantin Ananyev Acked-by: Morten Brørup --- config/x86/meson.build| 6 ++ lib/eal/x86/include/rte_rtm.h |

[PATCH v8 03/14] eal: use barrier intrinsics

2023-05-01 Thread Tyler Retzlaff
Inline assembly is not supported for MSVC x64 instead expand rte_compiler_barrier as _ReadWriteBarrier and for rte_smp_mb _m_mfence intrinsics. Signed-off-by: Tyler Retzlaff Acked-by: Bruce Richardson Acked-by: Konstantin Ananyev Acked-by: Morten Brørup --- lib/eal/include/generic/rte_atomic.

[PATCH v8 01/14] eal: use rdtsc intrinsic

2023-05-01 Thread Tyler Retzlaff
Inline assembly is not supported for MSVC x64. Convert code to use __rdtsc intrinsic. Signed-off-by: Tyler Retzlaff Acked-by: Konstantin Ananyev Acked-by: Morten Brørup --- lib/eal/x86/include/rte_cycles.h | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/e

RE: [dpdk-dev] [PATCH v2] ring: fix use after free in ring release

2023-05-01 Thread Honnappa Nagarahalli
> -Original Message- > From: Konstantin Ananyev > Sent: Monday, May 1, 2023 7:32 AM > To: wangyunj...@huawei.com > Cc: dev@dpdk.org; Honnappa Nagarahalli > ; konstantin.v.anan...@yandex.ru; > luyi...@huawei.com; sta...@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2] ring: fix use after fre

Re: [PATCH v2] net/ixgbe: add proper memory barriers for some Rx functions

2023-05-01 Thread Konstantin Ananyev
Segmentation fault has been observed while running the ixgbe_recv_pkts_lro() function to receive packets on the Loongson 3C5000 processor which has 64 cores and 4 NUMA nodes. From the ixgbe_recv_pkts_lro() function, we found that as long as the first packet has the EOP bit set, and the length of

Re: [PATCH v7 06/14] eal: use prefetch intrinsics

2023-05-01 Thread Konstantin Ananyev
nline assembly is not supported for MSVC x64 instead use _mm_prefetch and _mm_cldemote intrinsics. Signed-off-by: Tyler Retzlaff Acked-by: Bruce Richardson Acked-by: Morten Brørup --- lib/eal/x86/include/rte_prefetch.h | 25 + 1 file changed, 21 insertions(+), 4 deleti

Re: [PATCH v7 05/14] eal: use umonitor umwait and tpause intrinsics

2023-05-01 Thread Konstantin Ananyev
Inline assembly is not supported for MSVC x64 instead use _umonitor, _umwait and _tpause intrinsics. Signed-off-by: Tyler Retzlaff Acked-by: Morten Brørup --- lib/eal/x86/rte_power_intrinsics.c | 12 1 file changed, 12 insertions(+) diff --git a/lib/eal/x86/rte_power_intrinsics.c

Re: [dpdk-dev] [PATCH v2] ring: fix use after free in ring release

2023-05-01 Thread Konstantin Ananyev
After the memzone is freed, it is not removed from the 'rte_ring_tailq'. If rte_ring_lookup is called at this time, it will cause a use-after-free problem. This change prevents that from happening. Fixes: 4e32101f9b01 ("ring: support freeing") Cc: sta...@dpdk.org Suggested-by: Honnappa Nagar