Re: [PATCH 1/2] eventdev: add bulk type event ring operations

2023-04-04 Thread Jerin Jacob
On Mon, Apr 3, 2023 at 6:49 PM Mattias Rönnblom wrote: > > Introduce bulk enqueue and dequeue operations into the > API, to supplement the already-existing burst > calls. > > Signed-off-by: Mattias Rönnblom Looks good to me. As the original author adding @Richardson, Bruce for review. > ---

Re: [dpdk-dev] [PATCH 1/2] common/cnxk: support SPI to SA translation action

2023-04-04 Thread Jerin Jacob
On Mon, Mar 13, 2023 at 10:54 AM wrote: > > From: Kiran Kumar K > > Support SPI to SA index translation action with > SPI bits MS_28_25. > > Signed-off-by: Kiran Kumar K > Reviewed-by: Satheesh Paul > Reviewed-by: Nithin Dabilpuram Applied to dpdk-next-net-mrvl/for-next-net. Thanks > --- >

RE: [RFC v2 2/2] eal: add high-performance timer facility

2023-04-04 Thread Morten Brørup
> From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] > Sent: Monday, 3 April 2023 14.04 > > On 2023-03-22 13:18, Morten Brørup wrote: > >> From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] > >> Sent: Wednesday, 15 March 2023 18.04 > > > >> +++ b/lib/htimer/rte_htimer.h > >>

RE: [PATCH v2] devtools: stop compiler atomics with no C11 equivalent

2023-04-04 Thread Morten Brørup
> From: Tyler Retzlaff [mailto:roret...@linux.microsoft.com] > Sent: Tuesday, 4 April 2023 02.22 > > Refrain from using compiler __atomic_{add,and,nand,or,sub,xor}_fetch() > to ease future adoption of C11 standard atomics. Seems I forgot to ack v1 when I commented it, so: Acked-by: Morten Brørup

Re: [PATCH v2 00/20] Enable lock annotations on most libraries and drivers

2023-04-04 Thread David Marchand
On Mon, Apr 3, 2023 at 5:37 PM Tyler Retzlaff wrote: > > On Mon, Apr 03, 2023 at 12:52:06PM +0200, David Marchand wrote: > > Hello Tyler, > > > > On Thu, Mar 2, 2023 at 9:52 AM David Marchand > > wrote: > > > On Mon, Feb 27, 2023 at 5:13 PM Gaëtan Rivet wrote: > > > > Ah ok, so if I understand

Re: [PATCH] net/hns3: fix build warning

2023-04-04 Thread Dongdong Liu
Hi Jerin Many thanks for fixing the warning. On 2023/4/4 14:55, jer...@marvell.com wrote: From: Jerin Jacob aarch64 gcc 12.2.0 build complain with below warning[1]. Move the new_link initialization upwards to fix the warning. Compiling C object drivers/libtmp_rte_net_hns3.a.p/net_hns3_hns3_et

Re: [PATCH v8 0/3] eal: provide abstracted bit counting functions

2023-04-04 Thread Bruce Richardson
On Mon, Apr 03, 2023 at 05:11:55PM -0700, Tyler Retzlaff wrote: > As discussed technical board meeting 2023-02-22 > http://mails.dpdk.org/archives/dev/2023-February/263516.html > > We will bring support in pieces for the MSVC compiler, there will be > some abstractions and functions introduced bef

Re: [PATCH 1/2] telemetry: use malloc instead of variable length array

2023-04-04 Thread Bruce Richardson
On Mon, Apr 03, 2023 at 01:19:12PM -0700, Stephen Hemminger wrote: > On Mon, 3 Apr 2023 09:30:23 -0700 > Tyler Retzlaff wrote: > > > __json_snprintf(char *buf, const int len, const char *format, ...) > > { > > - char tmp[len]; > > + char *tmp = malloc(len); > > va_list ap; > > - int

Re: [PATCH v3] telemetry: use portable syntax to initialize array

2023-04-04 Thread Bruce Richardson
On Mon, Apr 03, 2023 at 11:59:25AM -0700, Tyler Retzlaff wrote: > Use of ranges in designated initialization are a non-standard gcc > extension. Use loops to initialize permitted characters on first use. > > Signed-off-by: Tyler Retzlaff Acked-by: Bruce Richardson > --- > lib/telemetry/teleme

Re: [PATCH 3/9] eal: use barrier intrinsics when compiling with msvc

2023-04-04 Thread Bruce Richardson
On Mon, Apr 03, 2023 at 02:52:25PM -0700, Tyler Retzlaff wrote: > Inline assembly is not supported for msvc x64 instead use > _{Read,Write,ReadWrite}Barrier() intrinsics. > > Signed-off-by: Tyler Retzlaff > --- > lib/eal/include/generic/rte_atomic.h | 4 > lib/eal/x86/include/rte_atomic.h

RE: [PATCH v3] telemetry: use portable syntax to initialize array

2023-04-04 Thread Konstantin Ananyev
> -Original Message- > From: Tyler Retzlaff > Sent: Monday, April 3, 2023 7:59 PM > To: dev@dpdk.org > Cc: ciara.po...@intel.com; bruce.richard...@intel.com; > david.march...@redhat.com; tho...@monjalon.net; Tyler Retzlaff > > Subject: [PATCH v3] telemetry: use portable syntax to init

Re: [PATCH v1 1/1] eventdev/eth_rx: add event buf size and count in telemetry

2023-04-04 Thread Jerin Jacob
On Thu, Mar 23, 2023 at 2:28 PM Ganapati Kundapura wrote: > > rx_event_buf_count and rx_event_buf_size is added to structure > rte_event_eth_rx_adapter_stats but they are not displayed in > rxa_stats telemetry handler. > > Updated handle_rxa_stats() to display rx_event_buf_count and > rx_event_buf

Re: [PATCH v1 1/1] eventdev/eth_rx: add event buf size and count in telemetry

2023-04-04 Thread Jerin Jacob
On Tue, Apr 4, 2023 at 4:19 PM Jerin Jacob wrote: > > On Thu, Mar 23, 2023 at 2:28 PM Ganapati Kundapura > wrote: > > > > rx_event_buf_count and rx_event_buf_size is added to structure > > rte_event_eth_rx_adapter_stats but they are not displayed in > > rxa_stats telemetry handler. > > > > Update

Re: [PATCH v2] eventdev/timer: fix timeout event wait behavior

2023-04-04 Thread Jerin Jacob
On Tue, Mar 21, 2023 at 10:51 AM Shijith Thotton wrote: > > Improved the accuracy and consistency of timeout event wait behavior by > refactoring it. Previously, the delay function used for waiting could be > inaccurate, leading to inconsistent results. This commit updates the > wait behavior to u

Re: [PATCH v1 1/2] dts: fabric requirements

2023-04-04 Thread Juraj Linkeš
On Mon, Apr 3, 2023 at 5:18 PM Thomas Monjalon wrote: > 03/04/2023 16:56, Juraj Linkeš: > > On Mon, Apr 3, 2023 at 2:33 PM Thomas Monjalon > wrote: > > > > > 03/04/2023 13:46, Juraj Linkeš: > > > > Replace pexpect with Fabric. > > > > > > You should squash these lines with the move to Fabric. >

RE: [PATCH 3/9] eal: use barrier intrinsics when compiling with msvc

2023-04-04 Thread Konstantin Ananyev
> Inline assembly is not supported for msvc x64 instead use > _{Read,Write,ReadWrite}Barrier() intrinsics. > > Signed-off-by: Tyler Retzlaff > --- > lib/eal/include/generic/rte_atomic.h | 4 > lib/eal/x86/include/rte_atomic.h | 10 +- > 2 files changed, 13 insertions(+), 1 d

[PATCH] devtools: suppress checkpatch warning on some kernel macro

2023-04-04 Thread David Marchand
Kernel checkpatch.pl is confused about RTE_BUILD_BUG_ON() and warns as if our code was calling the kernel macro BUG_ON(). This does not make sense in the DPDK userspace code and the Linux kernel module hosted in our repository (kernel/linux/kni) won't make it upstream. Disable this warning. Sign

[PATCH v3 01/16] malloc: rework heap destroy

2023-04-04 Thread David Marchand
The destroy helper has been reworked to zero all the heap object but leave the lock untouched. The heap lock is then released through the standard API. Signed-off-by: David Marchand --- Changes since v2: - shrinked the change to the required part, --- lib/eal/common/malloc_heap.c | 6 -- li

[PATCH v3 00/16] Enable lock annotations on most libraries and drivers

2023-04-04 Thread David Marchand
This is a followup of the series that introduced lock annotations. I reworked and made annotations work in what seemed the easier cases. In most cases, I chose to convert inline wrappers around the EAL lock API to simple macro: I did not see much value in those wrappers and this is way simpler than

[PATCH v3 02/16] mem: rework malloc heap init

2023-04-04 Thread David Marchand
rte_eal_memory_init() and rte_eal_malloc_heap_init() must be called in a common section taking rte_mcfg_mem_read_lock(). Split rte_eal_malloc_heap_init() in two so that the mem lock is taken in rte_eal_init() making lock checks trivial (once annotated in the next patch). Signed-off-by: David March

[PATCH v3 03/16] mem: annotate shared memory config locks

2023-04-04 Thread David Marchand
Expose internal locks via some internal accessors. Then annotate rte_mcfg_xxx_(read|write)_(|un)lock. Signed-off-by: David Marchand --- lib/eal/common/eal_common_mcfg.c| 66 + lib/eal/include/rte_eal_memconfig.h | 63 +-- lib/eal/version.ma

[PATCH v3 04/16] hash: annotate cuckoo hash lock

2023-04-04 Thread David Marchand
__hash_rw_(reader|writer)_(|un)lock helpers take locks depending on conditions that are fixed at the rte_hash object initialisation. So we can tell clang that those helpers unconditionally take/release those locks (and waive the lock check on their implementation). Signed-off-by: David Marchand -

[PATCH v3 05/16] graph: annotate graph lock

2023-04-04 Thread David Marchand
Export internal lock and annotate associated helper. Signed-off-by: David Marchand --- lib/graph/graph.c | 10 -- lib/graph/graph_private.h | 10 -- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lib/graph/graph.c b/lib/graph/graph.c index a839a2803b..558

[PATCH v3 07/16] net/cxgbe: inherit lock annotations

2023-04-04 Thread David Marchand
Due to clang limitation, inline helpers don't inherit lock annotations from the EAL lock API. Replace them with macros. Signed-off-by: David Marchand --- drivers/net/cxgbe/base/adapter.h | 35 +++- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/drivers

[PATCH v3 08/16] net/fm10k: annotate mailbox lock

2023-04-04 Thread David Marchand
Expose requirements for helpers dealing with the FM10K_DEV_PRIVATE_TO_MBXLOCK(hw->back) lock. Signed-off-by: David Marchand --- drivers/net/fm10k/fm10k_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 8b83063

[PATCH v3 09/16] net/sfc: rework locking in proxy code

2023-04-04 Thread David Marchand
Remove one extra layer for proxy code: sfc_get_adapter_by_pf_port_id() now only resolves the sa object. sfc_adapter_(|un)lock() are added were necessary. This will simplify lock checks later. Signed-off-by: David Marchand --- drivers/net/sfc/sfc_repr_proxy.c | 59 ---

[PATCH v3 10/16] net/sfc: inherit lock annotations

2023-04-04 Thread David Marchand
Due to clang limitation, inline helpers don't inherit lock annotations from the EAL lock API. Replace them with macros. One additional change is required in sfc_ev_qpoll() so that clang does see the same lock is being manipulated. Signed-off-by: David Marchand --- drivers/net/sfc/sfc.h | 4

[PATCH v3 11/16] net/virtio: rework guest announce notify helper

2023-04-04 Thread David Marchand
Inline existing helpers virtio_dev_(pause|resume) into virtio_notify_peers(). This makes the lock check on hw->state_lock trivial. Signed-off-by: David Marchand --- drivers/net/virtio/virtio_ethdev.c | 75 -- drivers/net/virtio/virtio_ethdev.h | 4 -- 2 files changed

[PATCH v3 12/16] raw/ifpga: inherit lock annotations

2023-04-04 Thread David Marchand
The checks in those helpers are useless: - all (start/stop/reset/test) callers ensure that dev != NULL, - dev->sd can't be NULL either as it would mean the application is calling those helpers for a dev pointer that did not pass initialisation, Once the checks are removed, the only thing that re

[PATCH v3 13/16] vdpa/sfc: inherit lock annotations

2023-04-04 Thread David Marchand
Due to clang limitation, inline helpers don't inherit lock annotations from the EAL lock API. Replace them with macros. sfc_vdpa_ops.c was relying on an implicit cast of the dev_handle to a vdpa adapter object. Add an explicit conversion. Signed-off-by: David Marchand --- drivers/vdpa/sfc/sfc_v

[PATCH v3 14/16] net/failsafe: fix mutex locking

2023-04-04 Thread David Marchand
The pthread mutex API describes cases where locking might fail. Check fts_enter wrapper return code. Signed-off-by: David Marchand Acked-by: Gaetan Rivet --- drivers/net/failsafe/failsafe_ether.c | 3 +- drivers/net/failsafe/failsafe_flow.c | 23 +++-- drivers/net/failsafe/failsafe_ops.c

[PATCH v3 15/16] eal/windows: disable lock check on alarm code

2023-04-04 Thread David Marchand
This code uses locks to implement synchronisation between two threads. There seems nothing wrong with it, just silence the clang lock check. Signed-off-by: David Marchand --- lib/eal/windows/eal_alarm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/eal/windows/eal_alarm.c b/lib/eal/w

[PATCH v3 16/16] enable lock check

2023-04-04 Thread David Marchand
Now that a lot of components can be compiled with the lock checks, invert the logic and opt out for components not ready yet: - drivers/bus/dpaa, - drivers/common/cnxk, - drivers/common/mlx5, - drivers/event/cnxk, - drivers/net/bnx2x, - drivers/net/bnxt, - drivers/net/cnxk, - drivers/net/enic, - dr

[PATCH v3 06/16] drivers: inherit lock annotations for Intel drivers

2023-04-04 Thread David Marchand
Due to clang limitation, inline helpers don't inherit lock annotations from the EAL lock API. Replace them with macros. Signed-off-by: David Marchand --- drivers/common/iavf/iavf_osdep.h | 39 ++ drivers/common/iavf/iavf_prototype.h | 6 drivers/common/idpf/

Re: [PATCH] devtools: suppress checkpatch warning on some kernel macro

2023-04-04 Thread Ferruh Yigit
On 4/4/2023 1:36 PM, David Marchand wrote: > Kernel checkpatch.pl is confused about RTE_BUILD_BUG_ON() and warns as if > our code was calling the kernel macro BUG_ON(). > > This does not make sense in the DPDK userspace code and the Linux kernel > module hosted in our repository (kernel/linux/kni)

[PATCH v3 0/2] refine common module

2023-04-04 Thread beilei . xing
From: Beilei Xing Refine common module to support different configuration for different PMDs. V3 changes: - refine capability get. Beilei Xing (2): common/idpf: move PF specific functions from common init common/idpf: refine capability get drivers/common/idpf/idpf_common_device.c | 72

[PATCH v3 1/2] common/idpf: move PF specific functions from common init

2023-04-04 Thread beilei . xing
From: Beilei Xing Move PF reset and PF mailbox initialization functions from idpf_adapter_init function to _adapter_ext_init function, since they're different between PF and VF support. Signed-off-by: Beilei Xing --- drivers/common/idpf/idpf_common_device.c | 72 +--- d

[PATCH v3 2/2] common/idpf: refine capability get

2023-04-04 Thread beilei . xing
From: Beilei Xing Initialize required capability in PMD, and refine idpf_vc_caps_get function. Then different PMDs can require different capability. Signed-off-by: Beilei Xing --- drivers/common/idpf/idpf_common_virtchnl.c | 45 ++ drivers/net/cpfl/cpfl_ethdev.c

[PATCH v2] net/idpf: add VF support

2023-04-04 Thread beilei . xing
From: Beilei Xing Support VF whose device id is 0x145c. Signed-off-by: Beilei Xing --- v2 change: - Rebase code based on new patchset: https://patches.dpdk.org/project/dpdk/cover/20230404124112.71703-1-beilei.x...@intel.com/ drivers/net/idpf/idpf_ethdev.c | 89 ++

Re: [PATCH] eal/x86: remove redundant round to improve performance

2023-04-04 Thread David Marchand
On Wed, Mar 29, 2023 at 11:17 AM Leyi Rong wrote: > > In rte_memcpy_aligned(), one redundant round is taken in the 64 bytes > block copy loops if the size is a multiple of 64. So, let the catch-up > copy the last 64 bytes in this case. Fixes: f5472703c0bd ("eal: optimize aligned memcpy on x86")

Re: [PATCH] devtools: suppress checkpatch warning on some kernel macro

2023-04-04 Thread David Marchand
On Tue, Apr 4, 2023 at 3:01 PM Ferruh Yigit wrote: > > On 4/4/2023 1:36 PM, David Marchand wrote: > > Kernel checkpatch.pl is confused about RTE_BUILD_BUG_ON() and warns as if > > our code was calling the kernel macro BUG_ON(). > > > > This does not make sense in the DPDK userspace code and the Li

RE: [PATCH v7 4/4] eal: add nonnull and access function attributes

2023-04-04 Thread Morten Brørup
> From: Morten Brørup [mailto:m...@smartsharesystems.com] > Sent: Monday, 16 January 2023 14.07 > > Add nonnull function attribute to help the compiler detect a NULL > pointer being passed to a function not accepting NULL pointers as an > argument at build time. > > Add access function attributes

Re: [PATCH v7 4/4] eal: add nonnull and access function attributes

2023-04-04 Thread David Marchand
Hello Morten, On Tue, Apr 4, 2023 at 3:42 PM Morten Brørup wrote: > > Add nonnull function attribute to help the compiler detect a NULL > > pointer being passed to a function not accepting NULL pointers as an > > argument at build time. > > > > Add access function attributes to tell the compiler

RE: [PATCH v7 4/4] eal: add nonnull and access function attributes

2023-04-04 Thread Morten Brørup
> From: David Marchand [mailto:david.march...@redhat.com] > Sent: Tuesday, 4 April 2023 15.51 > > Hello Morten, > > On Tue, Apr 4, 2023 at 3:42 PM Morten Brørup > wrote: > > > Add nonnull function attribute to help the compiler detect a NULL > > > pointer being passed to a function not acceptin

[PATCH v1 0/9] extend octeon ep driver functionality

2023-04-04 Thread Sathesh Edara
This patch set adds the following support to octeon_ep driver - extends support for newer SoCs - support new features like IQ/OQ reset, ISM, mailbox between VF and PF and sets the watermark level for output queues. Sathesh Edara (9): net/octeon_ep: support cnf95n and cnf95o SoC net/octeon_ep:

[PATCH v1 1/9] net/octeon_ep: support cnf95n and cnf95o SoC

2023-04-04 Thread Sathesh Edara
This patch adds the required functionality in the Octeon endpoint driver to support the cnf95n and cnf95o endpoint device. Signed-off-by: Sathesh Edara --- drivers/net/octeon_ep/otx2_ep_vf.h| 2 ++ drivers/net/octeon_ep/otx_ep_ethdev.c | 13 +++-- 2 files changed, 13 insertions(+),

[PATCH v1 2/9] net/octeon_ep: support CNX10K series SoC

2023-04-04 Thread Sathesh Edara
This patch adds the required functionality in the Octeon endpoint driver to support the following CNX10K series endpoint devices. - CN10KA - CN10KB - CNF10KA - CNF10KB Signed-off-by: Sathesh Edara --- drivers/net/octeon_ep/cnxk_ep_vf.h| 5 - drivers/net/octeon_ep/otx_ep_ethdev.c | 21 ++

[PATCH v1 3/9] net/octeon_ep: support error propagation

2023-04-04 Thread Sathesh Edara
This patch adds detection of loop limits being hit, and propagate errors up the call chain when this happens. Signed-off-by: Sathesh Edara --- drivers/net/octeon_ep/cnxk_ep_vf.c| 51 +++ drivers/net/octeon_ep/otx2_ep_vf.c| 49 ++ drivers/net/octeon_ep/otx

[PATCH v1 4/9] net/octeon_ep: support IQ/OQ reset

2023-04-04 Thread Sathesh Edara
This patch adds input and output queue reset functionality, also receive queue interrupt enable and disable functionality. Signed-off-by: Sathesh Edara --- drivers/net/octeon_ep/otx2_ep_vf.c| 193 +- drivers/net/octeon_ep/otx2_ep_vf.h| 61 ++-- drivers/net/oc

[PATCH v1 6/9] net/octeon_ep: fix DMA incompletion

2023-04-04 Thread Sathesh Edara
This patch fixes the DMA incompletion during packet reads. Signed-off-by: Sathesh Edara --- drivers/net/octeon_ep/otx_ep_common.h | 8 drivers/net/octeon_ep/otx_ep_rxtx.c | 4 2 files changed, 12 insertions(+) diff --git a/drivers/net/octeon_ep/otx_ep_common.h b/drivers/net/oct

[PATCH v1 5/9] net/octeon_ep: support ISM

2023-04-04 Thread Sathesh Edara
This patch adds ISM specific functionality. Signed-off-by: Sathesh Edara --- drivers/net/octeon_ep/cnxk_ep_vf.c| 34 ++-- drivers/net/octeon_ep/cnxk_ep_vf.h| 12 ++ drivers/net/octeon_ep/otx2_ep_vf.c| 45 ++--- drivers/net/octeon_ep/otx2_ep_vf.h| 1

[PATCH v1 7/9] net/octeon_ep: update queue size checks

2023-04-04 Thread Sathesh Edara
This patch updates the output queue size checks to ensure that queue is larger than backpressure watermark.Add setting of default queue sizes to the minimum so that applications like testpmd can be started without explicit queue size arguments. Signed-off-by: Sathesh Edara --- drivers/net/octeon

[PATCH v1 9/9] net/octeon_ep: set watermark for output queues

2023-04-04 Thread Sathesh Edara
This patch sets the watermark level for SDP output queues to send backpressure to NIX, when available Rx buffers fall below watermark. Signed-off-by: Sathesh Edara --- drivers/net/octeon_ep/cnxk_ep_vf.c| 7 ++- drivers/net/octeon_ep/otx_ep_common.h | 1 + 2 files changed, 7 insertions(+)

[PATCH v1 8/9] net/octeon_ep: support Mailbox between VF and PF

2023-04-04 Thread Sathesh Edara
This patch adds the mailbox communication between VF and PF and supports the following mailbox messages. - Get and set MAC address - Get link information - Get stats - Get and set link status - Set and get MTU - Send notification to PF Signed-off-by: Sathesh Edara --- drivers/net/octeon_ep/cnxk

Re: [PATCH v7 4/4] eal: add nonnull and access function attributes

2023-04-04 Thread David Marchand
On Tue, Apr 4, 2023 at 4:02 PM Morten Brørup wrote: > > Btw, those were marked as "awaiting upstream", so I suspect someone > > (you maybe?) changed their state manually. > > This state is something used between subtree maintainers and main > > repository. > > Yes, I changed their state, trying t

RE: [PATCH v2] vfio: do not coalesce DMA mappings

2023-04-04 Thread Gupta, Nipun
Hi David, As the DPDK 23.03 release is out can we have a relook at this change? Thanks, Nipun > -Original Message- > From: Gupta, Nipun > Sent: Tuesday, February 7, 2023 2:27 PM > To: David Marchand ; > anatoly.bura...@intel.com > Cc: dev@dpdk.org; tho...@monjalon.net; Yigit, Ferr

RE: [PATCH 3/9] eal: use barrier intrinsics when compiling with msvc

2023-04-04 Thread Morten Brørup
> From: Konstantin Ananyev [mailto:konstantin.anan...@huawei.com] > Sent: Tuesday, 4 April 2023 14.11 [...] > Another ore generic comment - do we really need to pollute all that code with > RTE_TOOLCHAIN_MSVC ifdefs? > Right now we have ability to have subdir per arch (x86/arm/etc.). > Can we tre

Re: [PATCH v2] vfio: do not coalesce DMA mappings

2023-04-04 Thread Burakov, Anatoly
On 2/7/2023 8:56 AM, Gupta, Nipun wrote: [AMD Official Use Only - General] Hi David, I agree that change is not straightforward to review, but it should not cause any functional issue as we are still creating all the memory mappings, but one by one for each segment. For hot plug case this cau

Re: [PATCH 3/9] eal: use barrier intrinsics when compiling with msvc

2023-04-04 Thread Tyler Retzlaff
On Tue, Apr 04, 2023 at 09:53:21AM +0100, Bruce Richardson wrote: > On Mon, Apr 03, 2023 at 02:52:25PM -0700, Tyler Retzlaff wrote: > > Inline assembly is not supported for msvc x64 instead use > > _{Read,Write,ReadWrite}Barrier() intrinsics. > > > > Signed-off-by: Tyler Retzlaff > > --- > > lib

Re: [PATCH 3/9] eal: use barrier intrinsics when compiling with msvc

2023-04-04 Thread Tyler Retzlaff
On Tue, Apr 04, 2023 at 12:11:07PM +, Konstantin Ananyev wrote: > > > > Inline assembly is not supported for msvc x64 instead use > > _{Read,Write,ReadWrite}Barrier() intrinsics. > > > > Signed-off-by: Tyler Retzlaff > > --- > > lib/eal/include/generic/rte_atomic.h | 4 > > lib/eal/x

Re: [PATCH] net/af_xdp: make compatible with libbpf v0.8.0

2023-04-04 Thread Kevin Traynor
On 21/12/2022 09:28, Kevin Traynor wrote: On 21/12/2022 06:09, Andrew Rybchenko wrote: Hi Kevin, On 12/20/22 17:05, Kevin Traynor wrote: On 24/06/2022 11:23, Ciara Loftus wrote: libbpf v0.8.0 deprecates the bpf_get_link_xdp_id and bpf_set_link_xdp_fd functions. Use meson to detect if libbpf >

Re: [PATCH v3] telemetry: use portable syntax to initialize array

2023-04-04 Thread Tyler Retzlaff
On Tue, Apr 04, 2023 at 09:51:04AM +0100, Bruce Richardson wrote: > On Mon, Apr 03, 2023 at 11:59:25AM -0700, Tyler Retzlaff wrote: > > Use of ranges in designated initialization are a non-standard gcc > > extension. Use loops to initialize permitted characters on first use. > > > > Signed-off-by:

Re: [PATCH v3] telemetry: use portable syntax to initialize array

2023-04-04 Thread Tyler Retzlaff
On Tue, Apr 04, 2023 at 09:01:50AM +, Konstantin Ananyev wrote: > > > > -Original Message- > > From: Tyler Retzlaff > > Sent: Monday, April 3, 2023 7:59 PM > > To: dev@dpdk.org > > Cc: ciara.po...@intel.com; bruce.richard...@intel.com; > > david.march...@redhat.com; tho...@monjalon.

Re: [PATCH v3 15/16] eal/windows: disable lock check on alarm code

2023-04-04 Thread Tyler Retzlaff
On Tue, Apr 04, 2023 at 02:48:39PM +0200, David Marchand wrote: > This code uses locks to implement synchronisation between two threads. > There seems nothing wrong with it, just silence the clang lock check. > > Signed-off-by: David Marchand > --- Acked-by: Tyler Retzlaff

Re: [PATCH v3] telemetry: use portable syntax to initialize array

2023-04-04 Thread Bruce Richardson
On Tue, Apr 04, 2023 at 08:54:30AM -0700, Tyler Retzlaff wrote: > On Tue, Apr 04, 2023 at 09:51:04AM +0100, Bruce Richardson wrote: > > On Mon, Apr 03, 2023 at 11:59:25AM -0700, Tyler Retzlaff wrote: > > > Use of ranges in designated initialization are a non-standard gcc > > > extension. Use loops

Re: [PATCH v3] telemetry: use portable syntax to initialize array

2023-04-04 Thread Bruce Richardson
On Tue, Apr 04, 2023 at 08:59:06AM -0700, Tyler Retzlaff wrote: > On Tue, Apr 04, 2023 at 09:01:50AM +, Konstantin Ananyev wrote: > > > > > > > -Original Message- > > > From: Tyler Retzlaff > > > Sent: Monday, April 3, 2023 7:59 PM > > > To: dev@dpdk.org > > > Cc: ciara.po...@intel.c

Re: [PATCH 3/9] eal: use barrier intrinsics when compiling with msvc

2023-04-04 Thread Bruce Richardson
On Tue, Apr 04, 2023 at 08:43:01AM -0700, Tyler Retzlaff wrote: > On Tue, Apr 04, 2023 at 09:53:21AM +0100, Bruce Richardson wrote: > > On Mon, Apr 03, 2023 at 02:52:25PM -0700, Tyler Retzlaff wrote: > > > Inline assembly is not supported for msvc x64 instead use > > > _{Read,Write,ReadWrite}Barrie

Re: [PATCH 1/2] telemetry: use malloc instead of variable length array

2023-04-04 Thread Tyler Retzlaff
On Tue, Apr 04, 2023 at 09:47:21AM +0100, Bruce Richardson wrote: > On Mon, Apr 03, 2023 at 01:19:12PM -0700, Stephen Hemminger wrote: > > On Mon, 3 Apr 2023 09:30:23 -0700 > > Tyler Retzlaff wrote: > > > > > __json_snprintf(char *buf, const int len, const char *format, ...) > > > { > > > - ch

Re: [PATCH 1/2] telemetry: use malloc instead of variable length array

2023-04-04 Thread Bruce Richardson
On Tue, Apr 04, 2023 at 09:24:44AM -0700, Tyler Retzlaff wrote: > On Tue, Apr 04, 2023 at 09:47:21AM +0100, Bruce Richardson wrote: > > On Mon, Apr 03, 2023 at 01:19:12PM -0700, Stephen Hemminger wrote: > > > On Mon, 3 Apr 2023 09:30:23 -0700 > > > Tyler Retzlaff wrote: > > > > > > > __json_snp

Re: [PATCH v3] telemetry: use portable syntax to initialize array

2023-04-04 Thread Tyler Retzlaff
On Tue, Apr 04, 2023 at 05:19:26PM +0100, Bruce Richardson wrote: > On Tue, Apr 04, 2023 at 08:59:06AM -0700, Tyler Retzlaff wrote: > > On Tue, Apr 04, 2023 at 09:01:50AM +, Konstantin Ananyev wrote: > > > > > > > > > > -Original Message- > > > > From: Tyler Retzlaff > > > > Sent: Mo

Re: [PATCH v2] vfio: do not coalesce DMA mappings

2023-04-04 Thread Nipun Gupta
On 4/4/2023 8:43 PM, Burakov, Anatoly wrote: Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. On 2/7/2023 8:56 AM, Gupta, Nipun wrote: [AMD Official Use Only - General] Hi David, I agree that change is n

Re: [PATCH 3/9] eal: use barrier intrinsics when compiling with msvc

2023-04-04 Thread Tyler Retzlaff
On Tue, Apr 04, 2023 at 05:23:07PM +0100, Bruce Richardson wrote: > On Tue, Apr 04, 2023 at 08:43:01AM -0700, Tyler Retzlaff wrote: > > On Tue, Apr 04, 2023 at 09:53:21AM +0100, Bruce Richardson wrote: > > > On Mon, Apr 03, 2023 at 02:52:25PM -0700, Tyler Retzlaff wrote: > > > > Inline assembly is

Re: [PATCH 1/2] telemetry: use malloc instead of variable length array

2023-04-04 Thread Tyler Retzlaff
On Tue, Apr 04, 2023 at 05:28:29PM +0100, Bruce Richardson wrote: > On Tue, Apr 04, 2023 at 09:24:44AM -0700, Tyler Retzlaff wrote: > > On Tue, Apr 04, 2023 at 09:47:21AM +0100, Bruce Richardson wrote: > > > On Mon, Apr 03, 2023 at 01:19:12PM -0700, Stephen Hemminger wrote: > > > > On Mon, 3 Apr 2

Re: [PATCH 1/2] telemetry: use malloc instead of variable length array

2023-04-04 Thread Bruce Richardson
On Tue, Apr 04, 2023 at 09:44:46AM -0700, Tyler Retzlaff wrote: > On Tue, Apr 04, 2023 at 05:28:29PM +0100, Bruce Richardson wrote: > > On Tue, Apr 04, 2023 at 09:24:44AM -0700, Tyler Retzlaff wrote: > > > On Tue, Apr 04, 2023 at 09:47:21AM +0100, Bruce Richardson wrote: > > > > On Mon, Apr 03, 202

Re: [PATCH 1/2] telemetry: use malloc instead of variable length array

2023-04-04 Thread Tyler Retzlaff
On Tue, Apr 04, 2023 at 06:25:42PM +0100, Bruce Richardson wrote: > On Tue, Apr 04, 2023 at 09:44:46AM -0700, Tyler Retzlaff wrote: > > On Tue, Apr 04, 2023 at 05:28:29PM +0100, Bruce Richardson wrote: > > > On Tue, Apr 04, 2023 at 09:24:44AM -0700, Tyler Retzlaff wrote: > > > > On Tue, Apr 04, 202

[PATCH v4] telemetry: remove non-portable array initialization syntax

2023-04-04 Thread Tyler Retzlaff
Use of ranges in designated initialization are a non-standard gcc extension. Only initialize '_' and '/' elements of the array and filter tests of characters through name with standard C isalnum before checking the array. Suggested-by: Konstantin Ananyev Suggested-by: Bruce Richardson Signed-of

[PATCH v4] improve code portability

2023-04-04 Thread Tyler Retzlaff
Improve portability of telemetry code to allow it to be compiled by msvc unconditionally. Remove use of designated initialization ranges (gcc extension). Instead use a combination of a trivially initialized array and standard C isalnum. v4: * Re-implement using isalnum and sparsely populated ar

Reminder - DPDK Userspace Survey - deadline end of week

2023-04-04 Thread Nathan Southern
Dear DPDK Community, If you haven't yet responded to our Dublin 2023 Userspace Event Survey, a quick 5 question survey, please take the time to do so. Our deadline is the end of this coming weekend and this will be a significant factor in terms of determining the viability of this event. Here is

[PATCH v2 0/9] msvc integration changes

2023-04-04 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 v2 2/9] eal: use rtm and xtest intrinsics when compiling with msvc

2023-04-04 Thread Tyler Retzlaff
Inline assembly is not supported for msvc x64 instead use _xbegin, _xend, _xabort and _xtest intrinsics. Signed-off-by: Tyler Retzlaff --- lib/eal/x86/include/rte_rtm.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/lib/eal/x86/include/rte_rtm.h b/lib/eal/x86/include/rt

[PATCH v2 3/9] eal: use barrier intrinsics when compiling with msvc

2023-04-04 Thread Tyler Retzlaff
Inline assembly is not supported for msvc x64 instead use _mm_{s,l,m}fence() intrinsics. Signed-off-by: Tyler Retzlaff --- lib/eal/include/generic/rte_atomic.h | 4 lib/eal/x86/include/rte_atomic.h | 10 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/eal/

[PATCH v2 1/9] eal: use rdtsc intrinsic when compiling with msvc

2023-04-04 Thread Tyler Retzlaff
Inline assembly is not supported for msvc x64 instead use __rdtsc intrinsic. Signed-off-by: Tyler Retzlaff --- lib/eal/x86/include/rte_cycles.h | 8 1 file changed, 8 insertions(+) diff --git a/lib/eal/x86/include/rte_cycles.h b/lib/eal/x86/include/rte_cycles.h index a461a4d..0c142ce 1

[PATCH v2 4/9] eal: typedef cpu flag enum as int for msvc

2023-04-04 Thread Tyler Retzlaff
Forward declaration of a typedef is a non-standard extension and is not supported by msvc. Use an int instead. Abstract the use of the int/enum rte_cpu_flag_t in function parameter lists by re-typdefing the enum rte_cpu_flag_t to the rte_cpu_flag_t identifier. Remove the use of __extension__ on f

[PATCH v2 7/9] eal: exclude exposure of rte atomic APIs for MSVC builds

2023-04-04 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 --- lib/eal/include/generic/rte_atomic.h | 7 +++ lib/eal/x86/include/r

[PATCH v2 8/9] telemetry: disable json print formatting with msvc

2023-04-04 Thread Tyler Retzlaff
VLAs are unsafe and will never be implemented in MSVC. When compiling with MSVC just return immediately indicating 0 output characters formatted. For now telemetry doesn't work on Windows, we will revisit support for the telemetry library sometime after we establish the DPDK unit tests. Signed-of

[PATCH v2 5/9] eal: hide GCC extension based alignment markers

2023-04-04 Thread Tyler Retzlaff
When compiling with msvc don't expose typedefs used as alignment markers. Signed-off-by: Tyler Retzlaff --- 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..2f464e3 100644 --- a/lib/eal

[PATCH v2 9/9] telemetry: avoid expanding versioned symbol macros on msvc

2023-04-04 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 v2 6/9] eal: expand most macros to empty when using msvc

2023-04-04 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

Re: [PATCH v3 15/16] eal/windows: disable lock check on alarm code

2023-04-04 Thread Dmitry Kozlyuk
On Tue, Apr 4, 2023 at 3:49 PM David Marchand wrote: > > This code uses locks to implement synchronisation between two threads. > There seems nothing wrong with it, just silence the clang lock check. > > Signed-off-by: David Marchand Acked-by: Dmitry Kozlyuk

Re: [PATCH v2 1/2] eal: provide leading and trailing zero bit count abstraction

2023-04-04 Thread Tyler Retzlaff
On Thu, Jan 05, 2023 at 08:09:19AM +0100, Morten Brørup wrote: > > From: Tyler Retzlaff [mailto:roret...@linux.microsoft.com] > > Sent: Thursday, 24 November 2022 00.43 > > > > Provide an abstraction for leading and trailing zero bit counting > > functions to hide compiler specific intrinsics and

Re: [PATCH v2] devtools: add script to check for non inclusive naming

2023-04-04 Thread Luca Boccassi
On Mon, 2023-04-03 at 19:17 -0700, Stephen Hemminger wrote: > On Tue, 4 Apr 2023 00:08:30 +0100 > Luca Boccassi wrote: > > > On Mon, 3 Apr 2023 at 15:47, Stephen Hemminger > > wrote: > > > > > > Shell script to find use of words that not be used. > > > By default it prints matches. The -q (qui

Re: [PATCH 3/9] eal: use barrier intrinsics when compiling with msvc

2023-04-04 Thread Konstantin Ananyev
04/04/2023 16:49, Tyler Retzlaff пишет: On Tue, Apr 04, 2023 at 12:11:07PM +, Konstantin Ananyev wrote: Inline assembly is not supported for msvc x64 instead use _{Read,Write,ReadWrite}Barrier() intrinsics. Signed-off-by: Tyler Retzlaff --- lib/eal/include/generic/rte_atomic.h | 4 ++

Re: [PATCH 3/9] eal: use barrier intrinsics when compiling with msvc

2023-04-04 Thread Tyler Retzlaff
On Wed, Apr 05, 2023 at 12:49:21AM +0100, Konstantin Ananyev wrote: > 04/04/2023 16:49, Tyler Retzlaff пишет: > >On Tue, Apr 04, 2023 at 12:11:07PM +, Konstantin Ananyev wrote: > >> > >> > >>>Inline assembly is not supported for msvc x64 instead use > >>>_{Read,Write,ReadWrite}Barrier() intrins

RE: [RFC 0/1] ring: add callback infrastructire to ring library

2023-04-04 Thread Honnappa Nagarahalli
Hi Roxy, Thanks for the work, few questions inline. > -Original Message- > From: Rory Sexton > Sent: Thursday, March 23, 2023 6:38 AM > To: Honnappa Nagarahalli ; > konstantin.v.anan...@yandex.ru > Cc: dev@dpdk.org; Rory Sexton > Subject: [RFC 0/1] ring: add callback infrastructi

Re: [PATCH 1/2] telemetry: use malloc instead of variable length array

2023-04-04 Thread Stephen Hemminger
On Tue, 4 Apr 2023 09:47:21 +0100 Bruce Richardson wrote: > My suggestion is to use a combination of these methods. In json_snprintf > check if the input buffer is empty or has only one character in it, and use > method #2 if so. If that's not the case, then fallback to method #1 and do > a doubl

Re: [PATCH 1/2] telemetry: use malloc instead of variable length array

2023-04-04 Thread Stephen Hemminger
On Tue, 4 Apr 2023 10:34:01 -0700 Tyler Retzlaff wrote: > > > > I think suggestion #2 above should cover most cases, in which case using > > > > your original suggestion of malloc would be ok too for the rare case (if > > > > ever) where we don't just have one terminator on the end. > > > > >

Re: [PATCH v2] devtools: add script to check for non inclusive naming

2023-04-04 Thread Stephen Hemminger
On Tue, 04 Apr 2023 23:00:42 +0100 Luca Boccassi wrote: > > > > Ok, but that would mean using python and would also mean that terms like > > segreation which are not on the official list would not be caught > > No need for python, it can be done with 'jq' very easily. Also there's > 'segregat

Reminder - DPDK Techboard Meeting - Tomorrow 4/5 @ 8am PDT/11am EDT/1500h UTC

2023-04-04 Thread Nathan Southern
Good evening DPDK Community, Tomorrow DPDK will hold its biweekly tech board call at 8am PDT/11am EDT/1500h UTC. Agenda items will be posted here: https://annuel.framapad.org/p/r.0c3cc4d1e011214183872a98f6b5c7db And you can link to the meeting here: https://meet.jit.si/dpdk We look forward t