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

2021-05-05 Thread Morten Brørup
> From: Thomas Monjalon [mailto:tho...@monjalon.net] > Sent: Wednesday, May 5, 2021 8:51 AM > > 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: > >

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

2021-05-05 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 v4: fix typo in commit message of patch 11 --- Acked-by: Viacheslav Ovsiienk

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

2021-05-05 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 v4 02/17] common/mlx5: add CT offload capability checking

2021-05-05 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 v4 03/17] net/mlx5: use meter color reg for CT

2021-05-05 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 v4 04/17] net/mlx5: initialization of CT management

2021-05-05 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 v4 05/17] common/mlx5: add Dexv CT objects creation

2021-05-05 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 v4 06/17] net/mlx5: add modify support for CT

2021-05-05 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 v4 07/17] net/mlx5: add actions creating for CT

2021-05-05 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 v4 08/17] net/mlx5: close CT management structure

2021-05-05 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 v4 09/17] net/mlx5: add ASO CT query implementation

2021-05-05 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 v4 10/17] net/mlx5: add ASO CT destroy handling

2021-05-05 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 v4 11/17] net/mlx5: add translation of CT action

2021-05-05 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 v4 12/17] net/mlx5: add translation of CT item

2021-05-05 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 v4 13/17] net/mlx5: add CT context update

2021-05-05 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 v4 14/17] net/mlx5: validation of CT action

2021-05-05 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 v4 15/17] net/mlx5: validation of CT item

2021-05-05 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 v4 16/17] net/mlx5: add support of CT between two ports

2021-05-05 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 v4 17/17] doc: update mlx5 support for conntrack

2021-05-05 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 00/22] net/ena: update ENA PMD to v2.3.0

2021-05-05 Thread Michal Krawczyk
Hi, this version updates the driver to version 2.3.0, which fixes multiple bugs, contains part of the work on making the ENA PMD fully MP aware, and also updates HAL to the latest version. More detailed list of changes: * memcpy mapping to the dpdk-optimized version. * ena_com (HAL) update to

[dpdk-dev] [PATCH v2 01/22] net/ena: switch memcpy to dpdk-optimized version

2021-05-05 Thread Michal Krawczyk
From: Igor Chauskin memcpy is now mapped to rte_memcpy macro on x86 architectures. Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK") Cc: sta...@dpdk.org Signed-off-by: Igor Chauskin Reviewed-by: Michal Krawczyk Reviewed-by: Artur Rojek --- v2: * Fix nested declaration of the rte_

[dpdk-dev] [PATCH v2 02/22] net/ena/base: unify arg names for the functions

2021-05-05 Thread Michal Krawczyk
Instead of using 'queue' for struct ena_com_admin_queue and 'dev' for struct ena_com_dev variables, use more descriptive 'admin_queue' and 'ena_dev'. This also unifies the names of variables of the type struct ena_com_dev in the driver. Signed-off-by: Michal Krawczyk Reviewed-by: Igor Chauskin

[dpdk-dev] [PATCH v2 03/22] net/ena/base: add dev arg to the logging macros

2021-05-05 Thread Michal Krawczyk
Some platforms may make use of the device argument to make the logs more verbose and specific for the appropriate device. As it's not used by the ENA DPDK PMD for the logging, the type is just defined, but never used. It may be reconsidered to change this in the future by adding port ID to the me

[dpdk-dev] [PATCH v2 04/22] net/ena/base: typos, style and comments improvements

2021-05-05 Thread Michal Krawczyk
List of changes: * Comment style was adjusted for the functions * The keys_num at "struct ena_admin_feature_rss_flow_hash_control" was renamed to the key_parts to better describe it's meaning * The RSS indirection table was called "REDIRECTION" -> changed to INDIRECTION * Change AEN

[dpdk-dev] [PATCH v2 05/22] net/ena/base: fix issues from the static code scan

2021-05-05 Thread Michal Krawczyk
To silence error messages from the static code analysis, make the type conversions explicit where they're intended. Also fix the type for the DMA width value. Fixes: 99ecfbf845b3 ("ena: import communication layer") Signed-off-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Guy Tzal

[dpdk-dev] [PATCH v2 06/22] net/ena/base: destroy multiple "wait events"

2021-05-05 Thread Michal Krawczyk
Although the ENA DPDK PMD doesn't have to perform any actions for destroying the wait event, some other platforms have to. The macro "ENA_WAIT_EVENT_DESTROY" was renamed to "ENA_WAIT_EVENTS_DESTROY" and also whole implementation responsible for that was moved to a separate function for better read

[dpdk-dev] [PATCH v2 07/22] net/ena/base: remove indir table from ENA feat ctx

2021-05-05 Thread Michal Krawczyk
The RSS indirection table shouldn't be included as a part of the device features context. If the driver has to acquire it, it can be done using the separate API whenever the RSS configuration is needed. Signed-off-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Amit Bernstein ---

[dpdk-dev] [PATCH v2 08/22] net/ena/base: remove mutable RSS from the host info

2021-05-05 Thread Michal Krawczyk
This feature wasn't used by any of the drivers. Because of that, it was removed. Signed-off-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Shay Agroskin --- drivers/net/ena/base/ena_defs/ena_admin_defs.h | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --g

[dpdk-dev] [PATCH v2 09/22] net/ena/base: update generation date and commit

2021-05-05 Thread Michal Krawczyk
The current ena_com version was generated on 18.09.2020. Signed-off-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Amit Bernstein --- drivers/net/ena/base/ena_defs/ena_gen_info.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ena/base/ena_defs/

[dpdk-dev] [PATCH v2 10/22] net/ena/base: use rte_prefetch0_write

2021-05-05 Thread Michal Krawczyk
As in the v20.11 rte_prefetch0_write API was added, it should be used in the platform file for the definition of the macro prefetchw, instead of using simply prefetch0. Signed-off-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Amit Bernstein --- drivers/net/ena/base/ena_plat_dpdk.

[dpdk-dev] [PATCH v2 11/22] net/ena/base: adjust changes to lastest ena-com

2021-05-05 Thread Michal Krawczyk
From: Amit Bernstein 1. As memzone uses unique names, changed alloc coherent macro to use 64 bit size atomic variable to increase the memzone name space 2. "handle" param name change to be consistent with other macros 3. Variable definition displacement 4. Backslash alignment to column 80 Sig

[dpdk-dev] [PATCH v2 12/22] net/ena: fix parsing of large_llq_hdr argument

2021-05-05 Thread Michal Krawczyk
From: Igor Chauskin The code incorrectly checked the return value of comparison when parsing the argument key name. The return value of strcmp should be compared to 0 to identify a match. Fixes: 8a7a73f26cc9 ("net/ena: support large LLQ headers") Cc: sta...@dpdk.org Signed-off-by: Igor Chauskin

[dpdk-dev] [PATCH v2 13/22] net/ena: terminate devargs allowed keys with NULL

2021-05-05 Thread Michal Krawczyk
As the documentation of rte_kvargs_parse() states, the valid_keys argument must be NULL terminated. Lack of this feature may cause segmentation fault if the passed devarg will be different then the supported value. Fixes: 8a7a73f26cc9 ("net/ena: support large LLQ headers") Cc: sta...@dpdk.org Sig

[dpdk-dev] [PATCH v2 14/22] net/ena: indicate Rx RSS hash presence

2021-05-05 Thread Michal Krawczyk
To make it possible to the app to determine if the hash was calculated for the packet or not, the PKT_RX_RSS_HASH should be set in the mbuf's ol_flags. As the PMD wasn't setting that, the application couldn't check if there is a hash in a proper way. The hash is valid only if it's UDP or TCP and

[dpdk-dev] [PATCH v2 15/22] net/ena: remove endian swap functions

2021-05-05 Thread Michal Krawczyk
From: Stanislaw Kardach swap*_*_le() functions are not used anywhere and besides there are rte alternatives already present. Fixes: 1173fca25af9 ("ena: add polling-mode driver") Signed-off-by: Stanislaw Kardach Reviewed-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Shay Agroski

[dpdk-dev] [PATCH v2 16/22] net/ena: handle spurious wakeups in ENA_WAIT_EVENT

2021-05-05 Thread Michal Krawczyk
From: Stanislaw Kardach pthread_cond_timedwait() may spuriously wakeup according to POSIX. Therefore it is required to check whether predicate is actually true before finishing the waiting loop. Signed-off-by: Stanislaw Kardach Reviewed-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-

[dpdk-dev] [PATCH v2 17/22] net/ena: support SMP for mz alloc counter

2021-05-05 Thread Michal Krawczyk
From: Stanislaw Kardach Introduce a memory area for ENA driver shared between all the processes of a same prefix (memzone backed). Move the memzone allocation counter for ENA_MEM_ALLOC_COHERENT there so that all processes may utilize it. Signed-off-by: Stanislaw Kardach Reviewed-by: Michal Kraw

[dpdk-dev] [PATCH v2 18/22] net/ena: move default RSS key to shared mem

2021-05-05 Thread Michal Krawczyk
From: Stanislaw Kardach Make sure the same random generated RSS key is available to all ENA PMD instances in all processes. Signed-off-by: Stanislaw Kardach Reviewed-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Shay Agroskin --- drivers/net/ena/ena_ethdev.c | 16 +

[dpdk-dev] [PATCH v2 19/22] net/ena: make ethdev references smp safe

2021-05-05 Thread Michal Krawczyk
From: Stanislaw Kardach rte_pci_device and rte_eth_dev are process-local structures. Therefore ena_adapter::pdev and ena_adapter::rte_dev cannot be used universally. Switch this to extracting those structures via rte_eth_devices indexing and remove pdev since it's not used outside of init. Signe

[dpdk-dev] [PATCH v2 21/22] net/ena: report default ring size

2021-05-05 Thread Michal Krawczyk
From: Stanislaw Kardach Remove invalid ring size alignment logic and add default rx and tx port ring sizes to the device info spec. The logic in lines 1297 and 1371 is invalid. The RTE_ETH_DEV_FALLBACK_RX_RINGSIZE (and the TX counterpart) is a value that rte_eth_rx_queue_setup() will set if dev_

[dpdk-dev] [PATCH v2 20/22] net/ena: disable dev_ops not supported in SMP

2021-05-05 Thread Michal Krawczyk
From: Stanislaw Kardach For dev_ops not supported in SMP, either return -EPERM or return without doing anything. In both cases log a warning. Signed-off-by: Stanislaw Kardach Reviewed-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Shay Agroskin --- drivers/net/ena/ena_ethdev.c

[dpdk-dev] [PATCH v2 22/22] net/ena: update version to v2.3.0

2021-05-05 Thread Michal Krawczyk
This version update contains: * memcpy mapping to the dpdk-optimized version. * ena_com (HAL) update to the latest version. * Bug fixes for the the large LLQ headers and devargs parsing. * Mbuf RSS hash presence indication. * Bug fix for the default ring size. * Various fixes for SMP mo

[dpdk-dev] DPDK Telemetry library enhancement

2021-05-05 Thread Harman Kalra
Hi All, We have a use case where we need to gather statistics over network. Current implementation of telemetry library is based on Unix socket, we would like to enhance the scope of library to use network sockets. We understand security challenges with network sockets, to overcome them can we

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

2021-05-05 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 v5 02/17] common/mlx5: add CT offload capability checking

2021-05-05 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 v5 00/17] conntrack support in mlx5 PMD

2021-05-05 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 v4: fix typo in commit message of patch 11 v5: adjust mkey to lkey in SQ initi

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

2021-05-05 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 v5 04/17] net/mlx5: initialization of CT management

2021-05-05 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 v5 05/17] common/mlx5: add Dexv CT objects creation

2021-05-05 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 v5 06/17] net/mlx5: add modify support for CT

2021-05-05 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 v5 09/17] net/mlx5: add ASO CT query implementation

2021-05-05 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 v5 07/17] net/mlx5: add actions creating for CT

2021-05-05 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 v5 08/17] net/mlx5: close CT management structure

2021-05-05 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 v5 11/17] net/mlx5: add translation of CT action

2021-05-05 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 v5 10/17] net/mlx5: add ASO CT destroy handling

2021-05-05 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 v5 12/17] net/mlx5: add translation of CT item

2021-05-05 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 v5 13/17] net/mlx5: add CT context update

2021-05-05 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 v5 15/17] net/mlx5: validation of CT item

2021-05-05 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 v5 14/17] net/mlx5: validation of CT action

2021-05-05 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 v5 16/17] net/mlx5: add support of CT between two ports

2021-05-05 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 v5 17/17] doc: update mlx5 support for conntrack

2021-05-05 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

Re: [dpdk-dev] [PATCH v10 07/10] app/testpmd: replace POSIX specific code

2021-05-05 Thread Tal Shnaiderman
> Subject: [PATCH v10 07/10] app/testpmd: replace POSIX specific code > > External email: Use caution opening links or attachments > > > - Make printf format OS independent > - Replace htons with RTE_BE16 > - Replace POSIX specific inet_aton with OS independent inet_pton > - Replace sleep wi

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

2021-05-05 Thread David Marchand
On Wed, May 5, 2021 at 4:56 AM Wang, Haiyue wrote: > > > -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: ena

Re: [dpdk-dev] DPDK Telemetry library enhancement

2021-05-05 Thread Thomas Monjalon
05/05/2021 09:49, Harman Kalra: > Hi All, > > We have a use case where we need to gather statistics over network. Current > implementation of telemetry library is based on Unix socket, we would like to > enhance the scope of library to use network sockets. We understand security > challenges wi

Re: [dpdk-dev] [PATCH] telemetry: remove internal symbol from public header

2021-05-05 Thread David Marchand
On Tue, May 4, 2021 at 6:19 PM Power, Ciara wrote: > > >-Original Message- > >From: Richardson, Bruce > >Sent: Tuesday 4 May 2021 13:14 > >To: jer...@marvell.com > >Cc: Power, Ciara ; dev@dpdk.org; > >tho...@monjalon.net > >Subject: Re: [PATCH] telemetry: remove internal symbol from publi

Re: [dpdk-dev] [pull-request] dpdk-next-net-eventdev - v21.05 - rc2

2021-05-05 Thread Thomas Monjalon
04/05/2021 10:33, Jerin Jacob Kollanukkaran: > http://dpdk.org/git/next/dpdk-next-eventdev Pulled thanks Some changes I did: - fix ordering in release notes and MAINTAINERS - fix indent and ordering in meson files - improve title consistency

[dpdk-dev] [PATCH] test/crypto: fix gcc 11 array-bounds error

2021-05-05 Thread Kevin Traynor
$ gcc --version gcc (GCC) 11.1.1 20210428 (Red Hat 11.1.1-1) /test_cryptodev.c.o -c ../app/test/test_cryptodev.c ../app/test/test_cryptodev.c: In function ‘test_multi_session’: ../app/test/test_cryptodev.c:10447:9: error: array subscript ‘struct rte_cryptodev_sym_session *[4]’ is partly outside ar

Re: [dpdk-dev] DPDK Telemetry library enhancement

2021-05-05 Thread David Marchand
On Wed, May 5, 2021 at 9:49 AM Harman Kalra wrote: > We have a use case where we need to gather statistics over network. Current > implementation of telemetry library is based on Unix socket, we would like to > enhance the scope of library to use network sockets. We understand security > challe

[dpdk-dev] test/crypto: fix auth-cipher compare length in oop

2021-05-05 Thread Kai Ji
For out-of-place operations, comparing expected ciphertext with the operation result should skip cipher_offset bytes, as those will not be copied from source to the destination buffer, making the tests fail. Fixes: 02ed7b3871d6 ("test/crypto: add SNOW3G test cases for auth-cipher") Cc: damianx.no.

Re: [dpdk-dev] DPDK Telemetry library enhancement

2021-05-05 Thread Jerin Jacob
On Wed, May 5, 2021 at 2:13 PM Thomas Monjalon wrote: > > 05/05/2021 09:49, Harman Kalra: > > Hi All, > > > > We have a use case where we need to gather statistics over network. Current > > implementation of telemetry library is based on Unix socket, we would like > > to enhance the scope of lib

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

2021-05-05 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 v4: fix typo in commit message of patch 11 v5: adjust mkey to lkey in SQ initi

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

2021-05-05 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 v6 02/17] common/mlx5: add CT offload capability checking

2021-05-05 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 v6 03/17] net/mlx5: use meter color reg for CT

2021-05-05 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 v6 04/17] net/mlx5: initialization of CT management

2021-05-05 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 v6 05/17] common/mlx5: add Dexv CT objects creation

2021-05-05 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 v6 06/17] net/mlx5: add modify support for CT

2021-05-05 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 v6 07/17] net/mlx5: add actions creating for CT

2021-05-05 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 v6 08/17] net/mlx5: close CT management structure

2021-05-05 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 v6 09/17] net/mlx5: add ASO CT query implementation

2021-05-05 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 v6 10/17] net/mlx5: add ASO CT destroy handling

2021-05-05 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 v6 11/17] net/mlx5: add translation of CT action

2021-05-05 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 v6 12/17] net/mlx5: add translation of CT item

2021-05-05 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 v6 13/17] net/mlx5: add CT context update

2021-05-05 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 v6 14/17] net/mlx5: validation of CT action

2021-05-05 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 v6 16/17] net/mlx5: add support of CT between two ports

2021-05-05 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 v6 15/17] net/mlx5: validation of CT item

2021-05-05 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 v6 17/17] doc: update mlx5 support for conntrack

2021-05-05 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

Re: [dpdk-dev] DPDK Telemetry library enhancement

2021-05-05 Thread Bruce Richardson
On Wed, May 05, 2021 at 03:07:02PM +0530, Jerin Jacob wrote: > On Wed, May 5, 2021 at 2:13 PM Thomas Monjalon wrote: > > > > 05/05/2021 09:49, Harman Kalra: > > > Hi All, > > > > > > We have a use case where we need to gather statistics over network. > > > Current implementation of telemetry libr

Re: [dpdk-dev] DPDK Telemetry library enhancement

2021-05-05 Thread Bruce Richardson
On Wed, May 05, 2021 at 10:57:37AM +0200, David Marchand wrote: > On Wed, May 5, 2021 at 9:49 AM Harman Kalra wrote: > > We have a use case where we need to gather statistics over network. Current > > implementation of telemetry library is based on Unix socket, we would like > > to enhance the s

Re: [dpdk-dev] [EXT] Re: DPDK Telemetry library enhancement

2021-05-05 Thread Harman Kalra
> -Original Message- > From: David Marchand > Sent: Wednesday, May 5, 2021 2:28 PM > To: Harman Kalra > Cc: bruce.richard...@intel.com; kevin.la...@intel.com; > tho...@monjalon.net; step...@networkplumber.org; dev@dpdk.org; Luca > Boccassi ; Jerin Jacob Kollanukkaran > Subject: [EXT] R

Re: [dpdk-dev] [PATCH v2] acl: fix build with gcc 11

2021-05-05 Thread Thomas Monjalon
26/04/2021 15:35, Konstantin Ananyev: > gcc 11 with '-O2' complains about some variables being used without > being initialized: > > In file included from ../lib/librte_acl/acl_run_avx512x8.h:201, > from ../lib/librte_acl/acl_run_avx512.c:110: > In function ‘start_flow_avx512x8’,

Re: [dpdk-dev] DPDK Telemetry library enhancement

2021-05-05 Thread Jerin Jacob
On Wed, May 5, 2021 at 3:31 PM Bruce Richardson wrote: > > On Wed, May 05, 2021 at 03:07:02PM +0530, Jerin Jacob wrote: > > On Wed, May 5, 2021 at 2:13 PM Thomas Monjalon wrote: > > > > > > 05/05/2021 09:49, Harman Kalra: > > > > Hi All, > > > > > > > > We have a use case where we need to gather

Re: [dpdk-dev] [PATCH v2] hash: fix tuple adjustment

2021-05-05 Thread Thomas Monjalon
04/05/2021 16:25, Vladimir Medvedkin: > rte_thash_adjust_tuple() uses random to generate a new subtuple if > fn() callback reports about collision. In some cases random changes > the subtuple in a way that after complementary bits are applied the > original tuple is obtained. This patch replaces ra

Re: [dpdk-dev] [PATCH] bpf: fix unreachable statement

2021-05-05 Thread Thomas Monjalon
22/04/2021 13:23, Ananyev, Konstantin: > > From: HongBo Zheng > > > > In function 'eval_jcc', judgment 'op == EBPF_JLT' occurs > > twice, as a result, the corresponding second statement > > cannot be accessed. > > > > This patch fix this problem. > > > > Fixes: 8021917293d0 ("bpf: add extra val

Re: [dpdk-dev] [PATCH] telemetry: remove internal symbol from public header

2021-05-05 Thread Jerin Jacob
On Wed, May 5, 2021 at 2:14 PM David Marchand wrote: > > On Tue, May 4, 2021 at 6:19 PM Power, Ciara wrote: > > > > >-Original Message- > > >From: Richardson, Bruce > > >Sent: Tuesday 4 May 2021 13:14 > > >To: jer...@marvell.com > > >Cc: Power, Ciara ; dev@dpdk.org; > > >tho...@monjalon.

Re: [dpdk-dev] [PATCH v1 1/1] power: do not skip saving original acpi governor

2021-05-05 Thread Thomas Monjalon
28/04/2021 17:41, Pattan, Reshma: > > > -Original Message- > > From: dev On Behalf Of Anatoly Burakov > > + /* Save the original governor */ > > + rte_strscpy(pi->governor_ori, buf, sizeof(pi->governor_ori)); > > + > > Acked-by: Reshma Pattan Applied, thanks

Re: [dpdk-dev] [PATCH v3 0/7] test: refactor crypto unit test framework

2021-05-05 Thread Hemant Agrawal
Sorry for top posting. Akhil,     Will you please hold for a day on this patch? we are seeing few failures on dpaa2 with this patch, currently debugging them. Regards, Hemant On 5/1/2021 2:30 AM, Doherty, Declan wrote: On 23/04/2021 5:18 PM, Ciara Power wrote: The current crypto unit t

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

2021-05-05 Thread Van Haaren, Harry
> -Original Message- > From: Chengwen Feng > Sent: Wednesday, May 5, 2021 5:10 AM > To: tho...@monjalon.net; Yigit, Ferruh ; > sk...@marvell.com; jer...@marvell.com; Burakov, Anatoly > ; Van Haaren, Harry ; > step...@networkplumber.org > Cc: dev@dpdk.org; linux...@openeuler.org > Subject:

[dpdk-dev] [PATCH] examples: allow pkg-config to override

2021-05-05 Thread jerinj
From: Jerin Jacob In the cross-compilation environment, it possible to have different package config such as aarch64-linux-gnu-pkg-config. Use PKGCONF variable to detect the libdpdk availability. Signed-off-by: Jerin Jacob --- examples/bbdev_app/Makefile| 6 +++-

  1   2   3   >