dpdk.git
2 years agocrypto/cnxk: handle null chained ops
Anoob Joseph [Fri, 17 Dec 2021 09:20:00 +0000 (14:50 +0530)]
crypto/cnxk: handle null chained ops

Verification doesn't cover cases when NULL auth/cipher is provided as a
chain. Removed the separate function for verification and added a
replacement function which calls the appropriate downstream functions.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: add context reload for IV
Tejasree Kondoj [Fri, 17 Dec 2021 09:19:59 +0000 (14:49 +0530)]
crypto/cnxk: add context reload for IV

Adding context reload in datapath for IV in debug mode.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: skip unsupported cases
Anoob Joseph [Fri, 17 Dec 2021 09:19:58 +0000 (14:49 +0530)]
crypto/cnxk: skip unsupported cases

Add skip for transport mode tests that are not supported. Also,
updated the transport mode path to configure IP version as v4.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: add security session stats get
Ankur Dwivedi [Fri, 17 Dec 2021 09:19:57 +0000 (14:49 +0530)]
crypto/cnxk: add security session stats get

Adds the security session stats get op for cn10k.

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: use struct sizes for CTX writes
Anoob Joseph [Fri, 17 Dec 2021 09:19:56 +0000 (14:49 +0530)]
crypto/cnxk: use struct sizes for CTX writes

CTX writes only require the lengths are 8B aligned. Use the struct size
directly.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: account for CPT CTX updates and flush delays
Anoob Joseph [Fri, 17 Dec 2021 09:19:55 +0000 (14:49 +0530)]
crypto/cnxk: account for CPT CTX updates and flush delays

CPT CTX write with microcode would require CPT flush to complete to have
DRAM updated with the SA. Since datapath requires SA direction field,
introduce a new flag for the same.

Session destroy path is also updated to clear sa.valid bit using CTX
reload operation.

Session is updated with marker to differentiate s/w immutable and s/w
mutable portions.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: support lookaside IPsec HMAC-SHA384/512
Tejasree Kondoj [Fri, 17 Dec 2021 09:19:54 +0000 (14:49 +0530)]
crypto/cnxk: support lookaside IPsec HMAC-SHA384/512

Adding HMAC-SHA384/512 support to cnxk lookaside IPsec.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: write CPT CTX through microcode op
Tejasree Kondoj [Fri, 17 Dec 2021 09:19:53 +0000 (14:49 +0530)]
crypto/cnxk: write CPT CTX through microcode op

Adding support to write CPT CTX through microcode op(SET_CTX) for
cn10k lookaside PMD.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: update maximum sec crypto capabilities
Anoob Joseph [Fri, 17 Dec 2021 09:19:52 +0000 (14:49 +0530)]
crypto/cnxk: update maximum sec crypto capabilities

Update the macro to include newly added ciphers.
Updated the functions populating caps to throw error
when max is exceeded.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: clear session data before populating
Anoob Joseph [Fri, 17 Dec 2021 09:19:51 +0000 (14:49 +0530)]
crypto/cnxk: clear session data before populating

Clear session data before populating fields to not have garbage data.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: support lookaside IPsec AES-CBC-HMAC-SHA256
Tejasree Kondoj [Fri, 17 Dec 2021 09:19:50 +0000 (14:49 +0530)]
crypto/cnxk: support lookaside IPsec AES-CBC-HMAC-SHA256

Adding AES-CBC-HMAC-SHA256 support to lookaside IPsec PMD.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: enable allocated queues only
Shijith Thotton [Fri, 17 Dec 2021 09:19:49 +0000 (14:49 +0530)]
crypto/cnxk: enable allocated queues only

Only enable/disable queue pairs that are allocated during cryptodev
start/stop.

Fixes: 52008104e9a6 ("crypto/cnxk: update instruction queue in start/stop")
Cc: stable@dpdk.org
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocommon/cnxk: update completion code
Anoob Joseph [Fri, 17 Dec 2021 09:19:48 +0000 (14:49 +0530)]
common/cnxk: update completion code

Update completion code to match v1.19 microcode release.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocommon/cnxk: add missing reserved fields
Anoob Joseph [Fri, 17 Dec 2021 09:19:47 +0000 (14:49 +0530)]
common/cnxk: add missing reserved fields

Added missing bitfields for ctx flush and add err
print for ctx flush failure.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocommon/cnxk: fix reset of fields
Anoob Joseph [Fri, 17 Dec 2021 09:19:46 +0000 (14:49 +0530)]
common/cnxk: fix reset of fields

Copy DF/DSCP fields would get set based on ipsec_xform in the code
preceding this. Setting it again would cause the options to be reset.

Fixes: 78d03027f2cc ("common/cnxk: add IPsec common code")
Cc: stable@dpdk.org
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocommon/cnxk: add bit fields for params
Archana Muniganti [Fri, 17 Dec 2021 09:19:45 +0000 (14:49 +0530)]
common/cnxk: add bit fields for params

Added new structure with bit fields for params.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocommon/cnxk: support AES-XCBC key derivation
Anoob Joseph [Fri, 17 Dec 2021 09:19:44 +0000 (14:49 +0530)]
common/cnxk: support AES-XCBC key derivation

Add support for AES-XCBC key derivation.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocommon/cnxk: define minor opcodes for MISC
Anoob Joseph [Fri, 17 Dec 2021 09:19:43 +0000 (14:49 +0530)]
common/cnxk: define minor opcodes for MISC

MISC CPT instruction behaves differently based on minor opcode.
Define the missing minor opcodes for MISC major opcode.

Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agoevent/cnxk: add timer adapter periodic mode support
Shijith Thotton [Thu, 23 Dec 2021 16:06:22 +0000 (21:36 +0530)]
event/cnxk: add timer adapter periodic mode support

Add support for event timer adapter periodic mode capability.

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agocommon/cnxk: use XAQ create API for inline device
Pavan Nikhilesh [Mon, 13 Dec 2021 20:56:33 +0000 (02:26 +0530)]
common/cnxk: use XAQ create API for inline device

Use the XAQ AURA create and free API while initializing the
inline device.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agocommon/cnxk: add workaround for vWQE flush
Pavan Nikhilesh [Mon, 13 Dec 2021 20:54:23 +0000 (02:24 +0530)]
common/cnxk: add workaround for vWQE flush

Due to an errata writing to vWQE flush register might hang NIX.
Add workaround for vWQE flush hang by waiting for the max
coalescing timeout to flush out any pending vWQEs.

Fixes: ee48f711f3b0 ("common/cnxk: support NIX inline inbound and outbound setup")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agocommon/cnxk: add telemetry endpoints to SSO
Pavan Nikhilesh [Mon, 13 Dec 2021 20:43:08 +0000 (02:13 +0530)]
common/cnxk: add telemetry endpoints to SSO

Add common telemetry endpoints for SSO.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agoevent/cnxk: fix QoS devargs parsing
Pavan Nikhilesh [Mon, 13 Dec 2021 20:41:39 +0000 (02:11 +0530)]
event/cnxk: fix QoS devargs parsing

Fix qos devargs parsing using incorrect datatype for the
structure elements.

Fixes: 38c2e3240ba8 ("event/cnxk: add option to control SSO HWGRP QoS")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2 years agoeventdev/eth_rx: add event port get API
Naga Harish K S V [Sat, 22 Jan 2022 17:14:20 +0000 (11:14 -0600)]
eventdev/eth_rx: add event port get API

This patch introduces new api for retrieving event port id
of eth rx adapter.

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
2 years agoexamples/l3fwd: fix Rx burst size for event mode
Nipun Gupta [Tue, 11 Jan 2022 05:05:46 +0000 (10:35 +0530)]
examples/l3fwd: fix Rx burst size for event mode

While dequeuing the packets from the event device, burst size
is provided in the API. This was not getting properly
configured in the application. This patch correctly configures
the burst size.

Fixes: aaf58cb85b62 ("examples/l3fwd: add event port and queue setup")
Cc: stable@dpdk.org
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
2 years agoevent/cnxk: add external clock support for timer
Pavan Nikhilesh [Mon, 13 Dec 2021 11:13:44 +0000 (16:43 +0530)]
event/cnxk: add external clock support for timer

Add external clock support for cnxk timer adapter.

External clock mapping is as follows:
RTE_EVENT_TIMER_ADAPTER_EXT_CLK0 = TIM_CLK_SRC_10NS,
RTE_EVENT_TIMER_ADAPTER_EXT_CLK1 = TIM_CLK_SRC_GPIO,
RTE_EVENT_TIMER_ADAPTER_EXT_CLK2 = TIM_CLK_SRC_PTP,
RTE_EVENT_TIMER_ADAPTER_EXT_CLK3 = TIM_CLK_SRC_SYNCE,

TIM supports clock input from external GPIO, PTP, SYNCE clocks.
Input resolution is adjusted based on CNTVCT frequency for better
estimation.

Since TIM is unaware of input clock frequency, application is
expected to pass the frequency.
Example:
-a 0002:0e:00.0,tim_eclk_freq=122880000-0-0

The order of frequencies above is GPIO-PTP-SYNCE.

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2 years agoevent/cnxk: update minimum interval calculation
Pavan Nikhilesh [Mon, 13 Dec 2021 11:13:43 +0000 (16:43 +0530)]
event/cnxk: update minimum interval calculation

Minimum supported interval should now be retrieved from
mailbox based on the clock source and clock frequency.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2 years agoeventdev/eth_rx: fix missing internal port checks
Pavan Nikhilesh [Mon, 13 Dec 2021 08:31:43 +0000 (14:01 +0530)]
eventdev/eth_rx: fix missing internal port checks

When event delivery is through internal port, stats are maintained
by HW and we should avoid reading SW data structures for stats.
Fix missing internal port checks.

Fixes: 995b150c1ae1 ("eventdev/eth_rx: add queue stats API")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
2 years agodoc: fix dlb2 guide
Rashmi Shetty [Tue, 7 Dec 2021 23:01:51 +0000 (17:01 -0600)]
doc: fix dlb2 guide

Number of direct credits, atomic inflight and history list are
updated to DLB2.0 supported sizes. As DLB2.0 does not provide
dev arg to override the default per-queue atomic inflight
allocation, it is removed from the documentation.

Fixes: f3cad285bb88 ("event/dlb2: add infos get and configure")
Cc: stable@dpdk.org
Signed-off-by: Rashmi Shetty <rashmi.shetty@intel.com>
Reviewed-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
2 years agoeal/linux: log hugepage create errors with filename
Stephen Hemminger [Thu, 23 Dec 2021 19:21:58 +0000 (11:21 -0800)]
eal/linux: log hugepage create errors with filename

While debugging running DPDK service in a container, it is
useful to see which file creation failed.  Don't hide this
failure with DEBUG.

Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2 years agobuild: remove custom dependency checks in drivers
David Marchand [Thu, 20 Jan 2022 10:54:21 +0000 (11:54 +0100)]
build: remove custom dependency checks in drivers

Some drivers currently have their own checks and give some non
consistent reasons when an internal dependency is unavailable.

drivers/meson.build also checks for internal dependencies via 'deps'.
Let's rely on it for consistency, and smaller code.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Long Li <longli@microsoft.com>
2 years agobuild: make cfgfile optional
Bruce Richardson [Wed, 19 Jan 2022 18:10:02 +0000 (18:10 +0000)]
build: make cfgfile optional

Allow disabling of the cfgfile library in builds.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2 years agobuild: make "packet framework" optional
Bruce Richardson [Wed, 19 Jan 2022 18:10:01 +0000 (18:10 +0000)]
build: make "packet framework" optional

Add port, table and pipeline libraries - collectively often known as
the "packet framework" -  to the list of optional libraries, and
ensure tests can build with them disabled.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2 years agobuild: make flow classification optional
Bruce Richardson [Wed, 19 Jan 2022 18:10:00 +0000 (18:10 +0000)]
build: make flow classification optional

Add the flow_classify library to the list of optional libraries, and
ensure tests can build with it disabled.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2 years agobuild: make node optional
Bruce Richardson [Wed, 19 Jan 2022 18:09:59 +0000 (18:09 +0000)]
build: make node optional

Allow the 'node' library to be disabled in builds.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2 years agotest: link against all enabled libs
Bruce Richardson [Wed, 19 Jan 2022 18:09:58 +0000 (18:09 +0000)]
test: link against all enabled libs

Rather than maintaining a list of the libraries the unit tests need, and
having to conditionally include/omit optional libs from the list, we can
just link against all available libraries, simplifying the code
considerably.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2 years agobuild: allow recursive disabling of libraries
Bruce Richardson [Wed, 19 Jan 2022 18:09:57 +0000 (18:09 +0000)]
build: allow recursive disabling of libraries

Align the code in lib/meson.build with that in drivers/meson.build to
enable recursive disabling of libraries, i.e. if library b depends on
library a, disable library b if a is disabled (either explicitly or
implicitly). This allows libraries to be optional even if other DPDK
libs depend on them, something that was not previously possible.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2 years agogpudev: add alignment for memory allocation
Elena Agostini [Sat, 8 Jan 2022 00:20:01 +0000 (00:20 +0000)]
gpudev: add alignment for memory allocation

Similarly to rte_malloc, rte_gpu_mem_alloc accepts as
input the memory alignment size.

GPU driver should return GPU memory address aligned
with the input value.

Signed-off-by: Elena Agostini <eagostini@nvidia.com>
2 years agoconfig: add arch define for Arm
Ruifeng Wang [Thu, 20 Jan 2022 02:38:00 +0000 (10:38 +0800)]
config: add arch define for Arm

As per design document, RTE_ARCH is the name of the architecture.
However, the definition was missing on Arm with meson build.
It impacts applications that refers to this string.

Added for Arm builds.

Fixes: b1d48c41189a ("build: support ARM with meson")
Cc: stable@dpdk.org
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
2 years agoexamples/performance-thread: remove
Ferruh Yigit [Fri, 17 Dec 2021 13:15:26 +0000 (13:15 +0000)]
examples/performance-thread: remove

Remove sample application which is not clear if it is still relevant.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2 years agogpu/cuda: add NVIDIA GPU A100 identifier for DPU
Elena Agostini [Wed, 19 Jan 2022 21:41:49 +0000 (21:41 +0000)]
gpu/cuda: add NVIDIA GPU A100 identifier for DPU

Adding a new NVIDIA GPU identifier to let
driver recognize the A100 on a DPU card.

Signed-off-by: Elena Agostini <eagostini@nvidia.com>
2 years agogpu/cuda: fix memory list cleanup
Elena Agostini [Tue, 21 Dec 2021 20:50:42 +0000 (20:50 +0000)]
gpu/cuda: fix memory list cleanup

Memory list cleanup (called by cuda_mem_free)
was not properly set the new head of the list
when deleting an entry.

Fixes: 1306a73b1958 ("gpu/cuda: introduce CUDA driver")
Cc: stable@dpdk.org
Signed-off-by: Elena Agostini <eagostini@nvidia.com>
2 years agotest/dma: increase iterations of capacity test case
Bruce Richardson [Tue, 11 Jan 2022 13:41:05 +0000 (13:41 +0000)]
test/dma: increase iterations of capacity test case

To ensure we catch any bugs in calculation due to wrap-around of the id
values, increase the number of iterations of the burst_capacity test.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
2 years agodma/idxd: fix wrap-around in burst capacity calculation
Bruce Richardson [Tue, 11 Jan 2022 13:41:04 +0000 (13:41 +0000)]
dma/idxd: fix wrap-around in burst capacity calculation

The burst capacity calculation code assumes that the write and read
(i.e. ids_returned) values both wrap at the ring-size, but the read
value instead wraps as UINT16_MAX. Therefore, instead of just adding
ring-size to the write value in case the read is greater, we need to
just always mask the result to ensure a correct, in-range, value.

Fixes: 9459de4edc99 ("dma/idxd: add burst capacity")
Cc: stable@dpdk.org
Reported-by: Sunil Pai G <sunil.pai.g@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Sunil Pai G <sunil.pai.g@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
2 years agodma/idxd: fix paths to driver sysfs directory
Bruce Richardson [Tue, 11 Jan 2022 13:41:03 +0000 (13:41 +0000)]
dma/idxd: fix paths to driver sysfs directory

Recent kernel changes[1][2] mean that we cannot guarantee that the paths
in sysfs used for creating/binding a DSA or workqueue instance will be
as given in the utility script, since they are now "compatibility-mode
only". Update script to support both new paths and compatibility ones.

[1] https://lore.kernel.org/all/162637445139.744545.6008938867943724701.stgit@djiang5-desk3.ch.intel.com/
[2] https://lore.kernel.org/all/162637468705.744545.4399080971745974435.stgit@djiang5-desk3.ch.intel.com/

Fixes: 01863b9d2354 ("raw/ioat: include example configuration script")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
2 years agodma/idxd: fix burst capacity calculation
Bruce Richardson [Tue, 11 Jan 2022 13:41:02 +0000 (13:41 +0000)]
dma/idxd: fix burst capacity calculation

When the maximum burst size supported by HW is less than the available
ring space, incorrect capacity was returned when there was already some
jobs queued up for submission. This was because the capacity calculation
failed to subtract the number of already-enqueued jobs from the max
burst size. After subtraction is done, ensure that any negative values
(which should never occur if the user respects the reported limits), are
clamped to zero.

Fixes: 9459de4edc99 ("dma/idxd: add burst capacity")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
Tested-by: Jiayu Hu <jiayu.hu@intel.com>
2 years agobus/ifpga: remove useless check while browsing devices
Maxime Gouin [Wed, 5 Jan 2022 10:26:52 +0000 (11:26 +0100)]
bus/ifpga: remove useless check while browsing devices

reported by code analysis tool C++test (version 10.4):

  /build/dpdk-20.11/drivers/bus/ifpga/ifpga_bus.c
  67    Condition "afu_dev" is always evaluated to true
  81    Condition "afu_dev" is always evaluated to true

The "for" loop already checks that afu_dev is not NULL.

Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library")
Cc: stable@dpdk.org
Signed-off-by: Maxime Gouin <maxime.gouin@6wind.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
2 years agoeal: add OS defines for C conditional checks
Bruce Richardson [Thu, 16 Dec 2021 15:21:07 +0000 (15:21 +0000)]
eal: add OS defines for C conditional checks

Define a set of macros in the build configuration to allow C runtime
code to check the current OS environment. This saves the user having to
use ifdefs for e.g. disabling particular tests on Windows.
See included documentation changes for usage examples.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agodevtools: remove ugly workaround from get maintainer
Ferruh Yigit [Mon, 1 Nov 2021 13:35:32 +0000 (13:35 +0000)]
devtools: remove ugly workaround from get maintainer

Linux kernel 'get_maintainer.pl' script supports running out of Linux
tree since commit
31bb82c9caa9 ("get_maintainer: allow usage outside of kernel tree")

As commit is a few years old now, integrating it to DPDK and removing
ugly workaround for it.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2 years agodoc: remove dependency on findutils on FreeBSD
Bruce Richardson [Wed, 22 Dec 2021 15:18:55 +0000 (15:18 +0000)]
doc: remove dependency on findutils on FreeBSD

Standard "find" on BSD does not support the "-printf" so gfind from
findutils package was used to enable full doc builds. We can remove this
extra dependency by using "sed" and "tr" to adjust the output from
regular find instead.

Fixes: 8260f4f98cfe ("mk: use script to generate examples.dox")
Fixes: 499fe9dfcfc7 ("doc: add dependency on examples for API doxygen")
Fixes: 897e55c8d27f ("doc: fix Doxygen examples build on FreeBSD")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2 years agobuildtools: fix AVX512 check for Python 3.5
Lance Richardson [Mon, 3 Jan 2022 17:09:40 +0000 (12:09 -0500)]
buildtools: fix AVX512 check for Python 3.5

Python 3.5 subprocess.run() does not have a capture_output
parameter (it is present only in 3.7 and up).
Capture output by using subprocess.PIPE for stdout instead.

Fixes: bb9cd91095b3 ("buildtools: make AVX512 check portable")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
2 years agodrivers: remove octeontx2 drivers
Jerin Jacob [Sat, 11 Dec 2021 09:04:35 +0000 (14:34 +0530)]
drivers: remove octeontx2 drivers

As per the deprecation notice,  In the view of enabling unified driver
for octeontx2(cn9k)/octeontx3(cn10k), removing drivers/octeontx2
drivers and replace with drivers/cnxk/ which
supports both octeontx2(cn9k) and octeontx3(cn10k) SoCs.

This patch does the following

- Replace drivers/common/octeontx2/ with drivers/common/cnxk/
- Replace drivers/mempool/octeontx2/ with drivers/mempool/cnxk/
- Replace drivers/net/octeontx2/ with drivers/net/cnxk/
- Replace drivers/event/octeontx2/ with drivers/event/cnxk/
- Replace drivers/crypto/octeontx2/ with drivers/crypto/cnxk/
- Rename config/arm/arm64_octeontx2_linux_gcc as
  config/arm/arm64_cn9k_linux_gcc
- Update the documentation and MAINTAINERS to reflect the same.
- Change the reference to OCTEONTX2 as OCTEON 9. Old release notes and
the kernel related documentation is not accounted for this change.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
2 years agoregex/cn9k: use cnxk infrastructure
Liron Himi [Sat, 11 Dec 2021 09:04:34 +0000 (14:34 +0530)]
regex/cn9k: use cnxk infrastructure

update driver to use the REE cnxk code
replace octeontx2/otx2 with cn9k

Signed-off-by: Liron Himi <lironh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agocommon/cnxk: support REE
Liron Himi [Sat, 11 Dec 2021 09:04:33 +0000 (14:34 +0530)]
common/cnxk: support REE

extend cnxk infrastructure to support REE

Signed-off-by: Liron Himi <lironh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agocommon/cnxk: add REE mbox definitions
Liron Himi [Sat, 11 Dec 2021 09:04:32 +0000 (14:34 +0530)]
common/cnxk: add REE mbox definitions

add REE mbox definitions

Signed-off-by: Liron Himi <lironh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agocommon/cnxk: add REE HW definitions
Liron Himi [Sat, 11 Dec 2021 09:04:31 +0000 (14:34 +0530)]
common/cnxk: add REE HW definitions

adding REE (Regular Expression Engine) HW definitions

Signed-off-by: Liron Himi <lironh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agodoc: update LTS release cadence
Kevin Traynor [Mon, 13 Dec 2021 16:48:58 +0000 (16:48 +0000)]
doc: update LTS release cadence

Regular LTS releases have previously aligned to DPDK main branch
releases so that fixes being backported have already gone through
DPDK main branch release validation.

Now that DPDK main branch has moved to 3 releases per year, the LTS
releases should continue to align with it and follow a similar release
cadence.

Update stable docs to reflect this.

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
2 years agomaintainers: update for stable branches
Kevin Traynor [Mon, 13 Dec 2021 16:48:57 +0000 (16:48 +0000)]
maintainers: update for stable branches

Christian and Xueming are both already maintaining LTS releases.

Update the MAINTAINERS file to reflect this.

Cc: stable@dpdk.org
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
2 years agomaintainers: update for testpmd
Yuying Zhang [Fri, 7 Jan 2022 16:54:06 +0000 (16:54 +0000)]
maintainers: update for testpmd

Add Yuying Zhang as a co-maintainer.

Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2 years agodoc: replace deprecated distutils version parsing
Thomas Monjalon [Tue, 11 Jan 2022 11:35:44 +0000 (12:35 +0100)]
doc: replace deprecated distutils version parsing

When using Python 3.10, this warning appears:
  DeprecationWarning: The distutils package is deprecated
  and slated for removal in Python 3.12.
  Use setuptools or check PEP 632 for potential alternatives

The PEP 632 recommends replacing "distutils.version" with "packaging".

Bugzilla ID: 914
Cc: stable@dpdk.org
Reported-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Jerin Jacob <jerinj@marvell.com>
2 years agofix spelling in comments and strings
Josh Soref [Mon, 29 Nov 2021 16:08:02 +0000 (11:08 -0500)]
fix spelling in comments and strings

The tool comes from https://github.com/jsoref

Signed-off-by: Josh Soref <jsoref@gmail.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2 years agoversion: 22.03-rc0
David Marchand [Thu, 2 Dec 2021 18:11:21 +0000 (19:11 +0100)]
version: 22.03-rc0

Start a new release cycle with empty release notes.
Bump version and ABI minor.
Enable ABI checks.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2 years agoversion: 21.11.0
David Marchand [Fri, 26 Nov 2021 17:58:21 +0000 (18:58 +0100)]
version: 21.11.0

Signed-off-by: David Marchand <david.marchand@redhat.com>
2 years agomaintainers: update for compressdev
Fiona Trahe [Wed, 6 Oct 2021 16:25:47 +0000 (17:25 +0100)]
maintainers: update for compressdev

Replacing myself with Fan as compressdev API maintainer.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Ashish Gupta <ashish.gupta@marvell.com>
2 years agodevtools: forbid additions of __reserved
David Marchand [Sat, 23 Oct 2021 10:29:00 +0000 (12:29 +0200)]
devtools: forbid additions of __reserved

__reserved is a reserved keyword in Windows system headers.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Conor Walsh <conor.walsh@intel.com>
2 years agoethdev: announce migration to generic flow modify action
Viacheslav Ovsiienko [Fri, 26 Nov 2021 09:51:16 +0000 (11:51 +0200)]
ethdev: announce migration to generic flow modify action

The generic RTE_FLOW_ACTION_TYPE_MODIFY_FIELD action was
introduced by [1]. This action provides an unified way
to perform various arithmetic and transfer operations over
packet network header fields and packet metadata.

[1] 73b68f4c54a0 ("ethdev: introduce generic modify flow action")

On other side there are a bunch of multiple legacy actions,
that can be superseded by the generic MODIFY_FIELD action:

RTE_FLOW_ACTION_TYPE_OF_SET_MPLS_TTL
RTE_FLOW_ACTION_TYPE_OF_DEC_MPLS_TTL
RTE_FLOW_ACTION_TYPE_OF_SET_NW_TTL
RTE_FLOW_ACTION_TYPE_OF_DEC_NW_TTL      sfc
RTE_FLOW_ACTION_TYPE_OF_COPY_TTL_OUT
RTE_FLOW_ACTION_TYPE_OF_COPY_TTL_IN
RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC       bnxt, cxgbe, mlx5
RTE_FLOW_ACTION_TYPE_SET_IPV4_DST       bnxt, cxgbe, mlx5
RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC       cxgbe, mlx5
RTE_FLOW_ACTION_TYPE_SET_IPV6_DST       cxgbe, mlx5
RTE_FLOW_ACTION_TYPE_SET_TP_SRC         cxgbe, mlx5
RTE_FLOW_ACTION_TYPE_SET_TP_DST         cxgbe, mlx5
RTE_FLOW_ACTION_TYPE_DEC_TTL            mlx5, sfc
RTE_FLOW_ACTION_TYPE_SET_TTL            mlx5
RTE_FLOW_ACTION_TYPE_SET_MAC_SRC        cxgbe, mlx5
RTE_FLOW_ACTION_TYPE_SET_MAC_DST        cxgbe, mlx5
RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ        mlx5
RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ        mlx5
RTE_FLOW_ACTION_TYPE_INC_TCP_ACK        mlx5
RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK        mlx5
RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP      mlx5
RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP      mlx5
RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID    bnxt, cnxk, cxgbe, enic,
                                        mlx5, octeontx2, sfc
RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP    bnxt, cnxk, cxgbe, enic,
                                        mlx5, octeontx2, sfc
RTE_FLOW_ACTION_TYPE_SET_TAG            mlx5
RTE_FLOW_ACTION_TYPE_SET_META           mlx5

This note deprecates the following RTE Flow actions,
as not supported by any of PMDs:

RTE_FLOW_ACTION_TYPE_OF_SET_MPLS_TTL
RTE_FLOW_ACTION_TYPE_OF_DEC_MPLS_TTL
RTE_FLOW_ACTION_TYPE_OF_SET_NW_TTL
RTE_FLOW_ACTION_TYPE_OF_COPY_TTL_OUT
RTE_FLOW_ACTION_TYPE_OF_COPY_TTL_IN

The following actions are supposed to be deprecated in 22.07
and replaced by generic field modify action:

RTE_FLOW_ACTION_TYPE_OF_DEC_NW_TTL
RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC
RTE_FLOW_ACTION_TYPE_SET_IPV4_DST
RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC
RTE_FLOW_ACTION_TYPE_SET_IPV6_DST
RTE_FLOW_ACTION_TYPE_SET_TP_SRC
RTE_FLOW_ACTION_TYPE_SET_TP_DST
RTE_FLOW_ACTION_TYPE_DEC_TTL
RTE_FLOW_ACTION_TYPE_SET_TTL
RTE_FLOW_ACTION_TYPE_SET_MAC_SRC
RTE_FLOW_ACTION_TYPE_SET_MAC_DST
RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ
RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ
RTE_FLOW_ACTION_TYPE_INC_TCP_ACK
RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK
RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP
RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP
RTE_FLOW_ACTION_TYPE_SET_TAG
RTE_FLOW_ACTION_TYPE_SET_META

The VLAN set actions are interrelated to VLAN header insertion/removal
and supported by multiple PMDs and widely used by applications and
not supposed to be deprecated due to potential large impact on
drivers and applications.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2 years agodevtools/cocci: add script for ethdev namespace change
Aman Singh [Tue, 23 Nov 2021 08:47:19 +0000 (14:17 +0530)]
devtools/cocci: add script for ethdev namespace change

The cocci script is to help add prefix 'RTE_ETH' namespace to enum
& macro of ethdev library. It helps in automating these changes for
applications. The script won't make changes in the code comment part.
Usage: spatch <script path> <app path>

Signed-off-by: Aman Singh <aman.deep.singh@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
2 years agodoc: add details for new test structure
Ciara Power [Mon, 18 Oct 2021 14:50:30 +0000 (14:50 +0000)]
doc: add details for new test structure

The testing guide is now updated to include details about
using sub-testsuites.
Some example code is given to demonstrate how they can be used.

A note is also added to highlight the need for using vdev EAL args
when running cryptodev tests.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2 years agodoc: add a guide for developing unit tests
Aaron Conole [Fri, 15 Oct 2021 17:06:04 +0000 (13:06 -0400)]
doc: add a guide for developing unit tests

The DPDK testing infrastructure includes a comprehensive set of
libraries, utilities, and CI integrations for developers to test
their code changes.  This isn't well documented, however.

Document the basics for adding a test suite to the infrastructure
and enabling that test suite for continuous integration platforms
so that newer developers can understand how to develop test suites
and test cases.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2 years agodoc: add eventdev feature matrices
Sunil Kumar Kori [Wed, 24 Nov 2021 13:03:58 +0000 (18:33 +0530)]
doc: add eventdev feature matrices

Patch adds feature matrices for event dev, Rx/Tx, Crypto
and Timer adapters.

Along with, .ini files are added for all supported PMDs.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
2 years agodoc: add RIB and FIB programmer guides
Vladimir Medvedkin [Mon, 8 Nov 2021 17:37:25 +0000 (17:37 +0000)]
doc: add RIB and FIB programmer guides

Currently, programmer's guide for the RIB and FIB libraries are missing.
This commit adds them.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
2 years agodoc: fix a typo in EAL guide
Kefu Chai [Mon, 18 Oct 2021 14:29:23 +0000 (22:29 +0800)]
doc: fix a typo in EAL guide

Change from "how many segments each segment can have" to
"how many segments each segment list can have".

Fixes: b31739328354 ("doc: update guides for memory subsystem")
Cc: stable@dpdk.org
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2 years agodoc: replace machine option in build guide
Juraj Linkeš [Mon, 11 Oct 2021 13:42:27 +0000 (15:42 +0200)]
doc: replace machine option in build guide

Update the docs to reflect the two new variables, cpu_instruction_set
for non-arm builds and platform for arm builds.

Fixes: bf66003b51ec ("build: use platform for generic and native builds")

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
2 years agodoc: add traffic metering API walk-through
Jerin Jacob [Sat, 7 Aug 2021 08:21:08 +0000 (13:51 +0530)]
doc: add traffic metering API walk-through

Added a diagram to document meter library components
and added text for steps performed by the application to
configure the traffic meter and policing library.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2 years agodoc: fix typos in examples code
Ray Kinsella [Tue, 10 Aug 2021 14:34:20 +0000 (15:34 +0100)]
doc: fix typos in examples code

Fix documentation typos that are generating spurious CI warnings.

Fixes: 9a212dc06c7a ("doc: use code snippets in sample app guides")

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
2 years agodoc: add tested platforms with Mellanox NICs
Raslan Darawsheh [Fri, 26 Nov 2021 12:16:54 +0000 (14:16 +0200)]
doc: add tested platforms with Mellanox NICs

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

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
2 years agodoc: add tested platforms with NXP SoCs
Apeksha Gupta [Fri, 26 Nov 2021 09:41:10 +0000 (15:11 +0530)]
doc: add tested platforms with NXP SoCs

Add tested NXP platform to v21.11 release note for NXP enetfec PMD.

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
2 years agodoc: add power management scale mode reaction time note
David Hunt [Wed, 24 Nov 2021 16:53:00 +0000 (16:53 +0000)]
doc: add power management scale mode reaction time note

When using PMD Power Management, scale mode reacts slower than
monitor mode and pause mode. Add note in user guide to this
effect.

Signed-off-by: David Hunt <david.hunt@intel.com>
2 years agonet/mlx5: fix devargs validation for multi-class probing
Michael Baum [Thu, 25 Nov 2021 06:16:55 +0000 (08:16 +0200)]
net/mlx5: fix devargs validation for multi-class probing

The mlx5_args function reads the devargs and checks if they are valid
for this driver and if not it returns an error.

This was normal behavior as long as all the devargs come to this driver,
but since it is possible to run several drivers together, the function
may return an error for another driver's devarg even though it is
completely valid.
In addition the function does not allow the user to know which of the
devargs is incorrect, but returns an error without printing the
unknown devarg.

This patch eliminates the error return in the case of an unknown devarg,
and prints a warning for each such devarg specifically.

Fixes: 7b4f1e6bd367 ("common/mlx5: introduce common library")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2 years agocommon/mlx5: fix memory region lookup on slow path
Dmitry Kozlyuk [Thu, 25 Nov 2021 20:20:44 +0000 (22:20 +0200)]
common/mlx5: fix memory region lookup on slow path

Memory region (MR) was being looked up incorrectly
for the data address of an externally-attached mbuf.
A search was attempted for the mempool of the mbuf,
while mbuf data address does not belong to this mempool
in case of externally-attached mbuf.
Only attempt the search:
1) for not externally-attached mbufs;
2) for mbufs coming from MPRQ mempool;
3) for externally-attached mbufs from mempools
   with pinned external buffers.

Fixes: 08ac03580ef2 ("common/mlx5: fix mempool registration")

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Matan Azrad <matan@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agoapp/gpudev: remove memory leaks
Elena Agostini [Thu, 25 Nov 2021 23:03:32 +0000 (23:03 +0000)]
app/gpudev: remove memory leaks

Remove all memory leaks in case of errors in
test-gpudev application.

Fixes: e818c4e2bf50 ("gpudev: add memory API")
Fixes: c7ebd65c1372 ("gpudev: add communication list")

Signed-off-by: Elena Agostini <eagostini@nvidia.com>
2 years agogpudev: remove unnecessary memory barrier
Elena Agostini [Thu, 25 Nov 2021 22:40:54 +0000 (22:40 +0000)]
gpudev: remove unnecessary memory barrier

Remove unnecessary rte_gpu_wmb from rte_gpu_comm_populate_list_pkts.
It causes a performance degradation in case of NVIDIA GPU V100.

This change doesn't affect any functionality as the status resides
in CPU registered memory.

Fixes: c7ebd65c1372 ("gpudev: add communication list")

Signed-off-by: Elena Agostini <eagostini@nvidia.com>
2 years agocompress/mlx5: fix double close of device context
Michael Baum [Thu, 25 Nov 2021 08:18:29 +0000 (10:18 +0200)]
compress/mlx5: fix double close of device context

The context of the device opens once in the common probe and closes with
its removal.

If the probe of one of the drivers fails, it releases its resources and
then the common closes the context.
But mistakenly in the compress probe, if there isn't enough capabilities
to support compress operations, it closes the device and then common
probe closes it again.

Remove the redundant closing from compress probe.

Fixes: 2efd26544554 ("compress/mlx5: support partial transformation")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2 years agoexamples/ipsec-secgw: fix L4 length for TSO packets
Radu Nicolau [Wed, 24 Nov 2021 17:33:51 +0000 (17:33 +0000)]
examples/ipsec-secgw: fix L4 length for TSO packets

Using RTE_MBUF_F_TX_TCP_SEG requires L4 length to be set.

Fixes: a7f32947a316 ("examples/ipsec-secgw: support TCP TSO")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agomaintainers: update for testpmd
Aman Singh [Fri, 22 Oct 2021 07:19:49 +0000 (12:49 +0530)]
maintainers: update for testpmd

Add Aman Singh as co-maintainer of testpmd.

Make the title description more accurate for this tool.

Signed-off-by: Aman Singh <aman.deep.singh@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2 years agodoc: fix typo in coding style
Dariusz Sosnowski [Fri, 29 Oct 2021 13:19:02 +0000 (16:19 +0300)]
doc: fix typo in coding style

This patch fixes a typo in DPDK Coding Style, in Return Values section,
i.e. replaces "indicated may" with "indicated by".

Fixes: 36032e46be40 ("doc: add coding style")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2 years agodoc: capitalise PMD
Sean Morrissey [Mon, 22 Nov 2021 10:50:46 +0000 (10:50 +0000)]
doc: capitalise PMD

The doc's contain references to pmd but the proper use is to use PMD.

Cc: stable@dpdk.org
Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2 years agofix PMD wording
Sean Morrissey [Mon, 22 Nov 2021 10:50:44 +0000 (10:50 +0000)]
fix PMD wording

Removing the use of driver following PMD as its unnecessary.

Cc: stable@dpdk.org
Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Signed-off-by: Conor Fogarty <conor.fogarty@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2 years agoremove repeated 'the' in the code
Sean Morrissey [Mon, 22 Nov 2021 10:50:45 +0000 (10:50 +0000)]
remove repeated 'the' in the code

Remove the use of double "the" as it does not make sense.

Cc: stable@dpdk.org
Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Signed-off-by: Conor Fogarty <conor.fogarty@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2 years agodevtools: suppress checkpatch warning about strlcpy
Stephen Hemminger [Mon, 15 Nov 2021 23:26:10 +0000 (15:26 -0800)]
devtools: suppress checkpatch warning about strlcpy

Current version of Linux kernel checkpatch now complains about
usages of strlcpy because the Linux kernel prefers strscpy.

WARNING:STRLCPY: Prefer strscpy over strlcpy

But DPDK project allows strlcpy, therefore suppress the warning.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2 years agodevtools: check prefix for libraries patches
David Marchand [Wed, 20 Oct 2021 09:14:15 +0000 (11:14 +0200)]
devtools: check prefix for libraries patches

The convention in DPDK is to directly use library names as prefix,
without a lib/.

Signed-off-by: David Marchand <david.marchand@redhat.com>
2 years agodevtools: add acronyms in dictionary for commit checks
Ferruh Yigit [Wed, 10 Nov 2021 17:41:40 +0000 (17:41 +0000)]
devtools: add acronyms in dictionary for commit checks

FD      -> File Descriptor
GUID    -> Globally Unique Identifier
Netlink -> Linux Netlink socket family
PCIe    -> Peripheral Component Interconnect Express

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2 years agodevtools: add Marvell acronyms for commit checks
Ashwin Sekhar T K [Fri, 17 Sep 2021 10:58:39 +0000 (16:28 +0530)]
devtools: add Marvell acronyms for commit checks

Update word list with Marvell specific acronyms.

CPT  -> Cryptographic Accelerator Unit
CQ   -> Completion Queue
LBK  -> Loopback Interface Unit
LMT  -> Large Atomic Store Unit
MCAM -> Match Content Addressable Memory
NIX  -> Network Interface Controller Unit
NPA  -> Network Pool Allocator
NPC  -> Network Parser and CAM Unit
ROC  -> Rest Of Chip
RQ   -> Receive Queue
RVU  -> Resource Virtualization Unit
SQ   -> Send Queue
SSO  -> Schedule Synchronize Order Unit
TIM  -> Timer Unit

Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2 years agodevtools: clarify that lines up to 100 characters are ok
Bruce Richardson [Wed, 20 Oct 2021 14:26:01 +0000 (15:26 +0100)]
devtools: clarify that lines up to 100 characters are ok

Since we allow line lengths of up to 100, and the CI checkpatches job
only check for that amount, the rest of our tooling and docs should
reflect this reality. Therefore we can:

* adjust the editorconfig to use that value, to save editors (e.g. vim)
  from automatically wrapping lines at 80 characters when typing.
  [Since python checkers all seem to expect 79 character lines max, add
  for python only a 79-char max line length.]

* change the default line length setting in checkpatches script to 100
  so as it matches CI and pre-merge checks.

* update the docs to clarify that while 80 chars is recommended, up to
  100 characters is acceptable.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2 years agoversion: 21.11-rc4
David Marchand [Wed, 24 Nov 2021 18:13:05 +0000 (19:13 +0100)]
version: 21.11-rc4

Signed-off-by: David Marchand <david.marchand@redhat.com>
2 years agonet/mlx5: fix shared Rx queue segment configuration match
Viacheslav Ovsiienko [Wed, 24 Nov 2021 14:33:16 +0000 (16:33 +0200)]
net/mlx5: fix shared Rx queue segment configuration match

While joining the shared Rx queue to the existing queue group,
the queue configurations is checked to be the same as it was
specified in the first group queue creation - all shared
queues should be created with identical configurations.

During the Rx queue creation the buffer split segment
configuration can be altered - the zero segment sizes are
substituted with the actual ones, inherited from the pools,
number of segments can be extended to cover the maximal
packet length, etc. It means the actual queue segment
configuration can not be used directly to match the
configuration provided in the queue setup call.

To resolve an issue we should store original parameters
in the shared queue structure and perform the check against
one of these stored ones.

Fixes: 09c2555303be ("net/mlx5: support shared Rx queue")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agonet/mlx5: fix GENEVE and VXLAN-GPE flow item matching
Alexander Kozyrev [Wed, 24 Nov 2021 13:26:09 +0000 (15:26 +0200)]
net/mlx5: fix GENEVE and VXLAN-GPE flow item matching

GENEVE and VXLAN-GPE item matching is done similarly to GRE matching.
Users can skip the specification of the protocol type and expect that
this type is deducted from the inner header type automatically.
But the inner header type may not be specified in order to match all the
protocol types. In this case, PMD should not specify the protocol type.
Check if we have the inner header type before setting the protocol type.

Fixes: 690391dd0e8b ("net/mlx5: fix GENEVE protocol type translation")
Fixes: 861fa3796f75 ("net/mlx5: fix VXLAN-GPE next protocol translation")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agonet/mlx5: fix GRE flow item matching
Alexander Kozyrev [Wed, 24 Nov 2021 04:32:34 +0000 (06:32 +0200)]
net/mlx5: fix GRE flow item matching

GRE protocol type is implicitly set in the matching translation in case
an application doesn't specify any type explicitly in a flow rule.
It is extracted from the inner header type, but this type may be absent.
In this case, GRE item matching is broken. Check if we have the inner
header type before setting it to allow matching on all GRE packets.

Fixes: be26e81bfc1c ("net/mlx5: fix GRE protocol type translation")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agonet/mlx5: fix Rx queue reference count for indirect RSS
Dmitry Kozlyuk [Wed, 24 Nov 2021 09:40:30 +0000 (11:40 +0200)]
net/mlx5: fix Rx queue reference count for indirect RSS

mlx5_ind_table_obj_modify() was not changing the reference counters
of neither the new set of RxQs, nor the old set of RxQs.
On the other hand, creation of the RSS incremented the RxQ refcnt.
If an RxQ was present in both the initial and the modified set,
its reference counter was incremented one extra time
compared to the queues that were only present in the new set.
This prevented releasing said RxQ resources on port stop:

    flow indirect_action 0 create action_id 1 \
        action rss queues 0 1 end / end
    flow indirect_action 0 update 1 \
        action rss queues 2 3 end / end
    quit
    ...
    mlx5_net: mlx5.c:1622: mlx5_dev_close():
        port 0 some Rx queue objects still remain
    mlx5_net: mlx5.c:1626: mlx5_dev_close():
        port 0 some Rx queues still remain

Increment reference counters for the new set of RxQs
and decrement them for the old set of RxQs when needed.
Remove explicit referencing of RxQ from mlx5_ind_table_obj_attach()
because it reuses mlx5_ind_table_obj_modify() code doing this.

Fixes: ec4e11d41d12 ("net/mlx5: preserve indirect actions on restart")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Matan Azrad <matan@nvidia.com>
2 years agonet/mlx5: fix indirect RSS creation when port is stopped
Dmitry Kozlyuk [Wed, 24 Nov 2021 09:40:29 +0000 (11:40 +0200)]
net/mlx5: fix indirect RSS creation when port is stopped

mlx5_ind_table_obj_setup() was incrementing RxQ reference counters
even when the port was stopped, which prevented RxQ release
and triggered an internal assertion.
Only increment reference counter when the port is started.

Fixes: ec4e11d41d12 ("net/mlx5: preserve indirect actions on restart")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Matan Azrad <matan@nvidia.com>