Stephen Hemminger [Wed, 24 Apr 2019 16:46:19 +0000 (09:46 -0700)]
eal: fix formatting of hotplug error message
This message was missing newline, and should capitalize
"Cannot" like all the others in this area.
Fixes:
ac9e4a17370f ("eal: support attach/detach shared device from secondary")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Rami Rosen <ramirose@gmail.com>
David Hunt [Fri, 26 Apr 2019 14:04:54 +0000 (15:04 +0100)]
examples/power: fix json null termination
coverity complains about a null-termination after a read,
so we terminate once we exit the do-while read loop.
Coverity issue: 337680
Fixes:
a63504a90f ("examples/power: add JSON string handling")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
David Hunt [Fri, 26 Apr 2019 08:42:09 +0000 (09:42 +0100)]
examples/power: fix buffer overrun
The freqs array in freq_info struct has RTE_MAX_LCORE_FREQS elements,
yet the code can attempt to look at the index at RTE_MAX_LCORE,
which may be greater than RTE_MAX_LCORE_FREQS. Fix to limit index to
RTE_MAX_LCORE_FREQS.
Coverity issue: 337660
Fixes:
d26c18c93260 ("examples/vm_power: cpu frequency in host")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Yongseok Koh [Wed, 10 Apr 2019 19:41:54 +0000 (12:41 -0700)]
examples/multi_process: fix buffer underrun
For client_server_mp, the total number of buffers for the mbuf mempool
should be correctly calculated. Otherwise, having more clients will stop
traffic.
Fixes:
af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Shreyansh Jain [Thu, 25 Apr 2019 09:40:19 +0000 (15:10 +0530)]
examples/l3fwd: support separate buffer pool per port
Traditionally, only a single buffer pool per port
(or, per-port-per-socket) is created in l3fwd application.
If separate pools are created per-port, it might lead to gain in
performance as packet alloc/dealloc requests would be isolated
across ports (and their corresponding lcores).
This patch adds an argument '--per-port-pool' to the l3fwd application.
By default, old mode of single pool per port (split on sockets) is
active.
L3fwd user guide is also updated by this patch.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
John McNamara [Fri, 26 Apr 2019 15:14:22 +0000 (16:14 +0100)]
doc: fix spelling reported by aspell in comments
Fix spelling errors in the doxygen docs.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
John McNamara [Fri, 26 Apr 2019 15:14:21 +0000 (16:14 +0100)]
doc: fix spelling reported by aspell in guides
Fix spelling errors in the guide docs.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
Li Qiang [Tue, 16 Apr 2019 05:05:14 +0000 (13:05 +0800)]
raw/ifpga: fix file descriptor leak in error path
In rte_fpga_do_pr() function, if 'stat' return error the
'file_fd' is never closed thus leading a fd leak.
This patch avoids this.
Coverity issue: 279441
Fixes:
ef1e8ede3da59e ("raw/ifpga: add Intel FPGA bus rawdev driver")
Cc: stable@dpdk.org
Signed-off-by: Li Qiang <liq3ea@163.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
Hemant Agrawal [Wed, 24 Apr 2019 11:45:20 +0000 (17:15 +0530)]
raw/dpaa2_cmdif: remove driver name assignment
vdev driver names are not available in create if called from probe.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Wed, 24 Apr 2019 11:45:19 +0000 (17:15 +0530)]
doc: update dpaaX platform guides
Update the dpaa platform guides with latest SDK dependency.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Hemant Agrawal [Wed, 24 Apr 2019 11:45:18 +0000 (17:15 +0530)]
net/dpaa2: fix loopback spelling
Fixes:
a3a997f02d07 ("net/dpaa2: support low level loopback tester")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Wed, 24 Apr 2019 11:45:17 +0000 (17:15 +0530)]
raw/dpaa2_qdma: fix spin lock release
This shall be unlock post the lock
Fixes:
4d9a3f2a0159 ("raw/dpaa2_qdma: support RBP mode")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Wed, 24 Apr 2019 11:45:16 +0000 (17:15 +0530)]
raw/dpaa2_qdma: fix spin lock release
The code shall be unlock post the lock.
Fixes:
c22fab9a6c34 ("raw/dpaa2_qdma: support configuration APIs")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Bruce Richardson [Thu, 2 May 2019 16:51:54 +0000 (17:51 +0100)]
build: add libbsd to pkg-config file if enabled
If libbsd is enabled in DPDK, the strlcpy and strlcat functions in
rte_string_fns.h redirect to the varients in libbsd, only using the
fallbacks if it is not enabled. Therefore, if libbsd is enabled, it needs
to be called out as a DPDK dependency in the pkgconfig file.
To ensure that we don't have undefined variables on non-Linux platforms, we
can remove the linux condition around the libbsd check - no harm comes in
looking for it on other OS, since it's an optional dependency.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Bruce Richardson [Thu, 2 May 2019 16:51:53 +0000 (17:51 +0100)]
build: fix ninja install on FreeBSD
The post-install script to symlink the PMDs from their own PMD directory to
the regular lib directory (so they would be found by ld at runtime) was
using the "-r" flag to ln to create relative symlinks. This flag is
unsupported by ln on FreeBSD causing the ninja install step to fail.
Reworking the script to take the relative driver path as parameter removes
the need for ln to calculate the relative path ensuring compatibility with
FreeBSD.
As part of the fix, we move the registration of the install script to the
config/meson.build file, from the top level one. This improves readability
as the script takes as parameters the variables set in that file.
Fixes:
ed4d43d73e2b ("build: symlink drivers to library directory")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Bruce Richardson [Thu, 2 May 2019 16:51:52 +0000 (17:51 +0100)]
examples: install as part of ninja install
When we install dpdk onto a system, we want to put the examples into
the /usr/share/dpdk (or /usr/local/share) directory for reference.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Bruce Richardson [Thu, 2 May 2019 16:51:51 +0000 (17:51 +0100)]
examples/l3fwd: fix build on FreeBSD
On freebsd we need to include sys/socket.h to get the definition of
AF_INET in order to compile.
Fixes:
d5ceea4ab160 ("examples/l3fwd: format IP addresses for printing")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Reshma Pattan [Thu, 2 May 2019 09:33:34 +0000 (10:33 +0100)]
mk: disable warning for packed member pointer
gcc 9 on Fedora 30 gives an error
"taking address of packed member may result in an
unaligned pointer value" warnings.
For clang builds this warning is already disabled,
so disable "-Waddress-of-packed-member" for gcc builds
also.
Snippet of build error:
lib/librte_eal/linux/eal/eal_memalloc.c: In function ‘alloc_seg_walk’:
lib/librte_eal/linux/eal/eal_memalloc.c:768:12: error:
taking address of packed member of ‘struct rte_mem_config’ may result
in an unaligned pointer value [-Werror=address-of-packed-member]
768 | cur_msl = &mcfg->memsegs[msl_idx];
| ^~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Thomas Monjalon [Thu, 2 May 2019 14:53:45 +0000 (16:53 +0200)]
maintainers: fix added or removed files
Reference to test/Makefile was forgotten when removing this file.
Reference to app/test/test_rcu* was forgotten when adding the files.
Fixes:
a9de470cc7c0 ("test: move to app directory")
Fixes:
b87089b0bb19 ("test/rcu: add API and functional tests")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Ferruh Yigit [Thu, 2 May 2019 13:35:27 +0000 (14:35 +0100)]
build: reduce indentation in meson check
Just syntax change to reduce indentation, no functional change.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Ferruh Yigit [Thu, 2 May 2019 13:35:26 +0000 (14:35 +0100)]
build: fix crash by disabling AVX512 with binutils 2.31
On Skylake platform, with native build, KNI kernel module crashes
because of the corrupted values passed to kernel module.
The corruption occurs because the userspace kni library works
unexpectedly. Compiler [1] is using AVX512 instructions and generated
binary is wrong [2].
It turned around gcc does its job correct, but gas is generating binary
wrong. And expected binutils 2.30, 2.31 & 2.31.1 are affected. Issue has
been fixed in binutils 2.32 with:
Commit x86: don't mistakenly scale non-8-bit displacements
AVX512 was already disabled with bintuils 2.30 [3], extending it to
2.31 & 2.31.1 too.
[1] gcc (GCC) 8.3.1
20190223 (Red Hat 8.3.1-2)
[2] gcc bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90028
[3] Bugzilla ID 97 has the details.
Bugzilla ID: 249
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Ferruh Yigit [Thu, 2 May 2019 13:35:25 +0000 (14:35 +0100)]
build: fix meson binutils workaround
The '-mno-avx512f' compiler flag is not passed to the compiler,
detection of the binutils and setting flags works fine, but the flag
itself not used by compiler.
Removing the interim 'march_opt' variable and using directly
'machine_args' and setting '-mno-avx512f' to 'machine_args'
Fixes:
566b4d7a968f ("build: fix meson check for binutils 2.30")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Wed, 1 May 2019 19:50:14 +0000 (20:50 +0100)]
raw/dpaa2_cmdif: fix warnings with GCC 9
GCC9 gives warnings if the parameter passed to printf for "%s" could be
NULL, so we need to add checks in some cases to ensure that is not the
case.
Fixes:
3298fa4853b8 ("raw/dpaa2_cmdif: introduce DPAA2 command interface driver")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Wed, 1 May 2019 19:50:13 +0000 (20:50 +0100)]
raw/skeleton: fix warnings with GCC 9
GCC9 gives warnings if the parameter passed to printf for "%s" could be
NULL, so we need to add checks in some cases to ensure that is not the
case.
Fixes:
61c592a8d035 ("raw/skeleton: introduce skeleton rawdev driver")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Wed, 1 May 2019 19:50:12 +0000 (20:50 +0100)]
bus/fslmc: fix warning with GCC 9
Printing a null pointer with %s is flagged as a warning by GCC 9, and
should not be done. Replace the %s with the word "null" itself.
Fixes:
828d51d8fc3e ("bus/fslmc: refactor scan and probe functions")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Wed, 1 May 2019 19:50:11 +0000 (20:50 +0100)]
net/ixgbe: fix warning with GCC 9
Compiling on Fedora 30, we get the following warning, causing build failure
when Werror flag is set:
../drivers/net/ixgbe/ixgbe_rxtx.c:2141:14: warning:
‘nmb’ may be used uninitialized in this function [-Wmaybe-uninitialized]
2141 | rxe->mbuf = nmb;
| ~~~~~~~~~~^~~~~
Initializing the value to "NULL" fixes the issue.
Fixes:
8eecb3295aed ("ixgbe: add LRO support")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Wed, 1 May 2019 15:53:29 +0000 (16:53 +0100)]
crypto/zuc: fix dependency check
The check for the zuc library dependency did not check for the include
file needed for compilation. It's also recommended when looking for a
library to use the name without the lib prefix.
Fixes:
df1740a8db5f ("crypto/zuc: enable meson build")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Wed, 1 May 2019 15:53:28 +0000 (16:53 +0100)]
crypto/kasumi: fix dependency check
The check for the kasumi library dependency did not check for the include
file needed for compilation. It's also recommended when looking for a
library to use the name without the lib prefix.
Fixes:
2ec2d46c6255 ("crypto/kasumi: enable meson build")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Wed, 1 May 2019 15:53:27 +0000 (16:53 +0100)]
crypto/snow3g: add to meson build
Snow3G driver is missing support for building with meson. Add a new
meson.build file so it can be included in the builds.
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Peng Huang [Wed, 24 Apr 2019 15:11:59 +0000 (15:11 +0000)]
devtools: fix ABI compatibility check
The new default-taget "linux" is introduced in v19.05-rc1
but not exist in before release such as v19.02 which have
default-target "linuxapp", there is no compatibility report
when run validate-abi.sh to check ABI compatibility between
v19.05-rc1 and v19.02, changed default-target from "linux"
to "linuxapp" in validate-abi.sh
Fixes:
218c4e68c1d9 ("mk: use linux and freebsd in config names")
Cc: stable@dpdk.org
Signed-off-by: Peng Huang <peng.huang@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Honnappa Nagarahalli [Wed, 1 May 2019 03:54:18 +0000 (22:54 -0500)]
doc: add RCU guide
Add lib RCU QSBR programmer guide documentation.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Dharmik Thakkar [Wed, 1 May 2019 03:54:17 +0000 (22:54 -0500)]
test/rcu: add API and functional tests
Add API positive/negative test cases, functional tests and
performance tests.
Signed-off-by: Malvika Gupta <malvika.gupta@arm.com>
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Honnappa Nagarahalli [Wed, 1 May 2019 03:54:16 +0000 (22:54 -0500)]
rcu: add RCU library supporting QSBR mechanism
Add RCU library supporting quiescent state based memory reclamation method.
This library helps identify the quiescent state of the reader threads so
that the writers can free the memory associated with the lock less data
structures.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Acked-by: Paul E. McKenney <paulmck@linux.ibm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Ruifeng Wang <ruifeng.wang@arm.com>
Tested-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Nikhil Rao [Fri, 26 Apr 2019 16:33:36 +0000 (22:03 +0530)]
eventdev: add experimental tag back for Rx adapter
Add the experimental tag back to the Rx event adapter callback,
the Rx event callback register and the Rx event adapter statistics
retrieval functions due to an API change to be proposed in a
future patch.
This patch also adds the experimental tag to these
function definitions and adds the functions to the EXPERIMENTAL
section of the map file, these were missing previously.
Fixes:
80bdf91dc8ee ("eventdev: promote adapter functions as stable")
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Abhinandan Gujjar [Wed, 24 Apr 2019 16:34:38 +0000 (22:04 +0530)]
eventdev: fix crypto adapter
This patch fixes null pointer dereference and control
flow issues reported in event crypto adapter by coverity
Coverity issue: 279439, 279446, 279450, 279462
Fixes:
7901eac3409 ("eventdev: add crypto adapter implementation")
Cc: stable@dpdk.org
Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Arek Kusztal [Thu, 18 Apr 2019 16:45:04 +0000 (17:45 +0100)]
doc: update guide and release notes for QAT crypto
This patch adds release notes to 19.05 release document, and more
detailed description to Intel QuickAssist Technology driver
documentation files for asymmmetric crypto PMD.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Anoob Joseph [Thu, 18 Apr 2019 05:20:29 +0000 (10:50 +0530)]
crypto/octeontx: use distinct metabuf pool for each queue
The metabuf pool is shared across all queue pairs belonging to the
PMD. In order to prevent one queue pair from starving another,
use a distinct mempool for each queue pair.
Fixes:
273487f7b381 ("crypto/octeontx: add global resource init")
Cc: stable@dpdk.org
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Shally Verma <shallyv@marvell.com>
Fiona Trahe [Fri, 26 Apr 2019 19:28:03 +0000 (20:28 +0100)]
crypto/qat: fix null cipher algo for non 8-byte multiple
NULL cipher algo of 4-byte multiple and other sizes caused firmware hang
due to use of wrong mode. Changed from ECB mode to CTR mode to fix.
Fixes:
98f060891615 ("crypto/qat: add symmetric session file")
Cc: stable@dpdk.org
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Ayuj Verma [Tue, 23 Apr 2019 15:41:03 +0000 (21:11 +0530)]
cryptodev: include dependency in asym header
include rte_crypto_sym.h in asym header file.
Signed-off-by: Ayuj Verma <ayverma@marvell.com>
Signed-off-by: Shally Verma <shallyv@marvell.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Bruce Richardson [Tue, 23 Apr 2019 15:43:57 +0000 (16:43 +0100)]
crypto/aesni_gcm: check dependency version with make
The aesni_mb driver has a check in its Makefile for the correct version of
the IPsec_MB library, but this check was missed for the aesni_gcm driver.
Add this check to the makefile, removing an unnecessary assignment in the
process.
Suggested-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Bruce Richardson [Tue, 23 Apr 2019 15:43:56 +0000 (16:43 +0100)]
crypto/aesni_mb: cleanup version check
The version check for the IPSec_MB library present in the aesni_gcm
library's meson.build file is a little cleaner than that given here,
so update this one so that both work identically.
While one could use the checks done in the other right now, potentially in
future they may have different version dependencies, or may be compiled in
different orders, so keep the code duplicated for safety, since it's only a
few lines.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Bruce Richardson [Tue, 23 Apr 2019 15:43:55 +0000 (16:43 +0100)]
crypto/aesni_gcm: check dependency version with meson
The aesni_mb driver and the aesni_gcm driver both require the same version
of the IPSec_MB library, but only the former has a check of the library
found by meson to see if it's the correct version. Add a similar check to
the aesni_gcm library's meson.build file, so that the auto-detection of
dependencies works correctly.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Akhil Goyal [Mon, 22 Apr 2019 14:14:16 +0000 (19:44 +0530)]
examples/ipsec-secgw: fix pool usage for security session
Currently, two separate mempools are being used for creating crypto
sessions and its private data.
crypto sessions are created and initialized separately, so a separate
mempool is passed to each API, but in case of security sessions, where
only one API create and initialize the private data as well.
So if session mempool is passed to create a security session, the
mempool element size is not sufficient enough to hold the private
data as well.
As a perfect solution, the security session create API should take 2
mempools for header and private data and initiatlize accordingly,
but that would mean an API breakage, which will be done in the next
release cycle. So introducing this patch as a workaround to resolve this
issue.
Fixes:
261bbff75e34 ("examples: use separate crypto session mempools")
Cc: stable@dpdk.org
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Konstantin Ananyev [Thu, 4 Apr 2019 12:13:26 +0000 (13:13 +0100)]
examples/ipsec-secgw: fix SPD no-match case
acl_classify() returns zero value when no matching rule was found.
Currently ipsec-secgw treats it as a valid SPI value, though it has
to discard such packets.
Error could be easily observed by sending outbound unmatched packets,
user will see something like that in the log:
IPSEC: No cryptodev: core 7, cipher_algo 0, auth_algo 0, aead_algo 0
To fix it we need to treat packets with zero result from acl_classify()
as invalid ones. Also we can change DISCARD and BYPASS values to
simplify checks and save some extra space for valid SPI values.
To summarize the approach:
1. have special SPI values for DISCARD and BYPASS.
2. store in SPD full SPI value.
3. after acl_classify(), first check SPI value for DISCARD and BYPASS,
then convert it in SA index.
4. add check at initilisation time that for each SPD rule there is a
corresponding SA entry (with the same SPI).
Also marked few global variables as *static*.
Fixes:
906257e965b7 ("examples/ipsec-secgw: support IPv6")
Fixes:
2a5106af132b ("examples/ipsec-secgw: fix corner case for SPI value")
Cc: stable@dpdk.org
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Thomas Monjalon [Mon, 22 Apr 2019 22:43:52 +0000 (00:43 +0200)]
version: 19.05-rc2
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Thomas Monjalon [Mon, 15 Apr 2019 11:58:38 +0000 (13:58 +0200)]
doc: fix heading levels in bbdev test guide
The section "Test Vector files" should not be at the same level as
the main title "dpdk-test-bbdev Application".
Fixes:
f714a18885a6 ("app/testbbdev: add test application for bbdev")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: John McNamara <john.mcnamara@intel.com>
Andrius Sirvys [Thu, 18 Apr 2019 08:52:06 +0000 (09:52 +0100)]
bitrate: fix unchecked return value
Checking the return value of rte_metrics_update_values, if failed
returning that value.
Coverity had picked up that that the return value wasn't being checked.
Coverity issue: 336863
Fixes:
2ad7ba9a6567 ("bitrate: add bitrate statistics library")
Cc: stable@dpdk.org
Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Bruce Richardson [Mon, 8 Apr 2019 09:46:39 +0000 (10:46 +0100)]
app/testpmd: fix variable use before null check
The value returned from rte_eth_dev_tx_offload_name() function is used
for string comparison before being checked for NULL. Move the NULL check
up to be done first.
Coverity issue: 279438
Fixes:
c73a9071877a ("app/testpmd: add commands to test new offload API")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
Bruce Richardson [Mon, 8 Apr 2019 09:46:40 +0000 (10:46 +0100)]
net/i40e: fix dereference before check when getting EEPROM
As flagged by coverity, the "info" structure is being explicitly
dereferenced before being checked later for a NULL value.
Coverity issue: 277241
Fixes:
98e60c0d43f1 ("net/i40e: add module EEPROM callbacks for i40e")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
Bruce Richardson [Mon, 8 Apr 2019 09:46:38 +0000 (10:46 +0100)]
net/i40e: fix dereference before null check in mbuf release
Coverity flags that the txq variable is used before it's checked for NULL.
Also fix typo in error message.
Coverity issue: 195023
Fixes:
24853544c84c ("net/i40e: fix mbuf free in vector Tx")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
Bruce Richardson [Mon, 8 Apr 2019 09:46:37 +0000 (10:46 +0100)]
examples/vhost_scsi: fix null-check for parameter
Coverity points out that there is a check in the main thread loop for the
ctrlr->bdev being NULL, but by that stage the pointer has already been
dereferenced. Therefore, for safety, before we enter the loop do an
initial check on the parameter structure.
Coverity issue: 158657
Fixes:
db75c7af19bb ("examples/vhost_scsi: introduce a new sample app")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Bruce Richardson [Mon, 8 Apr 2019 09:46:36 +0000 (10:46 +0100)]
examples/vhost_scsi: fix header check for meson build
The header check for the example app was looking for virtio_scsi.h without
the "linux/" prefix, which meant it was never getting found when it should
have been.
Fixes:
8d47a753b7cb ("examples/vhost_scsi: disable build if missing dependency")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
David Christensen [Tue, 2 Apr 2019 18:46:12 +0000 (14:46 -0400)]
examples/power: fix build with some disabled PMDs
Running the devtools/test-build.sh script on IBM Power systems fails
because the IXGBE_PMD is explicity disabled for Power as an untested
driver, but the examples/vm_power_manager application has a hard
dependency on a function call in the IXGBE_PMD.
Modify the example application so that all dependencies on PMD code
are conditionally compiled.
Bugzilla ID: 237
Fixes:
c9a4779135c9 ("examples/vm_power_mgr: set MAC address of VF")
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: David Hunt <david.hunt@intel.com>
Reshma Pattan [Thu, 11 Apr 2019 11:13:36 +0000 (12:13 +0100)]
examples/power: fix overflowed value
Fix the data type of last_branches, last_branch_misses
from uint32_t to uint64_t, and for hits_diff, miss_diff
from int to int64_t respectively to fix possible
overflow or truncation.
Coverity issue: 337677
Fixes:
4b1a631b8a ("examples/vm_power: add oob monitoring functions")
Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reshma Pattan [Wed, 10 Apr 2019 14:54:31 +0000 (15:54 +0100)]
examples/power: fix string overflow
Use strlcpy instead of strcpy to fix string overflow.
Coverity issue: 337671
Fixes:
a63504a90f ("examples/power: add JSON string handling")
Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Reshma Pattan [Tue, 9 Apr 2019 16:00:24 +0000 (17:00 +0100)]
examples/power: fix string null termination
After the read() the jason_data null termination is missing
for the case "indent < 0", for "indent > 0" and "indent == 0"
cases null termination is already handled.
So add the missing case "indent < 0" to the existing "indent == 0"
case to fix null termination.
Coverity issue: 337680
Fixes:
a63504a90f ("examples/power: add JSON string handling")
Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
David Hunt [Wed, 10 Apr 2019 13:13:48 +0000 (14:13 +0100)]
examples/power: fix unreachable VF MAC init
A for loop to MAX_VFS had a break as the last line, so the w++
would never get called, breaking out of the loop after the
first iteration. Remove the break so that the loop can execute
properly.
Coverity issue: 337682
Fixes:
ace158c4a821 ("examples/vm_power: add check for port count")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
David Hunt [Tue, 9 Apr 2019 09:43:26 +0000 (10:43 +0100)]
examples/power: fix resource leak
Coverity issue: 337674
Fixes:
99a968fac0cf ("examples/vm_power: add core list parameter")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
David Hunt [Tue, 9 Apr 2019 09:22:01 +0000 (10:22 +0100)]
power: fix buffer overruns
A previous change removed the limit of 64 cores by
moving away from 64-bit masks to char arrays. However
this left a buffer overrun issue, where the max channels
was defined as 64, and max cores was defined as 256. These
should all be consistently set to RTE_MAX_LCORE.
The #defines being removed are CHANNEL_CMDS_MAX_CPUS,
CHANNEL_CMDS_MAX_CHANNELS, POWER_MGR_MAX_CPUS, and
CHANNEL_CMDS_MAX_VM_CHANNELS, and are being replaced
with RTE_MAX_LCORE for consistency and simplicity.
Coverity issue: 337672, 337673, 337678
Fixes:
fd73630e95c1 ("examples/power: change 64-bit masks to arrays")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Lee Daly [Fri, 12 Apr 2019 15:57:27 +0000 (16:57 +0100)]
power: fix max frequency after turbo disabling
This patch will ensure the correct max frequency of a core is set in
the lcore_power_info struct when disabling turbo, while using the
intel pstate driver.
Fixes:
e6c6dc0f96c8 ("power: add p-state driver compatibility")
Cc: stable@dpdk.org
Signed-off-by: Lee Daly <lee.daly@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Acked-by: Liang Ma <liang.j.ma@intel.com>
Marcin Hajkowski [Fri, 5 Apr 2019 16:22:05 +0000 (18:22 +0200)]
test/power: check all environment types
Test all existing power environment configuration to verify if related
data is properly initialized and clean in set/unset scenarios.
Signed-off-by: Marcin Hajkowski <marcinx.hajkowski@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Marcin Hajkowski [Fri, 5 Apr 2019 16:22:04 +0000 (18:22 +0200)]
power: reset function pointers on unset environment
Set all power environment related function pointers to NULL
when unset is being made.
Signed-off-by: Marcin Hajkowski <marcinx.hajkowski@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Marcin Hajkowski [Fri, 5 Apr 2019 16:22:03 +0000 (18:22 +0200)]
power: return error when environment already set
On attempt to set_env in already initialized state notify
user by returning error that operation cannot be performed.
Signed-off-by: Marcin Hajkowski <marcinx.hajkowski@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Marcin Hajkowski [Fri, 5 Apr 2019 14:35:35 +0000 (16:35 +0200)]
power: fix thread-safety environment modification
Due to lack of thread safety in exisiting solution
use spinlock mechanism for atomic
modification of power environment related data.
Fixes:
445c6528b5 ("power: common interface for guest and host")
Cc: stable@dpdk.org
Signed-off-by: Marcin Hajkowski <marcinx.hajkowski@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Lukasz Krakowiak [Tue, 9 Apr 2019 09:54:01 +0000 (11:54 +0200)]
examples/power: remove policy dependency to MAC list
Removed dependency to mac_list from policies:
* BRANCH_RATIO,
* WORKLOAD,
* TIME
in function update_policy.
Fixes:
1b897991473f ("power: update error handling")
Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Tested-by: Yufeng Mo <yufengx.mo@intel.com>
Vipin Varghese [Thu, 4 Apr 2019 08:55:15 +0000 (14:25 +0530)]
app/pdump: support multi-core capture
Add option --multi, to enhance pdump application to allow capture
on unique cores for each --pdump option. If option --multi is ignored
the default capture occurs on single core for all --pdump options.
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Vipin Varghese [Thu, 4 Apr 2019 08:55:14 +0000 (14:25 +0530)]
app/pdump: remove core restriction
PDUMP application is being limited to run on default first core.
The patch removes the restriction, allowing user to run on any of
selected cores in EAL args. If no args are passed, logic runs on
default master core.
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Pallantla Poornima [Tue, 9 Apr 2019 13:05:40 +0000 (14:05 +0100)]
app/bbdev: replace sprintf with snprintf or strlcpy
sprintf function is not secure as it doesn't check the length of string.
More secure function snprintf and strlcpy is used.
Fixes:
f714a18885 ("app/testbbdev: add test application for bbdev")
Cc: stable@dpdk.org
Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
Erik Gabriel Carrillo [Thu, 18 Apr 2019 21:00:04 +0000 (16:00 -0500)]
test/timer: exercise new APIs in secondary process
This commit adds an autotest which exercises new timer reset/stop APIs
in a secondary process. Timers are created, and sometimes stopped, in
the secondary process, and their expiration is checked for and handled
in the primary process.
Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Bruce Richardson [Wed, 10 Apr 2019 11:24:47 +0000 (12:24 +0100)]
reorder: add checks for invalid function inputs
For APIs which can return an error value, do sanity checking of the input
parameters for NULL and return a suitable error value for those cases.
NOTE: The drain function is currently omitting NULL checks too, but this
function has no way to flag an error value, so checking in that case would
simply mask problems.
Reported-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Thomas Monjalon [Tue, 9 Apr 2019 20:06:35 +0000 (22:06 +0200)]
mbuf: fix big endian build
Compilation was failing when using a big endian toolchain:
rte_mbuf.h:504:2: error: expected ',' or '}' before 'RTE_MBUF_L3_LEN_OFS'
Fixes:
8d9c2c3a1f01 ("mbuf: add function to generate raw Tx offload value")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Stephen Hemminger [Wed, 17 Apr 2019 18:45:06 +0000 (11:45 -0700)]
bus/vmbus: fix resource leak on error
If secondary process attempt to mmap the resource resulted in
the wrong address, then it would leave behind the bad mmap.
Coverity issue: 337675, 337664
Fixes:
2a28a502c607 ("bus/vmbus: map ring in secondary process")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Stephen Hemminger [Wed, 10 Apr 2019 18:05:33 +0000 (11:05 -0700)]
drivers: remove blank line at EOF
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Wed, 10 Apr 2019 17:41:32 +0000 (10:41 -0700)]
examples/l3fwd: format IP addresses for printing
The IP addresses should be formatted using standard routines
rather than outputing in raw hex.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Stephen Hemminger [Wed, 10 Apr 2019 17:41:31 +0000 (10:41 -0700)]
examples/l3fwd: use reserved IP addresses
The l3fwd example should use the IPv4 addresses defined in RFC5735 and
the IPv6 addresses defined in RFC5180 for the L3 forwarding example
Longest Prefix Match table.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Stephen Hemminger [Wed, 10 Apr 2019 17:41:30 +0000 (10:41 -0700)]
app/testpmd: add ability to set Tx IP and UDP parameters
This patch changes what testpmd uses as IP addresses when
run in transmit only mode. The old code was using
192.168.0.1 -> 192.168.0.2
but these addresses are reserved for private Internet by RFC 1918.
The new code uses 192.18.0.1 and 192.18.0.2 which are on the
subnet reserved for performance testing by RFC 2544.
New command line option allows the user to pick any other src/dst
address desired.
Notice: this changes the default IP address for transmit only.
It may cause some user who has hardcoded network addresses to report
a regression.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Jerin Jacob [Fri, 19 Apr 2019 12:10:40 +0000 (17:40 +0530)]
eventdev: promote adapter functions as stable
Promote the adapter functions and rte_event_port_unlinks_in_progress()
as stable as it's been added for a while now and multiple drivers and
test application like test-eventdev has been tested using the adapter APIs.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Thomas Monjalon [Thu, 18 Apr 2019 00:30:58 +0000 (02:30 +0200)]
eal: promote some experimental functions as stable
The function rte_eal_cleanup() was introduced more than one year ago,
in DPDK 18.02. It is no longer experimental, allowing
pdump, proc-info and hotplug_mp apps to not need any experimental API.
The function rte_ctrl_thread_create() was introduced one year ago
in DPDK 18.05. It is no longer experimental, allowing
KNI PMD and TEP example to not need any experimental API.
The functions rte_socket_count() and rte_socket_id_by_idx() were
introduced one year ago in DPDK 18.05. They are no longer experimental.
The function rte_dev_is_probed() was introduced half a year ago
in DPDK 18.11. It is no longer experimental.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Herakliusz Lipiec [Fri, 19 Apr 2019 10:28:52 +0000 (11:28 +0100)]
net/tap: fix multi process reply buffer
A successful call to rte_mp_request_sync does not guarantee that there
are any messages in the buffer, and this should be checked for before
accessing data in the message. Buffer can be empty if IPC is disabled or
if we decide to ignore replies.
Fixes:
c9aa56edec8e ("net/tap: access primary process queues from secondary")
Cc: stable@dpdk.org
Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Xiaolong Ye [Fri, 19 Apr 2019 12:47:39 +0000 (13:47 +0100)]
net/af_xdp: fix creating multiple instance
Naming the buf_ring and umem memzone dynamically allows
to create multiple af_xdp vdevs.
Fixes:
f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")
Reported-by: Markus Theil <markus.theil@tu-ilmenau.de>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Rahul Lakkireddy [Fri, 19 Apr 2019 09:22:01 +0000 (14:52 +0530)]
net/cxgbe: update Chelsio T5/T6 NIC device ids
Cc: stable@dpdk.org
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Stephen Hemminger [Fri, 19 Apr 2019 11:44:25 +0000 (12:44 +0100)]
net/cxgbe: fix colliding function names
This driver defines lots of functions (like init_rss) which are intended
to only be used in this device. But when doing static linking these
global functions cause link failures when similar function name is
used in application.
This patch prefixes all functions defined in cxgbe.h with cxgbe_
to avoid these kind of conflicts.
Fixes:
bfcb257d3014 ("net/cxgbe: enable RSS for VF")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Eduard Serra [Thu, 18 Apr 2019 20:59:37 +0000 (20:59 +0000)]
net/vmxnet3: add v4 boot and guest UDP RSS config
This patch introduces:
- VMxnet3 v4 negotiation and,
- entirely guest-driven UDP RSS support.
VMxnet3 v3 already has UDP RSS support, however it
depends on hypervisor provisioning on the VM through
ESX specific flags, which are not transparent or known
to the guest later on.
Vmxnet3 v4 introduces a new API transaction which allows
configuring RSS entirely from the guest. This API must be
invoked after device shared mem region is initialized.
IPv4 ESP RSS (SPI based) is also available, but currently
there are no ESP RSS definitions on rte_eth layer to
handle that.
Signed-off-by: Eduard Serra <eserra@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Radu Nicolau [Wed, 17 Apr 2019 14:36:47 +0000 (15:36 +0100)]
net/bonding: fix potential out of bounds read
Add validation to pointer constructed from the IPv4 header length
in order to prevent malformed packets from generating a potential
out of bounds memory read.
Fixes:
09150784a776 ("net/bonding: burst mode hash calculation")
Cc: stable@dpdk.org
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Chas Williams <chas3@att.com>
Leyi Rong [Fri, 19 Apr 2019 03:03:50 +0000 (11:03 +0800)]
net/ice: fix Tx function selection
Add ice_set_tx_function_flag() to configure tx_simple_allowed properly.
Fixes:
6eac0b7fde95 ("net/ice: support advance Rx/Tx")
Cc: stable@dpdk.org
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Ori Kam [Thu, 18 Apr 2019 13:16:07 +0000 (13:16 +0000)]
net/mlx5: add drop action to Direct Verbs E-Switch
This commit adds support for drop action when creating E-Switch flow
using DV.
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Ori Kam [Thu, 18 Apr 2019 13:16:06 +0000 (13:16 +0000)]
net/mlx5: add Forward Database table type
Actions like encap/decap, modify header require setting the flow table
type. Until now we supported only Nic RX and Nic TX, this commits adds
the support for FDB table type for those actions.
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Ori Kam [Thu, 18 Apr 2019 13:16:05 +0000 (13:16 +0000)]
net/mlx5: add E-Switch port id action to Direct Verbs
This commits adds matching on source port, using DV API.
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Ori Kam [Thu, 18 Apr 2019 13:16:04 +0000 (13:16 +0000)]
net/mlx5: add transfer attribute to matcher
In current implementation the DV steering supported only NIC steering.
This commit adds the transfer attribute in order to create a matcher
on the FDB tables.
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Ori Kam [Thu, 18 Apr 2019 13:16:03 +0000 (13:16 +0000)]
net/mlx5: add port id item to Direct Verbs
Adds the port id item to the DV steering code.
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Ori Kam [Thu, 18 Apr 2019 13:16:02 +0000 (13:16 +0000)]
net/mlx5: validate Direct Rule E-Switch
Add validation logic for E-Switch using Direct Rules.
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Ori Kam [Thu, 18 Apr 2019 13:16:01 +0000 (13:16 +0000)]
net/mlx5: support Direct Rules E-Switch
This commit checks the for DR E-Switch support.
The support is based on both Device and Kernel.
This commit also enables the user to manually disable this this feature.
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Ori Kam [Thu, 18 Apr 2019 13:16:00 +0000 (13:16 +0000)]
net/mlx5: fix meson build for Direct Rules
The meson build was missing the define for Direct Rules.
Fixes:
4f84a19779ca ("net/mlx5: add Direct Rules API")
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Ori Kam [Thu, 18 Apr 2019 13:15:59 +0000 (13:15 +0000)]
net/mlx5: fix translate vport function name
Modify the translate vport function to match other translate items
naming conventions.
Fixes:
0fe3f18f78d8 ("net/mlx5: add source vport match to the ingress rules")
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Ori Kam [Wed, 17 Apr 2019 20:01:45 +0000 (20:01 +0000)]
net/mlx5: fix modify header action position
According to RTE flow the action order should be the order that the
actions were given.
In the case of modify actions the position of the action was always
last.
This commit solves this issue by saving the position of the first modify
action, and then adds to this position the pointer to the modify action.
Fixes:
4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs")
Cc: stable@dpdk.org
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Ori Kam [Sun, 14 Apr 2019 20:17:11 +0000 (20:17 +0000)]
net/mlx5: fix release of jump to queue action
Currently the allocation of the jump to QP is done in flow apply,
this results in memory leak.
This patch fixes this issue by moving the allocation and release of the
jump to QP action to the responsibility of the hrxq.
Fixes:
cbb66daa3c85 ("net/mlx5: prepare Direct Verbs for Direct Rule")
Cc: stable@dpdk.org
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Viacheslav Ovsiienko [Tue, 16 Apr 2019 14:10:28 +0000 (14:10 +0000)]
net/mlx5: support PF representor
On BlueField platform we have the new entity - PF representor.
This one represents the PCI PF attached to external host on the
side of ARM. The traffic sent by the external host to the NIC
via PF will be seem by ARM on this PF representor.
This patch refactors port recognizing capability on the base of
physical port name. We have two groups of name formats. Legacy
name formats are supported by kernels before ver 5.0 (being
more precise - before the patch [1]) or before Mellanox OFED 4.6,
and new naming formats added by the patch [1].
Legacy naming formats are supported:
- missing physical port name (no sysfs/netlink key) at all,
master is assumed
- decimal digits (for example "12"), representor is assumed,
the value is the index of attached VF
New naming formats are supported:
- "p" followed by decimal digits, for example "p2", master
is assumed
- "pf" followed by PF index concatenated with "vf" followed by
VF index, for example "pf0vf1", representor is assumed.
If index of VF is "-1" it is a special case of host PF
representor, this representor must be indexed in devargs
as 65535, for example representor=[0-3,65535] will
allow representors for VF0, VF1, VF2, VF3 and for host PF.
Note: do not specify representor=[0-65535], it causes devargs
processing error, because number of ports (rte_eth_dev) is
limited.
Applications should distinguish representors and master devices
exclusively by device flag RTE_ETH_DEV_REPRESENTOR and do not
rely on switch port_id (mlx5 PMD deduces ones from representor_id)
values returned by dev_infos_get() API.
[1] https://www.spinics.net/lists/netdev/msg547007.html
Linux-tree:
c12ecc23 (Or Gerlitz 2018-04-25 17:32 +0300)
"net/mlx5e: Move to use common phys port names for vport representors"
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Viacheslav Ovsiienko [Mon, 15 Apr 2019 08:40:58 +0000 (08:40 +0000)]
net/mlx4: fix memory region cleanup
mlx4 driver has a global list of Memory Regions created by
device, and there is a ml4_mr_release() routine which makes
a memory cleanup at device closing. The head of device MR list
was fetched outside the rwlock protected section. Also some
noticed typos are fixed.
Fixes:
9797bfcce1c9 ("net/mlx4: add new memory region support")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Viacheslav Ovsiienko [Fri, 12 Apr 2019 15:45:27 +0000 (15:45 +0000)]
net/mlx5: fix memory region cleanup
mlx5 driver has a global list of Memory Regions created by
device, and there is a ml5_mr_release() routine which makes
a memory cleanup at device closing. The head of device MR list
was fetched outside the rwlock protected section. Also some
noticed typos are fixed.
Fixes:
974f1e7ef146 ("net/mlx5: add new memory region support")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Adrien Mazarguil [Thu, 18 Apr 2019 17:20:55 +0000 (19:20 +0200)]
net/failsafe: fix source port id in Rx packets
When passed to the application, Rx packets retain the port ID value
originally set by slave devices. Unfortunately these IDs have no
meaning to applications, which are typically unaware of their existence.
This confuses those caring about the source port field in mbufs
(m->port) which experience issues ranging from traffic drop to crashes.
Fixes:
a46f8d584eb8 ("net/failsafe: add fail-safe PMD")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>