[PATCH v1] net/mlx5: fix secondary process query stats segfault

2024-01-21 Thread Rongwei Liu
The "outer_of_buffer" counter is owned by the primary process devx object and it is pointer by pointer in mlx5_priv structure. Actually, there are 4 levels' pointers in this piece of code. The secondary process can't access this part directly since it belongs to another process' heap. Return ENOT

Re: [PATCH] [v2]lib/telemetry:fix telemetry conns leak in case of socket write fail

2024-01-21 Thread fengchengwen
Acked-by: Chengwen Feng On 2024/1/20 16:58, Shaowei Sun wrote: > Telemetry can only create 10 conns by default, each of which is processed > by a thread. > > When a thread fails to write using socket, the thread will end directly > without reducing the total number of conns. > > This will resul

Re: [PATCH] mempool: test performance with larger bursts

2024-01-21 Thread fengchengwen
Hi Morten, On 2024/1/21 12:52, Morten Brørup wrote: > Bursts of up to 128 packets are not uncommon, so increase the maximum > tested get and put burst sizes from 32 to 128. How about add 64 ? > > Some applications keep more than 512 objects, so increase the maximum > number of kept objects from

Re: [PATCH v3 1/2] config/arm: allow WFE to be enabled config time

2024-01-21 Thread Ruifeng Wang
On 2024/1/21 11:21 PM, pbhagavat...@marvell.com wrote: From: Pavan Nikhilesh Allow RTE_ARM_USE_WFE to be enabled at meson configuration time by passing it via c_args instead of modifying `config/arm/meson.build`. Example usage: meson build -Dc_args='-DRTE_ARM_USE_WFE' \ --cross-file

Re: [PATCH v3 1/2] config/arm: allow WFE to be enabled config time

2024-01-21 Thread fengchengwen
Acked-by: Chengwen Feng On 2024/1/21 23:21, pbhagavat...@marvell.com wrote: > From: Pavan Nikhilesh > > Allow RTE_ARM_USE_WFE to be enabled at meson configuration > time by passing it via c_args instead of modifying > `config/arm/meson.build`. > > Example usage: > meson build -Dc_args='-DRTE_

Re: [PATCH 1/2] config/arm: avoid mcpu and march conflicts

2024-01-21 Thread Ruifeng Wang
+Cc On 2024/1/21 5:36 PM, pbhagavat...@marvell.com wrote: From: Pavan Nikhilesh The compiler options march and mtune are a subset of mcpu and will lead to conflicts if improper march is chosen for a given mcpu. To avoid conflicts, force part number march when mcpu is available and is supported

Re: [PATCH 2/2] config/arm: add support for fallback march

2024-01-21 Thread Ruifeng Wang
+Cc On 2024/1/21 5:36 PM, pbhagavat...@marvell.com wrote: From: Pavan Nikhilesh Some ARM CPUs have specific march requirements and are not compatible with the supported march list. Add fallback march in case the mcpu and the march advertised in the part_number_config are not supported by the c

Re: [PATCH 02/12] argparse: add argparse library

2024-01-21 Thread fengchengwen
Hi Stephen, On 2024/1/22 12:54, Stephen Hemminger wrote: > On Mon, 22 Jan 2024 03:57:52 + > Chengwen Feng wrote: > >> +Parsing by autosave way >> +~~~ >> + >> +For which known value types (just like ``RTE_ARGPARSE_ARG_VALUE_INT``"), >> could >> +parse by autosave way, ju

Re: [PATCH 02/12] argparse: add argparse library

2024-01-21 Thread Stephen Hemminger
On Mon, 22 Jan 2024 03:57:52 + Chengwen Feng wrote: > +Parsing by autosave way > +~~~ > + > +For which known value types (just like ``RTE_ARGPARSE_ARG_VALUE_INT``"), > could > +parse by autosave way, just like above "--aaa"/"--bbb"/"--ccc" optional > +arguments: > + > +If

[PATCH 12/12] examples/dma: replace getopt with argparse

2024-01-21 Thread Chengwen Feng
Replace getopt with argparse. Signed-off-by: Chengwen Feng --- examples/dma/dmafwd.c| 279 ++- examples/dma/meson.build | 2 +- 2 files changed, 127 insertions(+), 154 deletions(-) diff --git a/examples/dma/dmafwd.c b/examples/dma/dmafwd.c index f27317a

[PATCH 11/12] argparse: pretty help info

2024-01-21 Thread Chengwen Feng
This commit aligns help info. Take dmafwd as an example, previous: options: -h, --help: show this help message and exit. --mac-updating: Enable MAC addresses updating --no-mac-updating: Disable MAC addresses updating -p, --portmask: hexadecimal bitmask of ports to configure -q, --nb-queue: n

[PATCH 10/12] test/argparse: add parse unsigned base type test

2024-01-21 Thread Chengwen Feng
This commit adds parsing unsigned base type (u8/u16/u32/u64) test. Signed-off-by: Chengwen Feng --- app/test/test_argparse.c | 59 1 file changed, 54 insertions(+), 5 deletions(-) diff --git a/app/test/test_argparse.c b/app/test/test_argparse.c index 98c

[PATCH 09/12] argparse: support parse unsigned base type

2024-01-21 Thread Chengwen Feng
This commit supports parsing unsigned base type (u8/u16/u32/u64). Signed-off-by: Chengwen Feng --- lib/argparse/rte_argparse.c | 116 lib/argparse/rte_argparse.h | 10 +++- 2 files changed, 125 insertions(+), 1 deletion(-) diff --git a/lib/argparse/rte_argp

[PATCH 07/12] argparse: provide parsing known type API

2024-01-21 Thread Chengwen Feng
Provide API which could parsing the value from the input string based on the value type. This API could used in user callback when parsing string by argparse or kvargs library. Signed-off-by: Chengwen Feng --- lib/argparse/rte_argparse.c | 19 +++ lib/argparse/rte_argparse.h | 19

[PATCH 08/12] test/argparse: add parse type test

2024-01-21 Thread Chengwen Feng
This commit adds parse type test. Signed-off-by: Chengwen Feng --- app/test/test_argparse.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/app/test/test_argparse.c b/app/test/test_argparse.c index f55b57a21f..98c6cd6b80 100644 --- a/app/test/test_argparse.c +++ b/app

[PATCH 06/12] test/argparse: add parse parameters test

2024-01-21 Thread Chengwen Feng
This commit adds parse parameters test. Signed-off-by: Chengwen Feng --- app/test/test_argparse.c | 437 +++ 1 file changed, 437 insertions(+) diff --git a/app/test/test_argparse.c b/app/test/test_argparse.c index 31c46ecccf..f55b57a21f 100644 --- a/app/test/

[PATCH 02/12] argparse: add argparse library

2024-01-21 Thread Chengwen Feng
Introduce argparse library (which was inspired by the thread [1]). This commit provides public API and doc. [1] https://patchwork.dpdk.org/project/dpdk/patch/20231105054539.22303-2-fengcheng...@huawei.com/ Signed-off-by: Chengwen Feng --- doc/api/doxy-api-index.md | 1 + doc/api

[PATCH 05/12] argparse: support parse parameters

2024-01-21 Thread Chengwen Feng
This commit supports parse parameters which described in [argc, argv]. Signed-off-by: Chengwen Feng --- lib/argparse/rte_argparse.c | 289 +++- 1 file changed, 286 insertions(+), 3 deletions(-) diff --git a/lib/argparse/rte_argparse.c b/lib/argparse/rte_argparse.

[PATCH 04/12] test/argparse: add verify argument config test

2024-01-21 Thread Chengwen Feng
This commit adds verify argument config test. Signed-off-by: Chengwen Feng --- app/test/meson.build | 1 + app/test/test_argparse.c | 327 +++ 2 files changed, 328 insertions(+) create mode 100644 app/test/test_argparse.c diff --git a/app/test/meson.bu

[PATCH 03/12] argparse: support verify argument config

2024-01-21 Thread Chengwen Feng
This commit supports verify argument config. Signed-off-by: Chengwen Feng --- lib/argparse/rte_argparse.c | 307 +++- 1 file changed, 306 insertions(+), 1 deletion(-) diff --git a/lib/argparse/rte_argparse.c b/lib/argparse/rte_argparse.c index 3471c5e757..3dbae88

[PATCH 01/12] eal: introduce more macro for bit definition

2024-01-21 Thread Chengwen Feng
Introduce macros: RTE_MBIT64/RTE_MBIT32, RTE_GENMASK64/RTE_GENMASK32, and RTE_FIELD_GET64/RTE_FIELD_GET32. Signed-off-by: Chengwen Feng --- lib/eal/include/rte_bitops.h | 64 1 file changed, 64 insertions(+) diff --git a/lib/eal/include/rte_bitops.h b/lib/ea

[PATCH 00/12] add argparse library

2024-01-21 Thread Chengwen Feng
Introduce argparse library (which was inspired by the thread [1]), compared with getopt, it makes it easy to write user-friendly command-like program. Note: the 2nd commit contains usage examples. [1] https://patchwork.dpdk.org/project/dpdk/patch/20231105054539.22303-2-fengcheng...@huawei.com/

[PATCH v2] vhost: fix deadlock during software live migration of VDPA in a nested virtualization environment

2024-01-21 Thread Hao Chen
In a nested virtualization environment, running dpdk-vdpa in QEMU-L1 for software live migration will result in a deadlock between dpdke-vdpa and QEMU-L2 processes. 'rte_vdpa_relay_vring_used'-> '__vhost_iova_to_vva'-> 'vhost_user_iotlb_rd_unlock(vq)'-> 'vhost_user_iotlb_miss'-> send vhost message

RE: [PATCH v4 1/1] ethdev: parsing multiple representor devargs string

2024-01-21 Thread Chaoyong He
> -Original Message- > From: Harman Kalra > Sent: Monday, January 22, 2024 3:19 AM > To: dev@dpdk.org; Thomas Monjalon ; Ferruh Yigit > ; Andrew Rybchenko > ; Ajit Khaparde > ; Somnath Kotur > ; John Daley ; Hyong > Youb Kim ; Yuying Zhang ; > Beilei Xing ; Qiming Yang ; Qi > Zhang ; We

RE: [EXT] Re: [PATCH v3 1/1] ethdev: parsing multiple representor devargs string

2024-01-21 Thread Harman Kalra
Hi Andrew, Thanks for the review comments. Please see responses inline. Kindly review V4 as well. > -Original Message- > > @@ -459,9 +460,23 @@ eth_dev_devargs_tokenise(struct rte_kvargs > *arglist, const char *str_in) > > break; > > > > case 3: /* Pars

[PATCH v4 1/1] ethdev: parsing multiple representor devargs string

2024-01-21 Thread Harman Kalra
Adding support for parsing multiple representor devargs strings passed to a PCI BDF. There may be scenario where port representors for various PFs or VFs under PFs are required and all these are representor ports shall be backed by single pci device. In such case port representors can be created us

[PATCH v4 0/1] multiple representors in one device

2024-01-21 Thread Harman Kalra
Following series adds support to enable creation of multiple representors under one base device. There may be scenarios where port representors for multiple PFs or VFs under PF are required and all these representor ports created under a single pci device. Marvell CNXK port representor solution is

RE: [RFC] mbuf: performance optimization

2024-01-21 Thread Morten Brørup
> From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Sunday, 21 January 2024 18.08 > > On Sun, 21 Jan 2024 06:32:42 +0100 > Morten Brørup wrote: > > > I suppose that reducing mbuf->nb_segs from 16 to 8 bit is realistic, > considering that a maximum size IP packet (64 KB) is unli

Re: [RFC] mbuf: performance optimization

2024-01-21 Thread Stephen Hemminger
On Sun, 21 Jan 2024 06:32:42 +0100 Morten Brørup wrote: > I suppose that reducing mbuf->nb_segs from 16 to 8 bit is realistic, > considering that a maximum size IP packet (64 KB) is unlikely to use more > than 64 plus some segments. Does anyone know of any use case with more than > 255 segment

[PATCH v3 2/2] net/octeon_ep: add Rx NEON routine

2024-01-21 Thread pbhagavatula
From: Pavan Nikhilesh Add Rx ARM NEON SIMD routine. Signed-off-by: Pavan Nikhilesh --- drivers/net/octeon_ep/cnxk_ep_rx_neon.c | 140 drivers/net/octeon_ep/meson.build | 6 +- drivers/net/octeon_ep/otx_ep_ethdev.c | 5 +- drivers/net/octeon_ep/otx_ep_rxtx.h

[PATCH v3 1/2] net/octeon_ep: improve Rx performance

2024-01-21 Thread pbhagavatula
From: Pavan Nikhilesh Use mempool API instead of pktmbuf alloc to avoid mbuf reset as it will be done by rearm on receive. Reorder refill to avoid unnecessary write commits on mbuf data. Signed-off-by: Pavan Nikhilesh --- drivers/net/octeon_ep/cnxk_ep_rx.c | 4 +-- drivers/net/octeon_ep/c

[PATCH v3 2/2] event/cnxk: use WFE LDP loop for getwork routine

2024-01-21 Thread pbhagavatula
From: Pavan Nikhilesh Use WFE LDP loop while polling for GETWORK completion for better power savings. Disabled by default and can be enabled by configuring meson with -Dc_args='-DRTE_ARM_USE_WFE'. Signed-off-by: Pavan Nikhilesh --- doc/guides/eventdevs/cnxk.rst | 9 ++ drivers/event/c

[PATCH v3 1/2] config/arm: allow WFE to be enabled config time

2024-01-21 Thread pbhagavatula
From: Pavan Nikhilesh Allow RTE_ARM_USE_WFE to be enabled at meson configuration time by passing it via c_args instead of modifying `config/arm/meson.build`. Example usage: meson build -Dc_args='-DRTE_ARM_USE_WFE' \ --cross-file config/arm/arm64_cn10k_linux_gcc Signed-off-by: Pavan Nik

[PATCH 2/2] config/arm: add support for fallback march

2024-01-21 Thread pbhagavatula
From: Pavan Nikhilesh Some ARM CPUs have specific march requirements and are not compatible with the supported march list. Add fallback march in case the mcpu and the march advertised in the part_number_config are not supported by the compiler. Example mcpu = neoverse-n2 march =

[PATCH 1/2] config/arm: avoid mcpu and march conflicts

2024-01-21 Thread pbhagavatula
From: Pavan Nikhilesh The compiler options march and mtune are a subset of mcpu and will lead to conflicts if improper march is chosen for a given mcpu. To avoid conflicts, force part number march when mcpu is available and is supported by the compiler. Example: march = armv9-a m

RE: [RFC] ethdev: introduce entropy calculation

2024-01-21 Thread Ori Kam
Hi Andrew, > -Original Message- > From: Andrew Rybchenko > Sent: Friday, January 12, 2024 9:46 AM > To: Ori Kam ; Dariusz Sosnowski > ; ferruh.yi...@amd.com; > cristian.dumitre...@intel.com; NBU-Contact-Thomas Monjalon (EXTERNAL) > > Cc: dev@dpdk.org; Raslan Darawsheh > Subject: Re: [RF