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>
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.
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>
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>
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>
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>
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>
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>
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.
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.
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.
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>
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.
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.
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
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>
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>
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>
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.
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.
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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.
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>
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.
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>