[PATCH 13/16] eal: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- lib/eal/include/rte_eal_paging.h| 5 + lib/eal/windows/include/rte_virt2phys.h | 5 + 2 files changed, 10 insertions(+) diff --git a/lib/eal/include/rte_eal_paging.h b/lib/eal/include/rte_eal_pa

[PATCH 16/16] pcapng: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- lib/pcapng/pcapng_proto.h | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/pcapng/pcapng_proto.h b/lib/pcapng/pcapng_proto.h index 47161d8a12..2e0c0e8cfd 100644 --- a/lib/pcapng/pcapng_proto.h +++ b/

[PATCH 15/16] hash: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- lib/hash/rte_cmp_arm64.h | 5 + lib/hash/rte_cmp_x86.h | 5 + 2 files changed, 10 insertions(+) diff --git a/lib/hash/rte_cmp_arm64.h b/lib/hash/rte_cmp_arm64.h index e9e26f9abd..aaad614d56 100644 ---

[PATCH 14/16] efd: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- lib/efd/rte_efd_x86.h | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/efd/rte_efd_x86.h b/lib/efd/rte_efd_x86.h index e2f9dcca88..fac74fa50b 100644 --- a/lib/efd/rte_efd_x86.h +++ b/lib/efd/rte_efd_

[PATCH 10/16] raw/ifpga/base: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/raw/ifpga/base/opae_at24_eeprom.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/raw/ifpga/base/opae_at24_eeprom.h b/drivers/raw/ifpga/base/opae_at24_eeprom.h index caae9a3ec1..6ba6933

[PATCH 11/16] kni: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- kernel/linux/kni/compat.h | 5 + lib/kni/rte_kni_fifo.h| 5 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h index 664785674f..087

[PATCH 12/16] acl: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. It should noted that there is an exceptional case: lib/acl/acl_run_avx512_common.h is designed to be included several times. Signed-off-by: Weiguo Li --- lib/acl/acl_run_altivec.h | 5 + lib/acl/acl_run_avx2.h | 5 + lib/acl/

[PATCH 09/16] net/virtio: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/net/virtio/virtio_rxtx_packed_avx.h | 5 + drivers/net/virtio/virtio_rxtx_packed_neon.h | 5 + 2 files changed, 10 insertions(+) diff --git a/drivers/net/virtio/virtio_rxtx_packed_avx.h b/driv

[PATCH 08/16] net/tap: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/net/tap/tap_bpf_insns.h | 5 + drivers/net/tap/tap_log.h | 5 + 2 files changed, 10 insertions(+) diff --git a/drivers/net/tap/tap_bpf_insns.h b/drivers/net/tap/tap_bpf_insns.h index 1a91b

[PATCH 07/16] net/qede: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/net/qede/base/reg_addr.h | 5 + drivers/net/qede/qede_sriov.h| 5 + 2 files changed, 10 insertions(+) diff --git a/drivers/net/qede/base/reg_addr.h b/drivers/net/qede/base/reg_addr.h index c

[PATCH 06/16] net/netvsc: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/net/netvsc/hn_nvs.h | 5 + drivers/net/netvsc/hn_rndis.h | 5 + drivers/net/netvsc/hn_var.h | 5 + 3 files changed, 15 insertions(+) diff --git a/drivers/net/netvsc/hn_nvs.h b/drivers/ne

[PATCH 04/16] net/enetfec: add define guards to avoid multiple inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/net/enetfec/enet_uio.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/enetfec/enet_uio.h b/drivers/net/enetfec/enet_uio.h index fec8ba6f95..0d5b9e7a39 100644 --- a/drivers/net/enetf

[PATCH 05/16] net/i40e: add define guards to avoid multiple inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/net/i40e/i40e_regs.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/i40e/i40e_regs.h b/drivers/net/i40e/i40e_regs.h index b19bb1d5a5..b3111dbf96 100644 --- a/drivers/net/i40e/i40e_r

[PATCH 02/16] event/octeontx: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/event/octeontx/timvf_worker.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/event/octeontx/timvf_worker.h b/drivers/event/octeontx/timvf_worker.h index 3f1e77f1d1..a99ff54245 100644 -

[PATCH 03/16] net/cxgbe: add define guards to avoid multiple inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/net/cxgbe/base/t4_regs.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/cxgbe/base/t4_regs.h b/drivers/net/cxgbe/base/t4_regs.h index 8a14d09a15..4952f7cde4 100644 --- a/drivers/net

[PATCH 01/16] bus/dpaa: add define guards to avoid multiple inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/bus/dpaa/base/qbman/qman.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/bus/dpaa/base/qbman/qman.h b/drivers/bus/dpaa/base/qbman/qman.h index 4346d86537..19be738424 100644 --- a/driv

Re: [PATCH v18 2/8] eal: add thread attributes

2022-02-05 Thread Tyler Retzlaff
On Sat, Feb 05, 2022 at 10:00:01AM +0100, Thomas Monjalon wrote: > 05/02/2022 05:41, Tyler Retzlaff: > > On Fri, Feb 04, 2022 at 07:21:10PM +, Ananyev, Konstantin wrote: > > > > +int > > > > +rte_thread_attr_init(rte_thread_attr_t *attr) > > > > +{ > > > > + RTE_VERIFY(attr != NULL); > >

[PATCH v3 10/10] app/testpmd: implement rte flow queue indirect actions

2022-02-05 Thread Alexander Kozyrev
Add testpmd support for the rte_flow_q_action_handle API. Provide the command line interface for operations dequeue. Usage example: flow queue 0 indirect_action 0 create action_id 9 ingress postpone yes action rss / end flow queue 0 indirect_action 0 update action_id 9 action queue inde

[PATCH v3 03/10] ethdev: bring in async queue-based flow rules operations

2022-02-05 Thread Alexander Kozyrev
A new, faster, queue-based flow rules management mechanism is needed for applications offloading rules inside the datapath. This asynchronous and lockless mechanism frees the CPU for further packet processing and reduces the performance impact of the flow rules creation/destruction on the datapath.

[PATCH v3 09/10] app/testpmd: implement rte flow pull operations

2022-02-05 Thread Alexander Kozyrev
Add testpmd support for the rte_flow_q_pull API. Provide the command line interface for pulling operations results. Usage example: flow pull 0 queue 0 Signed-off-by: Alexander Kozyrev --- app/test-pmd/cmdline_flow.c | 56 +++- app/test-pmd/config.c

[PATCH v3 08/10] app/testpmd: implement rte flow push operations

2022-02-05 Thread Alexander Kozyrev
Add testpmd support for the rte_flow_q_push API. Provide the command line interface for pushing operations. Usage example: flow queue 0 push 0 Signed-off-by: Alexander Kozyrev --- app/test-pmd/cmdline_flow.c | 56 - app/test-pmd/config.c

[PATCH v3 07/10] app/testpmd: implement rte flow queue flow operations

2022-02-05 Thread Alexander Kozyrev
Add testpmd support for the rte_flow_q_create/rte_flow_q_destroy API. Provide the command line interface for enqueueing flow creation/destruction operations. Usage example: testpmd> flow queue 0 create 0 postpone no table 6 pattern_template 0 actions_template 0 pattern eth d

[PATCH v3 06/10] app/testpmd: implement rte flow table management

2022-02-05 Thread Alexander Kozyrev
Add testpmd support for the rte_flow_table API. Provide the command line interface for the flow table creation/destruction. Usage example: testpmd> flow table 0 create table_id 6 group 9 priority 4 ingress mode 1 rules_number 64 pattern_template 2 actions_template 4 testpmd> flow table

[PATCH v3 05/10] app/testpmd: implement rte flow template management

2022-02-05 Thread Alexander Kozyrev
Add testpmd support for the rte_flow_pattern_template and rte_flow_actions_template APIs. Provide the command line interface for the template creation/destruction. Usage example: testpmd> flow pattern_template 0 create pattern_template_id 2 template eth dst is 00:16:3e:31:15:c3 / end

[PATCH v3 04/10] app/testpmd: implement rte flow configuration

2022-02-05 Thread Alexander Kozyrev
Add testpmd support for the rte_flow_configure API. Provide the command line interface for the Flow management. Usage example: flow configure 0 queues_number 8 queues_size 256 Implement rte_flow_info_get API to get available resources: Usage example: flow info 0 Signed-off-by: Alexander Kozyrev

[PATCH v3 02/10] ethdev: add flow item/action templates

2022-02-05 Thread Alexander Kozyrev
Treating every single flow rule as a completely independent and separate entity negatively impacts the flow rules insertion rate. Oftentimes in an application, many flow rules share a common structure (the same item mask and/or action list) so they can be grouped and classified together. This knowl

[PATCH v3 01/10] ethdev: introduce flow pre-configuration hints

2022-02-05 Thread Alexander Kozyrev
The flow rules creation/destruction at a large scale incurs a performance penalty and may negatively impact the packet processing when used as part of the datapath logic. This is mainly because software/hardware resources are allocated and prepared during the flow rule creation. In order to optimi

[PATCH v3 00/10] ethdev: datapath-focused flow rules management

2022-02-05 Thread Alexander Kozyrev
Three major changes to a generic RTE Flow API were implemented in order to speed up flow rule insertion/destruction and adapt the API to the needs of a datapath-focused flow rules management applications: 1. Pre-configuration hints. Application may give us some hints on what type of resources are

[PATCH 6/6] eventdev: remove C++ include guard from private header

2022-02-05 Thread Weiguo Li
The extern "C" declaration is useless in private header, as previous patch (http://dpdk.org/patch/98948) noted. This file contains only a half part of the include guard, just remove it. Fixes: d35e61322de52 ("eventdev: move inline APIs into separate structure") Cc: pbhagavat...@marvell.com Signed

[PATCH 5/6] eal/windows: fix the curly braces mismatch problem

2022-02-05 Thread Weiguo Li
Supplement the first half of braces for the extern "C" block Fixes: 99a2dd955fba6 ("lib: remove librte_ prefix from directory names") Cc: bruce.richard...@intel.com Signed-off-by: Weiguo Li --- lib/eal/windows/include/dirent.h | 4 1 file changed, 4 insertions(+) diff --git a/lib/eal/wind

[PATCH 4/6] net/dpaa2: fix the curly braces mismatch problem

2022-02-05 Thread Weiguo Li
Supplement the second half of braces for the extern "C" block Fixes: 72ec7a678e70 ("net/dpaa2: add soft parser driver") Cc: sunil.k...@nxp.com Signed-off-by: Weiguo Li --- drivers/net/dpaa2/dpaa2_sparser.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/dpaa2/dpaa2_sparser.

[PATCH 3/6] net/cxgbe: fix the curly braces mismatch problem

2022-02-05 Thread Weiguo Li
Supplement the second half of braces for the extern "C" block Fixes: 3bd122eef2cc ("cxgbe/base: add hardware API for Chelsio T5 series adapters") Cc: rahul.lakkire...@chelsio.com Signed-off-by: Weiguo Li --- drivers/net/cxgbe/base/common.h | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH 0/6] fix the curly braces mismatch problem

2022-02-05 Thread Weiguo Li
To make C header file compatible with C++ linking, a conventional practice enclose the code with braces as below: #ifdef __cplusplus extern "C" { #endif ... #ifdef __cplusplus } #endif Some alternative forms of "#ifdef __cplusplus", like "#if defined(__cplusplus)" or "# ifdef __cplusplus", als

[PATCH 1/6] bus/dpaa: fix the curly braces mismatch problem

2022-02-05 Thread Weiguo Li
Supplement the missing half of braces for the extern "C" block Fixes: 6d6b4f49a155 ("bus/dpaa: add FMAN hardware operations") Fixes: 919eeaccb2ba ("bus/dpaa: introduce NXP DPAA bus driver skeleton") Cc: shreyansh.j...@nxp.com Signed-off-by: Weiguo Li --- drivers/bus/dpaa/include/fsl_fman.h | 5

[PATCH 2/6] common/mlx5: fix the curly braces mismatch problem

2022-02-05 Thread Weiguo Li
Supplement the second half of braces for the extern "C" block Fixes: 7525ebd8ebb0 ("common/mlx5: add glue functions on Windows") Cc: tal...@nvidia.com Signed-off-by: Weiguo Li --- drivers/common/mlx5/windows/mlx5_win_defs.h | 5 + drivers/common/mlx5/windows/mlx5_win_ext.h | 4 2 file

Re: [dpdk-dev] [PATCH 1/1] mem: check allocation in dynamic hugepage init

2022-02-05 Thread David Marchand
On Tue, Dec 14, 2021 at 2:30 PM Yunjian Wang wrote: > > The function malloc() could return NULL, the return value > need to be checked. > > Fixes: 694161b7e065 ("mem: extract common dynamic memory allocation") > Cc: sta...@dpdk.org > > Signed-off-by: Yunjian Wang Reviewed-by: David Marchand --

Re: [PATCH] ring: fix overflow in memory size calcuation

2022-02-05 Thread David Marchand
On Tue, Dec 14, 2021 at 4:30 AM Zhihong Wang wrote: > > Parameters count and esize are both unsigned int, and their product can > legally exceed unsigned int and lead to runtime access violation. > > Fixes: cc4b218790f6 ("ring: support configurable element size") > Cc: sta...@dpdk.org > > Signed-o

[PATCH v2 2/2] eal: support systemd service convention for runtime directory

2022-02-05 Thread Stephen Hemminger
Systemd.exec supports configuring the runtime directory of a service via RuntimeDirectory=. This creates the directory with the necessary permissions which actual service may not have if running in container. The change to DPDK is to look for the environment RUNTIME_DIRECTORY first and use that in

[PATCH v2 1/2] eal: remove size for eal_set_runtime_dir

2022-02-05 Thread Stephen Hemminger
The size argument to eal_set_runtime_dir is useless and was being used incorrectly in strlcpy. It worked only because all callers passed PATH_MAX which is same as sizeof the destination runtime_dir. Note: this is an internal API so no user exposed change. Signed-off-by: Stephen Hemminger Reviewe

[PATCH v2 0/2] eal: support configuring runtime directory

2022-02-05 Thread Stephen Hemminger
Found this while exploring running a DPDK service with systemd container environment. It helps if the place DPDK puts its runtime directory is configurable. v2 - fix dpdk_telemetry.py to use append dpdk Stephen Hemminger (2): eal: remove size for eal_set_runtime_dir eal: support systemd servi

Re: [PATCH] ring: update Doxygen comments re RING_F_EXACT_SZ

2022-02-05 Thread David Marchand
On Wed, Dec 22, 2021 at 5:21 PM Robert Sanford wrote: > > - Add RING_F_EXACT_SZ description to rte_ring_init and > rte_ring_create param comments. > - Fix ring size comments. > > Signed-off-by: Robert Sanford Acked-by: Morten Brørup Acked-by: Bruce Richardson Acked-by: Konstantin Ananyev Ap

Re: [dpdk-dev] [PATCH] ring: fix error return value when creating ring

2022-02-05 Thread David Marchand
On Mon, Jan 10, 2022 at 3:15 PM Ananyev, Konstantin wrote: > > > The error value returned by rte_ring_create_elem() should be positive > > integers. However, if the rte_ring_get_memsize_elem() function fails, > > a negative number is returned and is directly used as the return value. > > As a resu

Re: [PATCH] ring: optimize corner case for enqueue/dequeue

2022-02-05 Thread David Marchand
On Tue, Jan 11, 2022 at 12:38 PM Andrzej Ostruszka wrote: > When enqueueing/dequeueing to/from the ring we try to optimize by manual > loop unrolling. The check for this optimization looks like: > > if (likely(idx + n < size)) { > > where 'idx' points to the first usable element (empty sl

RE: [PATCH v18 2/8] eal: add thread attributes

2022-02-05 Thread Ananyev, Konstantin
> > On Fri, Feb 04, 2022 at 07:21:10PM +, Ananyev, Konstantin wrote: > > > Implement thread attributes for: > > > * thread affinity > > > * thread priority > > > Implement functions for managing thread attributes. > > > > > > Priority is represented through an enum that allows for two levels

Re: [PATCH v18 2/8] eal: add thread attributes

2022-02-05 Thread Thomas Monjalon
05/02/2022 05:41, Tyler Retzlaff: > On Fri, Feb 04, 2022 at 07:21:10PM +, Ananyev, Konstantin wrote: > > > +int > > > +rte_thread_attr_init(rte_thread_attr_t *attr) > > > +{ > > > + RTE_VERIFY(attr != NULL); > > > > As a generic one, here and everywhere: > > Please don't use RTE_VERIFY() for c