dpdk.git
4 years agonet/af_packet: remove queue number limitation
Stephen Hemminger [Thu, 27 Feb 2020 20:00:03 +0000 (12:00 -0800)]
net/af_packet: remove queue number limitation

Since qpairs is part of the vdev arguments, there is no need to
limit it to 16. The queue arrays can be dynamically sized based
on the requested parameters.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: John W. Linville <linville@tuxdriver.com>
4 years agoapp/testpmd: parse flow command line for AH
Xiao Zhang [Fri, 14 Feb 2020 00:52:44 +0000 (08:52 +0800)]
app/testpmd: parse flow command line for AH

Add AH and AH SPI to testpmd rte flow command line.
Add note and sample AH rules in testpmd guide.

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agonet/mlx5: fix VLAN PCP item calculation
Ophir Munk [Wed, 26 Feb 2020 08:27:48 +0000 (08:27 +0000)]
net/mlx5: fix VLAN PCP item calculation

The VLAN 16 bits tci field contains both values of PCP and VID. When
extracting any one of them - it is required not to affect the other one.
Previous to this commit in routine flow_dev_get_vlan_info_from_items()
we calculated the PCP as follows:
    (1) vlan->vlan_tci &= MLX5DV_FLOW_VLAN_PCP_MASK;
    (2) vlan->vlan_tci |= <3 bits value of PCP>
In line (1) we should have used the negated mask ('~' operator) such
that only the PCP bits will be nullified before ORing them with the
updated PCP value.

Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/i40e: relax barrier in Tx
Gavin Hu [Wed, 12 Feb 2020 05:56:21 +0000 (13:56 +0800)]
net/i40e: relax barrier in Tx

To keep ordering of mixed accesses, rte_cio is sufficient.
The rte_io barrier inside the I40E_PCI_REG_WRITE is overkill.[1]

[1] http://inbox.dpdk.org/dev/CALBAE1M-ezVWCjqCZDBw+MMDEC4O9
qf0Kpn89EMdGDajepKoZQ@mail.gmail.com

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/i40e: fix port start during config restore
Xiao Zhang [Fri, 28 Feb 2020 03:22:04 +0000 (11:22 +0800)]
net/i40e: fix port start during config restore

If configuring VF promiscuous mode is not supported, return '-ENOTSUP'
error code in '.promiscuous_enable/disable' dev_ops.

This is to fix the port start during config restore, where if
'.promiscuous_enable/disable' dev_ops exists and return any value other
than '-ENOTSUP', start will fail.

Same is done for '.allmulticast_enable/disable' dev_ops.

Fixes: ddc7cb0d9453 ("net/i40e: re-program promiscuous mode on VF interface")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/thunderx: support link up and down
Harman Kalra [Wed, 5 Feb 2020 09:26:33 +0000 (14:56 +0530)]
net/thunderx: support link up and down

Add support for .set_link_up/down() eth ops to bring
link up and down.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/octeontx2: fix link information for loopback port
Ashish Gupta [Thu, 6 Feb 2020 12:30:58 +0000 (18:00 +0530)]
net/octeontx2: fix link information for loopback port

Loopback devices are exposed as ethdev device in octeontx2.
This patch fixes the link information for loopback ports.

Fixes: 38f566280abb ("net/octeontx2: add link stats operations")
Cc: stable@dpdk.org
Signed-off-by: Ashish Gupta <ashishg@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/af_packet: support default MAC address change
Stephen Hemminger [Sat, 15 Feb 2020 19:20:12 +0000 (11:20 -0800)]
net/af_packet: support default MAC address change

Since packet is talking to a network device (probably tap)
it is possible for the device driver to change the hardware address
by making an ioctl to kernel.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/axgbe: support registers dump
Chandu Babu N [Tue, 11 Feb 2020 10:28:03 +0000 (15:58 +0530)]
net/axgbe: support registers dump

Implement "get_reg" eth_dev_ops for axgbe

Signed-off-by: Chandu Babu N <chandu@amd.com>
Acked-by: Ravi Kumar <ravi1.kumar@amd.com>
4 years agonet/axgbe: add debug logs
Chandu Babu N [Tue, 11 Feb 2020 08:19:39 +0000 (13:49 +0530)]
net/axgbe: add debug logs

Add debug logs in various modules in axgbe

Signed-off-by: Chandu Babu N <chandu@amd.com>
Acked-by: Ravi Kumar <ravi1.kumar@amd.com>
4 years agobuild: fix linker warnings with clang on Windows
Dmitry Kozlyuk [Thu, 27 Feb 2020 04:25:37 +0000 (07:25 +0300)]
build: fix linker warnings with clang on Windows

Clang on Windows doesn't use pthread for now, while MinGW does. Removing
`-pthread` option with MS linker fixes the following warning:

    clang: warning: argument unused during compilation: '-pthread'
        [-Wunused-command-line-argument]

Option `--no-as-needed` is meaningless for PE output. Disabling it on
Windows fixes the following warning:

    LINK : warning LNK4044: unrecognized option '/-no-as-needed'; ignored

Fixes: 98edcbb5a ("eal/windows: introduce Windows support")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: William Tu <u9012063@gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
4 years agobuild: add cross-file for MinGW-w64
Dmitry Kozlyuk [Thu, 27 Feb 2020 04:25:35 +0000 (07:25 +0300)]
build: add cross-file for MinGW-w64

Add Meson configuration to cross-compile for Windows using MinGW-w64.
It may require adjustments in some cases, but at least it provides
the foundation.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: William Tu <u9012063@gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
4 years agobuild: support MinGW-w64 with Meson
Dmitry Kozlyuk [Thu, 27 Feb 2020 04:25:34 +0000 (07:25 +0300)]
build: support MinGW-w64 with Meson

MinGW-w64 linker does not mimic MS linker options, so the build system
must differentiate between linkers on Windows. Use GNU linker options
with GCC and MS linker options with Clang.

MinGW-w64 by default uses MSVCRT stdio, which does not comply to ANSI,
most notably its formatting and string handling functions. MinGW-w64
support for the Universal CRT (UCRT) is ongoing, but the toolchain
provides its own standard-complying implementation of stdio. The latter
is used in the patch to support formatting in DPDK.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: William Tu <u9012063@gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
4 years agoeal/windows: support building with MinGW-w64
Dmitry Kozlyuk [Thu, 27 Feb 2020 04:25:33 +0000 (07:25 +0300)]
eal/windows: support building with MinGW-w64

Disable bundled getopt implementation and GNU extensions shim when
building in GNU environment.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: William Tu <u9012063@gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
4 years agoeal/windows: use lowercase filenames for system headers
Dmitry Kozlyuk [Thu, 27 Feb 2020 04:25:32 +0000 (07:25 +0300)]
eal/windows: use lowercase filenames for system headers

Mixed case in Windows header names causes errors when cross-compiling
from Linux with case-sensitive filesystem using MinGW, because MinGW
distribution provides all platform SDK headers in lowercase. The change
does not affect Windows native builds on case-insensitive filesystems
(NTFS default).

Reported-by: Narcisa Vasile <navasile@microsoft.com>
Reported-by: William Tu <u9012063@gmail.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: William Tu <u9012063@gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
4 years agoeal: introduce portable format attribute
Dmitry Kozlyuk [Thu, 27 Feb 2020 04:25:31 +0000 (07:25 +0300)]
eal: introduce portable format attribute

When using __attribute__((format(...)) on functions, GCC on Windows
assumes MS-specific format string by default, even if the underlying
stdio implementation is ANSI-compliant (either MS Unicersal CRT
or MinGW implementation). Wrap attribute into a macro that forces
GNU-specific format string when using GCC.

Use this new attribute for logging and panic messages in EAL
and for output strings in cmdline library.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: William Tu <u9012063@gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
4 years agoeal: fix compiler detection in public headers
Thomas Monjalon [Mon, 16 Mar 2020 12:04:53 +0000 (13:04 +0100)]
eal: fix compiler detection in public headers

RTE_TOOLCHAIN_* macros are defining the target compiler.
Some API may be used in a host application like pmdinfogen.
That's why the the public headers should check the effective compiler
in use instead of the target compiler.

Detecting the compiler with macros is easy, except for __GNUC__
which is defined in all compilers supporting some GNU compatibility.

It is improved by defining RTE_CC_CLANG, RTE_CC_ICC and RTE_CC_GCC.
The extra macro RTE_CC_IS_GNU is defined to 0 or 1 in GCC case,
so it can be used simply with #if.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
4 years agopci: fix build on ppc
David Christensen [Mon, 16 Mar 2020 20:47:49 +0000 (13:47 -0700)]
pci: fix build on ppc

The include file rte_debug.h is pulled into x86 builds through the
following callchain:

lib/librte_eal/common/include/generic/rte_cycles.h:17,
lib/librte_eal/common/include/arch/x86/rte_cycles.h:13,
lib/librte_eal/common/include/arch/x86/rte_spinlock.h:18,
lib/librte_eal/common/include/arch/x86/rte_rwlock.h:13,

The PPC specific version of the same callchain does not include
rte_debug.h.  Add rte_debug.h back into the C files that require it.

Fixes: 0dcba5256287 ("pci: remove unneeded includes in public header file")
Cc: stable@dpdk.org
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Tested-by: David Wilder <dwilder@us.ibm.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agopci: fix build on FreeBSD
Bruce Richardson [Mon, 16 Mar 2020 16:37:05 +0000 (16:37 +0000)]
pci: fix build on FreeBSD

When removing the extra headers from rte_pci.h stdlib should have been
removed instead of stdio, since off_t is missing for BSD builds when just
including stdlib.h

Fixes: 0dcba5256287 ("pci: remove unneeded includes in public header file")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agopci: remove unneeded includes in public header file
Bruce Richardson [Mon, 16 Mar 2020 11:29:51 +0000 (11:29 +0000)]
pci: remove unneeded includes in public header file

The rte_pci.h file includes more header files than are actually needed,
which means that all users of it also include those headers. This patch
removes the unneeded headers - adding them elsewhere where other components
were requiring them but not including them directly.

Fixes: c752998b5e2e ("pci: introduce library and driver")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agotelemetry: fix port stats retrieval
Ciara Power [Thu, 27 Feb 2020 17:04:56 +0000 (17:04 +0000)]
telemetry: fix port stats retrieval

The ep struct is used to track what type of stats are required by the
client. For PORT_STATS type, it contains the lists of port and metric
ids to query, and the number of ids in each list.

The ep struct has values set (num of port and metric ids) when a request
for port stats values by name is received. However, after this value
assignment, the struct is reset to all 0 values, meaning the number of
port and metric ids required now both show as 0, and the client will not
receive the requested data in response. To fix this issue, the memset
call is now moved above the ep struct value assignment.

Fixes: 4080e46c8078 ("telemetry: support global metrics")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>
4 years agoservice: fix crash on exit
Harry van Haaren [Wed, 11 Mar 2020 14:39:27 +0000 (14:39 +0000)]
service: fix crash on exit

This commit releases all service cores from their role,
returning them to ROLE_RTE on rte_service_finalize().

This fixes an issue relating to the service cores causing
a race-condition on rte_eal_cleanup(), where the service core
could still be executing while the main thread has already
free-d the service memory, leading to a segfault.

Fixes: da23f0aa87d8 ("service: fix memory leak with new function")
Cc: stable@dpdk.org
Reported-by: David Marchand <david.marchand@redhat.com>
Reported-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
4 years agomem: mark pages as not accessed when reserving VA
David Marchand [Mon, 9 Mar 2020 14:54:42 +0000 (15:54 +0100)]
mem: mark pages as not accessed when reserving VA

When the memory allocator reserves virtual addresses, it still does not
know what they will be used for.
Besides, huge areas are reserved for memory hotplug in multiprocess
setups. But most of the pages are unused in the whole life of the
processes.

Change protection mode to PROT_NONE when only reserving VA.
The memory allocator already switches to the right mode when making use
of it.

It also has the nice effect of getting those pages skipped by the kernel
when calling mlockall() or when a coredump gets generated.

Cc: stable@dpdk.org
Suggested-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
4 years agoeal/arm64: fix precise TSC
Haifeng Lin [Thu, 12 Mar 2020 01:08:33 +0000 (01:08 +0000)]
eal/arm64: fix precise TSC

In order to get more accurate the cntvct_el0 reading,
SW must invoke isb.

Fixes: ccad39ea0712 ("eal/arm: add cpu cycle operations for ARMv8")
Cc: stable@dpdk.org
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Haifeng Lin <haifeng.lin@huawei.com>
4 years agoeal/arm64: remove internal macros
David Marchand [Mon, 9 Mar 2020 09:38:44 +0000 (10:38 +0100)]
eal/arm64: remove internal macros

No need to export dsb and dmb.
EAL memory barriers are the public API.

%s/\<\(d.b\)\>(\([^()]*\))$/asm volatile("\1 \2" : : : "memory")/

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agoeal: fix log message print for regex
Sunil Kumar Kori [Mon, 9 Mar 2020 06:17:23 +0000 (11:47 +0530)]
eal: fix log message print for regex

If user passes log-level eal parameter to enable log level based on regex
then in case of error message is being printed for pattern match instead of
regex. Following is the warning message thrown:

Compiling C object 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_options.c.o'.
In function ‘eal_parse_log_level’,
   inlined from ‘eal_parse_common_option’ at ../lib/librte_eal/common/eal_common_options.c:1418:7:
../lib/librte_eal/common/eal_common_options.c:1053:4: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
 1053 |    fprintf(stderr, "cannot set log level %s,%d\n",
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1054 |     pattern, priority);
      |     ~~~~~~~~~~~~~~~~~~

Fixes: 7f0bb634a140 ("log: add ability to match log type with globbing")
Cc: stable@dpdk.org
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
4 years agoeal: fix 32-bit structure marker
Haiyue Wang [Sun, 8 Mar 2020 04:18:24 +0000 (12:18 +0800)]
eal: fix 32-bit structure marker

Use the 32bit typedef for structure 4B alignment marking.

Fixes: 2b393160a480 ("eal: introduce structure markers")
Cc: stable@dpdk.org
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agodrivers/crypto: fix build with make 4.3
Thomas Monjalon [Thu, 27 Feb 2020 22:20:28 +0000 (23:20 +0100)]
drivers/crypto: fix build with make 4.3

In the check for the version of intel-ipsec-mb library,
there is a backslash in front of the #include.
This backslash is for escaping the hash sign parsed as
a number sign in make.

Since make-4.3, escaping is not required for the number sign.
As a consequence, it resolves now to '\#':

syntax error near unexpected token `|'
`grep -e "IMB_VERSION_STR" \#include <intel-ipsec-mb.h> | cut -d'"' -f2'
syntax error near unexpected token `|'
`grep -e "IMB_VERSION_NUM" \#include <intel-ipsec-mb.h> | cut -d' ' -f3'

The makefiles are fixed by using a variable for the hash sign,
as recommended in make-4.3 changelog:
https://lists.gnu.org/archive/html/info-gnu/2020-01/msg00004.html

Fixes: 3067c8ce77ac ("crypto/aesni_mb: fix build with custom dependency path")
Fixes: 457b8e372975 ("crypto/aesni_gcm: check dependency version with make")
Fixes: bf6eb2c22fd1 ("crypto/kasumi: use IPsec library")
Fixes: 7c87e2d7b359 ("crypto/snow3g: use IPsec library")
Fixes: 61f7c988e39e ("crypto/zuc: use IPsec library")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodevtools: add acronyms in dictionary for commit checks
Ferruh Yigit [Fri, 6 Mar 2020 14:32:53 +0000 (14:32 +0000)]
devtools: add acronyms in dictionary for commit checks

BAR    -> Base Address Register
FDIR   -> Flow Director
GENEVE -> Generic Network Virtualization Encapsulation
IO     -> Input/Output
MPLS   -> Multiprotocol Label Switching
NEON
null
NVGRE  -> Network Virtualization using Generic Routing Encapsulation
RDMA   -> Remote Direct Memory Access
TC     -> Traffic Class
VFIO   -> Virtual Function I/O
VXLAN  -> Virtual Extensible LAN
XDP    -> eXpress Data Path

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agodrivers: add crypto as dependency for event drivers
Hemant Agrawal [Thu, 5 Mar 2020 12:04:12 +0000 (17:34 +0530)]
drivers: add crypto as dependency for event drivers

Since the introduction of crypto event adapters, event drivers
have dependencies on crypto drivers.

/usr/bin/ld: cannot find -lrte_pmd_dpaa_sec
collect2: error: ld returned 1 exit status
make[9]: *** [.../mk/rte.lib.mk:100:
librte_pmd_dpaa_event.so.20.0.2] Error 1

Fixes: b0f66a68ca74 ("event/dpaa: support crypto adapter")
Fixes: 3721c39f405a ("event/dpaa2: support crypto adapter")
Cc: stable@dpdk.org
Reported-by: David Marchand <david.marchand@redhat.com>
Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoexamples/qos_sched: fix build with gcc 10
Timothy Redaelli [Wed, 5 Feb 2020 17:05:46 +0000 (18:05 +0100)]
examples/qos_sched: fix build with gcc 10

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: be1e533238c0 ("examples/qos_sched: add TC and queue config flexibility")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoexamples/eventdev: fix build with gcc 10
Timothy Redaelli [Wed, 5 Feb 2020 17:05:45 +0000 (18:05 +0100)]
examples/eventdev: fix build with gcc 10

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: 3d1b33e44ae2 ("examples/eventdev: move common data into pipeline common")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoexamples/vhost_blk: fix build with gcc 10
Timothy Redaelli [Wed, 5 Feb 2020 13:47:03 +0000 (14:47 +0100)]
examples/vhost_blk: fix build with gcc 10

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoapp/pipeline: fix build with gcc 10
Timothy Redaelli [Wed, 5 Feb 2020 14:12:20 +0000 (15:12 +0100)]
app/pipeline: fix build with gcc 10

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: 48f31ca50cc4 ("app/pipeline: packet framework benchmark")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
4 years agotest: fix build with gcc 10
Timothy Redaelli [Wed, 5 Feb 2020 12:50:42 +0000 (13:50 +0100)]
test: fix build with gcc 10

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: 08e0c7581468 ("test/fib: add performance autotests")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
4 years agocrypto/octeontx2: fix build with gcc 10
Timothy Redaelli [Wed, 5 Feb 2020 12:50:41 +0000 (13:50 +0100)]
crypto/octeontx2: fix build with gcc 10

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: 2f8a1b963eb7 ("crypto/octeontx2: add PMD skeleton")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
4 years agomaintainers: update for Netcope PMDs
Jan Remes [Mon, 2 Mar 2020 16:34:05 +0000 (17:34 +0100)]
maintainers: update for Netcope PMDs

Jan and Rastislav are leaving Netcope. Martin and Jakub
will replace them as Netcope PMD maintainers.

Signed-off-by: Jan Remes <remes@netcope.com>
4 years agomaintainers: update for virtio and vhost
Xiaolong Ye [Fri, 21 Feb 2020 13:35:39 +0000 (21:35 +0800)]
maintainers: update for virtio and vhost

I volunteer to be co-maintainer for Vhost-user/Vhost PMD/Virtio PMD.

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Zhihong Wang <zhihong.wang@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
4 years agomaintainers: resign from virtio and vhost
Tiwei Bie [Fri, 21 Feb 2020 13:28:41 +0000 (21:28 +0800)]
maintainers: resign from virtio and vhost

I'm leaving Intel, and I'm not sure when I could dedicate enough
time to DPDK in the future. So I'm removing my name from the
MAINTAINERS file.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
4 years agoversion: 20.05-rc0
David Marchand [Tue, 25 Feb 2020 16:32:00 +0000 (17:32 +0100)]
version: 20.05-rc0

Start a new release cycle with empty release notes.
ABI must now be checked with v20.02 as a reference.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agoversion: 20.02
Thomas Monjalon [Tue, 25 Feb 2020 20:46:30 +0000 (21:46 +0100)]
version: 20.02

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodevtools: export dictionary for commit title check
Sean Morrissey [Mon, 24 Feb 2020 15:30:01 +0000 (15:30 +0000)]
devtools: export dictionary for commit title check

Moved title syntax to a separate file so that it improves code
readability and allows easy addition.

Also logic changed from checking for bad pattern to checking good
pattern which documents the expected syntax more clearly, and does not
have gaps in the checks.

Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agodoc: fix VM power manager guide as PDF
Thomas Monjalon [Tue, 25 Feb 2020 17:43:18 +0000 (18:43 +0100)]
doc: fix VM power manager guide as PDF

When generating PDF with on an old system,
there are failures because of long tables:

vm_power_management.rst:420: ERROR: Malformed table.
Column span alignment problem in table line 5.
vm_power_management.rst:545: ERROR: Malformed table.
Column span alignment problem in table line 5.
vm_power_management.rst:754: ERROR: Malformed table.
Column span alignment problem in table line 5.

The tables (having only two columns) are replaced
with the more appropriate definition lists.

Fixes: 30d3aa861db5 ("doc: rework VM power manager user guide")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agodoc: add tested Marvell integrated NIC platforms
Jerin Jacob [Tue, 25 Feb 2020 17:08:14 +0000 (22:38 +0530)]
doc: add tested Marvell integrated NIC platforms

Add tested Marvell integrated NIC platforms to v20.02 release notes.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
4 years agodevtools: add fixes flag to commit listing
Kevin Traynor [Mon, 3 Feb 2020 15:59:55 +0000 (15:59 +0000)]
devtools: add fixes flag to commit listing

During backporting, if the fixes or stable tag are missing,
it usually requires some investigation by stable maintainer
as to why.

The presence of a fixes tag may be known from whether the
originating release of the issue is printed at the end of the
line but with variable line lengths and nested partial fixes
it doesn't catch the eye.

When there are a large amount of commits, adding an aligned column
indicating the presence of a fixes tag beside the stable one makes
it easier to quickly see the patches requiring further investigation.

e.g.
20.02 8f33cbcfa S F net/i40e/base: fix buffer address (16.04)
20.02 4b3da9415 S F net/i40e/base: fix error message (1.7.0)
20.02 1da546c39 - F net/i40e/base: fix missing link modes (17.08)
20.02 79bfe7808 S F net/i40e/base: fix Tx descriptors number (1.7.0)
20.02 50126939c - F net/i40e/base: fix retrying logic (18.02)
20.02 dcd05da0a S F app/testpmd: fix GENEVE flow item (18.02)
20.02 b0b9fdad2 S - net/bnx2x: support secondary process (N/A)
20.02 f8279f47d S F net/netvsc: fix crash in secondary process (18.08)

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
4 years agodoc: add feature support matrix link in i40e guide
Xiaolong Ye [Tue, 25 Feb 2020 11:14:40 +0000 (19:14 +0800)]
doc: add feature support matrix link in i40e guide

There is an increase in number of issues related to supported cables and
modules, this link and note can help users identify or narrow down the
issues.

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agodoc: remove not supported features from hinic matrix
Thomas Monjalon [Mon, 24 Feb 2020 19:51:26 +0000 (20:51 +0100)]
doc: remove not supported features from hinic matrix

Only the supported features are supposed to be listed
in the networking features matrix.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agodoc: fix typos in 19.11 release notes
Yong Wang [Tue, 31 Dec 2019 07:36:47 +0000 (15:36 +0800)]
doc: fix typos in 19.11 release notes

Remove the redundant "when used". And modify "ans" to "and".

Fixes: b21302a10721 ("eventdev: add Tx flag for packets with same destination")
Fixes: 92c083915ade ("doc: update release notes for 19.11")
Cc: stable@dpdk.org
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
4 years agodoc: add tested platforms with Mellanox NICs
Raslan Darawsheh [Tue, 25 Feb 2020 09:24:01 +0000 (11:24 +0200)]
doc: add tested platforms with Mellanox NICs

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
4 years agodoc: add Tx inline hint in mlx5 guide
Viacheslav Ovsiienko [Tue, 25 Feb 2020 13:57:28 +0000 (13:57 +0000)]
doc: add Tx inline hint in mlx5 guide

The no-inline hint flag is described.

Fixes: cacb44a09962 ("net/mlx5: add no-inline Tx flag")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agodoc: announce python 2 support removal
Robin Jarry [Mon, 17 Feb 2020 09:26:59 +0000 (10:26 +0100)]
doc: announce python 2 support removal

Now that Python 2 is officially not maintained anymore, prepare the
removal of support in DPDK.

Add a deprecation notice indicating the removal schedule.

Signed-off-by: Robin Jarry <robin.jarry@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agodoc: announce igb_uio move to an external repository
Jerin Jacob [Thu, 30 Jan 2020 16:58:53 +0000 (22:28 +0530)]
doc: announce igb_uio move to an external repository

Based on the tech board meeting held on 2019-11-06,
It's been decided to move igb_uio kernel module to a new repository
hosted by dpdk.org in v20.11 release.

http://mails.dpdk.org/archives/dev/2019-November/151763.html

Adding the deprecation notice for the same in advance.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agodoc: announce deprecation of max constants as array size
Ferruh Yigit [Thu, 30 Jan 2020 14:20:03 +0000 (14:20 +0000)]
doc: announce deprecation of max constants as array size

Adding the deprecation notice as reminder for next ABI breakage release
(20.11).
This one time breakage is required to be able to extend enum/define
without breaking ABI.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agodoc: fix naming of Mellanox devices
Thomas Monjalon [Mon, 24 Feb 2020 19:52:14 +0000 (20:52 +0100)]
doc: fix naming of Mellanox devices

The devices of the family ConnectX may have two letters as suffix.
Such suffix is preceded with a space and the second x is lowercase:
    - ConnectX-4 Lx
    - ConnectX-5 Ex
    - ConnectX-6 Dx

Uppercase of the device family name BlueField is also fixed.

The lists of supported devices are fixed.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: remove redundant line in mlx5 guide
Thomas Monjalon [Mon, 24 Feb 2020 19:50:42 +0000 (20:50 +0100)]
doc: remove redundant line in mlx5 guide

When adding GTP to the list of supported tunnels,
the old line was not removed.

Fixes: f31d7a0171da ("net/mlx5: support GTP")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: add external pinned memory mbuf to release notes
Viacheslav Ovsiienko [Mon, 24 Feb 2020 17:58:15 +0000 (17:58 +0000)]
doc: add external pinned memory mbuf to release notes

Update release notes features for the new mbuf pool
with external pinned buffers.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agodoc: add metadata limitation in mlx5 guide
Viacheslav Ovsiienko [Mon, 24 Feb 2020 17:57:49 +0000 (17:57 +0000)]
doc: add metadata limitation in mlx5 guide

The metadata limitation is described.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agodoc: add raw encap/decap limitations in mlx5 guide
Raslan Darawsheh [Sun, 23 Feb 2020 09:30:59 +0000 (11:30 +0200)]
doc: add raw encap/decap limitations in mlx5 guide

Document validation limitations for encap/decap.

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agodoc: add IP DSCP rewrite to mlx5 and release notes
Thomas Monjalon [Mon, 24 Feb 2020 19:50:05 +0000 (20:50 +0100)]
doc: add IP DSCP rewrite to mlx5 and release notes

The new rte_flow feature for DSCP field rewrite offload was
missing in the release notes.

The mlx5 requirements for DSCP field rewrite offload were missing.

Fixes: 8482ffe4b68b ("ethdev: add IPv4/IPv6 DSCP rewrite action")
Fixes: 6f26e604a9c3 ("net/mlx5: support IPv4/IPv6 DSCP rewrite action")

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: update mlx5 vDPA requirements
Matan Azrad [Mon, 24 Feb 2020 16:55:07 +0000 (16:55 +0000)]
doc: update mlx5 vDPA requirements

The first Mellanox OFED version to support mlx5 vDPA driver is 5.0.

Signed-off-by: Matan Azrad <matan@mellanox.com>
4 years agovdpa/mlx5: fix guest notification timing
Matan Azrad [Mon, 24 Feb 2020 16:55:06 +0000 (16:55 +0000)]
vdpa/mlx5: fix guest notification timing

When the HW finishes to consume the guest Rx descriptors, it creates a
CQE in the CQ.

The mlx5 driver arms the CQ to get notifications when a specific CQE
index is created - the index to be armed is the next CQE index which
should be polled by the driver.

The mlx5 driver configured the kernel driver to send notification to the
guest callfd in the same time it arrives to the mlx5 driver.

It means that the guest was notified only for each first CQE in a poll
cycle, so if the driver polled CQEs of all the virtio queue available
descriptors, the guest was not notified again for the rest because
there was no any new cycle for polling.

Hence, the Rx queues might be stuck when the guest didn't work with
poll mode.

Move the guest notification to be after the driver consumes all the
SW own CQEs.
By this way, guest will be notified only after all the SW CQEs are
polled.

Also init the CQ to be with HW owner in the start.

Fixes: 8395927cdfaf ("vdpa/mlx5: prepare HW queues")

Signed-off-by: Matan Azrad <matan@mellanox.com>
4 years agovdpa/mlx5: fix event setup
Matan Azrad [Tue, 25 Feb 2020 08:43:48 +0000 (08:43 +0000)]
vdpa/mlx5: fix event setup

The completion event mechanism should work only if at least one of the
virtqs has valid callfd to be notified on.

When all the virtqs works with poll mode, the event mechanism should not
be configured.

The driver didn't take it into account and crashed in the above case.

Do not configure event interrupt when all the virtqs are in poll mode.

Fixes: 8395927cdfaf ("vdpa/mlx5: prepare HW queues")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agodoc: update release notes for 20.02
John McNamara [Sun, 23 Feb 2020 10:59:28 +0000 (10:59 +0000)]
doc: update release notes for 20.02

Fix grammar, spelling and formatting of DPDK 20.02 release notes.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoversion: 20.02-rc4
Thomas Monjalon [Sat, 22 Feb 2020 20:56:33 +0000 (21:56 +0100)]
version: 20.02-rc4

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodevtools: add EditorConfig file
Robin Jarry [Fri, 25 Oct 2019 14:04:10 +0000 (16:04 +0200)]
devtools: add EditorConfig file

EditorConfig is a file format and collection of text editor plugins for
maintaining consistent coding styles between different editors and IDEs.

Initialize the file following the coding rules in
doc/guides/contributing/coding_style.rst,
doc/guides/contributing/documentation.rst and
doc/guides/contributing/patches.rst.

In order for this file to be taken into account (unless they use an
editor with built-in EditorConfig support), developers will have to
install a plugin.

Note: The max_line_length property is only supported by a limited number
of EditorConfig plugins. It will be ignored if unsupported.

Add this new file in MAINTAINERS in the "Developers and Maintainers
Tools" section.

Link: https://editorconfig.org/
Link: https://github.com/editorconfig/editorconfig-emacs
Link: https://github.com/editorconfig/editorconfig-vim
Link: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties#max_line_length
Signed-off-by: Robin Jarry <robin.jarry@6wind.com>
4 years agodevtools: warn on C99-style comment
Lance Richardson [Sat, 15 Feb 2020 17:09:50 +0000 (12:09 -0500)]
devtools: warn on C99-style comment

C99-style comments are not permitted according to DPDK coding
style guidelines, enable checking for these by checkpatch.pl.

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
4 years agoadd top-level SPDX license tag
Hemant Agrawal [Thu, 28 Nov 2019 07:05:38 +0000 (12:35 +0530)]
add top-level SPDX license tag

This patch adds top level SPDX license identifiers for some of the DPDK
source and scripts, where the copyright owners have not yet agreed to
replace the full BSD-3 license plate.

This patch also add SPDX license tag for a file with no
previous license plates. (DPDK is BSD-3)

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
4 years agodevtools: add SPDX license tag to config loader
Stephen Hemminger [Wed, 4 Dec 2019 15:55:17 +0000 (07:55 -0800)]
devtools: add SPDX license tag to config loader

Trivial file was missing any license.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agopmdinfogen: add SPDX license tag
Hemant Agrawal [Fri, 27 Sep 2019 08:39:56 +0000 (14:09 +0530)]
pmdinfogen: add SPDX license tag

This patch adds SPDX license tag to pmdinfogen files.

These files are originally drived from kernel.
They are being used as binary tool to support internal
build.

This patch requires license exception approval from
DPDK Technical Board and Governing Board.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: add build requirement in some crypto PMD guides
Pablo de Lara [Mon, 17 Feb 2020 17:12:55 +0000 (17:12 +0000)]
doc: add build requirement in some crypto PMD guides

The following crypto PMDs use the Intel Multi-buffer library:
- AESNI MB PMD
- AESNI GCM PMD
- ZUC PMD
- KASUMI PMD
- SNOW3G PMD

When this library is built with gcc < 5.0, it might throw
some compilation issues. A workaround has been added in the
repo of this library, so a note on this has been added
to the documentation of these PMDs.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: introduce OpenWrt how-to
Xiaolong Ye [Mon, 17 Feb 2020 02:47:03 +0000 (10:47 +0800)]
doc: introduce OpenWrt how-to

This doc describes how to enable DPDK on OpenWrt
in both virtual and physical x86 environment.

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: clarify memory write combining in mlx5 guide
Viacheslav Ovsiienko [Thu, 20 Feb 2020 12:44:37 +0000 (12:44 +0000)]
doc: clarify memory write combining in mlx5 guide

Just add the words about write combining attribute.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agodoc: rework VM power manager user guide
David Hunt [Mon, 17 Feb 2020 10:48:17 +0000 (10:48 +0000)]
doc: rework VM power manager user guide

Review and re-work of vm_power_manager documentation.
Hopefully this is clearer, easier to follow.

Signed-off-by: David Hunt <david.hunt@intel.com>
4 years agodoc: fix multi-producer enqueue figure in ring guide
Prateek Agarwal [Wed, 19 Feb 2020 21:05:30 +0000 (15:05 -0600)]
doc: fix multi-producer enqueue figure in ring guide

The producer head pointer in multi producer enqueue fig.6.10
points to incorrect object in the ring array.

Fixes: fc1f2750a3ec ("doc: programmers guide")
Cc: stable@dpdk.org
Signed-off-by: Prateek Agarwal <prateekag@cse.iitb.ac.in>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
4 years agodoc: fix quiescent state description in RCU guide
Prateek Agarwal [Wed, 19 Feb 2020 21:05:29 +0000 (15:05 -0600)]
doc: fix quiescent state description in RCU guide

The quiescent state description refers to an incorrect
thread.

Fixes: 64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism")
Cc: stable@dpdk.org
Signed-off-by: Prateek Agarwal <prateekag@cse.iitb.ac.in>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
4 years agodoc: fix devargs in OCTEON TX2 event device guide
Pavan Nikhilesh [Wed, 19 Feb 2020 06:55:11 +0000 (12:25 +0530)]
doc: fix devargs in OCTEON TX2 event device guide

Fix OCTEON TX2 event device devargs examples.

Fixes: 55e778ca4648 ("event/octeontx2: add devargs for inflight buffer count")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
4 years agoeal/windows: fix out-of-memory check in asprintf
Dmitry Kozlyuk [Mon, 17 Feb 2020 23:56:16 +0000 (02:56 +0300)]
eal/windows: fix out-of-memory check in asprintf

Check vsnprintf() result to prevent calling malloc() with negative size.
Check actual malloc() result and terminate asprintf() with documented
error code to prevent the use of NULL pointer.

Fixes: e8428a9d8 ("eal/windows: add some basic functions and macros")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
4 years agokernel: remove unused directory for Windows
Thomas Monjalon [Mon, 17 Feb 2020 16:58:29 +0000 (17:58 +0100)]
kernel: remove unused directory for Windows

The netuio driver will be hosted in a separate repository:
http://git.dpdk.org/dpdk-kmods/

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Narcisa Vasile <navasile@microsoft.com>
4 years agobuild: fix experimental library versioning
Ferruh Yigit [Thu, 20 Feb 2020 19:54:53 +0000 (19:54 +0000)]
build: fix experimental library versioning

The problem occurred when workaround that makes soname two digits
applied. With this change for the ABI version "20.0.1" the experimental
library version become ".so.2001".
After workaround removed in ABI version 21.0, the experimental library
version will become ".so.210".
"2001" is bigger value than "201" although it is a previous version of
the library version, this can break the version comparisons.

To fix this, introducing a temporary sub level versioning for the
experimental libraries, so that minor version comparison will continue
to work.

After change experimental libraries will follow below versioning:

DPDK version  ABI version  soname       library name
------------  -----------  ------       ------------
DPDK 19.11     20.0        .so.0.200    .so.0.200
DPDK 20.02     20.0.1      .so.0.200.1  .so.0.200.1
DPDK 20.05     20.0.2      .so.0.200.2  .so.0.200.2
DPDK 20.11     21.0        .so.0.210    .so.0.210
DPDK 21.02     21.1        .so.0.211    .so.0.211

Note: After workaround removed in DPDK 20.11 and soname switch back to
single digit this patch won't work and needs to be updated.

Fixes: f26c2b39b271 ("build: fix soname info for 19.11 compatibility")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Ray Kinsella <ray.kinsella@intel.com>
4 years agodevtools: skip experimental libraries in ABI check
David Marchand [Fri, 21 Feb 2020 15:42:53 +0000 (16:42 +0100)]
devtools: skip experimental libraries in ABI check

We don't provide ABI compatibility for experimental libraries.
Skip those libraries by catching a soname containing a version starting
with '0.'.

Align the special case for the glue libraries by using the soname too.
Once libabigail has support for it, we will have a single type of rule.

Fixes: 777014e56d07 ("devtools: add ABI checks")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: update thunderx driver guide
Harman Kalra [Fri, 7 Feb 2020 10:02:48 +0000 (15:32 +0530)]
doc: update thunderx driver guide

Updating the thunderx with loopback port support,
debugging options, new features added and correcting
some formatting issues.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/mlx5: fix inline packet size for ConnectX-4 Lx
Viacheslav Ovsiienko [Thu, 20 Feb 2020 21:18:33 +0000 (21:18 +0000)]
net/mlx5: fix inline packet size for ConnectX-4 Lx

This patch does extra inline packet size check to tune
the ConnectX-4 Lx performance in the legacy Multi-Packet Write
mode.

Fixes: 7593cf1d3500 ("net/mlx5: fix legacy multi-packet write session")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix last completed built descriptor
Viacheslav Ovsiienko [Thu, 20 Feb 2020 21:17:47 +0000 (21:17 +0000)]
net/mlx5: fix last completed built descriptor

The routine sending packets with Multi-Packet Write method assigns
the wqe_last variable with transmit descriptor (WQE - work queue entry)
being built. If send queue is close to full state, the WQE has no data
yet (trying to put the first packet) and there is no enough space
in descriptor for the next packet the WQE is discarded and the stored
wqe_last value becomes invalid - points to the discarded WQE.

The mlx5_tx_burst_request_completion() routine might set the completion
request flags in the WQE pointed by wqe_last, it is safe, but the next
mlx5_tx_burst call uses the WQE as the first free one and request
completion flags might be overwritten and completion request will be
lost causing the transmit  datapath malfunction.

Fixes: 8b581c690a54 ("net/mlx5: move Tx complete request routine")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agoapp/testpmd: fix return of port list parser
Hariprasad Govindharajan [Thu, 20 Feb 2020 17:39:03 +0000 (17:39 +0000)]
app/testpmd: fix return of port list parser

The function parse_port_list() is designed to return
unsigned int value. After sanitizing the inputs,
it is returning -1. Changed it to return 0.

Fixes: 2df00d562d20 ("app/testpmd: add --portlist option")

Signed-off-by: Hariprasad Govindharajan <hariprasad.govindharajan@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/mlx5: fix metadata split with encap action
Matan Azrad [Thu, 20 Feb 2020 14:43:30 +0000 (14:43 +0000)]
net/mlx5: fix metadata split with encap action

In order to move the mbuf metadata from the WQE to the FDB steering
domain, the PMD add for each NIC TX flow a new action to copy the
metadata register REG_A to REG_C_0.

This copy action is considered as modify header action from HW
perspective.

The HW doesn't support to do modify header action after ant
encapsulation action.

The split metadata function wrongly added the copy action in the end of
the original actions list, hence, NIC egress flow with encapsulation
action failed when the PMD worked with dv_xmeta_en mode.

Move the copy action to be before and back to back with the
encapsulation action for the aforementioned case.

Fixes: 71e254bc0294 ("net/mlx5: split Rx flows to provide metadata copy")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/mlx5: fix running without Rx queue
Shiri Kuzin [Thu, 20 Feb 2020 14:42:26 +0000 (14:42 +0000)]
net/mlx5: fix running without Rx queue

When running mlx5_dev_start in mlx5_ethdev the function calls
mlx5_dev_configure_rss_reta in order to configure the rxq's.

Before mlx5_dev_configure_rss_reta there isn't a check whether
there are rxq's and if rxq's are 0 the function fails.
For example, this command:
/build/app/test-pmd/testpmd -n 4  -w 0000:08:00.0,rx_vec_en=0
-- --burst=64 --mbcache=512 -i  --nb-cores=27  --txd=2048 --rxd=2048
--vxlan-gpe-port=6081 --mp-alloc=xbuf --rxq 0 --forward-mode=txonly
would fail.

In order to fix this issue, we should call mlx5_dev_configure_rss_reta
only if we have rxq's.

Fixes: 63bd16292c3a ("net/mlx5: support RSS on hairpin")
Cc: stable@dpdk.org
Reported-by: Sylvain Rodon <srn@nexatech.fr>
Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix match on ethertype and CVLAN tag
Dekel Peled [Thu, 20 Feb 2020 11:33:25 +0000 (13:33 +0200)]
net/mlx5: fix match on ethertype and CVLAN tag

HW supports match on one Ethertype, the Ethertype following the last
VLAN tag of the packet (see PRM).
Previous patch added specific handling for packets with VLAN tag,
after setting match on Ethertype.

This patch moves the handling of packets with VLAN tag, to be done
before and instead of setting match on Ethertype.

Previous patch also added, as part of specific handling for packets
with VLAN tag, the setting of cvlan_tag mask bit in translation of
L3 items.
In case of L3 tunnel there is no inner L2 header, so setting this
mask bit is wrong and causes match failures.

This patch adds check to make sure L2 header exists before setting
cvlan_tag mask bit for L3 items.

Fixes: 00f75a40576b ("net/mlx5: fix VLAN match for DV mode")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Tested-by: Raslan Darawsheh <rasland@mellanox.com>
4 years agonet/mlx5: fix VLAN actions in meter
Suanming Mou [Thu, 20 Feb 2020 07:45:44 +0000 (09:45 +0200)]
net/mlx5: fix VLAN actions in meter

Meter suffix subflow only has the port id and tag match item, if VLAN
push and set VLAN id actions exist in the suffix subflow, the user
defined VLAN items is required for the actions to set a correct VLAN
id.

Currently, the VLAN item stays in the meter prefix subflow. Without
the VLAN item, VLAN id or pcp will not be inherited.

Actions require the VLAN item as below:
RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN
RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID

Add a private VLAN item to copy the user defined VLAN item to the meter
suffix subflow, so the suffix subflow will have the chance to get the
correct original VLAN id and pcp value from the VLAN item.

Fixes: 9ea9b049a960 ("net/mlx5: split meter flow")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix match information in meter
Suanming Mou [Thu, 20 Feb 2020 13:53:44 +0000 (15:53 +0200)]
net/mlx5: fix match information in meter

As meter flows are split into three subflows each, the prefix subflow
with meter action color the packet, the meter subflow filters out the
colored packets, the suffix subflow applies all the remaining actions
to the passed packets.

Currently, all the user defined items are matched in the prefix flow.
Flow id tag match item is the only item added to the meter suffix
subflow. Some of the remaining actions to be applied in the suffix
subflow require more information in the match item, or the suffix
subflow will not be created successfully.

Actions require the L3/L4 type in the match items as below:
RTE_FLOW_ACTION_TYPE_SET_TP_SRC
RTE_FLOW_ACTION_TYPE_SET_TP_DST
RTE_FLOW_ACTION_TYPE_DEC_TTL
RTE_FLOW_ACTION_TYPE_SET_TTL
RTE_FLOW_ACTION_TYPE_RSS
RTE_FLOW_ACTION_TYPE_QUEUE

Inherit the match item flags from meter prefix subflow to make actions
in suffix subflow get sufficient information.

Fixes: 9ea9b049a960 ("net/mlx5: split meter flow")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix layer flags missing in metadata
Suanming Mou [Thu, 20 Feb 2020 13:53:43 +0000 (15:53 +0200)]
net/mlx5: fix layer flags missing in metadata

Metadata suffix subflow inherits the RSS needed hash_fields from the
prefix subflow as the suffix subflow only has the tag match item unable
to generate the full original hash_fields for RSS action.

Unfortunately, hash_fields will only be generated if flow has RSS
action. So it means the prefix flow won't generate the hash_fields as
the RSS action has been split to the suffix flow.

Copy the layer flags from prefix subflow to suffix subflow to help the
suffix subflow to generate the correct hash_fields itself.

Fixes: 71e254bc0294 ("net/mlx5: split Rx flows to provide metadata copy")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix layer type in header modify action
Suanming Mou [Wed, 19 Feb 2020 14:26:20 +0000 (16:26 +0200)]
net/mlx5: fix layer type in header modify action

Currently, for header modify actions after tunnel decapsulation, the
header modify actions will still select the old outermost layer type.
It will cause header modify actions get the wrong layer type.

Add the tunnel decap flag to indicate the layer type to get for header
modify actions.

Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix layer validation with decapsulation
Suanming Mou [Wed, 19 Feb 2020 14:26:19 +0000 (16:26 +0200)]
net/mlx5: fix layer validation with decapsulation

Currently, the flow validate function only validate the outermost layer
with the header modify actions. If there is decapsulation action before
the header modify action, the validation should choose the inner layer
for validation.

Add decapsulation check when validate with the header modify actions.
Choose the inner layer once there is decapsulation action.

Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix VLAN ID action offset
Suanming Mou [Wed, 19 Feb 2020 14:15:17 +0000 (16:15 +0200)]
net/mlx5: fix VLAN ID action offset

Currently, the set VLAN ID header modify action has already got the
action pointer with offset from the header modify action array, but
the configuration saves the detail to the memory of action with the
offset again. It causes double offset to set the VLAN ID action to
the wrong place in the header modify array.

Remove the offset when get the action pointer to fix that issue.

Fixes: 5f163d520cff ("net/mlx5: support modify VLAN ID on existing VLAN header")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agoapp/testpmd: fix identifier size for port attach
Wisam Jaddo [Wed, 19 Feb 2020 16:47:30 +0000 (18:47 +0200)]
app/testpmd: fix identifier size for port attach

Identifier for new port may contain white list options,
and white list options will not fit into 128 from STR_TOKEN_SIZE,
instead having 4096 char from STR_MULTI_TOKEN_SIZE will provide
better and more options

Fixes: edab33b1c01d ("app/testpmd: support port hotplug")
Cc: stable@dpdk.org
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
4 years agonet/bnxt: fix race condition when port is stopped
Kalesh AP [Thu, 20 Feb 2020 04:12:14 +0000 (09:42 +0530)]
net/bnxt: fix race condition when port is stopped

Fix a race condition between port stop and error recovery task. When io
forwarding is not started on Stingray devices, driver will not receive
the async event from FW when there is a FW reset. While exiting testpmd,
as part of port stop driver sees this event and this in turn causes a
race between port stop and error recovery task.

Fixed this by ignoring the fatal/non-fatal async event from FW while
stopping port.

Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: fix crash in port stop while handling events
Kalesh AP [Thu, 20 Feb 2020 04:12:13 +0000 (09:42 +0530)]
net/bnxt: fix crash in port stop while handling events

Check for bp->hwrm_cmd_resp_addr before using it in HWRM_PREP to avoid
segmentation fault when stop port and meanwhile receive events from FW.

Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/ice: fix queue MSI-X interrupt binding
Tao Zhu [Wed, 19 Feb 2020 10:17:12 +0000 (18:17 +0800)]
net/ice: fix queue MSI-X interrupt binding

Operator '<<' should be used instead of '<' for shifting value to be
set in MSI-X configuration register.

Old code adds 1 on even MSI-X interrupt vector index used by queue,
resulting in interrupt mapping error.

Fixes: 65dfc889d86b ("net/ice: support Rx queue interruption")
Cc: stable@dpdk.org
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agoexamples/tep_term: remove redundant info get
Xiaoyun Li [Mon, 17 Feb 2020 01:41:15 +0000 (09:41 +0800)]
examples/tep_term: remove redundant info get

Removed redundant function call of 'rte_eth_dev_info_get()' since it has
already been called earlier.

Coverity issue: 349922
Fixes: 2bb43bd4350a ("examples/tep_term: add TSO offload configuration")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoci: reorganise Travis jobs
David Marchand [Wed, 19 Feb 2020 16:36:55 +0000 (17:36 +0100)]
ci: reorganise Travis jobs

Let's prune the jobs list to limit the amount of time spent by the robot
in Travis.

Since meson enables automatically the relevant components, there is not
much gain in testing with extra_packages vs required_packages.

For a given arch/compiler/env combination, compilation is first tested
in all jobs that run tests or build the docs or run the ABI checks.
In the same context, for jobs that accumulates running tests, building
the docs etc..., those steps are independent and can be split to save
some cpu on Travis.

With this, we go down from 21 to 15 jobs.

Note: this patch requires a flush of the existing caches in Travis.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
4 years agoci: use an explicit list of Travis jobs
David Marchand [Wed, 19 Feb 2020 15:19:52 +0000 (16:19 +0100)]
ci: use an explicit list of Travis jobs

Maintaining the .travis.yml requires some knowledge of how Travis
computes the jobs list (combination of os: arch: compiler: etc...).
Let's switch to an explicit list to find all jobs at a glance.

To enhance readability, jobs have been sorted per arch/compiler with
comments to isolate blocks.

Setting required_packages for aarch64 native jobs is unnecessary,
the global addons: values are the same.

This commit does not change the jobs list (21 jobs in total).

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>