dpdk.git
2 years agonet/ice: fix Tx checksum offload
Kevin Liu [Sun, 12 Dec 2021 14:35:20 +0000 (14:35 +0000)]
net/ice: fix Tx checksum offload

The tunnel packets is missing some information after Tx forwarding.

In ice_txd_enable_offload, when set tunnel packet Tx checksum
offload enable, td_offset should be set with outer l2/l3 len instead
of inner l2/l3 len.

In ice_txd_enable_checksum, td_offset should also be set with outer
l3 len.

This patch fix the bug that the checksum engine can forward Ipv4/Ipv6
tunnel packets.

Fixes: 28f9002ab67f ("net/ice: add Tx AVX512 offload path")
Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")
Cc: stable@dpdk.org
Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2 years agonet/ice: track DCF state of PF
Dapeng Yu [Wed, 24 Nov 2021 08:12:20 +0000 (16:12 +0800)]
net/ice: track DCF state of PF

When VF is reset, PF will change DCF state from ON to other state, if
flow creation, destroy, or redirect command is sent to DCF at this
time, it will fail.

This patch tracks DCF state and returns try-again error to caller when
DCF state is not ON.

Cc: stable@dpdk.org
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
2 years agonet/iavf: remove git residue symbol
Haiyue Wang [Thu, 16 Dec 2021 04:43:42 +0000 (12:43 +0800)]
net/iavf: remove git residue symbol

This extra symbol '+' should be added when patch was reapplied, and the
compiler treats it as unsigned type, so the code still runs well.

Fixes: 84108425054a ("net/iavf: support asynchronous virtual channel message")
Cc: stable@dpdk.org
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
2 years agonet/ice: fix Tx checksum offload capability
Qi Zhang [Wed, 24 Nov 2021 01:09:28 +0000 (09:09 +0800)]
net/ice: fix Tx checksum offload capability

Add missing capability for outer UDP Tx checksum.
Also fixed the feature list in ice_dcf.ini

Fixes: bf89db4409bb ("net/ice: complete device info get in DCF")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2 years agonet/ice: fix pattern check for flow director parser
Junfeng Guo [Wed, 22 Dec 2021 08:11:38 +0000 (16:11 +0800)]
net/ice: fix pattern check for flow director parser

FDIR rules with masks are not supported in current code. Thus add
pattern check for IPv4/UDP/TCP/SCTP addr/port to terminate the FDIR
programming stage.

Fixes: 1b71ed2cdd5d ("net/ice: refactor flow pattern parser")
Cc: stable@dpdk.org
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2 years agonet/cnxk: add devargs for configuring SDP channel mask
Satheesh Paul [Tue, 9 Nov 2021 09:42:04 +0000 (15:12 +0530)]
net/cnxk: add devargs for configuring SDP channel mask

This patch adds support to configure channel mask which will
be used by rte flow when adding flow rules on SDP interfaces.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agocommon/cnxk: support setting channel mask for SDP interfaces
Satheesh Paul [Tue, 9 Nov 2021 09:42:03 +0000 (15:12 +0530)]
common/cnxk: support setting channel mask for SDP interfaces

ROC changes to support setting channel mask for SDP interfaces.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agonet/qede: fix redundant condition in debug code
Anatoly Burakov [Tue, 30 Nov 2021 16:59:13 +0000 (16:59 +0000)]
net/qede: fix redundant condition in debug code

Expression "a && 1" is equivalent to just "a", so fix the accidental
inclusion of a literal in code.

Fixes: ec55c118792b ("net/qede: add infrastructure for debug data collection")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
Reviewed-by: Igor Russkikh <irusskikh@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
2 years agocommon/cnxk: wait for XAQ pool to fill
Ashwin Sekhar T K [Tue, 30 Nov 2021 06:07:02 +0000 (11:37 +0530)]
common/cnxk: wait for XAQ pool to fill

Wait for XAQ pool to get filled with the freed pointers
before proceeding.

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agocommon/cnxk: wait for SQB pool to fill
Ashwin Sekhar T K [Tue, 30 Nov 2021 06:07:01 +0000 (11:37 +0530)]
common/cnxk: wait for SQB pool to fill

Wait for SQB pool to get filled with the freed pointers
before proceeding.

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agocommon/cnxk: support waiting for pool filling
Ashwin Sekhar T K [Tue, 30 Nov 2021 06:07:00 +0000 (11:37 +0530)]
common/cnxk: support waiting for pool filling

Add roc_npa_aura_op_available_wait() API which can be used to wait
until an NPA pool gets filled up to a certain count of pointers.

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agocommon/cnxk: update CPU directive in NPA assembly code
Ashwin Sekhar T K [Tue, 30 Nov 2021 05:48:09 +0000 (11:18 +0530)]
common/cnxk: update CPU directive in NPA assembly code

Use arch_extension instead of .cpu directive in NPA assembly code
snippets. Using .cpu directive with generic causes it to override
the micro architecture selected by march,mcpu.
For example if march=armv8.5-a+crypto+sve2 provided then the .cpu
directive overrides it to generic+crypto+sve2, use arch_extension
to get the expected result.

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agocommon/cnxk: use CAS with release semantics for batch alloc
Ashwin Sekhar T K [Tue, 30 Nov 2021 05:45:27 +0000 (11:15 +0530)]
common/cnxk: use CAS with release semantics for batch alloc

Before issuing the batch alloc, we clear the first word of
cache lines so that NPA can update the status. Make sure that
this line clear is flushed before the batch alloc is issued.

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agocommon/cnxk: ensure ROC cache alignment of NPA stack size
Ashwin Sekhar T K [Tue, 30 Nov 2021 05:38:22 +0000 (11:08 +0530)]
common/cnxk: ensure ROC cache alignment of NPA stack size

When PLT_CACHE_LINE_SIZE is set to 64B, the memzone size reserved for
NPA stack could be a multiple of 64B. In such a case, when NDC SYNC
is initiated for the NPA LF, it could go and corrupt an additional
64B bytes as NDC flushes in multiples of ROC cache line size (128B).

So ensure that NPA stack size requested is a multiple of 128B.

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agocommon/cnxk: fix nibble parsing order when dumping MCAM
Satheesh Paul [Wed, 24 Nov 2021 07:55:27 +0000 (13:25 +0530)]
common/cnxk: fix nibble parsing order when dumping MCAM

Fix the order in which layer flags and layer type fields
are parsed when dumping the MCAM data.

Fixes: 9869c39918a0 ("common/cnxk: support flow entry dump")
Cc: stable@dpdk.org
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agonet/mlx5: fix MPRQ stride devargs adjustment
Michael Baum [Tue, 23 Nov 2021 18:38:05 +0000 (20:38 +0200)]
net/mlx5: fix MPRQ stride devargs adjustment

In Multi-Packet RQ creation, the user can choose the number of strides
and their size in bytes. The user updates it using specific devargs for
both of these parameters.
The above two parameters determine the size of the WQE which is actually
their product of multiplication.

If the user selects values that are not in the supported range, the PMD
changes them to default values. However, apart from the range
limitations for each parameter individually there is also a minimum
value on their multiplication. When the user selects values that their
multiplication are lower than minimum value, no adjustment is made and
the creation of the WQE fails.

This patch adds an adjustment in these cases as well. When the user
selects values whose multiplication is lower than the minimum, they are
replaced with the default values.

Fixes: ecb160456aed ("net/mlx5: add device parameter for MPRQ stride size")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2 years agonet/mlx5: improve stride parameter names
Michael Baum [Tue, 23 Nov 2021 18:38:04 +0000 (20:38 +0200)]
net/mlx5: improve stride parameter names

In the striding RQ management there are two important parameters, the
size of the single stride in bytes and the number of strides.

Both the data-path structure and config structure keep the log of the
above parameters. However, in their names there is no mention that the
value is a log which may be misleading as if the fields represent the
values themselves.

This patch updates their names describing the values more accurately.

Fixes: ecb160456aed ("net/mlx5: add device parameter for MPRQ stride size")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2 years agocommon/mlx5: add minimum WQE size for striding RQ
Michael Baum [Tue, 23 Nov 2021 18:38:03 +0000 (20:38 +0200)]
common/mlx5: add minimum WQE size for striding RQ

Some devices have a WQE size limit for striding RQ. On some newer
devices, this limitation is smaller and information on its size is
provided by the firmware.

This patch adds the attribute query from firmware: the minimum required
size of WQE buffer for striding RQ in granularity of Bytes.

Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2 years agonet/mlx5: fix modify field MAC address offset
Viacheslav Ovsiienko [Fri, 26 Nov 2021 13:09:45 +0000 (15:09 +0200)]
net/mlx5: fix modify field MAC address offset

The MAC addresses fields are 48 bit wide and are processed
by mlx5 PMD as two words. There the bug was introduced for
the offset, causing malfunction of MODIFY_FIELD action
with MAC address fields as source or destination and
with non zero field offset.

Fixes: 40c8fb1fd3b3 ("net/mlx5: update modify field action")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agomem: quiet base address hint warning if not requested
Anatoly Burakov [Mon, 9 Nov 2020 15:47:48 +0000 (15:47 +0000)]
mem: quiet base address hint warning if not requested

Any EAL memory allocation often goes through eal_get_virtual_area()
function, which will print a warning whenever the resulting allocation
didn't match the specified address requirements. This is useful for
when we have requested a specific base virtual address, to let the user
know that the mapping has deviated from that address.

However, on Linux, we also have a default base address that's there to
ensure better chances of successful secondary process initialization,
as well as higher likelihood of the virtual areas to fit inside the
IOMMU address width. Because of this default base address, there are
warnings printed even when no base address was explicitly requested,
which can be confusing to the user.

Emit this warning with debug level unless base address was explicitly
requested by the user.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2 years agodma/cnxk: fix installing internal headers
Srikanth Yalavarthi [Wed, 26 Jan 2022 05:49:34 +0000 (21:49 -0800)]
dma/cnxk: fix installing internal headers

DMA module internal header files are currently being installed to the
prefix directory. This patch updates DMA meson config file to exclude
internal headers during install stage.

Fixes: 53f6d7328bf4 ("dma/cnxk: create and initialize device on PCI probing")
Cc: stable@dpdk.org
Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
Acked-by: Radha Mohan Chintakuntla <radhac@marvell.com>
2 years agodevtools: fix comment detection in forbidden token check
David Marchand [Thu, 27 Jan 2022 10:55:11 +0000 (11:55 +0100)]
devtools: fix comment detection in forbidden token check

After a comment section was detected, passing to a new hunk was not seen
as ending the section and all subsequent hunks were ignored.

Fixes: 7413e7f2aeb3 ("devtools: alert on new calls to exit from libs")
Cc: stable@dpdk.org
Reported-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: David Marchand <david.marchand@redhat.com>
2 years agotest/crypto: add copy/set DF cases in IPsec
Anoob Joseph [Mon, 6 Dec 2021 11:08:00 +0000 (16:38 +0530)]
test/crypto: add copy/set DF cases in IPsec

Add test cases to verify copy DF and set DF options
with lookaside IPsec offload.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agotest/crypto: add AES-XCBC known vectors
Anoob Joseph [Mon, 6 Dec 2021 11:07:59 +0000 (16:37 +0530)]
test/crypto: add AES-XCBC known vectors

Add known vector test cases for NULL cipher + AES-XCBC.
Also add both algos to the combined mode list of algos.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agotest/crypto: skip null auth in ICV corrupt case
Tejasree Kondoj [Mon, 6 Dec 2021 11:07:58 +0000 (16:37 +0530)]
test/crypto: skip null auth in ICV corrupt case

Skipping NULL authentication in ICV corruption test case
for lookaside IPsec testsuite.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agotest/crypto: add fragmented packet case
Tejasree Kondoj [Mon, 6 Dec 2021 11:07:57 +0000 (16:37 +0530)]
test/crypto: add fragmented packet case

Add fragmented plain packet test case in combined mode.
The test case leverages combined mode framework to generate
IPsec packet from a fragment and verify that headers are formed
correctly. The IPsec packet would be decapsulated and the plain
packet is compared against the original packet.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agotest/crypto: add IPsec AES-CTR cases
Tejasree Kondoj [Mon, 6 Dec 2021 11:07:56 +0000 (16:37 +0530)]
test/crypto: add IPsec AES-CTR cases

Add IPsec AES-CTR test case for combined mode
in lookaside IPsec testsuite.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agotest/crypto: add IPsec security stats cases
Ankur Dwivedi [Mon, 6 Dec 2021 11:07:55 +0000 (16:37 +0530)]
test/crypto: add IPsec security stats cases

Add security stats test cases in IPSEC protocol testsuite.

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agotest/crypto: add IPsec transport mode cases
Anoob Joseph [Mon, 6 Dec 2021 11:07:54 +0000 (16:37 +0530)]
test/crypto: add IPsec transport mode cases

Added IPsec transport mode test cases for IPv4 packets
in the test app.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agotest/crypto: add IPsec fragmented packet known vectors
Tejasree Kondoj [Mon, 6 Dec 2021 11:07:53 +0000 (16:37 +0530)]
test/crypto: add IPsec fragmented packet known vectors

Added fragmented plain packet known vector test case in
IPsec outbound. The test case sends a fragmented packet
and ensures that the IPsec packet generated has correct
fragmentation fields (ie, the IPsec packet is not fragmented)
by comparing against the known vector.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agotest/crypto: add IPsec HMAC-SHA384/512 known vectors
Tejasree Kondoj [Mon, 6 Dec 2021 11:07:52 +0000 (16:37 +0530)]
test/crypto: add IPsec HMAC-SHA384/512 known vectors

Test app is updated with lookaside IPsec HMAC-SHA384/512
known vectors test cases.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agotest/crypto: add IPv6 tunnel mode cases
Tejasree Kondoj [Mon, 6 Dec 2021 11:07:51 +0000 (16:37 +0530)]
test/crypto: add IPv6 tunnel mode cases

Added IPv6 known vector and combined mode tests.
Following modes are added:
Tunnel IPv6 in IPv6
Tunnel IPv4 in IPv4
Tunnel IPv4 in IPv6
Tunnel IPv6 in IPv4

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agotest/crypto: add chained operations in combined cases
Anoob Joseph [Mon, 6 Dec 2021 11:07:50 +0000 (16:37 +0530)]
test/crypto: add chained operations in combined cases

Extend lookaside IPsec combined mode cases to cover chained
operations also.

Currently covering combinations of Ciphers(AES-128-CBC)
and Auth(NULL, SHA2-256 [16B ICV]).

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agotest/crypto: add IPsec AES-CBC-HMAC-SHA256 known vectors
Tejasree Kondoj [Mon, 6 Dec 2021 11:07:49 +0000 (16:37 +0530)]
test/crypto: add IPsec AES-CBC-HMAC-SHA256 known vectors

Test app for lookaside IPsec is added with
AES-CBC-HMAC-SHA256 test cases.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agotest/crypto: add IPsec AES-CBC known vectors
Anoob Joseph [Mon, 6 Dec 2021 11:07:48 +0000 (16:37 +0530)]
test/crypto: add IPsec AES-CBC known vectors

Extend IPsec lookaside test framework to support chained
operations and add AES-CBC 128 known vector tests.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agoexamples/ipsec-secgw: fix default flow rule creation
Nithin Dabilpuram [Fri, 17 Dec 2021 12:44:51 +0000 (18:14 +0530)]
examples/ipsec-secgw: fix default flow rule creation

Fix default flow rule to create after ethdev start to align
with rte_flow spec.

Fixes: 513f192b5fd4 ("examples/ipsec-secgw: add default flow for inline Rx")
Cc: stable@dpdk.org
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agoexamples/ipsec-secgw: fix eventdev start sequence
Nithin Dabilpuram [Thu, 2 Dec 2021 12:30:36 +0000 (18:00 +0530)]
examples/ipsec-secgw: fix eventdev start sequence

Start eventdev after complete initialization of event dev,
rx adapter and tx adapter.

Fixes: e0b0e55c8f15 ("examples/ipsec-secgw: add framework for event helper")
Cc: stable@dpdk.org
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
2 years agocrypto/ipsec_mb: fix tainted data for session
Ciara Power [Fri, 10 Dec 2021 14:09:52 +0000 (14:09 +0000)]
crypto/ipsec_mb: fix tainted data for session

Downcasting a void * to struct aesni_gcm_session * caused the session
data to be treated as tainted.
Removing the void * temporary variable and adding a cast avoids this
issue.

Coverity issue: 374377
Fixes: 746825e5c0ea ("crypto/ipsec_mb: move aesni_gcm PMD")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2 years agocrypto/ipsec_mb: fix queue cleanup null pointer dereference
Ciara Power [Fri, 10 Dec 2021 14:09:51 +0000 (14:09 +0000)]
crypto/ipsec_mb: fix queue cleanup null pointer dereference

The qp was being used in the cleanup without checking if it was non NULL.
A check is now added to verify qp is non NULL before use.

Coverity issue: 374375
Fixes: c75542ae4200 ("crypto/ipsec_mb: introduce IPsec_mb framework")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2 years agocrypto/ipsec_mb: fix queue setup null pointer dereference
Ciara Power [Fri, 10 Dec 2021 14:09:50 +0000 (14:09 +0000)]
crypto/ipsec_mb: fix queue setup null pointer dereference

When setting up a qp in a secondary process, the local qp pointer is set
to the stored device qp, configured by the primary process for that
device, but only if that device qp is not NULL.
If the device qp was not set up correctly by the primary process and has
a NULL value, the local qp variable stays at the default initialised
value, NULL. This causes a NULL pointer dereference later in the
function when using the qp value.

This is fixed by always setting the local qp to the value of the device
qp stored, and then checking if qp is NULL, returning an error if it is.

Coverity issue: 374382
Fixes: 72a169278a56 ("crypto/ipsec_mb: support multi-process")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2 years agocrypto/cnxk: update microcode completion handling
Anoob Joseph [Fri, 17 Dec 2021 09:20:11 +0000 (14:50 +0530)]
crypto/cnxk: update microcode completion handling

Update microcode completion code handling to update the required mbuf &
crypto op flags. IP checksum good case is now reported by specific
microcode completion code.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: enable copy DSCP
Anoob Joseph [Fri, 17 Dec 2021 09:20:10 +0000 (14:50 +0530)]
crypto/cnxk: enable copy DSCP

Copy DSCP is supported. Enable it in capabilities.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: add per packet IV in lookaside IPsec debug
Archana Muniganti [Fri, 17 Dec 2021 09:20:09 +0000 (14:50 +0530)]
crypto/cnxk: add per packet IV in lookaside IPsec debug

For cn9k, use HW GEN IV as default and add per pkt IV
in lookaside IPsec debug mode. Debug mode helps to verify
lookaside PMD using known outbound vectors in lookaside
autotest.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: support AES-CMAC
Anoob Joseph [Fri, 17 Dec 2021 09:20:08 +0000 (14:50 +0530)]
crypto/cnxk: support AES-CMAC

Add support for AES CMAC auth algorithm.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: add copy and set DF
Anoob Joseph [Fri, 17 Dec 2021 09:20:07 +0000 (14:50 +0530)]
crypto/cnxk: add copy and set DF

Add support for copy and set DF bit.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: support AES-XCBC and null cipher
Anoob Joseph [Fri, 17 Dec 2021 09:20:06 +0000 (14:50 +0530)]
crypto/cnxk: support AES-XCBC and null cipher

Add support for AES XCBC and NULL cipher.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: fix extend tail calculation
Anoob Joseph [Fri, 17 Dec 2021 09:20:05 +0000 (14:50 +0530)]
crypto/cnxk: fix extend tail calculation

If the packet size to be incremented after IPsec processing is less
than size of hdr (size incremented before submitting), then extend_tail
can become negative. Allow negative values for the variable.

Fixes: 67a87e89561c ("crypto/cnxk: add cn9k lookaside IPsec datapath")
Cc: stable@dpdk.org
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: support lookaside IPsec AES-CTR
Tejasree Kondoj [Fri, 17 Dec 2021 09:20:04 +0000 (14:50 +0530)]
crypto/cnxk: support lookaside IPsec AES-CTR

Adding AES-CTR support to cnxk CPT in
lookaside IPsec mode.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: add more info on command timeout
Anoob Joseph [Fri, 17 Dec 2021 09:20:03 +0000 (14:50 +0530)]
crypto/cnxk: add more info on command timeout

Print more info when command timeout happens. Print software and
hardware queue information.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: use atomics to access CPT res
Anoob Joseph [Fri, 17 Dec 2021 09:20:02 +0000 (14:50 +0530)]
crypto/cnxk: use atomics to access CPT res

The memory would be updated by hardware. Use atomics to read the same.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/cnxk: fix inflight count calculation
Anoob Joseph [Fri, 17 Dec 2021 09:20:01 +0000 (14:50 +0530)]
crypto/cnxk: fix inflight count calculation

Inflight count calculation is updated to cover wrap around cases where
head can become smaller than tail.

Fixes: fd390896f4a3 ("crypto/cnxk: allow different cores in pending queue")
Cc: stable@dpdk.org
Reported-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
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>