[dpdk-dev] [PATCH v2 5/5] net/iavf: support new VLAN virtchnl opcodes

2020-12-13 Thread Haiyue Wang
The new VLAN virtchnl opcodes introduce rich capabilities setting like outer/inner different TPIDs. Signed-off-by: Haiyue Wang --- drivers/net/iavf/iavf.h| 6 ++ drivers/net/iavf/iavf_ethdev.c | 46 +++ drivers/net/iavf/iavf_vchnl.c | 147 + 3

[dpdk-dev] [PATCH v2 4/5] net/ice: add DCF port representor

2020-12-13 Thread Haiyue Wang
Add the DCF port representor infrastructure for the VFs of DCF attached PF. Then the standard ethdev API can be used to configure the VFs. The main function is VLAN related. Signed-off-by: Qiming Yang Signed-off-by: Haiyue Wang --- drivers/net/ice/ice_dcf.c| 1 + drivers/net/

[dpdk-dev] [PATCH v2 3/5] net/ice: enable QinQ filter for switch

2020-12-13 Thread Haiyue Wang
Enable the double VLAN support for QinQ filter switch. Signed-off-by: Wei Zhao Signed-off-by: Haiyue Wang --- drivers/net/ice/ice_generic_flow.c | 8 +++ drivers/net/ice/ice_generic_flow.h | 1 + drivers/net/ice/ice_switch_filter.c | 104 +--- 3 files changed, 102

[dpdk-dev] [PATCH v2 2/5] net/iavf: support Ethernet CRC strip disable

2020-12-13 Thread Haiyue Wang
The VF will check the PF's CRC strip capability firstly, then set the 'CRC strip disable' value in the queue configuration according to the RX CRC offload setting. Signed-off-by: Haiyue Wang --- drivers/net/iavf/iavf_ethdev.c | 3 +++ drivers/net/iavf/iavf_rxtx.c | 6 +- drivers/net/iavf/i

[dpdk-dev] [PATCH v2 1/5] common/iavf: new VLAN opcode

2020-12-13 Thread Haiyue Wang
Add new VLAN opcode support. Signed-off-by: Haiyue Wang --- drivers/common/iavf/virtchnl.h | 229 + 1 file changed, 229 insertions(+) diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h index b931da61e..445d04d53 100644 --- a/drivers/comm

[dpdk-dev] [PATCH v2 0/5] Add AVF & DCF VLAN feaure

2020-12-13 Thread Haiyue Wang
Add new VLAN feature, which has rich settings. Haiyue Wang (5): common/iavf: new VLAN opcode net/iavf: support Ethernet CRC strip disable net/ice: enable QinQ filter for switch net/ice: add DCF port representor net/iavf: support new VLAN virtchnl opcodes drivers/common/iavf/virtchnl.h

[dpdk-dev] [PATCH v1 5/5] net/iavf: support new VLAN virtchnl opcodes

2020-12-13 Thread Haiyue Wang
The new VLAN virtchnl opcodes introduce rich capabilities setting like outer/inner different TPIDs. Signed-off-by: Haiyue Wang --- drivers/net/iavf/iavf.h| 6 ++ drivers/net/iavf/iavf_ethdev.c | 46 +++ drivers/net/iavf/iavf_vchnl.c | 147 + 3

[dpdk-dev] [PATCH v1 3/5] net/ice: enable QinQ filter for switch

2020-12-13 Thread Haiyue Wang
Enable the double VLAN support for QinQ filter switch. Signed-off-by: Wei Zhao Signed-off-by: Haiyue Wang --- drivers/net/ice/ice_generic_flow.c | 8 +++ drivers/net/ice/ice_generic_flow.h | 1 + drivers/net/ice/ice_switch_filter.c | 104 +--- 3 files changed, 102

[dpdk-dev] [PATCH v1 2/5] net/iavf: support Ethernet CRC strip disable

2020-12-13 Thread Haiyue Wang
The VF will check the PF's CRC strip capability firstly, then set the 'CRC strip disable' value in the queue configuration according to the RX CRC offload setting. Signed-off-by: Haiyue Wang --- drivers/net/iavf/iavf_ethdev.c | 3 +++ drivers/net/iavf/iavf_rxtx.c | 6 +- drivers/net/iavf/i

[dpdk-dev] [PATCH v1 1/5] common/iavf: new VLAN opcode

2020-12-13 Thread Haiyue Wang
Add new VLAN opcode support. Signed-off-by: Haiyue Wang --- drivers/common/iavf/virtchnl.h | 229 + 1 file changed, 229 insertions(+) diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h index b931da61e..445d04d53 100644 --- a/drivers/comm

[dpdk-dev] [PATCH v1 4/5] net/ice: add DCF port representor

2020-12-13 Thread Haiyue Wang
Add the DCF port representor infrastructure for the VFs of DCF attached PF. Then the standard ethdev API can be used to configure the VFs. The main function is VLAN related. Signed-off-by: Qiming Yang Signed-off-by: Haiyue Wang --- drivers/net/ice/ice_dcf.c| 1 + drivers/net/

[dpdk-dev] [PATCH 5/5] net/iavf: support eCPRI MSG TYPE 0 for RSS

2020-12-13 Thread Junfeng Guo
From: Simei Su This patch enables eCPRI Message Type 0 with input set physical channel ID in rte_flow for RSS. Signed-off-by: Simei Su --- drivers/net/iavf/iavf_hash.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/drivers/net/iavf/iavf_hash.c b/drivers

[dpdk-dev] [PATCH 4/5] net/iavf: support eCPRI MSG TYPE 0 for AVF FDIR

2020-12-13 Thread Junfeng Guo
For eCPRI MSG Type 0, ecpriRtcid/ecpriPcid field within the eCPRI header will be extracted to Field Vector for AVF FDIR. SPEC for eCPRI: http://www.cpri.info/downloads/eCPRI_v_2.0_2019_05_10c.pdf Signed-off-by: Junfeng Guo --- drivers/net/iavf/iavf_fdir.c | 32

[dpdk-dev] [PATCH 3/5] net/iavf: define new bits for eCPRI

2020-12-13 Thread Junfeng Guo
Define new bits of protocol header, field and input set for eCPRI. Signed-off-by: Junfeng Guo --- drivers/net/iavf/iavf_generic_flow.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_generic_flow.h b/drivers/net/iavf/iavf_generic_flow.h index 9e518b

[dpdk-dev] [PATCH 2/5] net/iavf: support flow patterns for eCPRI

2020-12-13 Thread Junfeng Guo
From: Simei Su Add patterns support for eCPRI. Added patterns are as follows: eth_ecpri eth_ipv4_ecpri Signed-off-by: Simei Su --- drivers/net/iavf/iavf_generic_flow.c | 15 +++ drivers/net/iavf/iavf_generic_flow.h | 3 +++ 2 files changed, 18 insertions(+) diff -

[dpdk-dev] [PATCH 1/5] common/iavf: add proto hdr flds support for eCPRI

2020-12-13 Thread Junfeng Guo
Add eCPRI header and its field selectors, including MSG_TYPE, PCID and RTCID. Since the offset of PCID is same as RTCID, we just add one MACRO for these two fields. For MSG Type 0, ecpriRtcid/ecpriPcid field within the eCPRI header will be extracted to Field Vector for FDIR and RSS. SPEC for eCPRI

[dpdk-dev] [PATCH 0/5] support eCPRI MSG TYPE 0 for AVF FDIR and RSS

2020-12-13 Thread Junfeng Guo
This patch set enables eCPRI Message Type 0 with input set physical channel ID in rte_flow for AVF FDIR and RSS. [PATCH 1/5] common/iavf: add proto hdr flds support for eCPRI. [PATCH 2/5] net/iavf: support flow patterns for eCPRI. [PATCH 3/5] net/iavf: define new bits for eCPRI. [PATCH 4/5] net/ia

[dpdk-dev] [PATCH v1] net/iavf: fix not release memory issue in large VF

2020-12-13 Thread Ting Xu
This patch fixed the issue that the memory allocated for structure virtchnl_del_ena_dis_queues is not released at the end of the functions iavf_enable_queues_lv, iavf_disable_queues_lv and iavf_switch_queue_lv. Fixes: 9cf9c02bf6ee ("net/iavf: add enable/disable queues for large VF") Cc: sta...@dpd

[dpdk-dev] [PATCH v4 27/32] net/mlx5: update MR prototypes for DevX

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Currently MR operations are Verbs based. This commit updates MR operations prototypes such that DevX MR operations callbacks can be used as well. Rename 'struct mlx5_verbs_ops' as 'struct mlx5_mr_ops' and move it to shared file mlx5.h. Signed-off-by: Ophir Munk Acked-by: Matan

[dpdk-dev] [PATCH v4 29/32] net/mlx5/windows: implement device attribute getter

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk This commit is the Windows implementation of mlx5_os_get_dev_attr() API. It follows the commit in [1]. A new file named mlx5_os.c is added under windows directory as its Linux counterpart file: linux/mlx5_os.c. [1]. commit e85f623e13ea ("net/mlx5: remove attributes dependency on

[dpdk-dev] [PATCH v4 28/32] common/mlx5/windows: add OS reg/dereg MR

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk This commits implements Windows API for MR registration and deregistration. It is based on DevX. Is support the relaxed ordering flow in Windows by checking the capabilities and machine type. Signed-off-by: Ophir Munk Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad ---

[dpdk-dev] [PATCH v4 32/32] net/mlx5: refactor eth dev ops for Windows

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk There are two types of eth_dev_ops used under Windows: primary and isolate mode. Their function calls initialization is added to the OS specific file mlx5_os.c. Secondary process eth_dev_ops is nullified. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/net/mlx5/wi

[dpdk-dev] [PATCH v4 25/32] common/mlx5/windows: add OS alloc/dealloc pd

2020-12-13 Thread Tal Shnaiderman
Implement Windows API mlx5_os_alloc_pd() and mlx5_os_dealloc_pd(). They are equivalent to the Linux implementation in [1]. [1] ("net/mlx5: wrap glue alloc/dealloc PD with OS calls") Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/common/mlx5/rte_common_mlx5_exports.def | 3 +-

[dpdk-dev] [PATCH v4 26/32] common/mlx5/windows: add OS umem reg/dereg API

2020-12-13 Thread Tal Shnaiderman
Implement Windows API mlx5_os_umem_reg() and mlx5_os_umem_dereg(). They are equivalent to the Linux implementation. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/common/mlx5/rte_common_mlx5_exports.def | 2 + drivers/common/mlx5/windows/mlx5_common_os.c| 60 +

[dpdk-dev] [PATCH v4 31/32] net/mlx5/windows: implement mlx5 mac addr add

2020-12-13 Thread Tal Shnaiderman
Get the list of MAC addresses and verify if the input mac parameter already exists. If not - return -ENOTSUP (as Windows does not support adding new MAC addresses). If the MAC address exists (EEXIST) return 0 (the equivalent of Linux implementation of this API). Signed-off-by: Tal Shnaiderman Ack

[dpdk-dev] [PATCH v4 30/32] net/mlx5/windows: add mlx5_os.c stubs

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk mlx5_os_set_nonblock_channel_fd mlx5_os_dev_shared_handler_install mlx5_os_dev_shared_handler_uninstall mlx5_os_read_dev_stat mlx5_os_mac_addr_flush mlx5_os_mac_addr_remove mlx5_os_vf_mac_addr_modify mlx5_os_set_promisc mlx5_os_set_allmulti Set struct mlx5_flow_driver_ops mlx5_f

[dpdk-dev] [PATCH v4 24/32] common/mlx5/windows: add getter functions

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Add file mlx5/windows/mlx5_common_os.h the equivalent of Linux file mlx5/linux/mlx5_common_os.h. It contains getters functions mlx5_os_get_dev_device_name, mlx5_os_get_ctx_device_name, mlx5_os_get_ctx_device_path, mlx5_os_get_umem_id, mlx5_os_get_devx_channel_fd. Signed-off-by:

[dpdk-dev] [PATCH v4 22/32] mlx5/windows: generate file mlx5_autoconf.h

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk File mlx5_autoconf.h is generated under Windows to maintain compatibility with the Linux build system. This file is included in Linux/Windows shared source files therefore it is required. Currently the file is created empty. Signed-off-by: Ophir Munk Acked-by: Matan Azrad ---

[dpdk-dev] [PATCH v4 14/32] common/mlx5/windows: handle memory allocations with alignment

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk This commit is the Windows equivalent of the Linux implementation. The APIs included in this commit: mlx5_os_malloc(), mlx5_os_free(). For memory allocations (with or without alignment) we always call _aligned_malloc(). Even if zero alignment was requested in the first place - w

[dpdk-dev] [PATCH v4 21/32] mlx5/windows: add initialization routine for external lib

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Add function mlx5_glue_constructor() as an initialization routine for run-time dependency on external lib. Currently the routine has an empty body. It is used for compatibility with Linux. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/common/mlx5/windows/meson.

[dpdk-dev] [PATCH v4 23/32] common/mlx5/windows: extend PRM match_param_bits struct

2020-12-13 Thread Tal Shnaiderman
Add reserved size to PRM 'struct mlx5_ifc_fte_match_param_bits' for non Linux OS. Windows drivers require this extension since their expected size should match the actual struct size. Linux drivers do not require this extension and already use calculations based on the shorter size. Use a static a

[dpdk-dev] [PATCH v4 19/32] common/mlx5/windows: add glue functions APIs

2020-12-13 Thread Tal Shnaiderman
Windows glue functions are added to file mlx5/windows/mlx5_glue.c. The following APIs are supported: get_device_list, free_device_list, open_device, close_device, query_device, query_hca_iseg, devx_obj_create, devx_obj_destroy, devx_obj_query, devx_obj_modify, devx_general_cmd, devx_umem_reg, devx_

[dpdk-dev] [PATCH v4 11/32] net/mlx5: fix adding destroy flow action wrapper

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Glue function destroy_flow_action() was wrapped by OS specific operation mlx5_flow_os_destroy_flow_action(). It was skipped in file mlx5.c. Fixes: b293fbf9672b ("net/mlx5: add OS specific flow actions operations") Cc: sta...@dpdk.org Signed-off-by: Ophir Munk Acked-by: Matan A

[dpdk-dev] [PATCH v4 13/32] common/mlx5/linux: handle memory allocations with alignment

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk mlx5_malloc() API has an alignment parameter for system memory allocations. malloc() is called for non-aligned allocations and posix_memalign() is called for aligned allocations. When calling mlx5_free() there is no distinction whether the memory was originally allocated with or

[dpdk-dev] [PATCH v4 18/32] common/mlx5: add DevX alloc PD command

2020-12-13 Thread Tal Shnaiderman
Add a new DevX API mlx5_devx_cmd_alloc_pd() that creates a new protection domain (PD). Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_devx_cmds.c| 35 drivers/common/mlx5/mlx5_devx_cmds.h| 2 ++ drivers/common/

[dpdk-dev] [PATCH v4 17/32] common/mlx5: extend DevX query hca attributes command

2020-12-13 Thread Tal Shnaiderman
Extend DevX API mlx5_devx_cmd_query_hca_attr() to report on max number of available objects including: CQ, QP, PD, SRQ. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_devx_cmds.c | 11 +++ drivers/common/mlx5/mlx5_devx_cmds.h | 10 +- drivers/c

[dpdk-dev] [PATCH v4 20/32] mlx5/windows: add mlx5 meson file

2020-12-13 Thread Tal Shnaiderman
File drivers/common/mlx5/windows/meson.build is added to enable mlx5 source files compilation under common windows directory. A Devx SDK tool must be installed to export two external H files: mlx5devx.h and mlx5_ifc_devx.h. The installation is based on environment variable DEVX_INC_PATH. In additio

[dpdk-dev] [PATCH v4 16/32] common/mlx5: add Windows exports file

2020-12-13 Thread Tal Shnaiderman
File drivers/common/mlx5/rte_common_mlx5_exports.def contains mlx5 Windows exported symbols under common/mlx5 directory (DLL file name librte_common_mlx5*.dll). It is the equivalent of Linux map file rte_common_mlx5_version.map but the list of symbols may be different between the two operating syst

[dpdk-dev] [PATCH v4 15/32] common/mlx5/linux: wrap event channel APIs with OS calls

2020-12-13 Thread Tal Shnaiderman
Wrap the API to create/destroy event channel and to subscribe an event with OS calls. In Linux those calls are implemented by glue functions while in Windows they are not supported. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/common/mlx5/linux/mlx5_common_os.h | 22

[dpdk-dev] [PATCH v4 09/32] net/mlx5: wrap glue alloc/dealloc PD with OS calls

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Wrap glue calls alloc_pd() and dealloc_pd() with generic OS calls. In Linux - protection domain allocations are implemented by Verbs glue API while in Windows it is by DevX API. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/common/mlx5/linux/mlx5_common_os.h |

[dpdk-dev] [PATCH v4 12/32] common/mlx5: add definition HAVE_INFINIBAND_VERBS_H

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Add a Verbs file presence indication. Under Linux it is required that file infiniband/verbs.h is installed for building DPDK. Other operating systems (e.g. Windows) ignore Verbs completely. This commit adds definition HAVE_INFINIBAND_VERBS_H (file mlx5_autoconf.h) to indicate w

[dpdk-dev] [PATCH v4 04/32] net/mlx5: fix freeing packet pacing

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Packet pacing is allocated under condition #ifdef HAVE_MLX5DV_PP_ALLOC. In a similar way - free packet pacing index under the same condition. This update is required to successfully compile under operating systems which do not support packet pacing. Fixes: aef1e20ebeb2 ("net/mlx

[dpdk-dev] [PATCH v4 08/32] net/mlx5: move static_assert calls to global scope

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Some Windows compilers consider static_assert() as calls to another function rather than a compiler directive which allows checking type information at compile time. This only occurs if the static_assert call appears inside another function scope. To solve it move the static_ass

[dpdk-dev] [PATCH v4 03/32] net/mlx5: remove Linux files from Windows compilation

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk This commit removes Linux files flow_verbs.c and mlx5_rxtx_vec.c from Windows compilation. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/net/mlx5/meson.build | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/net/mlx5/m

[dpdk-dev] [PATCH v4 10/32] net/mlx5: wrap glue reg/dereg UMEM with OS calls

2020-12-13 Thread Tal Shnaiderman
Wrap glue calls for UMEM registration and deregistration with generic OS calls since each OS (Linux or Windows) has a different glue API parameters. Signed-off-by: Tal Shnaiderman Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/common/mlx5/linux/mlx5_common_os.h | 12

[dpdk-dev] [PATCH v4 05/32] net/mlx5: replace Linux sleep with rte sleep

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Replace Linux API usleep() and nanosleep() with rte_delay_us_sleep(). The replacement occurs in shared files compiled under different operating systems. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5.c | 5 +++-- drivers/net/mlx5/mlx5_trigge

[dpdk-dev] [PATCH v4 06/32] net/mlx5: define mprq functions as static inline

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Functions mlx5_check_mprq_support(), mlx5_rxq_mprq_enabled(), mlx5_mprq_enabled() are moved from source file mlx5_rxq.c to header file mlx5_rxtx.h and their type is updated to 'static __rte_always_inline'. Previously the functions were declared as 'inline' in the source file whic

[dpdk-dev] [PATCH v4 02/32] net/mlx5/linux: extend device attributes getter

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk This commit adds device attributes parameters to be reported by mlx5_os_get_dev_attr(): max_cqe, max_mr, max_pd, max_srq, max_srq_wr Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_os.c | 5 + drivers/net/mlx5/mlx5.h | 5 + 2 f

[dpdk-dev] [PATCH v4 07/32] net/mlx5: do not define static_assert in Windows

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk In Linux 'static_assert' is defined in file mlx5_defs.h: #ifndef HAVE_STATIC_ASSERT #define static_assert _Static_assert #endif The same definition can originate from Linux file /usr/include/assert.h. In Windows static_assert is used while _Static_assert is unknown. Ther

[dpdk-dev] [PATCH v4 01/32] net/mlx5: fix folding constant array error

2020-12-13 Thread Tal Shnaiderman
Before this commit the PMD used: const int elt_n = 8 const int *stack[elt_n]; In Windows clang compiler complains: net/mlx5/mlx5_flow.c:215:19: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant] Fix it by using a constant macro definition

[dpdk-dev] [PATCH v4 00/32] mlx5 Windows support - part #5

2020-12-13 Thread Tal Shnaiderman
This patch series is part of preparing mlx5 PMD to compile and run under Windows OS. Part #5 v1: initial version v2: Fixes after CR and rebase, also patchset was split and part of the commits sent in v1 will be sent later on. v3: Remove common compilation as it depends on upcoming patches [Dmitr

[dpdk-dev] [PATCH v2] eal/windows: add pthread TLS function support

2020-12-13 Thread Tal Shnaiderman
Add the following functions to the pthread shim implementation for Windows as they are needed for thread safe rte_flow functions. pthread_key_create. pthread_key_delete. pthread_getspecific. pthread_setspecific. Signed-off-by: Tal Shnaiderman --- v2: fix style issues --- lib/librte_eal/windows/

Re: [dpdk-dev] [EXT] Re: [PATCH v1 1/2] meson: update meson build for armada drivers

2020-12-13 Thread Liron Himi
-Original Message- From: Ferruh Yigit Sent: Wednesday, 9 December 2020 12:50 To: Liron Himi ; bruce.richard...@intel.com Cc: dev@dpdk.org; Akhil Goyal Subject: [EXT] Re: [dpdk-dev] [PATCH v1 1/2] meson: update meson build for armada drivers External Email

[dpdk-dev] [PATCH] eal/windows: add pthread TLS function support

2020-12-13 Thread Tal Shnaiderman
Add the following functions to the pthread shim implementation for Windows as they are needed for thread safe rte_flow functions. pthread_key_create. pthread_key_delete. pthread_getspecific. pthread_setspecific. Signed-off-by: Tal Shnaiderman --- lib/librte_eal/windows/include/pthread.h | 42 ++

Re: [dpdk-dev] [PATCH] pci/windows: do not fail on missing NUMA node for PCIe

2020-12-13 Thread Dmitry Kozlyuk
On Sun, 13 Dec 2020 16:16:04 +0200, Tal Shnaiderman wrote: > On older processors, NUMA isn't bound to PCIe locality. > those cases return ERROR_NOT_FOUND in response to the > SetupDiGetDevicePropertyW call with DEVPKEY_Device_Numa_Node > attribute. > > This error fails the probe process for the PC

[dpdk-dev] [Bug 600] Windows DPDK real-time priority threads causing thread starvation

2020-12-13 Thread bugzilla
https://bugs.dpdk.org/show_bug.cgi?id=600 Bug ID: 600 Summary: Windows DPDK real-time priority threads causing thread starvation Product: DPDK Version: 20.08 Hardware: All OS: Windows Status: UNC

Re: [dpdk-dev] [PATCH] pci/windows: do not fail on missing NUMA node for PCIe

2020-12-13 Thread Odi Assli
> Subject: [PATCH] pci/windows: do not fail on missing NUMA node for PCIe > > On older processors, NUMA isn't bound to PCIe locality. > those cases return ERROR_NOT_FOUND in response to the > SetupDiGetDevicePropertyW call with DEVPKEY_Device_Numa_Node > attribute. > > This error fails the probe

[dpdk-dev] [PATCH] pci/windows: do not fail on missing NUMA node for PCIe

2020-12-13 Thread Tal Shnaiderman
On older processors, NUMA isn't bound to PCIe locality. those cases return ERROR_NOT_FOUND in response to the SetupDiGetDevicePropertyW call with DEVPKEY_Device_Numa_Node attribute. This error fails the probe process for the PCIe device. this commit will ignore such failure and will set the numa_n

[dpdk-dev] [PATCH v3 32/32] net/mlx5: refactor eth dev ops for Windows

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk There are two types of eth_dev_ops used under Windows: primary and isolate mode. Their function calls initialization is added to the OS specific file mlx5_os.c. Secondary process eth_dev_ops is nullified. Signed-off-by: Ophir Munk --- drivers/net/mlx5/windows/mlx5_os.c | 108 +

[dpdk-dev] [PATCH v3 30/32] net/mlx5/windows: add mlx5_os.c stubs

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk mlx5_os_set_nonblock_channel_fd mlx5_os_dev_shared_handler_install mlx5_os_dev_shared_handler_uninstall mlx5_os_read_dev_stat mlx5_os_mac_addr_flush mlx5_os_mac_addr_remove mlx5_os_vf_mac_addr_modify mlx5_os_set_promisc mlx5_os_set_allmulti Set struct mlx5_flow_driver_ops mlx5_f

[dpdk-dev] [PATCH v3 29/32] net/mlx5/windows: implement device attribute getter

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk This commit is the Windows implementation of mlx5_os_get_dev_attr() API. It follows the commit in [1]. A new file named mlx5_os.c is added under windows directory as its Linux counterpart file: linux/mlx5_os.c. [1]. commit e85f623e13ea ("net/mlx5: remove attributes dependency on

[dpdk-dev] [PATCH v3 31/32] net/mlx5/windows: implement mlx5 mac addr add

2020-12-13 Thread Tal Shnaiderman
Get the list of MAC addresses and verify if the input mac parameter already exists. If not - return -ENOTSUP (as Windows does not support adding new MAC addresses). If the MAC address exists (EEXIST) return 0 (the equivalent of Linux implementation of this API). Signed-off-by: Tal Shnaiderman ---

[dpdk-dev] [PATCH v3 25/32] common/mlx5/windows: add OS alloc/dealloc pd

2020-12-13 Thread Tal Shnaiderman
Implement Windows API mlx5_os_alloc_pd() and mlx5_os_dealloc_pd(). They are equivalent to the Linux implementation in (1). (1) ("net/mlx5: wrap glue alloc/dealloc PD with OS calls") Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/common/mlx5/rte_common_mlx5_exports.def | 3 +-

[dpdk-dev] [PATCH v3 24/32] common/mlx5/windows: add getter functions

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Add file mlx5/windows/mlx5_common_os.h the equivalent of Linux file mlx5/linux/mlx5_common_os.h. It contains getters functions mlx5_os_get_dev_device_name, mlx5_os_get_ctx_device_name, mlx5_os_get_ctx_device_path, mlx5_os_get_umem_id, mlx5_os_get_devx_channel_fd. Signed-off-by:

[dpdk-dev] [PATCH v3 26/32] common/mlx5/windows: add OS umem reg/dereg API

2020-12-13 Thread Tal Shnaiderman
Implement Windows API mlx5_os_umem_reg() and mlx5_os_umem_dereg(). They are equivalent to the Linux implementation. Signed-off-by: Tal Shnaiderman --- drivers/common/mlx5/rte_common_mlx5_exports.def | 2 + drivers/common/mlx5/windows/mlx5_common_os.c| 60 + drivers/c

[dpdk-dev] [PATCH v3 28/32] common/mlx5/windows: add OS reg/dereg MR

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk This commits implements Windows API for MR registration and deregistration. It is based on DevX. Is support the relaxed ordering flow in Windows by checking the capabilities and machine type. Signed-off-by: Ophir Munk Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad ---

[dpdk-dev] [PATCH v3 22/32] mlx5/windows: generate file mlx5_autoconf.h

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk File mlx5_autoconf.h is generated under Windows to maintain compatibility with the Linux build system. This file is included in Linux/Windows shared source files therefore it is required. Currently the file is created empty. Signed-off-by: Ophir Munk Acked-by: Matan Azrad ---

[dpdk-dev] [PATCH v3 23/32] common/mlx5/windows: extend PRM match_param_bits struct

2020-12-13 Thread Tal Shnaiderman
Add reserved size to PRM 'struct mlx5_ifc_fte_match_param_bits' for non Linux OS. Windows drivers require this extension since their expected size should match the actual struct size. Linux drivers do not require this extension and already use calculations based on the shorter size. Use a static a

[dpdk-dev] [PATCH v3 27/32] net/mlx5: update MR prototypes for DevX

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Currently MR operations are Verbs based. This commit updates MR operations prototypes such that DevX MR operations callbacks can be used as well. Rename 'struct mlx5_verbs_ops' as 'struct mlx5_mr_ops' and move it to shared file mlx5.h. Signed-off-by: Ophir Munk Acked-by: Matan

[dpdk-dev] [PATCH v3 19/32] common/mlx5/windows: add glue functions APIs

2020-12-13 Thread Tal Shnaiderman
Windows glue functions are added to file mlx5/windows/mlx5_glue.c. The following APIs are supported: get_device_list, free_device_list, open_device, close_device, query_device, query_hca_iseg, devx_obj_create, devx_obj_destroy, devx_obj_query, devx_obj_modify, devx_general_cmd, devx_umem_reg, devx_

[dpdk-dev] [PATCH v3 21/32] mlx5/windows: add initialization routine for external lib

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Add function mlx5_glue_constructor() as an initialization routine for run-time dependency on external lib. Currently the routine has an empty body. It is used for compatibility with Linux. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/common/mlx5/windows/meson.

[dpdk-dev] [PATCH v3 20/32] mlx5/windows: add mlx5 meson file

2020-12-13 Thread Tal Shnaiderman
File drivers/common/mlx5/windows/meson.build is added to enable mlx5 source files compilation under common windows directory. A Devx SDK tool must be installed to export two external H files: mlx5devx.h and mlx5_ifc_devx.h. The installation is based on environment variable DEVX_INC_PATH. In additio

[dpdk-dev] [PATCH v3 17/32] common/mlx5: extend DevX query hca attributes command

2020-12-13 Thread Tal Shnaiderman
Extend DevX API mlx5_devx_cmd_query_hca_attr() to report on max number of available objects including: CQ, QP, PD, SRQ. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_devx_cmds.c | 11 +++ drivers/common/mlx5/mlx5_devx_cmds.h | 10 +- drivers/c

[dpdk-dev] [PATCH v3 13/32] common/mlx5/linux: handle memory allocations with alignment

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk mlx5_malloc() API has an alignment parameter for system memory allocations. malloc() is called for non-aligned allocations and posix_memalign() is called for aligned allocations. When calling mlx5_free() there is no distinction whether the memory was originally allocated with or

[dpdk-dev] [PATCH v3 06/32] net/mlx5: define mprq functions as static inline

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Functions mlx5_check_mprq_support(), mlx5_rxq_mprq_enabled(), mlx5_mprq_enabled() are moved from source file mlx5_rxq.c to header file mlx5_rxtx.h and their type is updated to 'static __rte_always_inline'. Previously the functions were declared as 'inline' in the source file whic

[dpdk-dev] [PATCH v3 10/32] net/mlx5: wrap glue reg/dereg UMEM with OS calls

2020-12-13 Thread Tal Shnaiderman
Wrap glue calls for UMEM registration and deregistration with generic OS calls since each OS (Linux or Windows) has a different glue API parameters. Signed-off-by: Tal Shnaiderman Signed-off-by: Ophir Munk --- drivers/common/mlx5/linux/mlx5_common_os.h | 12 drivers/common/mlx5/mlx

[dpdk-dev] [PATCH v3 18/32] common/mlx5: add DevX alloc PD command

2020-12-13 Thread Tal Shnaiderman
Add a new DevX API mlx5_devx_cmd_alloc_pd() that creates a new protection domain (PD). Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_devx_cmds.c| 35 drivers/common/mlx5/mlx5_devx_cmds.h| 2 ++ drivers/common/

[dpdk-dev] [PATCH v3 16/32] common/mlx5: add Windows exports file

2020-12-13 Thread Tal Shnaiderman
File drivers/common/mlx5/rte_common_mlx5_exports.def contains mlx5 Windows exported symbols under common/mlx5 directory (DLL file name librte_common_mlx5*.dll). It is the equivalent of Linux map file rte_common_mlx5_version.map but the list of symbols may be different between the two operating syst

[dpdk-dev] [PATCH v3 07/32] net/mlx5: do not define static_assert in Windows

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk In Linux 'static_assert' is defined in file mlx5_defs.h: #ifndef HAVE_STATIC_ASSERT #define static_assert _Static_assert #endif The same definition can originate from Linux file /usr/include/assert.h. In Windows static_assert is used while _Static_assert is unknown. Ther

[dpdk-dev] [PATCH v3 12/32] common/mlx5: add definition HAVE_INFINIBAND_VERBS_H

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Add a Verbs file presence indication. Under Linux it is required that file infiniband/verbs.h is installed for building DPDK. Other operating systems (e.g. Windows) ignore Verbs completely. This commit adds definition HAVE_INFINIBAND_VERBS_H (file mlx5_autoconf.h) to indicate w

[dpdk-dev] [PATCH v3 09/32] net/mlx5: wrap glue alloc/dealloc PD with OS calls

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Wrap glue calls alloc_pd() and dealloc_pd() with generic OS calls. In Linux - protection domain allocations are implemented by Verbs glue API while in Windows it is by DevX API. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/common/mlx5/linux/mlx5_common_os.h |

[dpdk-dev] [PATCH v3 05/32] net/mlx5: replace Linux sleep with rte sleep

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Replace Linux API usleep() and nanosleep() with rte_delay_us_sleep(). The replacement occurs in shared files compiled under different operating systems. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5.c | 5 +++-- drivers/net/mlx5/mlx5_trigge

[dpdk-dev] [PATCH v3 15/32] common/mlx5/linux: wrap event channel APIs with OS calls

2020-12-13 Thread Tal Shnaiderman
Wrap the API to create/destroy event channel and to subscribe an event with OS calls. In Linux those calls are implemented by glue functions while in Windows they are not supported. Signed-off-by: Tal Shnaiderman --- drivers/common/mlx5/linux/mlx5_common_os.h | 22 ++ drivers

[dpdk-dev] [PATCH v3 01/32] net/mlx5: fix folding constant array error

2020-12-13 Thread Tal Shnaiderman
Before this commit the PMD used: const int elt_n = 8 const int *stack[elt_n]; In Windows clang compiler complains: net/mlx5/mlx5_flow.c:215:19: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant] Fix it by using a constant macro definition

[dpdk-dev] [PATCH v3 03/32] net/mlx5: remove Linux files from Windows compilation

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk This commit removes Linux files flow_verbs.c and mlx5_rxtx_vec.c from Windows compilation. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/net/mlx5/meson.build | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/net/mlx5/m

[dpdk-dev] [PATCH v3 04/32] net/mlx5: fix freeing packet pacing

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Packet pacing is allocated under condition #ifdef HAVE_MLX5DV_PP_ALLOC. In a similar way - free packet pacing index under the same condition. This update is required to successfully compile under operating systems which do not support packet pacing. Fixes: aef1e20ebeb2 ("net/mlx

[dpdk-dev] [PATCH v3 08/32] net/mlx5: move static_assert calls to global scope

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Some Windows compilers consider static_assert() as calls to another function rather than a compiler directive which allows checking type information at compile time. This only occurs if the static_assert call appears inside another function scope. To solve it move the static_ass

[dpdk-dev] [PATCH v3 14/32] common/mlx5/windows: handle memory allocations with alignment

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk This commit is the Windows equivalent of the Linux implementation. The APIs included in this commit: mlx5_os_malloc(), mlx5_os_free(). For memory allocations (with or without alignment) we always call _aligned_malloc(). Even if zero alignment was requested in the first place - w

[dpdk-dev] [PATCH v3 02/32] net/mlx5/linux: extend device attributes getter

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk This commit adds device attributes parameters to be reported by mlx5_os_get_dev_attr(): max_cqe, max_mr, max_pd, max_srq, max_srq_wr Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_os.c | 5 + drivers/net/mlx5/mlx5.h | 5 + 2 f

[dpdk-dev] [PATCH v3 11/32] net/mlx5: fix adding destroy flow action wrapper

2020-12-13 Thread Tal Shnaiderman
From: Ophir Munk Glue function destroy_flow_action() was wrapped by OS specific operation mlx5_flow_os_destroy_flow_action(). It was skipped in file mlx5.c. Fixes: b293fbf9672b ("net/mlx5: add OS specific flow actions operations") Cc: sta...@dpdk.org Signed-off-by: Ophir Munk Acked-by: Matan A

[dpdk-dev] [PATCH v3 00/32] mlx5 Windows support - part #5

2020-12-13 Thread Tal Shnaiderman
This patch series is part of preparing mlx5 PMD to compile and run under Windows OS. Part #5 v1: initial version v2: Fixes after CR and rebase, also patchset was split and part of the commits sent in v1 will be sent later on. v3: Remove common compilation as it depends on upcoming patches [Dmitr

Re: [dpdk-dev] [PATCH] net/mlx5: fix buffer split offload advertising

2020-12-13 Thread Asaf Penso
>-Original Message- >From: dev On Behalf Of Viacheslav Ovsiienko >Sent: Friday, December 11, 2020 1:45 PM >To: dev@dpdk.org >Cc: Raslan Darawsheh ; Matan Azrad >; sta...@dpdk.org >Subject: [dpdk-dev] [PATCH] net/mlx5: fix buffer split offload advertising > >The buffer split Rx offload is n

[dpdk-dev] [PATCH 6/7] net/hns3: fix directly access with rte device

2020-12-13 Thread Lijun Ou
From: "Min Hu (Connor)" In current version, there exists the way of access global 'rte_eth_devices' array directly, and this is not a good way. Better way is to store the 'eth_dev' in the device private data in the probe(). Then driver could use it later. Fixes: ab2e2e344163 ("net/hns3: get devi

[dpdk-dev] [PATCH 2/7] net/hns3: fix xstats statistics with id

2020-12-13 Thread Lijun Ou
From: Huisong Li Number of xstats item in rte_eth_xstats_get_by_id is obtained by the eth_dev_get_xstats_count API, and the xstats_get_by_id ops of the driver only needs to report the corresponding stats item result. However, a redundant code for reporting the number of stats items in the hns3_de

[dpdk-dev] [PATCH 3/7] net/hns3: fix abnormal return value in xstats

2020-12-13 Thread Lijun Ou
From: Huisong Li The ethdev API has processed the failure to obtain xstats statistics. Therefore, driver should return an error code instead of 0 in 'hns3_dev_xstats_get' API. Fixes: 8839c5e202f3 ("net/hns3: support device stats") Cc: sta...@dpdk.org Signed-off-by: Huisong Li Signed-off-by: Li

[dpdk-dev] [PATCH 1/7] net/hns3: fix incorrect interception with filter director

2020-12-13 Thread Lijun Ou
The rte_fdir_conf structure has deprecated and users need to use the specified rule parameters of rte_flow structure when configure a flow rule. As a result, it is incorrectly used in the rte_flow API. Fixes: fcba820d9b9e ("net/hns3: support flow director") Cc: sta...@dpdk.org Signed-off-by: Liju

[dpdk-dev] [PATCH 4/7] net/hns3: fix Rx/Tx abnormal errors stats

2020-12-13 Thread Lijun Ou
From: Huisong Li Abnormal errors stats in Rx/Tx datapath are statistics items in driver, and displayed in xstats. They should be cleared by the rte_eth_xstats_reset api, instead of the rte_eth_stats_reset. Fixes: c4b7d6761d01 ("net/hns3: get Tx abnormal errors in xstats") Fixes: 521ab3e93361 ("n

[dpdk-dev] [PATCH 0/7] some bugfixes for hns3

2020-12-13 Thread Lijun Ou
Here series fix some hns3 PMD bugs. Huisong Li (3): net/hns3: fix xstats statistics with id net/hns3: fix abnormal return value in xstats net/hns3: fix Rx/Tx abnormal errors stats Lijun Ou (2): net/hns3: fix incorrect interception with filter director net/hns3: remove unnecessary memset

[dpdk-dev] [PATCH 7/7] net/hns3: remove unnecessary memset

2020-12-13 Thread Lijun Ou
The hns3_cmd_desc has memset when setup and the memset for req is unnecessary. Signed-off-by: Lijun Ou --- drivers/net/hns3/hns3_rss.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index e2f0468..b5df374 100644 --- a/drivers/net

[dpdk-dev] [PATCH 5/7] net/hns3: fix location of saving ethdev

2020-12-13 Thread Lijun Ou
From: "Min Hu (Connor)" In current version, procedure of saving eth_dev in hns3 PMD init will be called more than twice, one for primary, the other for secondary. That will cause segmentation fault in Multi-process as eth_dev will be changed in secondary process, which is different from one in pr

  1   2   >