David Marchand [Tue, 5 Apr 2022 16:34:46 +0000 (18:34 +0200)]
eal: cleanup lcore ID hand-over
So far, a worker thread has been using its thread_id to discover which
lcore has been assigned to it.
On the other hand, as noted by Tyler, the pthread API does not strictly
guarantee that a new thread won't start running eal_thread_loop before
pthread_create writes to &lcore_config[xx].thread_id.
Though all OS implementations supported in DPDK (recently) ensure this
property, it is more robust to have the main thread directly pass
the worker thread lcore.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Ferruh Yigit [Mon, 11 Apr 2022 18:05:07 +0000 (19:05 +0100)]
maintainers: update email address
Use new email address.
Signed-off-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Elena Agostini [Wed, 13 Apr 2022 17:38:48 +0000 (17:38 +0000)]
gpu/cuda: add more NVIDIA devices
Add more NVIDIA GPU devices to the gpu/cuda driver list
compatible with GPUDirect RDMA.
Signed-off-by: Elena Agostini <eagostini@nvidia.com>
Tianli Lai [Tue, 29 Mar 2022 22:01:07 +0000 (06:01 +0800)]
net/dpaa2: fix dpdmux default interface
if dpdmux objects created by restool tools with
the argument "--default-if=<if-id-number>", this
function would change it to 1
Fixes:
1def64c2d79e ("net/dpaa2: add dpdmux initialization and configuration")
Cc: stable@dpdk.org
Signed-off-by: Tianli Lai <laitianli@tom.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Ivan Malov [Sun, 20 Mar 2022 10:11:00 +0000 (13:11 +0300)]
net/sfc: drop futile null check
The NULL pointer check is clearly unneeded.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
David Marchand [Tue, 5 Apr 2022 13:48:58 +0000 (15:48 +0200)]
eal/windows: add missing C++ include guards
Add missing 'extern "C"' to file.
Fixes:
1db72630da0c ("eal/windows: do not expose private facilities")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
David Marchand [Mon, 4 Apr 2022 14:24:39 +0000 (16:24 +0200)]
ci: add Fedora 35 container in GHA
Build DPDK with Fedora 35 containers.
GHA container support does not allow caching images and docker hub
seems to limit image pulls.
On the other hand, the Fedora project hub does not seem to limit them,
so prefer this hub.
Nevertheless, let's try to be good citizens and cache (once a day) a
prepared image for subsequent builds.
This preparation is done in a first prepare-container-images job.
The rpm-container-builds job then depends on it with a 'needs:' tag.
Differences with builds in Ubuntu GHA vm images:
- tasks are run as root in containers, no need for sudo,
- compiler must be explicitly installed,
- GHA artifacts can't contain a ':' in their name, and must be filtered,
- environment variables are not inherited and must be passed explicitly,
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Elena Agostini [Mon, 4 Apr 2022 14:43:52 +0000 (14:43 +0000)]
gpu/cuda: add NVIDIA A30X identifier for DPU
A30X GPU code for DPU.
Signed-off-by: Elena Agostini <eagostini@nvidia.com>
Tyler Retzlaff [Thu, 10 Mar 2022 07:35:08 +0000 (23:35 -0800)]
eal/windows: fix data race when creating threads
eal_thread_loop() uses lcore_config[i].thread_id,
which is stored upon the return from CreateThread().
Per documentation, eal_thread_loop() can start
before CreateThread() returns and the ID is stored.
Create lcore worker threads suspended and then subsequently resume to
allow &lcore_config[i].thread_id be stored before eal_thread_loop
execution.
Fixes:
53ffd9f080fc ("eal/windows: add minimum viable code")
Cc: stable@dpdk.org
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Haiyue Wang [Thu, 24 Mar 2022 08:41:43 +0000 (16:41 +0800)]
eal/x86: remove atomic header include loop
Remove the x86 top atomic header include from the architecture related
header file, since this x86 top atomic header file has included them.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Nicolas Chautru [Mon, 21 Mar 2022 18:19:50 +0000 (11:19 -0700)]
maintainers: add sections for some bbdev drivers
These were implicit from DPDK script but adding
separate reference to make it explicit.
Separate sections for API and PMDs
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Heinrich Kuhn [Fri, 25 Mar 2022 12:01:33 +0000 (14:01 +0200)]
maintainers: update for NFP
Niklas has been appointed the new maintainer for the NFP PMD.
Update the MAINTAINERS file to reflect this.
Signed-off-by: Heinrich Kuhn <heinrich.kuhn@corigine.com>
David Marchand [Wed, 23 Mar 2022 09:24:00 +0000 (10:24 +0100)]
devtools: document ABI check suppression rules
Suppression rules are being added during the life of an ABI and cleaned
when bumping the major version.
Sort and document those rules to avoid pruning rules that should be kept.
Signed-off-by: David Marchand <david.marchand@redhat.com>
David Marchand [Fri, 18 Mar 2022 14:35:08 +0000 (15:35 +0100)]
version: 22.07-rc0
Start a new release cycle with empty release notes.
Bump version and ABI minor.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
Thomas Monjalon [Thu, 17 Mar 2022 09:05:06 +0000 (10:05 +0100)]
version: 22.03.0
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
John McNamara [Wed, 16 Mar 2022 17:33:37 +0000 (17:33 +0000)]
doc: update release notes for 22.03
Fix grammar, spelling and formatting of DPDK 22.03 release notes.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
David Hunt [Wed, 9 Mar 2022 13:22:21 +0000 (13:22 +0000)]
doc: add PMD power management errata with RTM and GCC 9
An errata exists where users may see reduced power savings when using
PMD Power Management. This issue occurs when compiling DPDK applications
with GCC-9 on platforms with TSX enabled. In rte_power_monitor_multi(),
the function may return without successfully starting the RTM
transaction (the _xbegin() fails).
Signed-off-by: David Hunt <david.hunt@intel.com>
Wei Huang [Wed, 16 Mar 2022 07:26:30 +0000 (03:26 -0400)]
raw/ifpga: fix build with optimization
Compile failed with cflag optimization=1 on Ubuntu20.04 with GCC10.3,
it reported vendor_id and dev_id may be used uninitialized in function
ifpga_rawdev_fill_info().
Actually it's not the truth, the variables are initialized in function
ifpga_get_dev_vendor_id(). To avoid such compile error, the variables
are initialized when they are defined.
Fixes:
9c006c45d0c5 ("raw/ifpga: scan PCIe BDF device tree")
Cc: stable@dpdk.org
Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
Sean Morrissey [Wed, 9 Mar 2022 09:33:10 +0000 (09:33 +0000)]
doc: fix telemetry example in cryptodev guide
Blank line added to the final telemetry example for the
cryptography device library as to fix the example
rendering.
Fixes:
1c559ee8469 ("cryptodev: add telemetry endpoint for capabilities")
Cc: stable@dpdk.org
Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Juraj Linkeš [Tue, 25 Jan 2022 13:20:02 +0000 (14:20 +0100)]
doc: add arm64 cross file example
The docs mention modifications and additions to the cross file,
but there is no demonstration of how those should look like.
Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
Juraj Linkeš [Tue, 25 Jan 2022 13:20:01 +0000 (14:20 +0100)]
doc: update arm64 cross build of numactl
Numactl cross compilation doesn't work with clang, remove it
and fix the GCC cross compiler executable name.
Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
Juraj Linkeš [Tue, 25 Jan 2022 13:20:00 +0000 (14:20 +0100)]
doc: add arm64 toolchain names update instructions
The newer versions have an extra -none- in the name.
Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
Juraj Linkeš [Tue, 25 Jan 2022 13:19:59 +0000 (14:19 +0100)]
doc: add CFLAGS/LDFLAGS alternatives for arm64 cross build
Remove CFLAGS and LDFLAGS since Meson doesn't support them well enough.
Add Meson alternatives: -Dc_args and -Dc_link_args on the command line
and in cross files.
Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
Tudor Brindus [Tue, 8 Feb 2022 03:50:18 +0000 (22:50 -0500)]
doc: simplify Linux paramter rcu_nocbs in PVP benchmark
From Documentation/admin-guide/kernel-parameters.txt, specifically the
last sentence:
nohz_full= [KNL,BOOT,SMP,ISOL]
The argument is a cpu list, as described above.
In kernels built with CONFIG_NO_HZ_FULL=y, set
the specified list of CPUs whose tick will be stopped
whenever possible. The boot CPU will be forced outside
the range to maintain the timekeeping. Any CPUs
in this list will have their RCU callbacks offloaded,
just as if they had also been called out in the
rcu_nocbs= boot parameter.
The kernel or-s the nohz_full cpumask into the rcu_nocbs cpumask at
startup, and uses that.
Signed-off-by: Tudor Brindus <me@tbrindus.ca>
Bruce Richardson [Tue, 15 Mar 2022 22:05:04 +0000 (22:05 +0000)]
doc: add hyperlinks to driver guides in Linux guide
The document roadmap section was missing any mention of the individual
drivers guides which are important for users. Add them to list.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Tue, 15 Mar 2022 22:05:03 +0000 (22:05 +0000)]
doc: add hyperlinks to other docs from Linux guide
The document roadmap section called out the titles of other documents,
but these are better as hyperlinks.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Tue, 15 Mar 2022 22:05:02 +0000 (22:05 +0000)]
doc: add hyperlinks to driver guides in FreeBSD guide
The document roadmap section was missing any mention of the individual
drivers guides which are important for users. Add them to list.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Tue, 15 Mar 2022 22:05:01 +0000 (22:05 +0000)]
doc: add hyperlinks to other docs from FreeBSD guide
The document roadmap section called out the titles of other documents,
but these are better as hyperlinks.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Wed, 16 Mar 2022 13:45:51 +0000 (13:45 +0000)]
doc: change informational warnings to notes in Linux guide
There are two warnings in the VFIO section about limitations of VFIO and
limitations on who can bind/unbind devices. Since these don't actually
describe any unsafe conditions, and are more informational, we can
change these to notes. This also helps emphasise the other warnings in
the documents which flag genuine security concerns.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Wed, 16 Mar 2022 13:45:50 +0000 (13:45 +0000)]
doc: consolidate VFIO content on Linux drivers page
Rather than having separate sections for VFIO and VFIO no-iommu mode, as
well as a separate section further down the document on troubleshooting
VFIO, we can consolidate all these as subsections into a primary VFIO
section. This section starts with the basics of VFIO use, then covers
no-iommu mode, before moving on to the more advanced topics such as
creating VFs and ending with the troubleshooting subsection.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Wed, 16 Mar 2022 13:45:49 +0000 (13:45 +0000)]
doc: move UIO section to the end of Linux drivers page
To further de-emphasise UIO over the alternatives, we can move the UIO
section of the drivers page to the end of the document, giving more
prominence to VFIO and bifurcated drivers.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Wed, 16 Mar 2022 13:45:48 +0000 (13:45 +0000)]
doc: split VFIO section in Linux guide
The VFIO section of the page about Linux drivers was rather long and
unstructured. This can be improved by splitting it up into subsections,
to cover the specifics of memory limits and creating VFs. When moving
the various text notes into the relevant subsections, we can drop the
note about kernels earlier than 3.6, since DPDK no longer supports
kernels that old.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Wed, 16 Mar 2022 13:45:47 +0000 (13:45 +0000)]
doc: emphasise VFIO over UIO-based modules in Linux guide
VFIO is to be strongly preferred over UIO-based modules, so update our
text and examples to only refer to VFIO, giving an initial reference at
the start to UIO as a fallback option.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Wed, 16 Mar 2022 13:45:46 +0000 (13:45 +0000)]
doc: move device binding up in Linux guide
While the details of VFIO and UIO may be of interest to some, most users
of the doc are likely primarily interested in how to bind their devices
to the kernel driver and then move on to running the app. Therefore, the
most important part of the "Linux Drivers" section of the GSG is the
subsection on "Binding and Unbinding", so put that first.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Wed, 16 Mar 2022 13:45:45 +0000 (13:45 +0000)]
doc: make UIO safety warning more visible in Linux guide
The GSG has a note warning that use of UIO is inherently unsafe due to
lack of IOMMU protection. However, this was only flagged as a "NOTE",
meaning it could easily be missed. Changing the rst tag from "note" to
"warning" and moving it to the top of the UIO subsection makes this a
lot more visible to users.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Wed, 16 Mar 2022 13:45:44 +0000 (13:45 +0000)]
doc: fix missing note on UIO module in Linux guide
The docs on binding drivers was updated as part of the removal of the
igb_uio module from the main DPDK repo. As part of that update, a note
about uio_pci_generic requiring legacy interrupts was removed, but
should have been kept.
Fixes:
56bb5841fd06 ("kernel/linux: remove igb_uio")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Wed, 16 Mar 2022 13:45:43 +0000 (13:45 +0000)]
doc: replace characters for (R) symbol in Linux guide
Some IDEs, such as eclipse, complained on save about the use of special
characters in the (R) symbol in linux GSG doc. We can replace those with
the equivalent "|reg|" text, and including isonum.txt.
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Thu, 10 Mar 2022 12:38:43 +0000 (12:38 +0000)]
doc: remove IOMMU pass-through from Linux guide
The "Linux Drivers" section of the GSG already notes that, for use of
UIO, the IOMMU must be disabled or put into pass-through mode.
Therefore, there is no need to duplicate this information in the
"additional functionality" section. Also the kernel configuration
options documented in the section are enabled as standard on all common
distro kernels, so the information should not be needed in a GSG doc.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Thu, 10 Mar 2022 12:38:42 +0000 (12:38 +0000)]
doc: drop reference to KNI from Linux guide
The KNI library is disabled by default in DPDK and is already documented
in the programmers guide and also in the sample application guide. There
are also in-kernel alternatives to it. Therefore, we can drop the
(already fairly minimal) reference to it from the Linux GSG.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Thu, 10 Mar 2022 12:38:41 +0000 (12:38 +0000)]
doc: shorten details on HPET use
As best we can tell, the HPET timers are not commonly used, so there is
little need to give extensive detail and commentry on them in the Linux
GSG. As such, we can reduce the GSG section to just a single subsection
and also move it down the page below items which are likely of greater
importance.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Thu, 10 Mar 2022 12:38:40 +0000 (12:38 +0000)]
doc: expand list of directories in Linux guide
Not all directories were given in the GSG document, but many of those
omitted would be of interest to users, e.g. "doc", "license" and
"usertools" directories. Adding these leaves only "devtools", and
"kernel" as the only undocumented directories, so add them in too for
completeness.
When updating the section, add "including" to the line leading up to the
directory list, indicating that, while the list is currently complete,
it is not guaranteed to always be.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Thu, 10 Mar 2022 12:38:39 +0000 (12:38 +0000)]
doc: merge Linux requirements for applications build
When building end-applications linked with DPDK, the only additional
tool needed is pkg-config/pkgconf. However, the standard development
tools meta-packages on most distro's include this as standard, meaning
it does not really require its own section. The one outlier in the
existing text is "alpine" where it is not present when using "libc-dev"
target. However, changing "gcc" and "libc-dev" to "alpine-sdk"
metapackage aligns alpine with the other distros in this regard.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Thu, 10 Mar 2022 12:38:38 +0000 (12:38 +0000)]
doc: remove duplicated note about UEFI secure boot
A note about secure boot not allowing UIO is present in both the system
requirements section and the driver binding section. This fits better in
the driver binding section, so the copy in system requirements can be
removed. The document in general now also emphasises VFIO over UIO more
than when this note was first added, reducing the need for this warning
to be repeated.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Thu, 10 Mar 2022 12:38:37 +0000 (12:38 +0000)]
doc: drop note about old chipset from Linux guide
The chipsets referenced in the note[1] were all launched in 2012 and are
now discontinued, so we can drop the note about them at this stage.
[1] https://ark.intel.com/content/www/us/en/ark/products/codename/44946/products-formerly-cave-creek.html
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Fri, 11 Mar 2022 20:07:52 +0000 (20:07 +0000)]
doc: update build section of FreeBSD guide
Some minor updates for the section on builing DPDK in the GSG:
* update Python 3.7 package name to the 3.8 version
* note that the pyelftools needs to be tied to the python version
* drop reference to jansson library for legacy telemetry
* replace special characters for (R)
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Raslan Darawsheh [Tue, 15 Mar 2022 09:34:28 +0000 (11:34 +0200)]
doc: add tested platforms with Mellanox NICs
Add tested platforms with Mellanox NICs to the 22.03 release notes.
Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
Lingli Chen [Thu, 10 Mar 2022 09:46:19 +0000 (17:46 +0800)]
doc: add tested Intel platforms with Intel NICs
Add tested Intel platforms with Intel NICs to v22.03 release note.
Signed-off-by: Lingli Chen <linglix.chen@intel.com>
Acked-by: Xueqin Lin <xueqin.lin@intel.com>
Rakesh Kudurumalla [Fri, 4 Mar 2022 14:23:37 +0000 (19:53 +0530)]
net/cnxk: fix build with optimization
Fix the following build error seen with --optimization=1 and
GCC 10.3.0.
drivers/net/cnxk/cnxk_ethdev_mtr.c: In function
‘cnxk_nix_mtr_policy_validate’:
lib/ethdev/rte_mtr_driver.h:188:10: error: ‘str’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
drivers/net/cnxk/cn10k_rx.h:149:2 error: ‘frag_ptr’ may be
used uninitialized in this function
Bugzilla ID: 939
Fixes:
b526599020ef ("net/cnxk: fix build with GCC 12")
Cc: stable@dpdk.org
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Tested-by: Daxue Gao <daxuex.gao@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Thinh Tran [Wed, 9 Mar 2022 19:49:00 +0000 (14:49 -0500)]
net/mlx5: fix CPU socket ID for Rx queue creation
The default CPU socket ID was used while creating the Rx queue and this caused
creation failure in case if hardware was not resided on the default socket.
The patch sets the correct CPU socket ID for the mlx5_rxq_ctrl before
calling the mlx5_rxq_create_devx_rq_resources() which eventually calls
mlx5_devx_rq_create() with correct CPU socket ID.
Fixes:
bc5bee028ebc ("net/mlx5: create drop queue using DevX")
Cc: stable@dpdk.org
Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Jiawei Wang [Mon, 7 Mar 2022 02:10:42 +0000 (04:10 +0200)]
net/mlx5: fix port matching in sample flow rule
If there are an explicit port match and sample action in the same flow,
mlx5 PMD pushes the explicit port match in the prefix subflow, and
uses the tag item match in the suffix subflow.
The explicit port match was translated into source vport match so
the sample suffix subflow lost this match after flow split.
This patch copies the explicit port match to the sample suffix subflow,
and the latter gets the correct source vport value in the flow matcher.
Fixes:
b4c0ddbfcc58 ("net/mlx5: split sample flow into two sub-flows")
Cc: stable@dpdk.org
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Thomas Monjalon [Tue, 15 Mar 2022 01:16:22 +0000 (02:16 +0100)]
version: 22.03-rc4
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Bruce Richardson [Fri, 11 Mar 2022 20:05:23 +0000 (20:05 +0000)]
eventdev: fix clang C++ include
When compiling on FreeBSD with clang and include checking enabled,
errors are emitted due to differences in how empty structs/unions are
handled in C and C++, as C++ structs cannot have zero size.
lib/eventdev/rte_eventdev.h:992:2: error:
union has size 0 in C, non-zero size in C++
Since the contents of the union are all themselves of zero size,
the actual union wrapper is unnecessary. We therefore remove it for C++
builds - though keep it for C builds for safety and clarity of
understanding the code. The alignment constraint on the union is
unnecessary in the case where the whole struct is aligned on a 16-byte
boundary, so we add that constraint to the overall structure to ensure
it applies for C++ code as well as C.
Fixes:
1cc44d409271 ("eventdev: introduce event vector capability")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Fri, 11 Mar 2022 20:05:22 +0000 (20:05 +0000)]
cryptodev: fix clang C++ include
When compiling on FreeBSD with clang and include checking enabled,
errors are emitted due to differences in how empty structs/unions are
handled in C and C++, as C++ structs cannot have zero size.
lib/cryptodev/rte_crypto.h:127:2: error:
union has size 0 in C, non-zero size in C++
Since the contents of the union are all themselves of zero size,
the actual union wrapper is unnecessary. We therefore remove it for C++
builds - though keep it for C builds for safety and clarity of
understanding the code.
Fixes:
c0f87eb5252b ("cryptodev: change burst API to be crypto op oriented")
Fixes:
d2a4223c4c6d ("cryptodev: do not store pointer to op specific params")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Fri, 11 Mar 2022 20:05:21 +0000 (20:05 +0000)]
compressdev: fix missing space in log macro
Building with clang on FreeBSD with chkincs enabled, we get the
following error about a missing space:
lib/compressdev/rte_compressdev_internal.h:25:58: error:
invalid suffix on literal;
C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
rte_log(RTE_LOG_ ## level, compressdev_logtype, "%s(): "fmt "\n", \
Adding in a space between the '"' and 'fmt' removes the error.
Fixes:
ed7dd94f7f66 ("compressdev: add basic device management")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Fri, 11 Mar 2022 20:05:20 +0000 (20:05 +0000)]
compressdev: separate out driver-only headers
The headers rte_compressdev_pmd.h and rte_compressdev_internal.h are,
as the filenames suggest, headers for building drivers using the
compressdev APIs. As such they should be marked as
"driver_sdk_headers" rather than just "headers" in the meson.build
file.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Fri, 11 Mar 2022 20:05:19 +0000 (20:05 +0000)]
eal/freebsd: add missing C++ include guards
Add missing 'extern "C"' to file.
Fixes:
428eb983f5f7 ("eal: add OS specific header file")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Ferruh Yigit [Wed, 9 Mar 2022 11:25:29 +0000 (11:25 +0000)]
maintainers: update for KNI, UIO and pcap
Won't able to allocate time on these components, resigning from
maintaining them.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Rahul Bhansali [Tue, 11 Jan 2022 12:50:05 +0000 (18:20 +0530)]
examples/l3fwd: fix buffer overflow in Tx
This patch fixes the stack buffer overflow error reported
from AddressSanitizer.
Function send_packetsx4() tries to access out of bound data
from rte_mbuf and fill it into TX buffer even in the case
where no pending packets (len = 0).
Performance impact:- No
ASAN error report:-
==819==ERROR: AddressSanitizer: stack-buffer-overflow on address
0xffffe2c0dcf0 at pc 0x0000005e791c bp 0xffffe2c0d7e0 sp 0xffffe2c0d800
READ of size 8 at 0xffffe2c0dcf0 thread T0
#0 0x5e7918 in send_packetsx4 ../examples/l3fwd/l3fwd_common.h:251
#1 0x5e7918 in send_packets_multi ../examples/l3fwd/l3fwd_neon.h:226
Fixes:
96ff445371e0 ("examples/l3fwd: reorganise and optimize LPM code path")
Cc: stable@dpdk.org
Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Gregory Etelson [Thu, 10 Mar 2022 05:59:53 +0000 (07:59 +0200)]
app/testpmd: fix flow rule with flex input link
Testpmd reads flex item configuration from a JSON file.
Flex item input link description is stored in testpmd
flow item format. For example, `eth type is 0x0800`.
The item description is placed into a general testpmd CLI
flow rule command template and parsed to convert string into
flow item object.
The patch adds the `actions` section to the flow rule template.
Fixes:
59f3a8acbcdb ("app/testpmd: add flex item commands")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Gregory Etelson [Sun, 13 Mar 2022 09:01:23 +0000 (11:01 +0200)]
app/testpmd: fix GTP header parsing in checksum engine
GTP header can be followed by an optional 32 bits extension.
GTP notifies about the extension presence through the E, S or PN
header bits.
Csum GTP header parser did not check the extension bits value.
The patch updates GTP header length if at-least one of the
extension bits is set.
Fixes:
d8e5e69f3a9b ("app/testpmd: add GTP parsing and Tx checksum offload")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
Adham Masarwah [Sun, 13 Mar 2022 12:57:02 +0000 (14:57 +0200)]
app/testpmd: fix show RSS RETA on Windows
Replaced using strtoul with strtoull when converting to
64-bit mask field.
In Windows strtoul returns 32-bit values which cause an
issue with show RSS RETA.
Fixes:
66c594904ac ("ethdev: support multiple sizes of redirection table")
Cc: stable@dpdk.org
Signed-off-by: Adham Masarwah <adham@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
Kevin Liu [Wed, 29 Dec 2021 09:37:02 +0000 (09:37 +0000)]
app/testpmd: fix L4 checksum in multi-segments
Testpmd forwards packets in checksum mode that it needs to calculate
the checksum of each layer's protocol.
In process_inner_cksums, when parsing tunnel packets, inner L4 offset
should be outer_l2_len + outer_l3_len + l2_len + l3_len.
In process_outer_cksums, when parsing tunnel packets, outer L4 offset
should be outer_l2_len + outer_l3_len.
Fixes:
e6b9d6411e91 ("app/testpmd: add SW L4 checksum in multi-segments")
Cc: stable@dpdk.org
Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
Acked-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
Gerry Gribbon [Wed, 9 Mar 2022 23:41:52 +0000 (23:41 +0000)]
app/regex: fix number of matches
Depending on number of jobs specified on command line, part of the
data buffer may not get searched, resulting in incorrect number of
matches being reported.
Additional change to ensure the "All Matches" summary outputs the
correct match start locations in the supplied data buffer.
Fixes:
de06137cb295 ("app/regex: add RegEx test application")
Cc: stable@dpdk.org
Signed-off-by: Gerry Gribbon <ggribbon@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
David Marchand [Thu, 10 Mar 2022 18:30:40 +0000 (19:30 +0100)]
bpf: fix build with some libpcap version on FreeBSD
This is something caught in UNH FreeBSD env.
For some reason [1], the pcap/bpf.h header started to define _BPF_H_.
It happens that the bpf_impl.h internal DPDK header uses this define as
an internal guard.
This triggers a build failure in bpf_convert.c which can't find
RTE_BPF_LOG macro.
Fix the include guard to use the filename and remove _.
1: https://github.com/the-tcpdump-group/libpcap/pull/1074
Fixes:
94972f35a02e ("bpf: add BPF loading and execution framework")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Piotr Bronowski [Wed, 9 Mar 2022 18:02:00 +0000 (18:02 +0000)]
crypto/ipsec_mb: fix GCM requested digest length
This patch removes coverity defect CID 375828:
Untrusted value as argument (TAINTED_SCALAR)
Coverity issue: 375828
Fixes:
ceb863938708 ("crypto/aesni_gcm: support all truncated digest sizes")
Cc: stable@dpdk.org
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Pablo de Lara [Wed, 9 Mar 2022 10:45:14 +0000 (10:45 +0000)]
crypto/ipsec_mb: fix GMAC parameters setting
AES-GMAC requires plaintext length to be 0 when using AES-GCM,
so only AAD data is used.
Fixes:
a501609ea646 ("crypto/ipsec_mb: fix length and offset settings")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Tested-by: Radu Nicolau <radu.nicolau@intel.com>
Ciara Loftus [Fri, 11 Mar 2022 13:45:13 +0000 (13:45 +0000)]
net/af_xdp: fix shared UMEM fill queue reserve
Commit
81fe6720f84f ("net/af_xdp: reserve fill queue before socket create")
moves the fill queue reserve logic to before the creation of the socket in
order to suppress kernel logs like:
XSK buffer pool does not provide enough addresses to fill 2047 buffers on
Rx ring 0
However, for queues that share umem, the fill queue reserve must occur
after the socket creation, because the fill queue is not valid until
that point.
This commit uses the umem refcnt value to determine whether the queue is
sharing a umem, and performs the fill queue reservation either before or
after the socket creation, depending on the refcnt value.
The kernel logs will still be seen for the shared umem queues.
Fixes:
81fe6720f84f ("net/af_xdp: reserve fill queue before socket create")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Junxiao Shi [Wed, 9 Mar 2022 21:18:43 +0000 (21:18 +0000)]
net/af_xdp: fix custom program loading with multiple queues
When the PMD is configured to load a custom XDP program, it sets
XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD flag to prevent libbpf from
loading its default XDP program. However, when queue_count is set to
greater than 1, this flag is only set for the first XSK socket but not
for subsequent XSK sockets. This causes XSK socket creation failure.
This commit ensures that XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD flag is
set for all XSK socket creations when custom XDP program is being used.
Fixes:
01fa83c94d7e ("net/af_xdp: workaround custom program loading")
Cc: stable@dpdk.org
Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
Devendra Singh Rawat [Fri, 4 Mar 2022 12:08:33 +0000 (17:38 +0530)]
net/qede: fix maximum Rx packet length
Size of CRC is not added to max_rx_pktlen, due to this bigger sized
packets(size 1480, 1490 1500) are being dropped.
This fix adds RTE_ETHER_CRC_LEN to max_rx_pktlen.
Fixes:
1bb4a528c41f ("ethdev: fix max Rx packet length")
Cc: stable@dpdk.org
Signed-off-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
Devendra Singh Rawat [Fri, 4 Mar 2022 12:08:32 +0000 (17:38 +0530)]
net/qede: fix Rx bulk
qede_alloc_rx_bulk_mbufs() was trimming the number of requested
mbufs count to QEDE_MAX_BULK_ALLOC_COUNT.
The Rx callback was ignorant of this trimming and it was always
resetting the number of empty RX BD ring slots to 0.
This resulted in Rx BD ring getting into an inconsistent
state and ultimately the application fails to receive any traffic.
The fix trims the number of requested mbufs count before
making call to qede_alloc_rx_bulk_mbufs().
After qede_alloc_rx_bulk_mbufs() returns successfully, the
number of empty Rx BD ring slots are decremented by the
correct count.
Fixes:
8f2312474529 ("net/qede: fix performance bottleneck in Rx path")
Cc: stable@dpdk.org
Signed-off-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
Devendra Singh Rawat [Fri, 4 Mar 2022 12:08:31 +0000 (17:38 +0530)]
net/qede: fix Tx completion
Tx completion routine was first incrementing the number of free
slots in Tx ring and then freeing corresponding mbufs in bulk.
In some situations, the number of mbufs freed were less than
number of Tx ring slots freed. This caused Tx ring to get into an
inconsistent state and ultimately application fails to transmit
further traffic.
The fix first updates the Tx ring SW consumer index, then
increments Tx ring free slot number and finally frees the mbuf,
this is done in a single iteration of loop.
Fixes:
2c41740bf19e ("net/qede: get consumer index once")
Fixes:
4996b959cde6 ("net/qede: free packets in bulk")
Cc: stable@dpdk.org
Signed-off-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
Alexander Kozyrev [Thu, 10 Mar 2022 05:06:36 +0000 (07:06 +0200)]
doc: mention mlx5 MPRQ incompatibility with external buffers
Multi-Packet Rx queue uses PMD-managed buffers to store packets.
These buffers are externally attached to user mbufs.
This conflicts with the feature that allows using user-managed
externally attached buffers in an application.
Add the corresponding limitation to MLX5 documentation that MPRQ
and external data buffers cannot be used together.
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Viacheslav Ovsiienko [Thu, 24 Feb 2022 16:01:36 +0000 (18:01 +0200)]
doc: fix modify field action description for mlx5
This patch adds mlx5 specifics description about
handling the Ethernet type by modify field action
for VLAN-ed traffic.
Fixes:
641dbe4fb053 ("net/mlx5: support modify field flow action")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Jiawei Wang [Thu, 10 Mar 2022 04:00:10 +0000 (06:00 +0200)]
net/mlx5: fix implicit tag insertion with sample action
A flow rule with sample action was split into two sub-flows,
and the implicit tag action with unique id was added in the prefix
sub-flow, the suffix sub-flow used the tag item to match with that
unique id, and the implicit set tag action was inserted next to
the sample action.
While there's either PUSH VLAN action or ENCAP action preceding the
sample action, implicit set tag action was added after PUSH VLAN or
ENCAP actions, causing flow creation failure due to rdma-core
does not support this action order.
This patch ensures the implicit set tag action is inserted before
either PUSH VLAN or encap action (if any) in the prefix sub-flow.
Fixes:
6a951567c159 ("net/mlx5: support E-Switch mirroring and jump in one flow")
Cc: stable@dpdk.org
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Rongwei Liu [Wed, 9 Mar 2022 12:08:29 +0000 (14:08 +0200)]
net/mlx5: forbid multiple ASO actions in a single rule
For now, only one ASO action is supported in a single flow rule.
Flow rule with more than one ASO action should be rejected in the
validation stage.
Flow rule with action non-shared AGE and COUNT together should be
treated as non-ASO because AGE will fall back to use HW counter,
not ASO hit object.
Group 0 will use HW counter for AGE action even if no COUNT action.
This commit will reject patterns (no matter which group if transfer)
like:
1. group 1 pattern... / end actions age / meter / end
2. group 1 pattern... / end actions conntrack / meter / end
3. group 1 pattern... / end actions age / conntrack... / end
If AGE comes together with COUNT in the above patterns, it's allowed.
Fixes:
daed4b6e ("net/mlx5: use aging by counter when counter exists")
Cc: stable@dpdk.org
Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Jiawei Wang [Wed, 9 Mar 2022 10:19:46 +0000 (12:19 +0200)]
net/mlx5: fix sample flow action on trusted device
A flow rule with sample action will be split into two sub flows,
and a tag action was added implicitly in the sample prefix sub flow,
the reserved metadata regC index was used for this tag action.
The reserved metadata regC was shared with metering action,
for ConnectX-5 trusted device (VF/SF), the reserved metadata regC was
invalid since PF only supported the legacy metering.
This patch adds the checking for the tag index and back to use the
application tag if a failure happened.
Fixes:
a9b6ea45bed6 ("net/mlx5: fix tag ID conflict with sample action")
Cc: stable@dpdk.org
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Dariusz Sosnowski [Wed, 9 Mar 2022 09:39:20 +0000 (09:39 +0000)]
net/mlx5: fix VLAN push action validation
Flow domain and direction was validated when OF_PUSH_VLAN action
appears in flow actions. Flow was rejected whenever this action:
- was used in NIC domain, in ingress direction;
- was used in FDB domain, in ingress direction, on ConnectX-5.
This validation logic rejected a valid case when the OF_PUSH_VLAN
action was used when directing traffic to the hairpin queue,
configured in TX implicit mode.
This patch moves code responsible for OF_PUSH_VLAN validation of
domain and direction from flow_dv_validate_push_vlan() to
flow_dv_validate(). Domain and direction are now validated when either
non-hairpin queue is used or hairpin queue is configured in Tx explicit
mode.
Fixes:
96f85ec489db ("net/mlx5: check VLAN push/pop support")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Joyce Kong [Fri, 4 Mar 2022 07:35:17 +0000 (07:35 +0000)]
net/i40e: fix build with 16B descriptor on Arm
For NEON vector path, there is an issue when building
with 16B descriptor:
incompatible types when assigning to type ‘uint64x2_t’
from type ‘uint32x4_t’
180 | descs[3] = vbslq_u32(v_desc3_mask, v_zeros,
vreinterpretq_u32_u64(descs[3]));
| ^~~~~~~~~
The fix is to add interpretation between type 'uint64x2_t'
and type 'uint32x4_t'.
Fixes:
dba9e3bcd9bb ("net/i40e: add flow mark capability to NEON Rx")
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Elena Agostini [Thu, 10 Mar 2022 00:06:50 +0000 (00:06 +0000)]
gpu/cuda: mark unused GDRCopy functions parameters
Without enabling gdrcopy, DPDK build has warnings about
unused gdrcopy functions input parameters.
This patch set them to __rte_unused .
Fixes:
24c7759 ("gpu/cuda: map GPU memory with GDRCopy")
Signed-off-by: Elena Agostini <eagostini@nvidia.com>
David Marchand [Tue, 18 Jan 2022 14:53:30 +0000 (15:53 +0100)]
vhost: fix FD leak with inflight messages
Even if unlikely, a buggy vhost-user master might attach fds to inflight
messages. Add checks like for other types of vhost-user messages.
Fixes:
d87f1a1cb7b6 ("vhost: support inflight info sharing")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Chenbo Xia [Mon, 14 Feb 2022 08:32:37 +0000 (16:32 +0800)]
vhost: fix queue number check when setting inflight FD
In function vhost_user_set_inflight_fd, queue number in inflight
message is used to access virtqueue. However, queue number could
be larger than VHOST_MAX_VRING and cause write OOB as this number
will be used to write inflight info in virtqueue structure. This
patch checks the queue number to avoid the issue and also make
sure virtqueues are allocated before setting inflight information.
Fixes:
ad0a4ae491fe ("vhost: checkout resubmit inflight information")
Cc: stable@dpdk.org
Reported-by: Wenxiang Qian <leonwxqian@gmail.com>
Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thomas Monjalon [Tue, 8 Mar 2022 23:34:09 +0000 (00:34 +0100)]
version: 22.03-rc3
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Robert Sanford [Tue, 21 Dec 2021 19:57:28 +0000 (14:57 -0500)]
maintainers: update for timer library
Remove self from Timers maintainers.
Signed-off-by: Robert Sanford <rsanford@akamai.com>
Brian Dooley [Mon, 7 Mar 2022 15:13:47 +0000 (15:13 +0000)]
maintainers: update for FIPS validation
Replace Marko Kovacevic with Brian Dooley and Fan Zhang.
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Yuying Zhang [Thu, 10 Feb 2022 15:03:38 +0000 (15:03 +0000)]
maintainers: update for testpmd BPF files
Move 'test-pmd/bpf_cmd.*' files under BPF component.
Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Yuying Zhang [Thu, 10 Feb 2022 14:51:29 +0000 (14:51 +0000)]
maintainers: update for testpmd TM and MTR
Move 'test-pmd/cmdline_tm.*' files under
"Traffic Management API" component.
Move 'test-pmd/cmdline_mtr.*' files under
"Traffic Metering and Policing API" component.
Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Elena Agostini [Tue, 8 Mar 2022 23:59:47 +0000 (23:59 +0000)]
gpudev: fix page alignment in communication list
Memory allocated for CPU mapping the status flag
in the communication list should be aligned to the
GPU page size, which can be different of CPU page alignment.
The GPU page size is added to the GPU info,
and is used when creating a communication list.
Fixes:
9b8cae4d991e ("gpudev: use CPU mapping in communication list")
Signed-off-by: Elena Agostini <eagostini@nvidia.com>
Leyi Rong [Tue, 8 Mar 2022 05:56:17 +0000 (13:56 +0800)]
net/iavf: fix potential out-of-bounds access
Fix potential out-of-bounds access as overrunning callee's array of
size 26 by passing argument rxq->rxdid(which evaluates to 63) in call
to iavf_rx_scan_hw_ring_flex_rxd.
Coverity issue: 376616
Fixes:
0ed16e01313e ("net/iavf: fix function pointer in multi-process")
Cc: stable@dpdk.org
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ivan Malov [Sun, 6 Mar 2022 16:12:06 +0000 (19:12 +0300)]
net/sfc: reduce log level of tunnel restore info error
OvS might invoke this API on its data path, out of sync
with its control plane. If the control path has already
deactivated the tunnel context entry, these invocations
will produce quite a few error printouts. Suppress that.
Fixes:
7e5b479803c3 ("net/sfc: implement control path operations in tunnel offload")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Rongwei Liu [Mon, 7 Mar 2022 08:00:35 +0000 (10:00 +0200)]
net/mlx5: fix meter creation default state
Disable means there is no packet drop in the meter. Meter is
active always but programmed with another CIR/CBS value.
If the user wants to disable the meter in creation, PMD calls
the disable() API manually after meter initialized.
Fixes:
444320186393 ("net/mlx5: support meter creation with policy")
Cc: stable@dpdk.org
Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Bing Zhao [Thu, 3 Mar 2022 15:26:58 +0000 (17:26 +0200)]
net/mlx5: fix configuration without Rx queue
None Rx queue configured in a DPDK application should be supported.
In this mode, the NIC can be used to generate packets without
receiving any ingress traffic.
In the current implementation, once there is no Rx queue specified,
the array to store the queues' pointers is NULL after allocation.
Then the checking of the array allocation prevents the application
from starting up.
By adding another condition checking of the Rx queue number, the
application with none Rx queue can start up successfully.
Fixes:
4cda06c3c35e ("net/mlx5: split Rx queue into shareable and private")
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Michael Baum [Wed, 2 Mar 2022 19:14:31 +0000 (21:14 +0200)]
net/mlx5: fix E-Switch DV flow disabling
E-Switch DV flow is supported only when DV flow is supported and
enabled.
The mlx5_shared_dev_ctx_args_config() function ensures that when the
environment does not support DV, the "dv_esw_en" flag is turned off.
However, when the environment is supportive but the user has requested
to disable it, the "dv_esw_en" flag remains on and causes the PMD to try
to create an E-Switch through the Verbs engine.
This patch adds check to ensure that "dv_esw_en" flag will be turned off
when DV flow is disabled.
Fixes:
a13ec19c1993 ("net/mlx5: add shared device context config structure")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Dariusz Sosnowski [Wed, 2 Mar 2022 17:06:59 +0000 (17:06 +0000)]
net/mlx5: fix MPLS/GRE Verbs spec ordering
When using Verbs flow engine to create flows, GRE Verbs spec was put at
the end of specs list. This created problems for flows matching MPLSoGRE
packets. In generated specs list MPLS spec was put before GRE spec, but
Verbs API requires that MPLS spec must be put in its exact location in
protocol stack.
This patch fixes this behavior. Space for GRE Verbs spec is reserved at
its exact location. MPLS Verbs is inserted at its exact location as
well. GRE spec is filled after all flow items are parsed.
Fixes:
985b479267aa ("net/mlx5: fix GRE protocol type translation for Verbs")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Asaf Penso [Mon, 28 Feb 2022 08:11:17 +0000 (10:11 +0200)]
doc: add steps to configure mlx5 VF as trusted
Trusted VF is needed to offload rules with rte_flow to a group
that is bigger than 0.
The configuration is done in two parts: driver and FW.
This patch adds the needed steps to configure a VF to be trusted.
Signed-off-by: Asaf Penso <asafp@nvidia.com>
Reviewed-by: Raslan Darawsheh <rasland@nvidia.com>
Gregory Etelson [Wed, 2 Mar 2022 11:06:42 +0000 (13:06 +0200)]
net/mlx5: fix flex item availability
Flex item availability is restricted to BlueField-2 and BlueField-3
PF ports.
The patch validates port type compliance before proceeding to
flex item creation.
Fixes:
db25cadc0887 ("net/mlx5: add flex item operations")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Shun Hao [Wed, 2 Mar 2022 10:33:01 +0000 (12:33 +0200)]
net/mlx5: fix meter policy creation assert
The meter policy creation doesn't belong to flow rule creation
process, so thread workspace was not initialized and there will be
assert error when using it.
This patch removes the incorrect using of thread workspace in meter
policy creation, and adds a flag in policy instead. When creating
flow rule, can use the flag to set the mark flag in thread workspace.
Fixes:
082becbf1f35 ("net/mlx5: fix mark enabling for Rx")
Cc: stable@dpdk.org
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Bing Zhao [Wed, 2 Mar 2022 07:57:35 +0000 (09:57 +0200)]
net/mlx5: remove unused reference counter
In the previous implementation, a count was used to record the number
of the references to a table resource, including the creation of the
table, the jumping to the table and the matchers created on the
table. Before releasing the table resource via the driver, it needed
to ensure that there is no reference to this table.
After the optimization of the resources management, the reference
count now is in the hash list entry as a unified solution for all the
resources management.
There is no need to keep the "refcnt" in the table resource
structure. It is removed in case that there is some unnecessary
memory overhead.
Fixes:
afd7a62514ad ("net/mlx5: make flow table cache thread safe")
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Dmitry Kozlyuk [Wed, 2 Mar 2022 01:34:29 +0000 (03:34 +0200)]
net/mlx5: fix modify port action validation
Certain flow rules containing a modify header action for an L4 port
could be erroneously rejected as invalid, because this action
was counted as consuming two HW actions, while it only requires one.
Fixes:
72a944dba163 ("net/mlx5: fix header modify action validation")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Michael Baum [Wed, 2 Mar 2022 07:58:23 +0000 (09:58 +0200)]
net/mlx5: fix external Rx queue referencing
When an indirection table object is modified, it updates the reference
counter for each RX queue related to it.
The reference counter for regular queues are indeed updated. However,
the reference counter for external RxQs are not.
This patch adds updating for external RxQs too.
Fixes:
311b17e669ab ("net/mlx5: support queue/RSS actions for external Rx queue")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Michael Baum [Wed, 2 Mar 2022 07:58:22 +0000 (09:58 +0200)]
net/mlx5: fix external Rx queue dereferencing
When an indirection table is destroyed, each Rx queue related to it,
should be dereferenced.
The regular queues are indeed dereferenced.
However, the external RxQs are not.
This patch adds dereferencing for external RxQs too.
Fixes:
311b17e669ab ("net/mlx5: support queue/RSS actions for external Rx queue")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>