[dpdk-dev] [PATCH v3 17/17] doc: update mlx5 support for conntrack

2021-05-04 Thread Bing Zhao
In the release notes and mlx5 NIC document, the support and limitation of connection tracking are added. Signed-off-by: Bing Zhao --- doc/guides/nics/features/default.ini | 1 + doc/guides/nics/features/mlx5.ini | 1 + doc/guides/nics/mlx5.rst | 14 ++ doc/guid

[dpdk-dev] [PATCH v3 16/17] net/mlx5: add support of CT between two ports

2021-05-04 Thread Bing Zhao
After creating a connection tracking context, it can be used between two ports. For each port, the flow for one direction traffic will be created. The context can only be shared between the owner port and the peer port that was specified when being created. Only the owner port could update the con

[dpdk-dev] [PATCH v3 15/17] net/mlx5: validation of CT item

2021-05-04 Thread Bing Zhao
The item of ASO connection tracking will be translated into the register value when matching. The validation of this item has no dependency on other layers, since the flow including this item should be jumped from another group. All the layers checking was already done in the previous groups. Only

[dpdk-dev] [PATCH v3 14/17] net/mlx5: validation of CT action

2021-05-04 Thread Bing Zhao
The validation of a CT action contains two parts. The first is the CT action configurations parameter. When creating a CT action context, some members need to be verified. The second is that when creating a flow, the DR action of CT should be validated with other actions and items as well. Current

Re: [dpdk-dev] [PATCH v2] eal: fix use wrong time API

2021-05-04 Thread Thomas Monjalon
05/05/2021 08:26, Morten Brørup: > > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Thomas Monjalon > > Sent: Wednesday, May 5, 2021 8:14 AM > > > > 04/05/2021 21:12, Morten Brørup: > > > > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Thomas > > Monjalon > > > > Sent: Tuesday, May 4,

[dpdk-dev] [PATCH v3 12/17] net/mlx5: add translation of CT item

2021-05-04 Thread Bing Zhao
The return register of the DR action will be used for matching. After the ASO CT checking of a TCP packet, the syndrome is filled in the register. Only the 8 LSB should be used. A converting from RTE_FLOW_CONNTRACK_FLAG* to the syndrome should be done after checing the spec and mask fields. Signed

[dpdk-dev] [PATCH v3 13/17] net/mlx5: add CT context update

2021-05-04 Thread Bing Zhao
When updating a connection tracking context, two separate parts could be updated. First, the direction. This will only update the traffic direction recorded in the software for flow creation. Second, the TCP parameters. The hardware context will be updated via the WQE. This update will be blocked u

[dpdk-dev] [PATCH v3 11/17] net/mlx5: add translation of CT action

2021-05-04 Thread Bing Zhao
When creating a flow with this action context for CT, it needs to be translated in 2 levels. First, retrieve from action context to rte_flow action. Second, translate it to the corresponding DR action with traffic direction that was specified when creating or updating via rte_flow_action_handle* A

[dpdk-dev] [PATCH v3 10/17] net/mlx5: add ASO CT destroy handling

2021-05-04 Thread Bing Zhao
When trying to destroy an ASO connection tracking context, the DR action created on this context should also be destroyed. Before inserting the related software object into the management free list, the reference count should be checked. Right now, the context object will not be freed to the syste

[dpdk-dev] [PATCH v3 09/17] net/mlx5: add ASO CT query implementation

2021-05-04 Thread Bing Zhao
After the connection tracking context is created and being used by the flows, the context will be updated by the HW automatically after a packet passed the CT validation. E.g., the ACK, SEQ, window and state of CT can be updated with both direction traffic. In order to query the updated contents o

[dpdk-dev] [PATCH v3 08/17] net/mlx5: close CT management structure

2021-05-04 Thread Bing Zhao
When freeing the IB shared context during stopping a device, the ASO connection tracking management structure should also be cleaned up. All the DR actions created should be destroyed. The structures need to be freed and ASO CT QP should be released. In the meanwhile, the allocated and registered

[dpdk-dev] [PATCH v3 07/17] net/mlx5: add actions creating for CT

2021-05-04 Thread Bing Zhao
Allocating a CT from the management pools and creating the DR actions for both directions by default. If there is no available connection tracking action, a new pool will be created with a fixed size bulk allocation. Right now, all the resources are controlled by the linked list. The ASO connecti

[dpdk-dev] [PATCH v3 06/17] net/mlx5: add modify support for CT

2021-05-04 Thread Bing Zhao
After the connection tracking object bulk is allocated, all the objects' contents are filled with zero by default. Every new-allocated object must be modified via WQE operation before it is used. In order to reduce the latency for the flow creation, an asynchronous way is used instead of busy wait

[dpdk-dev] [PATCH v3 05/17] common/mlx5: add Dexv CT objects creation

2021-05-04 Thread Bing Zhao
Adding support for connection tracking ASO creation via Devx command. Right now only bulk creation is supported. By default, the objects with zero contents will be created. Before using a single object, the modification via posting a WQE to the ASO CT SQ is needed. Signed-off-by: Bing Zhao ---

[dpdk-dev] [PATCH v3 04/17] net/mlx5: initialization of CT management

2021-05-04 Thread Bing Zhao
The definitions of ASO connection tracking objects management structures are added. Considering performance, the bulk allocation of ASO CT objects should be used. The maximal value per bulk and the granularity could be fetched from HCA capabilities 2. Right now, a fixed number of 64 is used for ea

[dpdk-dev] [PATCH v3 03/17] net/mlx5: use meter color reg for CT

2021-05-04 Thread Bing Zhao
Based on the capacity, 3 registers could be used. Due to the register allocation, only the one REG_C_3 for meter color could be reused right now. Then in the same flow, no more than one ASO action can be supported. Signed-off-by: Bing Zhao --- drivers/net/mlx5/mlx5_flow.c | 4 +++- drivers/net/

[dpdk-dev] [PATCH v3 01/17] common/mlx5: add connection tracking object definition

2021-05-04 Thread Bing Zhao
The structures of ASO connection tracking offload object are added based on the definitions in the PRM. One CT object context will be loaded into the cache completely in a reversed order of dwords. The valid bit should be the MSB of the last dword. This is used for the conntrack context creation an

[dpdk-dev] [PATCH v3 02/17] common/mlx5: add CT offload capability checking

2021-05-04 Thread Bing Zhao
During startup, the ASO connection tracking offload capability could be queried via HCA_CAP_QUERY command. If the HW doesn't support ASO CT, the value would be 0 by default. The following initialization should be skipped and the creation of the CT object should return a failure directly. The follo

[dpdk-dev] [PATCH v3 00/17] conntrack support in mlx5 PMD

2021-05-04 Thread Bing Zhao
This patch set adds the connection tracking offload support in the mlx5 driver, as well as the documents update. --- v2: code bug fixes, commits clean up and doc update. v3: fix error input pointer for CT MR registering --- Acked-by: Viacheslav Ovsiienko Bing Zhao (17): common/mlx5: add conn

[dpdk-dev] [PATCH v3 16/17] net/mlx5: add support of CT between two ports

2021-05-04 Thread Bing Zhao
After creating a connection tracking context, it can be used between two ports. For each port, the flow for one direction traffic will be created. The context can only be shared between the owner port and the peer port that was specified when being created. Only the owner port could update the con

[dpdk-dev] [PATCH v3 15/17] net/mlx5: validation of CT item

2021-05-04 Thread Bing Zhao
The item of ASO connection tracking will be translated into the register value when matching. The validation of this item has no dependency on other layers, since the flow including this item should be jumped from another group. All the layers checking was already done in the previous groups. Only

[dpdk-dev] [PATCH v3 14/17] net/mlx5: validation of CT action

2021-05-04 Thread Bing Zhao
The validation of a CT action contains two parts. The first is the CT action configurations parameter. When creating a CT action context, some members need to be verified. The second is that when creating a flow, the DR action of CT should be validated with other actions and items as well. Current

[dpdk-dev] [PATCH v3 13/17] net/mlx5: add CT context update

2021-05-04 Thread Bing Zhao
When updating a connection tracking context, two separate parts could be updated. First, the direction. This will only update the traffic direction recorded in the software for flow creation. Second, the TCP parameters. The hardware context will be updated via the WQE. This update will be blocked u

[dpdk-dev] [PATCH v3 12/17] net/mlx5: add translation of CT item

2021-05-04 Thread Bing Zhao
The return register of the DR action will be used for matching. After the ASO CT checking of a TCP packet, the syndrome is filled in the register. Only the 8 LSB should be used. A converting from RTE_FLOW_CONNTRACK_FLAG* to the syndrome should be done after checing the spec and mask fields. Signed

[dpdk-dev] [PATCH v3 11/17] net/mlx5: add translation of CT action

2021-05-04 Thread Bing Zhao
When creating a flow with this action context for CT, it needs to be translated in 2 levels. First, retrieve from action context to rte_flow action. Second, translate it to the corresponding DR action with traffic direction that was specified when creating or updating via rte_flow_action_handle* A

[dpdk-dev] [PATCH v3 08/17] net/mlx5: close CT management structure

2021-05-04 Thread Bing Zhao
When freeing the IB shared context during stopping a device, the ASO connection tracking management structure should also be cleaned up. All the DR actions created should be destroyed. The structures need to be freed and ASO CT QP should be released. In the meanwhile, the allocated and registered

[dpdk-dev] [PATCH v3 10/17] net/mlx5: add ASO CT destroy handling

2021-05-04 Thread Bing Zhao
When trying to destroy an ASO connection tracking context, the DR action created on this context should also be destroyed. Before inserting the related software object into the management free list, the reference count should be checked. Right now, the context object will not be freed to the syste

[dpdk-dev] [PATCH v3 09/17] net/mlx5: add ASO CT query implementation

2021-05-04 Thread Bing Zhao
After the connection tracking context is created and being used by the flows, the context will be updated by the HW automatically after a packet passed the CT validation. E.g., the ACK, SEQ, window and state of CT can be updated with both direction traffic. In order to query the updated contents o

[dpdk-dev] [PATCH v3 07/17] net/mlx5: add actions creating for CT

2021-05-04 Thread Bing Zhao
Allocating a CT from the management pools and creating the DR actions for both directions by default. If there is no available connection tracking action, a new pool will be created with a fixed size bulk allocation. Right now, all the resources are controlled by the linked list. The ASO connecti

[dpdk-dev] [PATCH v3 06/17] net/mlx5: add modify support for CT

2021-05-04 Thread Bing Zhao
After the connection tracking object bulk is allocated, all the objects' contents are filled with zero by default. Every new-allocated object must be modified via WQE operation before it is used. In order to reduce the latency for the flow creation, an asynchronous way is used instead of busy wait

[dpdk-dev] [PATCH v3 05/17] common/mlx5: add Dexv CT objects creation

2021-05-04 Thread Bing Zhao
Adding support for connection tracking ASO creation via Devx command. Right now only bulk creation is supported. By default, the objects with zero contents will be created. Before using a single object, the modification via posting a WQE to the ASO CT SQ is needed. Signed-off-by: Bing Zhao ---

[dpdk-dev] [PATCH v3 04/17] net/mlx5: initialization of CT management

2021-05-04 Thread Bing Zhao
The definitions of ASO connection tracking objects management structures are added. Considering performance, the bulk allocation of ASO CT objects should be used. The maximal value per bulk and the granularity could be fetched from HCA capabilities 2. Right now, a fixed number of 64 is used for ea

[dpdk-dev] [PATCH v3 03/17] net/mlx5: use meter color reg for CT

2021-05-04 Thread Bing Zhao
Based on the capacity, 3 registers could be used. Due to the register allocation, only the one REG_C_3 for meter color could be reused right now. Then in the same flow, no more than one ASO action can be supported. Signed-off-by: Bing Zhao --- drivers/net/mlx5/mlx5_flow.c | 4 +++- drivers/net/

[dpdk-dev] [PATCH v3 02/17] common/mlx5: add CT offload capability checking

2021-05-04 Thread Bing Zhao
During startup, the ASO connection tracking offload capability could be queried via HCA_CAP_QUERY command. If the HW doesn't support ASO CT, the value would be 0 by default. The following initialization should be skipped and the creation of the CT object should return a failure directly. The follo

[dpdk-dev] [PATCH v3 01/17] common/mlx5: add connection tracking object definition

2021-05-04 Thread Bing Zhao
The structures of ASO connection tracking offload object are added based on the definitions in the PRM. One CT object context will be loaded into the cache completely in a reversed order of dwords. The valid bit should be the MSB of the last dword. This is used for the conntrack context creation an

[dpdk-dev] [PATCH v3 00/17] conntrack support in mlx5 PMD

2021-05-04 Thread Bing Zhao
This patch set adds the connection tracking offload support in the mlx5 driver, as well as the documents update. --- v2: code bug fixes, commits clean up and doc update. v3: fix error input pointer for CT MR registering --- Acked-by: Viacheslav Ovsiienko Bing Zhao (17): common/mlx5: add conn

Re: [dpdk-dev] [PATCH v2] eal: fix use wrong time API

2021-05-04 Thread Morten Brørup
> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Thomas Monjalon > Sent: Wednesday, May 5, 2021 8:14 AM > > 04/05/2021 21:12, Morten Brørup: > > > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Thomas > Monjalon > > > Sent: Tuesday, May 4, 2021 6:50 PM > > > > > > 29/04/2021 04:10, Min

Re: [dpdk-dev] [PATCH v2] eal: fix use wrong time API

2021-05-04 Thread Thomas Monjalon
04/05/2021 21:12, Morten Brørup: > > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Thomas Monjalon > > Sent: Tuesday, May 4, 2021 6:50 PM > > > > 29/04/2021 04:10, Min Hu (Connor): > > > Currently, the mp uses gettimeofday() API to get the time, and used > > as > > > timeout parameter. > >

Re: [dpdk-dev] [PATCH v2 00/17] conntrack support in mlx5 PMD

2021-05-04 Thread Slava Ovsiienko
> -Original Message- > From: Bing Zhao > Sent: Wednesday, May 5, 2021 7:20 > To: Slava Ovsiienko ; Matan Azrad > ; NBU-Contact-Thomas Monjalon > > Cc: dev@dpdk.org; Ori Kam ; Raslan Darawsheh > > Subject: [PATCH v2 00/17] conntrack support in mlx5 PMD > > This patch set adds the connect

[dpdk-dev] [PATCH v2 17/17] doc: update mlx5 support for conntrack

2021-05-04 Thread Bing Zhao
In the release notes and mlx5 NIC document, the support and limitation of connection tracking are added. Signed-off-by: Bing Zhao --- doc/guides/nics/features/default.ini | 1 + doc/guides/nics/features/mlx5.ini | 1 + doc/guides/nics/mlx5.rst | 14 ++ doc/guid

[dpdk-dev] [PATCH v2 14/17] net/mlx5: validation of CT action

2021-05-04 Thread Bing Zhao
The validation of a CT action contains two parts. The first is the CT action configurations parameter. When creating a CT action context, some members need to be verified. The second is that when creating a flow, the DR action of CT should be validated with other actions and items as well. Current

[dpdk-dev] [PATCH v2 16/17] net/mlx5: add support of CT between two ports

2021-05-04 Thread Bing Zhao
After creating a connection tracking context, it can be used between two ports. For each port, the flow for one direction traffic will be created. The context can only be shared between the owner port and the peer port that was specified when being created. Only the owner port could update the con

[dpdk-dev] [PATCH v2 15/17] net/mlx5: validation of CT item

2021-05-04 Thread Bing Zhao
The item of ASO connection tracking will be translated into the register value when matching. The validation of this item has no dependency on other layers, since the flow including this item should be jumped from another group. All the layers checking was already done in the previous groups. Only

[dpdk-dev] [PATCH v2 13/17] net/mlx5: add CT context update

2021-05-04 Thread Bing Zhao
When updating a connection tracking context, two separate parts could be updated. First, the direction. This will only update the traffic direction recorded in the software for flow creation. Second, the TCP parameters. The hardware context will be updated via the WQE. This update will be blocked u

[dpdk-dev] [PATCH v2 12/17] net/mlx5: add translation of CT item

2021-05-04 Thread Bing Zhao
The return register of the DR action will be used for matching. After the ASO CT checking of a TCP packet, the syndrome is filled in the register. Only the 8 LSB should be used. A converting from RTE_FLOW_CONNTRACK_FLAG* to the syndrome should be done after checing the spec and mask fields. Signed

[dpdk-dev] [PATCH v2 11/17] net/mlx5: add translation of CT action

2021-05-04 Thread Bing Zhao
When creating a flow with this action context for CT, it needs to be translated in 2 levels. First, retrieve from action context to rte_flow action. Second, translate it to the corresponding DR action with traffic direction that was specified when creating or updating via rte_flow_action_handle* A

[dpdk-dev] [PATCH v2 10/17] net/mlx5: add ASO CT destroy handling

2021-05-04 Thread Bing Zhao
When trying to destroy an ASO connection tracking context, the DR action created on this context should also be destroyed. Before inserting the related software object into the management free list, the reference count should be checked. Right now, the context object will not be freed to the syste

[dpdk-dev] [PATCH v2 09/17] net/mlx5: add ASO CT query implementation

2021-05-04 Thread Bing Zhao
After the connection tracking context is created and being used by the flows, the context will be updated by the HW automatically after a packet passed the CT validation. E.g., the ACK, SEQ, window and state of CT can be updated with both direction traffic. In order to query the updated contents o

[dpdk-dev] [PATCH v2 08/17] net/mlx5: close CT management structure

2021-05-04 Thread Bing Zhao
When freeing the IB shared context during stopping a device, the ASO connection tracking management structure should also be cleaned up. All the DR actions created should be destroyed. The structures need to be freed and ASO CT QP should be released. In the meanwhile, the allocated and registered

[dpdk-dev] [PATCH v2 07/17] net/mlx5: add actions creating for CT

2021-05-04 Thread Bing Zhao
Allocating a CT from the management pools and creating the DR actions for both directions by default. If there is no available connection tracking action, a new pool will be created with a fixed size bulk allocation. Right now, all the resources are controlled by the linked list. The ASO connecti

[dpdk-dev] [PATCH v2 06/17] net/mlx5: add modify support for CT

2021-05-04 Thread Bing Zhao
After the connection tracking object bulk is allocated, all the objects' contents are filled with zero by default. Every new-allocated object must be modified via WQE operation before it is used. In order to reduce the latency for the flow creation, an asynchronous way is used instead of busy wait

[dpdk-dev] [PATCH v2 05/17] common/mlx5: add Dexv CT objects creation

2021-05-04 Thread Bing Zhao
Adding support for connection tracking ASO creation via Devx command. Right now only bulk creation is supported. By default, the objects with zero contents will be created. Before using a single object, the modification via posting a WQE to the ASO CT SQ is needed. Signed-off-by: Bing Zhao ---

[dpdk-dev] [PATCH v2 04/17] net/mlx5: initialization of CT management

2021-05-04 Thread Bing Zhao
The definitions of ASO connection tracking objects management structures are added. Considering performance, the bulk allocation of ASO CT objects should be used. The maximal value per bulk and the granularity could be fetched from HCA capabilities 2. Right now, a fixed number of 64 is used for ea

[dpdk-dev] [PATCH v2 03/17] net/mlx5: use meter color reg for CT

2021-05-04 Thread Bing Zhao
Based on the capacity, 3 registers could be used. Due to the register allocation, only the one REG_C_3 for meter color could be reused right now. Then in the same flow, no more than one ASO action can be supported. Signed-off-by: Bing Zhao --- drivers/net/mlx5/mlx5_flow.c | 4 +++- drivers/net/

[dpdk-dev] [PATCH v2 01/17] common/mlx5: add connection tracking object definition

2021-05-04 Thread Bing Zhao
The structures of ASO connection tracking offload object are added based on the definitions in the PRM. One CT object context will be loaded into the cache completely in a reversed order of dwords. The valid bit should be the MSB of the last dword. This is used for the conntrack context creation an

[dpdk-dev] [PATCH v2 02/17] common/mlx5: add CT offload capability checking

2021-05-04 Thread Bing Zhao
During startup, the ASO connection tracking offload capability could be queried via HCA_CAP_QUERY command. If the HW doesn't support ASO CT, the value would be 0 by default. The following initialization should be skipped and the creation of the CT object should return a failure directly. The follo

[dpdk-dev] [PATCH v2 00/17] conntrack support in mlx5 PMD

2021-05-04 Thread Bing Zhao
This patch set adds the connection tracking offload support in the mlx5 driver, as well as the documents update. --- v2: code bug fixes, commits clean up and doc update. --- Bing Zhao (17): common/mlx5: add connection tracking object definition common/mlx5: add CT offload capability checking

[dpdk-dev] [PATCH v3 2/2] eal: fix service core index validity

2021-05-04 Thread Chengwen Feng
This patch adds checking for service core index validity when parsing service corelist. Fixes: 7dbd7a6413ef ("service: add -S corelist option") Cc: sta...@dpdk.org Signed-off-by: Chengwen Feng Signed-off-by: Min Hu (Connor) --- v2->v3: * change patch's author --- lib/eal/common/eal_common_opti

[dpdk-dev] [PATCH v3 1/2] eal: check mp reply result

2021-05-04 Thread Chengwen Feng
This patch adds checking for mp reply result in handle_sync(). Fixes: 07dcbfe0101f ("malloc: support multiprocess memory hotplug") Cc: sta...@dpdk.org Signed-off-by: Chengwen Feng Signed-off-by: Min Hu (Connor) --- v2->v3: * change patch's author --- lib/eal/common/malloc_mp.c | 4 +--- 1 file

[dpdk-dev] [PATCH v3 0/2] fix bugs for librte eal

2021-05-04 Thread Chengwen Feng
This patchset fixed some bugs for librte_eal. v3: * change patch's author v2: * set variables an unsigned type. Chengwen Feng (2): eal: check mp reply result eal: fix service core index validity lib/eal/common/eal_common_options.c | 6 -- lib/eal/common/malloc_mp.c | 4 +--- 2

[dpdk-dev] [PATCH v3] eal: fix use wrong time API

2021-05-04 Thread Chengwen Feng
Currently, the mp uses gettimeofday() API to get the time, and used as timeout parameter. But the time which gets from gettimeofday() API isn't monotonically increasing. The process may fail if the system time is changed. This fixes it by using clock_gettime() API with monotonic attribution. Fix

Re: [dpdk-dev] [PATCH v4 2/3] net/iavf: enable PCI bus master after reset

2021-05-04 Thread Wang, Haiyue
> -Original Message- > From: David Marchand > Sent: Tuesday, May 4, 2021 19:32 > To: Wang, Haiyue > Cc: dev ; Zhang, Qi Z ; Wang, Liang-min > ; > Wu, Jingjing ; Xing, Beilei > Subject: Re: [PATCH v4 2/3] net/iavf: enable PCI bus master after reset > > On Tue, Apr 27, 2021 at 4:05 PM Ha

Re: [dpdk-dev] [PATCH v1] test/ticketlock: use C11 atomic builtins for lcores sync

2021-05-04 Thread Honnappa Nagarahalli
> > > > > > your subject line indicates the use of C11 which is a standard [1]. > > > > > > the patch itself uses gcc atomics builtins which are not part of C11 > > > standard so the subject line is incorrect and misleading. > > Ok, understood. How about the following? > > "use gcc's C11 atomic

Re: [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable testpmd on Windows

2021-05-04 Thread Kadam, Pallavi
On 5/3/2021 5:33 PM, Jie Zhou wrote: This patchset is to enable testpmd on windows. It mainly includes: - Enable building libraries on Windows that testpmd depends on - Add necessary macros required by testpmd on Windows in rte_os_shim.h - Add device event stubs for Windows - Resolve name colli

[dpdk-dev] test/crypto: copy offset data to oop dst buffer

2021-05-04 Thread Kai Ji
Copy over the offset data required for auth in out-of-place op when auth offset and cipher offset are not aligned. Fixes: e847fc512817 ("test/crypto: add encrypted digest case for AES-CTR-CMAC") Cc: adamx.dybkow...@intel.com Signed-off-by: Kai Ji --- app/test/test_cryptodev.c | 15 +

Re: [dpdk-dev] [PATCH v3 00/15] mlx5 common part for crypto driver

2021-05-04 Thread Thomas Monjalon
04/05/2021 19:54, Matan Azrad: > Dekel Peled (12): > common/mlx5: remove redundant spaces in header file > common/mlx5: update GENEVE TLV OPT obj name > common/mlx5: optimize read of general obj type caps > common/mlx5: add HCA cap for AES-XTS crypto > common/mlx5: support general object

[dpdk-dev] [PATCH v3 15/15] crypto/mlx5: set feature flags and capabilities

2021-05-04 Thread Matan Azrad
From: Shiri Kuzin Add the supported capabilities to the crypto driver. Add supported feature flags. Add crypto driver documentation. Signed-off-by: Shiri Kuzin Signed-off-by: Matan Azrad --- doc/guides/cryptodevs/features/mlx5.ini | 37 ++ doc/guides/cryptodevs/index.rst | 1

[dpdk-dev] [PATCH v3 13/15] crypto/mlx5: add enqueue and dequeue operations

2021-05-04 Thread Matan Azrad
From: Suanming Mou The crypto operations are done with the WQE set which contains one UMR WQE and one rdma write WQE. Most segments of the WQE set are initialized properly during queue setup, only limited segments are initialized according to the crypto detail in the datapath process. This commi

[dpdk-dev] [PATCH v3 14/15] crypto/mlx5: add statistic get and reset operations

2021-05-04 Thread Matan Azrad
From: Suanming Mou This commit adds mlx5 crypto statistic get and reset operations. Signed-off-by: Suanming Mou Signed-off-by: Matan Azrad --- drivers/crypto/mlx5/mlx5_crypto.c | 39 --- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/

[dpdk-dev] [PATCH v3 12/15] crypto/mlx5: add WQE set initialization

2021-05-04 Thread Matan Azrad
From: Suanming Mou Currently, HW handles the WQEs much faster than the software, Using the constant WQE set layout can initialize most of the WQE segments in advanced, and software only needs to configure very limited segments in datapath. This accelerates the software WQE organize in datapath.

[dpdk-dev] [PATCH v3 11/15] crypto/mlx5: add maximum segments device argument

2021-05-04 Thread Matan Azrad
From: Suanming Mou The mlx5 HW crypto operations are done by attaching crypto property to a memory region. Once done, every access to the memory via the crypto-enabled memory region will result with in-line encryption or decryption of the data. As a result, the design choice is to provide two ty

[dpdk-dev] [PATCH v3 09/15] crypto/mlx5: adjust to the multiple data unit API

2021-05-04 Thread Matan Azrad
From: Shiri Kuzin In AES-XTS the data to be encrypted\decrypted does not have to be in multiples of 16B size, the unit of data is called data-unit. As a result of patch [1] a new field is added to the cipher capability, called dataunit_set, where the devices can report the range of supported dat

[dpdk-dev] [PATCH v3 10/15] crypto/mlx5: add keytag device argument

2021-05-04 Thread Matan Azrad
From: Suanming Mou A keytag is a piece of data encrypted together with a DEK. When a DEK is referenced by an MKEY.bsf through its index, the keytag is also supplied in the BSF as plaintext. The HW will decrypt the DEK (and the attached keytag) and will fail the operation if the keytags don't mat

[dpdk-dev] [PATCH v3 07/15] crypto/mlx5: add memory region management

2021-05-04 Thread Matan Azrad
From: Shiri Kuzin Mellanox user space drivers don't deal with physical addresses as part of a memory protection mechanism. The device translates the given virtual address to a physical address using the given memory key as an address space identifier. That's why any mbuf virtual address is moved

[dpdk-dev] [PATCH v3 08/15] crypto/mlx5: create login object using DevX

2021-05-04 Thread Matan Azrad
From: Shiri Kuzin To work with crypto engines that are marked with wrapped_import_method, a login session is required. A crypto login object needs to be created using DevX. The crypto login object contains: - The credential pointer. - The import_KEK pointer to be used for all sec

[dpdk-dev] [PATCH v3 06/15] crypto/mlx5: add dev stop and start operations

2021-05-04 Thread Matan Azrad
From: Shiri Kuzin Add the dev_start function that is used to start a configured device. Add the dev_stop function that is used to stop a configured device. Both functions set the dev parameter as used and return 0. Signed-off-by: Shiri Kuzin Acked-by: Matan Azrad --- drivers/crypto/mlx5/mlx5

[dpdk-dev] [PATCH v3 03/15] crypto/mlx5: support session operations

2021-05-04 Thread Matan Azrad
From: Shiri Kuzin Sessions are used in symmetric transformations in order to prepare objects and data for packet processing stage. A mlx5 session includes iv_offset, pointer to mlx5_crypto_dek struct, bsf_size, bsf_p_type, encryption_order and encryption standard. Implement the next session ope

[dpdk-dev] [PATCH v3 05/15] crypto/mlx5: support queue pairs operations

2021-05-04 Thread Matan Azrad
From: Shiri Kuzin The HW queue pairs are a pair of send queue and receive queue of independent work queues packed together in one object for the purpose of transferring data between nodes of a network. Completion Queue is a FIFO queue of completed work requests. In crypto driver we use one QP i

[dpdk-dev] [PATCH v3 02/15] crypto/mlx5: add DEK object management

2021-05-04 Thread Matan Azrad
From: Shiri Kuzin A DEK(Data encryption Key) is an mlx5 HW object which represents the cipher algorithm key. The DEKs are used during data encryption/decryption operations. In symmetric algorithms like AES-STS, we use the same DEK for both encryption and decryption. Use the mlx5 hash-list tool

[dpdk-dev] [PATCH v3 04/15] crypto/mlx5: add basic operations

2021-05-04 Thread Matan Azrad
From: Shiri Kuzin The basic dev control operations are configure, close and get info. Extended the existing support of configure and close: -mlx5_crypto_dev_configure- function used to configure device. -mlx5_crypto_dev_close- function used to close a configured device.

[dpdk-dev] [PATCH v3 01/15] drivers: introduce mlx5 crypto PMD

2021-05-04 Thread Matan Azrad
From: Shiri Kuzin Add a new PMD for Nvidia devices- crypto PMD. The crypto PMD will be supported starting Nvidia ConnectX6 and BlueField2. The crypto PMD will add the support of encryption and decryption using the AES-XTS symmetric algorithm. The crypto PMD requires rdma-core and uses mlx5 Dev

[dpdk-dev] [PATCH v3 00/15] drivers: introduce mlx5 crypto PMD

2021-05-04 Thread Matan Azrad
Add a new PMD for Nvidia devices- crypto PMD. The crypto PMD will be supported on Nvidia ConnectX6 The crypto PMD will add the support of encryption and decryption using the AES-XTS symmetric algorithm. The crypto PMD requires rdma-core and uses mlx5 DevX. v2: Add data-path part. v3: Rebase. Sh

Re: [dpdk-dev] [PATCH v2] eal: fix use wrong time API

2021-05-04 Thread Morten Brørup
> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Thomas Monjalon > Sent: Tuesday, May 4, 2021 6:50 PM > > 29/04/2021 04:10, Min Hu (Connor): > > Currently, the mp uses gettimeofday() API to get the time, and used > as > > timeout parameter. > > > > But the time which gets from gettimeofday()

Re: [dpdk-dev] [PATCH v9 4/4] doc: add release note for vhost async packed ring

2021-05-04 Thread Ferruh Yigit
On 4/27/2021 9:03 AM, Cheng Jiang wrote: > Add release note for the support of vhost async packed ring. > > Signed-off-by: Cheng Jiang Squashed into relevant commit in next-net, thanks.

Re: [dpdk-dev] [dpdk-stable] [PATCH v3 1/2] test/mempool: fix heap buffer overflow

2021-05-04 Thread Thomas Monjalon
27/04/2021 15:56, Olivier Matz: > The function rte_pktmbuf_init() expects that the mempool private area is > large enough and was previously initialized by rte_pktmbuf_pool_init(), > which is not the case. > > This causes the function rte_pktmbuf_priv_size() to return an > unpredictable value, and

[dpdk-dev] [PATCH v3 15/15] common/mlx5: add UMR and RDMA write WQE defines

2021-05-04 Thread Matan Azrad
From: Suanming Mou This patch adds the struct defining UMR and RDMA write WQEs. Signed-off-by: Suanming Mou Signed-off-by: Matan Azrad --- drivers/common/mlx5/mlx5_prm.h | 187 + 1 file changed, 121 insertions(+), 66 deletions(-) diff --git a/drivers/common/ml

[dpdk-dev] [PATCH v3 14/15] common/mlx5: support register write access

2021-05-04 Thread Matan Azrad
From: Dekel Peled This patch adds support of write operation to NIC registers. Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_devx_cmds.c | 67 +++- drivers/common/mlx5/mlx5_devx_cmds.h | 4 ++ drivers/common/mlx5/version.map | 1 +

[dpdk-dev] [PATCH v3 13/15] common/mlx5: add crypto register structs and defs

2021-05-04 Thread Matan Azrad
From: Dekel Peled Encryption key management requires use of several related registers. This patch adds the relevant structs and values, according to PRM definitions. Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_prm.h | 41 ++ 1

[dpdk-dev] [PATCH v3 12/15] common/mlx5: support general obj CREDENTIAL create

2021-05-04 Thread Matan Azrad
From: Dekel Peled CREDENTIAL object is used for any crypto operation in wrapped mode. This patch add support of CREDENTIAL object create operation. Add reading of CREDENTIAL support capability. Add function to create general object type CREDENTIAL, using DevX API. Signed-off-by: Dekel Peled Ac

[dpdk-dev] [PATCH v3 11/15] common/mlx5: share get ib device match function

2021-05-04 Thread Matan Azrad
From: Shiri Kuzin The get_ib_device_match function iterates over the list of ib devices returned by the get_device_list glue function and returns the ib device matching the provided address. Since this function is in use by several drivers, in this patch we share the function in common part. Si

[dpdk-dev] [PATCH v3 10/15] common/mlx5: share hash list tool

2021-05-04 Thread Matan Azrad
From: Shiri Kuzin In order to use the hash list defined in net in other drivers, the hash list is moved to common utilities. In addition, the log definition was moved from the common utilities to a dedicated new log file in common in order to prevent a conflict. Signed-off-by: Shiri Kuzin Acke

[dpdk-dev] [PATCH v3 09/15] common/mlx5: add crypto BSF struct and defines

2021-05-04 Thread Matan Azrad
From: Dekel Peled This patch adds the struct defining crypto BSF segment of UMR WQE, and the related value definitions and offsets. Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_prm.h | 66 ++ 1 file changed, 66 insertions(+) di

[dpdk-dev] [PATCH v3 08/15] common/mlx5: support general obj CRYPTO LOGIN create

2021-05-04 Thread Matan Azrad
From: Dekel Peled CRYPTO_LOGIN Object is used to login to the device as crypto user or crypto officer. Required in order to perform any crypto related control operations. This patch adds support of CRYPTO_LOGIN object create operation. Add reading of CRYPTO_LOGIN support capability. Add function

[dpdk-dev] [PATCH v3 07/15] common/mlx5: support general obj IMPORT KEK create

2021-05-04 Thread Matan Azrad
From: Dekel Peled IMPORT_KEK object is used to wrap (encrypt) critical security parameters, such as other keys and credentials, when those need to be passed between the device and the software. This patch add support of IMPORT_KEK object create operation. Add reading of IMPORT_KEK support capabi

[dpdk-dev] [PATCH v3 06/15] common/mlx5: adjust DevX MKEY fields for crypto

2021-05-04 Thread Matan Azrad
From: Dekel Peled MKEY that will be used for crypto purposes must be created with crypto_en and remote access attributes. This patch adds support for them in the DevX MKEY context. Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_devx_cmds.c | 9 + driver

[dpdk-dev] [PATCH v3 05/15] common/mlx5: support general object DEK create op

2021-05-04 Thread Matan Azrad
From: Dekel Peled Data Encryption Keys (DEKs) are the keys used for data encryption/decryption operations. Add reading of DEK support capability. Add function to create general object type DEK, using DevX API. Arrange common version.map file in alphabetical order. Signed-off-by: Dekel Peled A

[dpdk-dev] [PATCH v3 04/15] common/mlx5: add HCA cap for AES-XTS crypto

2021-05-04 Thread Matan Azrad
From: Dekel Peled Update the PRM structure and HCA capabilities reading, to include relevant capabilities for AES-XTS crypto. Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_devx_cmds.c | 3 +++ drivers/common/mlx5/mlx5_devx_cmds.h | 2 ++ drivers/common/mlx5/mlx

[dpdk-dev] [PATCH v3 03/15] common/mlx5: optimize read of general obj type caps

2021-05-04 Thread Matan Azrad
From: Dekel Peled General object types support is indicated in bitmap general_obj_types, which is part of HCA capabilities list. Currently this bitmap is read multiple times, and each time a different bit is extracted. This patch optimizes the code, reading the bitmap once into a local variable,

[dpdk-dev] [PATCH v3 02/15] common/mlx5: update GENEVE TLV OPT obj name

2021-05-04 Thread Matan Azrad
From: Dekel Peled Rename MLX5_OBJ_TYPE_GENEVE_TLV_OPT as MLX5_GENERAL_OBJ_TYPE_GENEVE_TLV_OPT, to align with other general objects names. Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_devx_cmds.c | 2 +- drivers/common/mlx5/mlx5_prm.h | 4 ++-- 2 files ch

[dpdk-dev] [PATCH v3 01/15] common/mlx5: remove redundant spaces in header file

2021-05-04 Thread Matan Azrad
From: Dekel Peled File drivers/common/mlx5/mlx5_prm.h includes structs representing data items as defined in PRM document. Some of these structs were copied as-is from kernel file mlx5_ifc.h. As result the structs are not all aligned with the same spacing. This patch removes redundant spaces and

  1   2   >