dpdk.git
3 years agodoc: announce renaming of vhost operations struct
Maxime Coquelin [Fri, 30 Jul 2021 08:12:30 +0000 (10:12 +0200)]
doc: announce renaming of vhost operations struct

This patch announces the renaming of struct
vhost_device_ops to rte_vhost_device_ops in DPDK v21.11.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Adrian Moreno <amorenoz@redhat.com>
Acked-by: Marvin Liu <yong.liu@intel.com>
3 years agodoc: announce marking vDPA driver interface as internal
Maxime Coquelin [Fri, 30 Jul 2021 08:12:29 +0000 (10:12 +0200)]
doc: announce marking vDPA driver interface as internal

This patch announces the marking of all the vDPA driver APIs
as internal.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Marvin Liu <yong.liu@intel.com>
3 years agodoc: announce promoting some vhost API to stable
Chenbo Xia [Fri, 30 Jul 2021 08:19:25 +0000 (16:19 +0800)]
doc: announce promoting some vhost API to stable

This patch announces the experimental tag removal of 10 vhost APIs,
which have been experimental for more than 2 years.
All APIs could be made stable in DPDK 21.11.

Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Marvin Liu <yong.liu@intel.com>
3 years agodoc: announce changes in IPsec SA config option struct
Archana Muniganti [Sat, 31 Jul 2021 17:44:28 +0000 (23:14 +0530)]
doc: announce changes in IPsec SA config option struct

Propose new fields to support offloads like
- IPsec inner checksum(L3/L4)
- IPsec tunnel header verification
- TSO
- etc
in the structure ``rte_security_ipsec_sa_options``.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
3 years agodoc: announce changes in IPsec xform struct
Anoob Joseph [Tue, 3 Aug 2021 06:48:37 +0000 (12:18 +0530)]
doc: announce changes in IPsec xform struct

IPsec xform struct would be updated to include IPsec SA lifetime
configuration. The existing member 'esn_soft_limit' would only track
ESN. And as sequence number control is getting introduced,
'esn_soft_limit' may not indicate the number of packets processed.
Replace that with a new structure to cover all lifetime cases with
support for specifying both soft and hard lifetimes.

ESN control introduced by https://patches.dpdk.org/patch/95808/

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
3 years agodoc: announce changes in security session struct
Akhil Goyal [Tue, 3 Aug 2021 12:23:35 +0000 (17:53 +0530)]
doc: announce changes in security session struct

The structure rte_security_session is not directly used
by the application. The application just need an opaque
pointer to attached to the mbuf or rte_crypto_op while
enqueue. Hence, it can be hidden inside the library
and would prevent unnecessary indirection to the priv
session data in fastpath.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
3 years agodoc: announce changes in crypto raw data vector
Hemant Agrawal [Thu, 5 Aug 2021 13:55:29 +0000 (19:25 +0530)]
doc: announce changes in crypto raw data vector

The current crypto raw data vectors need to be extended to support
out of place processing. It is proposed to add additional desl_sgl
to provide details for destination sgl.
The same is also extended to support rte_security usecases, where
we need total data length to know how much additional memory space
is available in buffer other than data length so that driver/HW
can write expanded size data after encryption.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
3 years agodoc: announce change in crypto adapter metadata
Shijith Thotton [Wed, 4 Aug 2021 18:14:20 +0000 (23:44 +0530)]
doc: announce change in crypto adapter metadata

In crypto adapter metadata, first 8 bytes of request info is a space
holder for response info. For better clarity, reserved field should be
removed from request info. New space for response info can be made by
changing type of event crypto metadata to structure from union.

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Jerin Jacob <jerinj@marvell.com>
3 years agodoc: announce removal of lcore state finished
Honnappa Nagarahalli [Fri, 30 Jul 2021 19:59:12 +0000 (14:59 -0500)]
doc: announce removal of lcore state finished

Lcore state FINISHED is used by the worker thread to indicate that
it has completed the assigned task. The state is changed to
WAIT by another thread after it observes the updated state. This
additional step is redundant. After this deprecation, the worker
thread will update the state to WAIT.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Feifei Wang <feifei.wang2@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
3 years agodoc: update release notes for 21.08
John McNamara [Thu, 5 Aug 2021 21:57:13 +0000 (21:57 +0000)]
doc: update release notes for 21.08

Fix grammar, spelling and formatting of DPDK 21.08 release notes.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
3 years agodoc: add known issue with mbuf segment
Thomas Monjalon [Wed, 4 Aug 2021 13:29:52 +0000 (15:29 +0200)]
doc: add known issue with mbuf segment

A bug with segmented packets has been discovered but the agreement
to apply the fix is not concluded at the time of DPDK 21.08 release.
This bug seems to be in DPDK for many years and should be fixed in 21.11.

Suggested-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
3 years agodoc: announce changes to eventdev library
Pavan Nikhilesh [Mon, 2 Aug 2021 21:09:48 +0000 (02:39 +0530)]
doc: announce changes to eventdev library

Make driver layer as internal, remove unnecessary rte_ prefix for
structures and functions that are not a part of public API.
Promote experimental trace and vector APIs to stable.
Add reserved field to `rte_event_timer` structure.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
3 years agonet/mlx5: fix build on Windows
Gregory Etelson [Thu, 5 Aug 2021 09:55:03 +0000 (12:55 +0300)]
net/mlx5: fix build on Windows

mlx5_dev_check_sibling_config() API was updated to allow newly
spawned port locate existing sibling devices.
PMD port initialization for Windows OS was not updated
for the new API prototype:

drivers/net/mlx5/windows/mlx5_os.c:457:50: error:
too few arguments to function call, expected 3, have 2
err = mlx5_dev_check_sibling_config(priv, config);

The patch fixes mlx5_dev_check_sibling_config call for Windows OS.

Fixes: e9d420dfc2d0 ("net/mlx5: fix find sibling devices")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agoversion: 21.08-rc4
Thomas Monjalon [Wed, 4 Aug 2021 16:49:16 +0000 (18:49 +0200)]
version: 21.08-rc4

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
3 years agodoc: announce cryptodev operation struct changes
Anoob Joseph [Mon, 2 Aug 2021 11:11:24 +0000 (16:41 +0530)]
doc: announce cryptodev operation struct changes

One reserved byte in rte_crypto_op struct would be used to indicate
warnings and other information from the crypto/security operation. This
field will be used to communicate events such as soft expiry with IPsec
in lookaside mode.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agodoc: announce cryptodev driver interface as internal
Akhil Goyal [Tue, 3 Aug 2021 11:44:46 +0000 (17:14 +0530)]
doc: announce cryptodev driver interface as internal

The APIs which are internal to PMD and cryptodev library
can be marked as internal so that ABI checking do not
shout for changes in interfaces which are internal to DPDK.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet: announce changes in IPv4 header access
Gregory Etelson [Mon, 2 Aug 2021 10:38:34 +0000 (13:38 +0300)]
net: announce changes in IPv4 header access

Announce changes to add 2 unions.
The first union will provide integral and bits access to version and IHL.
The second union will provide integral and bits access to fragment flags
and offset.

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
3 years agodoc: announce hiding interrupt handle structure
Harman Kalra [Mon, 2 Aug 2021 16:03:52 +0000 (21:33 +0530)]
doc: announce hiding interrupt handle structure

Moving struct rte_intr_handle as an internal structure to
avoid any ABI breakages in future. Since this structure defines
some static arrays and changing respective macros breaks the ABI.
Eg:
Currently RTE_MAX_RXTX_INTR_VEC_ID imposes a limit of maximum 512
MSI-X interrupts that can be defined for a PCI device, while PCI
specification allows maximum 2048 MSI-X interrupts that can be used.
If some PCI device requires more than 512 vectors, either change the
RTE_MAX_RXTX_INTR_VEC_ID limit or dynamically allocate based on
PCI device MSI-X size on probe time. Either way its an ABI breakage.

Discussion thread:
https://mails.dpdk.org/archives/dev/2021-March/202959.html

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
3 years agodoc: announce renaming of mbuf offload flags
Olivier Matz [Fri, 30 Jul 2021 15:57:01 +0000 (17:57 +0200)]
doc: announce renaming of mbuf offload flags

The mbuf offload flags do not match the DPDK namespace (they are
not prefixed by RTE_). Announce their rename in 21.11, and the
removal of the old names in 22.11.

A draft coccinelle script is provided to anticipate what the
renaming will be.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
3 years agodoc: add tested platforms with Mellanox NICs
Raslan Darawsheh [Wed, 4 Aug 2021 12:54:47 +0000 (15:54 +0300)]
doc: add tested platforms with Mellanox NICs

Add tested platforms with Mellanox NICs to the 21.08 release notes.

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
3 years agodoc: add tested Intel platforms with Intel NICs
Yan Xia [Wed, 4 Aug 2021 14:20:24 +0000 (14:20 +0000)]
doc: add tested Intel platforms with Intel NICs

Add tested Intel platforms with Intel NICs to v21.08 release note.

Signed-off-by: Yan Xia <yanx.xia@intel.com>
3 years agopipeline: fix table statistics
Churchill Khangar [Mon, 2 Aug 2021 05:32:12 +0000 (11:02 +0530)]
pipeline: fix table statistics

This patch fixes the memcpy function call which was incorrect and led
to memory corruption for tables with more that just a few actions.

Fixes: 742b0a57f50e4 ("pipeline: add table statistics to SWX")
Cc: stable@dpdk.org
Signed-off-by: Churchill Khangar <churchill.khangar@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agodoc: add policy for promotion of experimental API
Ray Kinsella [Wed, 4 Aug 2021 09:34:31 +0000 (10:34 +0100)]
doc: add policy for promotion of experimental API

Clarifying the ABI policy on the promotion of experimental APIs to stable.
We have a fair number of APIs that have been experimental for more than
2 years. This policy amendment indicates that these APIs should be
promoted or removed, or should at least form a conversation between the
maintainer and original contributor.

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
3 years agodoc: update offload information for metering
Jiawei Wang [Tue, 3 Aug 2021 13:02:54 +0000 (16:02 +0300)]
doc: update offload information for metering

Update the Minimal SW and HW version offload support
information for ASO metering and metering hierarchy.

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Asaf Penso <asafp@nvidia.com>
3 years agodoc: limit FW support for mlx5 regex driver
Ori Kam [Tue, 3 Aug 2021 19:07:49 +0000 (22:07 +0300)]
doc: limit FW support for mlx5 regex driver

MLX5 RegEx is only supported with FW version XX.30.1004 or lower.

Signed-off-by: Ori Kam <orika@nvidia.com>
Acked-by: Asaf Penso <asafp@nvidia.com>
3 years agoapp/testpmd: fix IPv4 checksum
Gregory Etelson [Mon, 2 Aug 2021 18:13:16 +0000 (21:13 +0300)]
app/testpmd: fix IPv4 checksum

UDP protocol reserves 0 checksum value for special purposes.
Other protocols, like IPv4, TCP and SCTP must calculate checksum value
in software or offload checksum calculation to hardware.

If IPv4 TX checksum offload was off and header checksum was set to 0,
testpmd csum engine did not calculate checksum value for IPv4, TCP and
SCTP.

The patch always calculates IPv4, TCP and SCTP TX checksums if it is
not offloaded.

Bugzilla ID: 768
Fixes: b2a9e4a855d0 ("app/testpmd: fix Tx checksum calculation for tunnel")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
3 years agobus: clarify log for non-NUMA-aware devices
Dmitry Kozlyuk [Wed, 4 Aug 2021 08:03:01 +0000 (11:03 +0300)]
bus: clarify log for non-NUMA-aware devices

PCI, vmbus, and auxiliary drivers printed a warning
when NUMA node had been reported as (-1) or not reported by OS:

    EAL:   Invalid NUMA socket, default to 0

This message and its level might confuse users because the configuration
is valid and nothing happens that requires attention or intervention.
It was also printed without the device identification and with an indent
(PCI only), which is confusing unless DEBUG logging is on to print
the header message with the device name.

Reduce level to INFO, reword the message, and suppress it when there is
only one NUMA node because NUMA awareness does not matter in this case.
Also, remove the indent for PCI.

Fixes: f0e0e86aa35d ("pci: move NUMA node check from scan to probe")
Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")
Fixes: 1afce3086cf4 ("bus/auxiliary: introduce auxiliary bus")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
3 years agonet/mlx5: fix find sibling devices
Gregory Etelson [Tue, 3 Aug 2021 15:06:58 +0000 (18:06 +0300)]
net/mlx5: fix find sibling devices

The routine mlx5_eth_find_next() and related iterating macro
MLX5_ETH_FOREACH_DEV is used to iterate through sibling devices (all
representors share the same configuration and switching domain) on top
of specified root device.

The root device parameter was specified as NULL, and it caused
missing siblings in iteration during representor device probing,
causing:

1. allocating new domain_id for the device being probed.
2. discrepancy in representor configurations and potential overall
   driver malfunctions.

Fixes: 56bb3c84e982 ("net/mlx5: reduce PCI dependency")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agonet/mlx5: fix domains detection in meter hierarchy
Shun Hao [Wed, 4 Aug 2021 07:26:47 +0000 (10:26 +0300)]
net/mlx5: fix domains detection in meter hierarchy

Meters in one hierarchy might support different domains. For
example, one meter may support ingress only, but the root meter
can support all the domains.

If the later meter in the meter hierarchy wrongly doesn't inherit
the first meter's domains, it will lead to invalid domain table
access.

Fix is when creating meter hierarchy, try to inherit the first meter
domains in the meter hierarchy.

Fixes: a3b7af90baba ("net/mlx5: validate meter action in policy")
Cc: stable@dpdk.org
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: fix meter flow counter translation
Shun Hao [Wed, 4 Aug 2021 07:26:46 +0000 (10:26 +0300)]
net/mlx5: fix meter flow counter translation

When a flow rule uses a meter without any modify packet action,
there will be an internal drop flow with meter counter created,
matching the same 5-tuple as the original flow.

In this case, the meter flow count action is wrongly reused as the
original flow counter, leading to wrong flow statistics.

Add a check in the count action translation to detect the meter case
and use the meter drop dedicated counter in the meter 5-tuple flow
only.

Fixes: f3191849f2c2 ("net/mlx5: support flow count action handle")
Cc: stable@dpdk.org
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: workaround drop action with old kernel
Suanming Mou [Mon, 2 Aug 2021 14:30:24 +0000 (17:30 +0300)]
net/mlx5: workaround drop action with old kernel

Currently, there are two types of drop action implementation
in the PMD. One is the DR (Direct Rules) dummy placeholder drop
action and another is the dedicated dummy queue drop action.
When creates flow on the root table with DR drop action, the
action will be converted to MLX5_IB_ATTR_CREATE_FLOW_FLAGS_DROP
Verbs attribute in rdma-core.

In some inbox systems, MLX5_IB_ATTR_CREATE_FLOW_FLAGS_DROP Verbs
attribute may not be supported in the kernel driver. Create flow
with drop action on the root table will be failed as it is not
supported. In this case, the dummy queue drop action should be
used instead of DR dummy placeholder drop action.

This commit adds the DR drop action support detect on the root
table. If MLX5_IB_ATTR_CREATE_FLOW_FLAGS_DROP Verbs is not
supported in the system, a dummy queue will be used as drop
action.

Fixes: da845ae9d7c1 ("net/mlx5: fix drop action for Direct Rules/Verbs")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: fix VXLAN VNI matching on ConnectX-5
Rongwei Liu [Mon, 2 Aug 2021 12:20:48 +0000 (15:20 +0300)]
net/mlx5: fix VXLAN VNI matching on ConnectX-5

In the recent update, the misc5 matcher was introduced to
match VxLAN header extra fields. However, ConnectX-5
doesn't support misc5 for the UDP ports different from
VXLAN's standard one (4789).

Need to fall back to the previous approach and use legacy
misc matcher if non-standard UDP port is recognized
in VxLAN flow.

Fixes: 630a587bfb37 ("net/mlx5: support matching on VXLAN reserved field")
Cc: stable@dpdk.org
Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agonet/mlx5: fix port initialization of switch domain
Gregory Etelson [Mon, 2 Aug 2021 14:55:24 +0000 (17:55 +0300)]
net/mlx5: fix port initialization of switch domain

All active ports that belong to the same E-switch share domain_id
value.
Port initialization procedure searches through a database for existing
port with matching properties. New domain_id allocated if match was
not located. Otherwise, new port inherits existing domain_id.

Port initialization did not pass enough info to search procedure to
find existing matches. Therefore, each port was created with a private
domain_id value. As the result, port_id flow action failed because it
could not match ports in a rule to E-switch.

The patch adds dpdk_dev with port properties to device search.

Fixes: 56bb3c84e982 ("net/mlx5: reduce PCI dependency")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agocompress/mlx5: fix compression level translation
Raja Zidane [Thu, 29 Jul 2021 14:11:08 +0000 (17:11 +0300)]
compress/mlx5: fix compression level translation

Compression Level is interpreted by each PMD differently.
However, lower numbers give faster compression
at the expense of compression ratio, while higher numbers
may give better compression ratios but are likely slower.
The level affects the block size, which affects performance,
the bigger the block, the faster the compression is.

The problem was that higher levels caused bigger blocks:
  size = min_block_size - 1 + level.

the solution is to reverse the above:
  size = max_block_size + 1 - level.

Fixes: 39a2c8715f8f ("compress/mlx5: add transformation operations")
Cc: stable@dpdk.org
Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agodoc: update matching versions in ice guide
Qi Zhang [Thu, 22 Jul 2021 01:51:01 +0000 (09:51 +0800)]
doc: update matching versions in ice guide

Add recommended matching list for ice PMD in DPDK 21.08.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/bnxt: fix number of action records
Ajit Khaparde [Sat, 31 Jul 2021 04:39:21 +0000 (21:39 -0700)]
net/bnxt: fix number of action records

For Thor, the number of action records is being wrongly configured
to 128 because of incorrect definition of divider. This results in
an incorrect number of action records being negotiated with the FW.
Remove the divider from the templates and delete the logic which
uses the field in the resource manager logic.

Fixes: 3fe124d2536c ("net/bnxt: support Thor platform")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Tested-by: Shuanglin Wang <shuanglin.wang@broadcom.com>
3 years agodoc: announce API changes for Windows compatibility
Dmitry Kozlyuk [Wed, 21 Jul 2021 19:55:57 +0000 (22:55 +0300)]
doc: announce API changes for Windows compatibility

Windows headers define `s_addr`, `min`, and `max` as macros.
If DPDK headers are included after Windows ones, DPDK structure
definitions containing fields with these names get broken (example 1),
as well as any usage of such fields (example 2). If DPDK headers
undefined these macros, it could break consumer code (example 3).
It is proposed to rename structure fields in DPDK, because Win32 headers
are used more widely than DPDK, as a general-purpose platform compared
to domain-specific kit, and are harder to fix because of that.
Exact new names are left for further discussion.

Example 1:

    /* in DPDK public header included after windows.h */
    struct rte_type {
        int min;    /* ERROR: `min` is a macro */
    };

Example 2:

    #include <rte_ether.h>
    #include <winsock2.h>
    struct rte_ether_hdr eh;
    eh.s_addr.addr_bytes[0] = 0;    /* ERROR: `addr_s` is a macro */

Example 3:

    #include <winsock2.h>
    #include <rte_ether.h>
    struct in_addr addr;
    addr.s_addr = 0;      /* ERROR: there is no `s_addr` field,
                             and `s_addr` macro is undefined by DPDK. */

Commit 6c068dbd9fea ("net: work around s_addr macro on Windows")
modified definition of `struct rte_ether_hdr` to avoid the issue.
However, the workaround assumes `#define s_addr S_addr.S_un`
in Windows headers, which is not a part of official API.
It also complicates the definition of `struct rte_ether_hdr`.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Khoa To <khot@microsoft.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Akhil Goyal <gakhil@marvell.com>
3 years agodoc: announce extension of crypto data-unit length
Thomas Monjalon [Wed, 14 Apr 2021 20:15:43 +0000 (22:15 +0200)]
doc: announce extension of crypto data-unit length

The struct member dataunit_len is introduced in DPDK 21.05.
It is limited to 16 bits to fit a padding hole in 32-bit build.
This means the maximum data-unit length is 64 KB.
Some use cases may benefit of a bigger size as the proposed 32 bits.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agotest: quieten warning noise while forking
John Levon [Sun, 1 Aug 2021 17:53:25 +0000 (18:53 +0100)]
test: quieten warning noise while forking

When closing file descriptors post-fork, ignore "." and ".." directory
entries, so the test log doesn't have distracting errors like:

Error converting name fd 0 .:
Error converting name fd 0 ..:

Signed-off-by: John Levon <john.levon@nutanix.com>
3 years agoversion: 21.08-rc3
Thomas Monjalon [Sat, 31 Jul 2021 21:12:34 +0000 (23:12 +0200)]
version: 21.08-rc3

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
3 years agodoc: announce common prefix for ethdev
Ferruh Yigit [Wed, 30 Jun 2021 09:21:16 +0000 (10:21 +0100)]
doc: announce common prefix for ethdev

Announce adding 'RTE_ETH_' prefix to all public ethdev macros/enums on
v21.11.
Backward compatibility macros will be added on v21.11 and they will be
removed on v22.11.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Raslan Darawsheh <rasland@nvidia.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
3 years agodoc: announce removal of PCI bus ABI
Chenbo Xia [Tue, 1 Jun 2021 08:41:31 +0000 (16:41 +0800)]
doc: announce removal of PCI bus ABI

All ABIs in PCI bus driver, which are defined in rte_buc_pci.h,
will be removed and the header will be made internal.

Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
3 years agodoc: update atomic operation deprecation
Joyce Kong [Fri, 23 Jul 2021 09:49:43 +0000 (04:49 -0500)]
doc: update atomic operation deprecation

Update the incorrect description about atomic operations
with provided wrappers in deprecation doc[1].

[1]https://mails.dpdk.org/archives/dev/2021-July/213333.html

Fixes: 7518c5c4ae6a ("doc: announce adoption of C11 atomic operations semantics")
Cc: stable@dpdk.org
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
3 years agodoc: remove old deprecation notice for sched
Jasvinder Singh [Mon, 14 Jun 2021 16:30:00 +0000 (17:30 +0100)]
doc: remove old deprecation notice for sched

APIs and data structures hasve been modified as per deprecation
note, so removing deprecation notice from the notes.

Fixes: 85f52aa422d6 ("sched: add pipe config params to subport struct")
Cc: stable@dpdk.org
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
3 years agotest: flush stdout after forking
John Levon [Mon, 26 Jul 2021 12:16:27 +0000 (13:16 +0100)]
test: flush stdout after forking

meson test was not capturing the intended output from the child
process; force a flush to ensure it reaches the test log.

Signed-off-by: John Levon <john.levon@nutanix.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agodoc: add Arm PMU build option in profiling guide
Jerin Jacob [Sun, 11 Jul 2021 07:58:21 +0000 (13:28 +0530)]
doc: add Arm PMU build option in profiling guide

Documented the role of RTE_ARM_EAL_RDTSC_USE_PMU to enable
PMU based rte_rdtsc().

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
3 years agodoc: fix spelling
Henry Nadeau [Thu, 29 Jul 2021 16:48:05 +0000 (12:48 -0400)]
doc: fix spelling

Spell checked and corrected documentation.
If there are any errors, or I have changed something that wasn't an error
please reach out to me so I can update the dictionary.

Cc: stable@dpdk.org
Signed-off-by: Henry Nadeau <hnadeau@iol.unh.edu>
3 years agodoc: use code snippets in sample app guides
Conor Fogarty [Fri, 16 Jul 2021 13:57:52 +0000 (13:57 +0000)]
doc: use code snippets in sample app guides

Currently the sample app user guides use hard coded code snippets,
this patch changes these to use literalinclude which will dynamically
update the snippets as changes are made to the code.
This was introduced in commit 413c75c33c40 ("doc: show how to include
code in guides"). Comments within the sample apps were updated to
accommodate this as part of this patch. This will help to ensure that
the code within the sample app user guides is up to date and not out
of sync with the actual code.

Signed-off-by: Conor Fogarty <conor.fogarty@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
3 years agomaintainers: update for Marvell QLogic
Igor Russkikh [Tue, 27 Jul 2021 08:02:35 +0000 (10:02 +0200)]
maintainers: update for Marvell QLogic

Adding Marvell prefix for qlogic drivers.
Removing myself as I'm no longer responsible for qede driver

Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
Acked-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
3 years agomaintainers: update for atlantic
Igor Russkikh [Tue, 27 Jul 2021 08:02:34 +0000 (10:02 +0200)]
maintainers: update for atlantic

Fixing ex-Aquantia email - it is now part of Marvell.
Removing Pavel Belous email - he is not in company now.
Adding Marvell tree to run this through.

Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
3 years agodoc: announce security API changes for inline IPsec
Nithin Dabilpuram [Tue, 27 Jul 2021 17:51:21 +0000 (23:21 +0530)]
doc: announce security API changes for inline IPsec

Announce changes to make rte_security_set_pkt_metadata() and
rte_security_get_userdata() inline instead of C functions and
also addition of another field in structure rte_security_ctx for
holding flags.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agocrypto/mlx5: fix leaks on probing failure
Michael Baum [Thu, 29 Jul 2021 06:50:00 +0000 (09:50 +0300)]
crypto/mlx5: fix leaks on probing failure

In crypto driver probing, there are two validations after context
allocation.

When one of them fails, the context structure was not freed what caused
a memory leak.

Free it.

Fixes: debb27ea3442 ("crypto/mlx5: create login object using DevX")
Fixes: e8db4413cba5 ("crypto/mlx5: add keytag configuration")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agocrypto/qat: disable asymmetric crypto on GEN3
Arek Kusztal [Wed, 28 Jul 2021 16:18:31 +0000 (17:18 +0100)]
crypto/qat: disable asymmetric crypto on GEN3

This patch disables asymmetric crypto PMD on GEN3 devices.

Fixes: 1f5e4053f9b4 ("common/qat: support GEN3 devices")
Cc: stable@dpdk.org
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
3 years agodrivers: fix return of unsupported features on QAT GEN4
Arek Kusztal [Wed, 28 Jul 2021 16:18:30 +0000 (17:18 +0100)]
drivers: fix return of unsupported features on QAT GEN4

Fix return code when asymmetric crypto
or compression service is selected on GEN4 devices.

Fixes: 8f393c4ffdc1 ("common/qat: support GEN4 devices")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
3 years agoexamples/l2fwd-crypto: support cipher multiple data-unit
Matan Azrad [Wed, 28 Jul 2021 07:56:42 +0000 (10:56 +0300)]
examples/l2fwd-crypto: support cipher multiple data-unit

The support for multiple data-units includes the next:
- Add a new command-line argument to provide the data-unit length.
- Set the length in the cipher xform.
- Validate device capabilities for this feature.
- Pad the AES-XTS operation length to be aligned to the defined data-unit.

Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
3 years agocrypto/octeontx: fix freeing after device release
Akhil Goyal [Fri, 30 Jul 2021 17:58:27 +0000 (23:28 +0530)]
crypto/octeontx: fix freeing after device release

When the PMD is removed, rte_cryptodev_pmd_release_device
is called which frees cryptodev->data, and then tries to free
cryptodev->data->dev_private, which causes the heap use
after free issue.

A temporary pointer is set before the free of cryptodev->data,
which can then be used afterwards to free dev_private.

Fixes: bfe2ae495ee2 ("crypto/octeontx: add PMD skeleton")
Cc: stable@dpdk.org
Reported-by: Zhihong Peng <zhihongx.peng@intel.com>
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
3 years agocryptodev: fix freeing after device release
Ciara Power [Wed, 21 Jul 2021 12:51:22 +0000 (12:51 +0000)]
cryptodev: fix freeing after device release

The PMD destroy function was calling the release function, which frees
cryptodev->data, and then tries to free cryptodev->data->dev_private,
which causes the heap use after free issue.

A temporary pointer is set before the free of cryptodev->data,
which can then be used afterwards to free dev_private.
The free cannot be moved to before the release function is called,
as dev_private is used in the PMD close function while being released.

Fixes: 9e6edea41805 ("cryptodev: add APIs to assist PMD initialisation")
Cc: stable@dpdk.org
Reported-by: Zhihong Peng <zhihongx.peng@intel.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
3 years agotest/crypto: increase mbuf data payload size to 4K
Suanming Mou [Tue, 20 Jul 2021 13:28:11 +0000 (16:28 +0300)]
test/crypto: increase mbuf data payload size to 4K

Currently, there is vendor which can support bigger crypto data size.
Increase the default mbuf data payload size to 4K as needed.

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
3 years agocrypto/qat: fix raw data path dequeue
Fan Zhang [Tue, 27 Jul 2021 15:42:46 +0000 (16:42 +0100)]
crypto/qat: fix raw data path dequeue

This patch fixes the raw data path dequeue burst fail problem.
Previously in case the queue is full and not all packets
asked to be dequeued are processed, the dequeue burst will
never happen.

Fixes: c21574edc52a ("cryptodev: add dequeue count parameter in raw API")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
3 years agocrypto/cnxk: add null check for RSA key data
Kiran Kumar K [Mon, 26 Jul 2021 04:44:19 +0000 (10:14 +0530)]
crypto/cnxk: add null check for RSA key data

Coverity is reporting FORWARD_NULL issue when qt data is NULL.
Adding NULL check for this.

Coverity issue: 371893
Fixes: 5a3513caeb45 ("crypto/cnxk: add asymmetric session")

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
3 years agocrypto/ccp: convert driver from vdev to PCI
Amaranath Somalapuram [Mon, 26 Jul 2021 09:08:21 +0000 (14:38 +0530)]
crypto/ccp: convert driver from vdev to PCI

drop all the code duplicating the PCI bus driver
developed for enable IOMMU in vdev.

Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
3 years agocrypto/qat: fix array access
Arek Kusztal [Mon, 26 Jul 2021 16:47:49 +0000 (17:47 +0100)]
crypto/qat: fix array access

Fix possible access of an array by negative index in function
qat_sym_qp_setup.

Coverity issue: 372131, 372134
Fixes: 8f393c4ffdc1 ("common/qat: support GEN4 devices")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
3 years agocommon/cpt: update asymmetric ECDSA messages
Kiran Kumar K [Mon, 26 Jul 2021 04:48:53 +0000 (10:18 +0530)]
common/cpt: update asymmetric ECDSA messages

Adding changes to asymmetric ECDSA messages to align with
the new ucode for octeontx2 device.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
3 years agocrypto/cnxk: update asymmetric ECDSA messages
Kiran Kumar K [Mon, 26 Jul 2021 04:48:52 +0000 (10:18 +0530)]
crypto/cnxk: update asymmetric ECDSA messages

Adding changes to asymmetric ECDSA messages to align with
the new ucode for cnxk device.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
3 years agocommon/cnxk: add constants to EC groups
Kiran Kumar K [Mon, 26 Jul 2021 04:48:51 +0000 (10:18 +0530)]
common/cnxk: add constants to EC groups

New ucode expects const values A and B for asymmetric ECDSA
messages. Adding roc support for this.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
3 years agonet/bnxt: disable VF representors on Thor
Ajit Khaparde [Fri, 30 Jul 2021 21:08:49 +0000 (14:08 -0700)]
net/bnxt: disable VF representors on Thor

In a few cases with Thor device, PMD can segfault when VF
representors are specified. Temporarily fix it by preventing
VF reps for Thor device. This will be addressed in next release.

Fixes: 3fe124d2536c ("net/bnxt: support Thor platform")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
3 years agotest/rcu: use compiler atomics for data sync
Joyce Kong [Tue, 20 Jul 2021 03:51:25 +0000 (22:51 -0500)]
test/rcu: use compiler atomics for data sync

Covert rte_atomic usages to compiler atomic built-ins in
rcu_perf testcases.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agotest/service: use compiler atomics for lock sync
Joyce Kong [Tue, 20 Jul 2021 03:51:24 +0000 (22:51 -0500)]
test/service: use compiler atomics for lock sync

Convert rte_atomic usages to compiler atomic built-ins for lock
sync in service_cores testcases.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agotest/mempool: use compiler atomics for lcores sync
Joyce Kong [Tue, 20 Jul 2021 03:51:23 +0000 (22:51 -0500)]
test/mempool: use compiler atomics for lcores sync

Convert rte_atomic usages to compiler atomic built-ins for lcores
sync in mempool_perf testcases. Meanwhile, remove unnecessary
synchro init as it would be set to 0 when launching cores.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agotest/mempool: remove unused variable for lcores sync
Joyce Kong [Tue, 20 Jul 2021 03:51:22 +0000 (22:51 -0500)]
test/mempool: remove unused variable for lcores sync

Remove the unused synchro variable as there is no lcores
sync in mempool function test.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agotest/mcslock: use compiler atomics for lcores sync
Joyce Kong [Tue, 20 Jul 2021 03:51:21 +0000 (22:51 -0500)]
test/mcslock: use compiler atomics for lcores sync

Convert rte_atomic usages to compiler atomic built-ins for lcores
sync in mcslock testcases.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agotest/rwlock: use compiler atomics for lcores sync
Joyce Kong [Tue, 20 Jul 2021 03:51:20 +0000 (22:51 -0500)]
test/rwlock: use compiler atomics for lcores sync

Convert rte_atomic usages to compiler atomic built-ins for lcores
sync in rwlock testcases.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agotest/spinlock: use compile atomics for lcores sync
Joyce Kong [Tue, 20 Jul 2021 03:51:19 +0000 (22:51 -0500)]
test/spinlock: use compile atomics for lcores sync

Convert rte_atomic usages to compiler atomic built-ins for lcores
sync in spinlock testcases.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agotest/ticketlock: use compiler atomics for lcores sync
Joyce Kong [Tue, 20 Jul 2021 03:51:18 +0000 (22:51 -0500)]
test/ticketlock: use compiler atomics for lcores sync

Convert rte_atomic usages to compiler atomic built-ins for lcores
sync in ticketlock testcases.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoeal/windows: cleanup virt2phys handle
Dmitry Kozlyuk [Mon, 26 Jul 2021 21:36:32 +0000 (00:36 +0300)]
eal/windows: cleanup virt2phys handle

eal_mem_virt2phys_init() opens a handle for use by rte_mem_virt2phy().
Close this handle on EAL cleanup.

Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
3 years agoexamples/l3fwd: disable multi-queue for single queue
Chaoyong He [Mon, 10 May 2021 16:53:19 +0000 (18:53 +0200)]
examples/l3fwd: disable multi-queue for single queue

Set the Rx multi-queue mode to NONE when configuring a port that is
associated with hardware that only supports a single Rx queue.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agoapp/procinfo: add device registers dump
Chengchang Tang [Thu, 22 Jul 2021 10:58:36 +0000 (18:58 +0800)]
app/procinfo: add device registers dump

This patch add support for dump the device registers from a running
application. It can help developers locate the problem.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
3 years agoapp/acl: add script to automate testing
Konstantin Ananyev [Mon, 26 Jul 2021 11:51:37 +0000 (12:51 +0100)]
app/acl: add script to automate testing

The purpose of this script is to help automate ACL library functional
testing using test-acl app.
Sample input files are also provided.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agoapp/acl: allow comment and empty line in input
Konstantin Ananyev [Mon, 26 Jul 2021 11:51:36 +0000 (12:51 +0100)]
app/acl: allow comment and empty line in input

Allow comment (lines starting with '#') and empty lines in input
(rules, traces) files. These lines will be just skipped and shouldn't
affect the result anyhow.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agonet/bnxt: fix stats counter resource
Kishore Padmanabha [Mon, 19 Jul 2021 18:00:50 +0000 (14:00 -0400)]
net/bnxt: fix stats counter resource

The flow counters is reduced from 8192 to 6912 for Whitney
for compatibility with different versions of FW.
The FW resource manager splits resources for flow offload
and other use cases. A higher value used for flow offload
by the PMD can cause overriding the resources set aside by
FW. This in turn can lead to FW rejecting filter creation
requests during initialization.

Use a smaller safe value to avoid these issues.

Fixes: 6fad9115101c ("net/bnxt: reorganize ULP template directory structure")
Cc: stable@dpdk.org
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
3 years agonet/bnxt: fix initialization with old firmware
Jay Ding [Tue, 20 Jul 2021 14:40:27 +0000 (14:40 +0000)]
net/bnxt: fix initialization with old firmware

Fix the resource qcap list handling to use size based on
FW response.
The size of resource qcap list could be different when FW
and application are not matching. Application should be able
to handle this scenario when the FW is older and the size of
qcap is smaller. Failure to do this causes initialization failure.

This patch is needed for backward compatibility on different
firmware versions.

Fixes: 873661aa641a1 ("net/bnxt: support shared session")
Cc: stable@dpdk.org
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
3 years agoeventdev: fix event port setup in Tx adapter
Naga Harish K S V [Sat, 24 Jul 2021 14:10:36 +0000 (09:10 -0500)]
eventdev: fix event port setup in Tx adapter

The event port config set by application in
rte_event_eth_tx_adapter_create API is modified in
default configuration callback function. This patch removes
this hardcode to use application provided event port
config value.

Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")
Cc: stable@dpdk.org
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
3 years agoevent/cnxk: fix reading stale Tx queue depth
Pavan Nikhilesh [Tue, 20 Jul 2021 07:04:32 +0000 (12:34 +0530)]
event/cnxk: fix reading stale Tx queue depth

Reads to Tx queue FC memory need to be atomic to avoid cores using
same Tx queue spinning on stale values.

Fixes: 313e884a22fd ("event/cnxk: support Tx adapter fast path")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
3 years agoapp/testpmd: fix hotplug removal
Paulis Gributs [Wed, 28 Jul 2021 13:48:48 +0000 (13:48 +0000)]
app/testpmd: fix hotplug removal

After removing rte_eth_devices from testpmd the vm_hotplug no longer
recovered after removal of a device, because the port was closed
before querying it.

Fixes: 0a0821bcf312 ("app/testpmd: remove most uses of internal ethdev array")

Signed-off-by: Paulis Gributs <paulis.gributs@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
3 years agoapp/testpmd: fix Tx checksum calculation for tunnel
Gregory Etelson [Thu, 29 Jul 2021 17:01:41 +0000 (20:01 +0300)]
app/testpmd: fix Tx checksum calculation for tunnel

csumonly engine calculates Tx checksum of a tunnelled packet
for outer headers only or separately for outer and inner headers.
The calculation method is determined by checksum configuration options.
If Tx checksum calculation is separated,
the inner headers are processed before outer headers.

Inner headers processing sets checksum values to 0 unconditionally.
If Tx configuration offloads inner checksums only, outer checksum
calculation in software will read 0 instead of real values
and produce wrong result.

The patch zeroes inner checksums only before software calculation.

Fixes: 6b520d54ebfe ("app/testpmd: use Tx preparation in checksum engine")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
3 years agonet/softnic: fix memory leak as profile is freed
Dapeng Yu [Wed, 28 Jul 2021 06:05:39 +0000 (14:05 +0800)]
net/softnic: fix memory leak as profile is freed

In function softnic_table_action_profile_free(), the memory referenced
by pointer "ap" in the instance of "struct softnic_table_action_profile"
is not freed.

This patch fixes it.

Fixes: a737dd4e5863 ("net/softnic: add table action profile")
Cc: stable@dpdk.org
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
3 years agonet/softnic: fix null dereference in arguments parsing
Dapeng Yu [Tue, 27 Jul 2021 08:14:59 +0000 (16:14 +0800)]
net/softnic: fix null dereference in arguments parsing

When there is no "firmware" in arguments, the "firmware" pointer is
null, and will be dereferenced by rte_strscpy().

This patch moves the code block which copies character string from
"firmware" to "p->firmware" into the "if" statements where "firmware"
argument exists and it is duplicated successfully.

Coverity issue: 372136
Fixes: d8f852f5f369 ("net/softnic: fix memory leak in arguments parsing")
Cc: stable@dpdk.org
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
3 years agonet/memif: fix abstract socket address length
Nathan Skrzypczak [Fri, 23 Jul 2021 09:18:57 +0000 (11:18 +0200)]
net/memif: fix abstract socket address length

This fixes using abstract sockets with memifs.
We were not passing the exact addr_len,
which requires zeroing the remaining sun_path
and doesn't appear well in other utilities (e.g. lsof -U)

Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
3 years agocommon/sfc_efx/base: do not validate MAE action COUNT order
Ivan Malov [Thu, 29 Jul 2021 09:32:59 +0000 (12:32 +0300)]
common/sfc_efx/base: do not validate MAE action COUNT order

In DPDK + Open vSwitch use case, action COUNT is always the
first one to be added. In particular, it goes before action
DECAP in that use case. The current code enforces the right
order (DECAP goes before COUNT), and this provokes failures.
As an exception, do not validate the order for action COUNT.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agonet/ena: enable multi-segment in Tx offload flags
Ghalem Boudour [Fri, 30 Jul 2021 08:34:41 +0000 (10:34 +0200)]
net/ena: enable multi-segment in Tx offload flags

The DPDK ENA driver does not provide multi-segment tx offload capability.
Let's add DEV_TX_OFFLOAD_MULTI_SEGS to ports offload capability by
default, and always set it in dev->data->dev_conf.txmode.offload.

This flag in not listed in doc/guides/nics/features/default.ini, so
ena.ini does not need to be updated.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")
Cc: stable@dpdk.org
Signed-off-by: Ghalem Boudour <ghalem.boudour@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
3 years agonet/mlx5: fix meter hierarchy validation with yellow
Bing Zhao [Thu, 29 Jul 2021 16:04:05 +0000 (19:04 +0300)]
net/mlx5: fix meter hierarchy validation with yellow

In mlx5 PMD, the meter hierarchy only supports the green color. It
means that a meter action can only be in the green action list. In
the meanwhile, the yellow action list should be empty now. Any
action for the yellow color policy will be considered invalid if
the green color policy is a hierarchy.

Also, the error message printing of meter hierarchy validation is
fixed by removing an incorrect checking.

Fixes: 4b7bf3ffb473 ("net/mlx5: support yellow in meter policy validation")
Fixes: a3b7af90baba ("net/mlx5: validate meter action in policy")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: fix green meter policy RSS queues
Bing Zhao [Thu, 29 Jul 2021 16:04:04 +0000 (19:04 +0300)]
net/mlx5: fix green meter policy RSS queues

Both green policy and yellow policy could support RSS actions
simultaneous, the Rx queues configuration may be different between
them while the other fields should be the same.

When the only green color policy was supported in the past, the
queues copied and saved in the temporary workspace were used. Since
the yellow support was added, the queues stored in the thread
workspace would be overwritten by the yellow color policy. The flow
rule created using a meter with such a policy would have the same
RSS distribution for both green and yellow packets.

By using the meter action containers RSS information instead of the
workspace RSS, this overwritten can be prevented.

Fixes: b38a12272b3a ("net/mlx5: split meter color policy handling")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: fix meter EIR calculation
Bing Zhao [Thu, 29 Jul 2021 16:04:03 +0000 (19:04 +0300)]
net/mlx5: fix meter EIR calculation

Before the yellow color policy was supported, the only supported
profile of metering is RFC2697 and EIR is not part of the profile.
When creating a meter with this profile, the EIR part was always
zero.

After the yellow color policy supported and RFC2698 & 4115 support
was introduced, EIR is relevant and should be calculated. Usually
the EIR could not be zero and the formula for calculating CIR
mantissa & exponent could be reused.

The EIR could be 0 and then only green and red colors will be
supported from the specification. Both the mantissa and exponent
parts should be set to 0. Currently, the formula wrongly sets
non-zero values for the EIR=0 case.

Setting the mantissa and the exponent parts to zeros when EIR is 0
will solve the issue.

Fixes: 33a7493c8df8 ("net/mlx5: support meter for trTCM profiles")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: fix meter profile validation
Bing Zhao [Thu, 29 Jul 2021 16:04:02 +0000 (19:04 +0300)]
net/mlx5: fix meter profile validation

After the support for yellow color and RFC2698 & RFC4115 were added,
the profile validation adjustment was missed. With this fix, the
validation is like below:
  1. Legacy metering only supports RFC2697 without EBS.
  2. ASO metering can support all three profiles.
  3. For backward compatibility, none EBS with RFC2697 profile is
     still supported and the checking is done in the meter
     creation stage.

In the meanwhile, some checking which was done in the parameters
calculation stage is moved in the validation in order to skip the
useless checking.

Fixes: 33a7493c8df8 ("net/mlx5: support meter for trTCM profiles")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: add Tx scheduling check on queue creation
Viacheslav Ovsiienko [Thu, 29 Jul 2021 12:26:43 +0000 (15:26 +0300)]
net/mlx5: add Tx scheduling check on queue creation

The send scheduling on timestamp offload requires the Send
Queue (SQ) shares its User Access Region (UAR) with the
pacing Clock Queue. The SQ can be created by mlx5 PMD either
with DevX or with Verbs. If the SQ is being created with
DevX, the dedicated UAR can be specified and all the SQs
share the single UAR. Once SQ is being created with Verbs
the SQ's UAR is allocated by the rdma-core library internally
on its own and there is no UAR sharing. This caused hardware
errors on WAIT WQEs and overall send scheduling malfunction.

If SQs are going to be created with Verbs and the send
scheduling offload is explicitly requested via tx_pp devarg
the device probing is rejected as device configuration
can't satisfy the requirements.

Fixes: 3ec73abeed52 ("net/mlx5/linux: fix Tx queue operations decision")
Fixes: 8f848f32fc24 ("net/mlx5: introduce send scheduling devargs")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agonet/mlx5: fix timestamp initialization on empty clock queue
Viacheslav Ovsiienko [Wed, 28 Jul 2021 14:23:35 +0000 (17:23 +0300)]
net/mlx5: fix timestamp initialization on empty clock queue

The committing completions by clock queue might be delayed
after queue initialization is done and the only Clock Queue
completion entry (CQE) might keep the invalid status till
the CQE first update happens.

The mlx5_txpp_update_timestamp() wrongly recognized invalid
status as error and reported about lost synchronization.

The patch recognizes the invalid status as "not updated yet"
and accurate scheduling initialization routine waits till
CQE first update happens.

Some collateral typos in comment are fixed as well.

Fixes: 77522be0a56d ("net/mlx5: introduce clock queue service routine")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agonet/mlx5: fix flow engine type in function name
Asaf Penso [Wed, 28 Jul 2021 09:39:46 +0000 (12:39 +0300)]
net/mlx5: fix flow engine type in function name

The concrete function names have a prefix for flow_dv.
This emphasizes the flow engine is Direct Verbs.

The function flow_get_aged_flows doesn’t have this prefix.
It creates an inconsistency with the other functions.

Update the function name to include dv.

Fixes: fa2d01c87d2 ("net/mlx5: support flow aging")
Cc: stable@dpdk.org
Signed-off-by: Asaf Penso <asafp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: limit implicit MPLS RSS expansion over GRE
Suanming Mou [Wed, 28 Jul 2021 08:24:10 +0000 (11:24 +0300)]
net/mlx5: limit implicit MPLS RSS expansion over GRE

As [1] optimized the MPLS RSS expansion before, this commit limits
the implicitly MPLS RSS expansion for MPLSoGRE as well. For the
RSS flow matcher to GRE level only, it will not expand the MPLS
match item for the sub flows due to performance consideration.

The original RSS flow match item:
ETH VLAN IPV6 GRE GRE_KEY END

The previous RSS expansion:
ETH VLAN IPV6 GRE GRE_KEY END
ETH VLAN IPV6 GRE GRE_KEY IPV4 END
ETH VLAN IPV6 GRE GRE_KEY MPLS IPV4 END
ETH VLAN IPV6 GRE GRE_KEY MPLS ETH IPV4 END

New RSS expansion:
ETH VLAN IPV6 GRE GRE_KEY END
ETH VLAN IPV6 GRE GRE_KEY IPV4 END

[1]
commit a26cc30fa046 ("net/mlx5: limit inner RSS expansion for MPLS")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: fix default queue number in RSS flow rule
Lior Margalit [Tue, 27 Jul 2021 06:46:20 +0000 (09:46 +0300)]
net/mlx5: fix default queue number in RSS flow rule

The selection flags for the RX hash define how the received packets will
be distributed between multiple queues.
When creating a new TIR, the queue_num is set to 1 if none of the selection
flags is set.

Applied the same to the RSS desc before checking if it matches a cached
TIR object to save creating a new object every time.

Fixes: fabf8a37241c ("net/mlx5: fix shared RSS action release")
Cc: stable@dpdk.org
Signed-off-by: Lior Margalit <lmargalit@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: fix RSS flow rule with L4 mismatch
Lior Margalit [Tue, 27 Jul 2021 06:46:19 +0000 (09:46 +0300)]
net/mlx5: fix RSS flow rule with L4 mismatch

The RSS hash types defined in the API do not support setting the L4 proto
type (TCP or UDP) without setting the L3 proto. For example, ETH_RSS_TCP
is defined as
(ETH_RSS_NONFRAG_IPV4_TCP | \
 ETH_RSS_NONFRAG_IPV6_TCP | \
 ETH_RSS_IPV6_TCP_EX).

The L3 proto of the RSS hash type may be different than the one defined
in the pattern, for example:
testpmd> flow create .../ ipv4 / tcp / end actions rss types ipv6-tcp-ex
end / end

If the RSS hash type also includes L4 proto type as in the above example,
the selection flags for the RX hash are currently set with SPORT/DPORT
without setting SRC/DST IP. As this combination is not supported, it does
not match any of the pre-created TIRs of the indirect RSS action
and the flow creation fails.

The fix is to prevent setting the selection flags for the RX hash with
SPORT/DPORT without setting SRC/DST IP. It applies non-RSS processing of
the received packets. In case of indirect RSS action, it will match the
MLX5_RSS_HASH_NONE pre-created TIR.

Fixes: b1d63d829378 ("net/mlx5: support RSS on src or dst fields only")
Fixes: 4a78c88e3bae ("net/mlx5: fix Verbs flow tunnel")
Cc: stable@dpdk.org
Signed-off-by: Lior Margalit <lmargalit@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>