dpdk.git
5 years agovhost: replace IOTLB license with SPDX tag
Maxime Coquelin [Fri, 2 Aug 2019 06:59:09 +0000 (08:59 +0200)]
vhost: replace IOTLB license with SPDX tag

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agodoc: replace PVP guide license with SPDX tag
Maxime Coquelin [Fri, 2 Aug 2019 07:00:02 +0000 (09:00 +0200)]
doc: replace PVP guide license with SPDX tag

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agodoc: update supported i40e driver and firmware version
Zhaoyan Chen [Mon, 29 Jul 2019 03:36:21 +0000 (11:36 +0800)]
doc: update supported i40e driver and firmware version

Update supported Intel NIC driver version and firmware version

Signed-off-by: Zhaoyan Chen <zhaoyan.chen@intel.com>
5 years agoapp/testpmd: use exit instead of panic
Stephen Hemminger [Fri, 2 Aug 2019 02:51:54 +0000 (19:51 -0700)]
app/testpmd: use exit instead of panic

rte_panic causes a backtrace (which is uniformative since all
these calls are in main). Instead use rte_exit and try and make the
messages informative.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agoapp/testpmd: block secondary process
Stephen Hemminger [Fri, 2 Aug 2019 02:51:53 +0000 (19:51 -0700)]
app/testpmd: block secondary process

Since testpmd has several issues which keep it from working correctly
as a secondary process; abort if user tries to do it, rather than
running into later problems.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agoapp/testpmd: allow log level on command line
Stephen Hemminger [Fri, 2 Aug 2019 02:51:52 +0000 (19:51 -0700)]
app/testpmd: allow log level on command line

Since testpmd registers log type after processing command
line arguments, it is not possible to do:
  # testpmd --log-level='testpmd:info' ...

Fix this by initializing logtype first.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agoremove extra blank lines at end of files
Stephen Hemminger [Wed, 31 Jul 2019 14:57:38 +0000 (07:57 -0700)]
remove extra blank lines at end of files

There should not be blank lines at end of files.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agoethdev: sort experimental symbols per release
David Marchand [Wed, 31 Jul 2019 12:27:16 +0000 (14:27 +0200)]
ethdev: sort experimental symbols per release

Sort the experimental symbols per release to make it easier/quicker to
check for how long we have them.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agobus/pci: always check IOMMU capabilities
David Marchand [Mon, 5 Aug 2019 06:23:26 +0000 (08:23 +0200)]
bus/pci: always check IOMMU capabilities

IOMMU capabilities won't change and must be checked even if no PCI device
seem to be supported yet when EAL initialised.

This is to accommodate with SPDK that registers its drivers after
rte_eal_init(), especially on PPC platform where the IOMMU does not
support VA.

Fixes: 703458e19c16 ("bus/pci: consider only usable devices for IOVA mode")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Takeshi Yoshimura <tyos@jp.ibm.com>
5 years agobus/pci: remove unused x86 Linux constant
David Marchand [Fri, 2 Aug 2019 09:54:01 +0000 (11:54 +0200)]
bus/pci: remove unused x86 Linux constant

This macro is unused after a previous fix.

Fixes: fe822eb8c565 ("bus/pci: use IOVA DMA mask check when setting IOVA mode")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
5 years agoeal: hide internal function
David Marchand [Wed, 31 Jul 2019 12:07:33 +0000 (14:07 +0200)]
eal: hide internal function

This function has never been used outside of this code unit.
Mark it static and remove it from the eal internal header.

Fixes: 9e29251b2afa ("eal: thread affinity API")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
5 years agoeal: warn on legacy memory allocation requirement
Thomas Monjalon [Tue, 30 Jul 2019 17:21:53 +0000 (19:21 +0200)]
eal: warn on legacy memory allocation requirement

When using --no-huge mode, dynamic allocation is not supported.
Because of this limitation, the option --legacy-mem is implied
and -m may be needed to specify the amount of memory to allocate.
Otherwise the default amount MEMSIZE_IF_NO_HUGE_PAGE will be allocated.

The option --socket-mem can also be used with --legacy-mem
when hugepages are supported.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agoci: enable unit tests with Travis
Aaron Conole [Fri, 2 Aug 2019 21:25:52 +0000 (17:25 -0400)]
ci: enable unit tests with Travis

When building under Travis (or another linux CI service), enable
running the fast-tests when the RUN_TESTS environment variable is set.

For the Travis service, introduce two new shared builds, since the
shared builds are the ones passing.  Builds that are statically
linked still show some issues in some of the eal_flags tests.  We make
new builds for this, rather than piggybacking, because 'at a glance'
it is difficult to determine why a build fails, and if tests were
enabled for all builds, then looking at the logs for any build would
take a significant amount of time.

Finally, the command to invoke fast tests includes a timeout
multiplier, since some CI environments don't have enough resources to
complete the tests in the default 10s timeout period.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Michael Santana <msantana@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
5 years agotest: allow running shared build without installing
Michael Santana [Fri, 2 Aug 2019 21:25:51 +0000 (17:25 -0400)]
test: allow running shared build without installing

Currently many unit tests fail when running tests under shared builds.
This happens because of missing driver dependencies. This is fixed by
explicitly linking in missing drivers for the test application.

before and after (clang):
https://travis-ci.com/Maickii/dpdk-2/jobs/212329160#L623
https://travis-ci.com/Maickii/dpdk-2/jobs/212335912#L620

Suggested-by: Bruce Richardson <bruce.richardson@intel.com>
Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Michael Santana <msantana@redhat.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
5 years agotest/eal: fix command array sizes
David Marchand [Wed, 31 Jul 2019 18:56:30 +0000 (20:56 +0200)]
test/eal: fix command array sizes

Following removal of -c and -n options, the array should have been
shrunk to avoid launch_proc to access unitialised strings.

Fixes: b4dbacdb1ad7 ("test/eal: set core mask/list config only in dedicated test")
Fixes: 501fa9a40298 ("test/eal: set memory channel config only in dedicated test")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Michael Santana <msantana@redhat.com>
5 years agotest: remove link to ixgbe/i40e with meson
David Marchand [Wed, 31 Jul 2019 07:55:34 +0000 (09:55 +0200)]
test: remove link to ixgbe/i40e with meson

The tests do not depend on ixgbe or i40e drivers, just remove this
explicit link that likely comes from a copy/paste from testpmd.

Fixes: b5dc795a8a55 ("test: build app with meson as dpdk-test")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
5 years agoacl: fix undefined behavior of bit shifts
Aaron Conole [Wed, 31 Jul 2019 15:43:11 +0000 (11:43 -0400)]
acl: fix undefined behavior of bit shifts

Left-shift of an integer constant is represented as 'int' type, but a left
shift of 1 by 31 bits in 'int' is undefined.  Use the U suffix to force
a representation as unsigned.

Caught while running with ubsan under gcc.

Fixes: dc276b5780c2 ("acl: new library")
Cc: stable@dpdk.org
Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
5 years agodoc: fix link in release notes
Jerin Jacob [Fri, 2 Aug 2019 05:52:45 +0000 (11:22 +0530)]
doc: fix link in release notes

Fix the following doc build warning by correcting path.

doc/guides/rel_notes/release_18_05.rst:285:
WARNING: unknown document: ../rawdevs/ifpga_rawdev

Fixes: 473c88f9b391 ("drivers/raw: remove rawdev from directory names")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agoversion: 19.08-rc3
Thomas Monjalon [Tue, 30 Jul 2019 22:18:46 +0000 (00:18 +0200)]
version: 19.08-rc3

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
5 years agotest/flow_classify: fix undefined behavior
Aaron Conole [Tue, 30 Jul 2019 21:31:23 +0000 (17:31 -0400)]
test/flow_classify: fix undefined behavior

The unit test for the flow classify introduced undefined behavior by using
a corrupted list.  Remove these tests as the invalid data is impossible to
detect with the current API.

Fixes: 9c9befea4f57 ("test: add flow classify unit tests")
Cc: stable@dpdk.org
Signed-off-by: Aaron Conole <aconole@redhat.com>
5 years agodevtools: support FreeBSD
Olivier Matz [Thu, 11 Jul 2019 14:25:30 +0000 (16:25 +0200)]
devtools: support FreeBSD

- As "readlink -e" and "readlink -m" do not exist on freebsd,
  use "readlink -f", it should not have any impact in these cases.
- "sed -ri" is invalid on freebsd and should be replaced by
  "sed -ri=''"
- Use gmake instead of make.

This fixes the following command:
  SYSDIR=/usr/src/sys ./devtools/test-build.sh \
    -j4 x86_64-native-freebsd-gcc

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
5 years agodevtools: fix building kernel component tags
Jerin Jacob [Wed, 17 Jul 2019 15:54:42 +0000 (21:24 +0530)]
devtools: fix building kernel component tags

Update devtools/build-tags.sh to account the kernel
components under in kernel directory.

Fixes: acaa9ee991b5 ("move kernel modules directories")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
5 years agousertools: replace unsafe input function
Andrius Sirvys [Mon, 8 Apr 2019 13:54:41 +0000 (14:54 +0100)]
usertools: replace unsafe input function

LGTM static code analysis tool reports that the function 'input' is
unsafe. Changed to use raw_input which then converts it using
ast.literal_eval() which is safe.

Fixes: d1b94da4a4e0 ("usertools: add client script for telemetry")
Cc: stable@dpdk.org
Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
5 years agousertools: print binding errors to stderr
Anatoly Burakov [Thu, 25 Jul 2019 14:21:10 +0000 (15:21 +0100)]
usertools: print binding errors to stderr

Bring consistency to error messages and output them to stderr.
Also, whenever the script tells the user to "check usage", don't
tell the user to do it and just display usage instead.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agousertools: check if module is loaded before binding
Anatoly Burakov [Thu, 25 Jul 2019 14:21:09 +0000 (15:21 +0100)]
usertools: check if module is loaded before binding

Currently, if an attempt is made to bind a device to a driver that
is not loaded, a confusing and misleading error message appears.
Fix it so that, before binding to the driver, we actually check if
it is loaded in the kernel first.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agousertools: add error on missing driver to bind
Anatoly Burakov [Thu, 25 Jul 2019 14:21:08 +0000 (15:21 +0100)]
usertools: add error on missing driver to bind

A common user error is to forget driver to which the PCI devices should
be bound to. Currently, the error message in this case looks unhelpful
misleading and indecipherable to anyone but people who know how devbind
works.

Fix this by checking if the driver string is actually a valid device
string. If it is, we assume that the user has just forgot to specify the
driver, and display appropriate error. We also assume that no one will
name their driver in a format that looks like a PCI address, but that
seems like a reasonable assumption to make.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agodoc: update release notes for 19.08
John McNamara [Tue, 30 Jul 2019 13:24:27 +0000 (14:24 +0100)]
doc: update release notes for 19.08

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

Signed-off-by: John McNamara <john.mcnamara@intel.com>
5 years agodoc: add tested Intel platforms with Intel NICs
Wenjie Li [Mon, 29 Jul 2019 05:29:22 +0000 (13:29 +0800)]
doc: add tested Intel platforms with Intel NICs

Add tested Intel platforms with Intel NICs to v19.08 release note.

Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agodoc: update features supported by mlx
Thomas Monjalon [Tue, 30 Jul 2019 15:06:21 +0000 (17:06 +0200)]
doc: update features supported by mlx

Flow control was not documented as a supported feature
since the first fill of features matrix for mlx drivers.

Flow API and CRC offload flag support in mlx4 were missing in the
feature matrix when they were implemented (see below commits).

Fixes: 46d5736a7049 ("net/mlx4: support basic flow items and actions")
Fixes: ce07b1514d59 ("net/mlx4: fix CRC stripping capability report")
Fixes: e86b85ca757b ("doc: fill nics features matrix for mlx")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@mellanox.com>
5 years agodoc: remove unused maintainer role from guide
Thomas Monjalon [Wed, 17 Jul 2019 18:10:07 +0000 (20:10 +0200)]
doc: remove unused maintainer role from guide

The backup maintainer role is not explicitly used in the file MAINTAINERS.
Listing names in a priority order is preferred and more flexible
than explicit named roles.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agomaintainers: add co-maintainer to sched library
Jasvinder Singh [Fri, 26 Jul 2019 16:42:15 +0000 (17:42 +0100)]
maintainers: add co-maintainer to sched library

Add myself as a co-maintainer to dpdk sched library.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
5 years agoeal: fix control thread affinity with --lcores
David Marchand [Tue, 30 Jul 2019 15:05:22 +0000 (17:05 +0200)]
eal: fix control thread affinity with --lcores

The ctrl thread cpu affinity setting has been broken when using --lcores.

Using -l/-c options makes each lcore associated to a physical cpu in a 1:1
fashion.
On the contrary, when using --lcores, each lcore cpu affinity can be set
to a list of any online cpu on the system.

To handle both cases, each lcore cpu affinity is considered and removed
from the process startup cpu affinity.

Introduced macros to manipulate dpdk cpu sets in both Linux and FreeBSD.

Examples on a 8 cores Linux system:

$ cd /sys/fs/cgroup/cpuset/
$ mkdir dpdk
$ cd dpdk
$ echo 4-7 > cpuset.cpus
$ echo 0 > cpuset.mems
$ echo $$ > tasks

Before the fix:
$ ./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
 --no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048

8427 cpu_list=4-5,7 testpmd
8428 cpu_list=4-6 eal-intr-thread
8429 cpu_list=4-6 rte_mp_handle
8430 cpu_list=4-5,7 lcore-slave-7

$ taskset -c 7 \
 ./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
 --no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048

EAL: Detected 8 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Failed to create thread for interrupt handling
EAL: FATAL: Cannot init interrupt-handling thread
EAL: Cannot init interrupt-handling thread
PANIC in main():
Cannot init EAL

After the fix:
$ ./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
 --no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048

15214 cpu_list=4-5,7 testpmd
15215 cpu_list=6 eal-intr-thread
15216 cpu_list=6 rte_mp_handle
15217 cpu_list=4-5,7 lcore-slave-7

$ taskset -c 7 \
 ./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
 --no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048

15297 cpu_list=4-5,7 testpmd
15298 cpu_list=4-5,7 eal-intr-thread
15299 cpu_list=4-5,7 rte_mp_handle
15300 cpu_list=4-5,7 lcore-slave-7

Bugzilla ID: 322
Fixes: c3568ea37670 ("eal: restrict control threads to startup CPU affinity")
Cc: stable@dpdk.org
Reported-by: Johan Källström <johan.kallstrom@ericsson.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
5 years agoexamples/l3fwd: fix unaligned memory access on x86
Hariprasad Govindharajan [Tue, 30 Jul 2019 13:26:38 +0000 (14:26 +0100)]
examples/l3fwd: fix unaligned memory access on x86

Fix unaligned memory access when reading IPv6 header which
leads to segmentation fault by changing aligned memory read
to unaligned memory read.

Bugzilla ID: 279
Fixes: 64d3955de1de ("examples/l3fwd: fix ARM build")
Cc: stable@dpdk.org
Signed-off-by: Hariprasad Govindharajan <hariprasad.govindharajan@intel.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Tested-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
5 years agonet/bnxt: set checksum flags in vector Rx
Kalesh AP [Mon, 29 Jul 2019 21:28:25 +0000 (17:28 -0400)]
net/bnxt: set checksum flags in vector Rx

Fixed to return the checksum status of rx packets by setting
"ol_flags" correctly in vector mode receive.

These changes have been there for non vector mode receive.
In vector mode receive also indicate inner and outer checksum
errors individually in "ol_flag" to indicate L3 and L4 error.

Fixes: bc4a000f2f53 ("net/bnxt: implement SSE vector mode")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
5 years agonet/bnxt: fix context memory allocation
Kalesh AP [Mon, 29 Jul 2019 21:28:05 +0000 (17:28 -0400)]
net/bnxt: fix context memory allocation

There is a bug in context memory allocation because of which
it results in reusing the context memory allocated for the first
port while allocating memory for next ports.

Fix it by passing the port id in the name field while
allocating context memory.

Fixes: f8168ca0e690 ("net/bnxt: support thor controller")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
5 years agonet/virtio: fix build
Jerin Jacob [Tue, 30 Jul 2019 11:04:06 +0000 (16:34 +0530)]
net/virtio: fix build

Add extern to variable declaration to avoid some compiler treating it
as variable definition.

build error log:

lib/librte_pmd_virtio.a(vhost_kernel.o):(.rodata+0x110):
multiple definition of `vhost_msg_strings'
lib/librte_pmd_virtio.a(vhost_user.o):(.data.rel.ro.local+0x0):
first defined here
lib/librte_pmd_virtio.a(virtio_user_dev.o):(.rodata+0xe8):
multiple definition of `vhost_msg_strings'
lib/librte_pmd_virtio.a(vhost_user.o):(.data.rel.ro.local+0x0):
first defined here

Fixes: 33d24d65fe2b ("net/virtio-user: abstract backend operations")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agodrivers/raw: standardize naming
Bruce Richardson [Fri, 5 Jul 2019 09:34:01 +0000 (10:34 +0100)]
drivers/raw: standardize naming

The driver names for rawdevs were both different in make and meson builds
and were non-standard in the make version in that some included "rawdev" in
the name while others didn't.

Therefore, for global consistency of naming, we can use "rte_rawdev" rather
than "rte_pmd" for the prefix for the libraries. While most other driver
categories use "rte_pmd" as a prefix, there is precedent for this in the
mempool drivers use "rte_mempool" as a prefix.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
5 years agodrivers/raw: remove rawdev from directory names
Bruce Richardson [Fri, 5 Jul 2019 09:34:00 +0000 (10:34 +0100)]
drivers/raw: remove rawdev from directory names

The ifpga and skeleton rawdev drivers included "rawdev" in their directory
names, which was superfluous given that they were in the drivers/raw
directory. Shorten the names via this patch.

For meson builds, this will rename the final library .so/.a files
produced, but those will be renamed again later via a patch to
standardize rawdev names.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
5 years agotest/rcu: remove redundant header file
Ruifeng Wang [Wed, 24 Jul 2019 03:25:38 +0000 (11:25 +0800)]
test/rcu: remove redundant header file

RCU library now includes stdbool.h header itself.
There is no need to include this header file in RCU user files.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
5 years agotest/table: decrease memory requirement
Michael Santana [Mon, 29 Jul 2019 15:18:34 +0000 (11:18 -0400)]
test/table: decrease memory requirement

This patch reduces the memory footprint of tables for the unit test.
Lower memory footprint means the test now passes when trying to allocate
the tables. This patch is mainly to make table_autotest pass in CI.

Signed-off-by: Michael Santana <msantana@redhat.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
5 years agotest/eal: fix --socket-mem option
Vamsi Attunuru [Mon, 29 Jul 2019 08:08:50 +0000 (10:08 +0200)]
test/eal: fix --socket-mem option

eal flag autotest fails when multiple mem size flags are passed to
--socket-mem option irrespective of RTE_MAX_NUMA_NODES and the number of
available sockets on the test system.

Fixes: 45f1b6e8680a ("app: add new tests on eal flags")
Cc: stable@dpdk.org
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Vamsi Attunuru <vattunuru@marvell.com>
Tested-by: Vamsi Attunuru <vattunuru@marvell.com>
5 years agotest: enable installing app with meson
Anatoly Burakov [Wed, 24 Jul 2019 15:47:31 +0000 (16:47 +0100)]
test: enable installing app with meson

Currently, the test app is not being installed by default when
built and installed with meson build system. Fix that to enable
installation of the test app alongside other DPDK apps.

Fixes: b5dc795a8a55 ("test: build app with meson as dpdk-test")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agoexamples/rxtx_callbacks: fix HW timestamp config
Harman Kalra [Tue, 30 Jul 2019 07:46:45 +0000 (07:46 +0000)]
examples/rxtx_callbacks: fix HW timestamp config

Since all PMDs doesn't implement per queue offload capabilities but
supports RX timestamping and also since rx_offload_capa includes all
rx_queue_offload_capa's. Hence moving the logic to enable HW timestamp
via DEV_RX_OFFLOAD_TIMESTAMP flag before device configuration so that
this application can work with all PMDs.

Fixes: cd1dadeb9b2a ("examples/rxtx_callbacks: support HW timestamp")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
5 years agoexamples/qos_sched: add more TC to red configuration
Jasvinder Singh [Wed, 24 Jul 2019 12:27:19 +0000 (13:27 +0100)]
examples/qos_sched: add more TC to red configuration

Add RED configuration to more traffic classes in app configuration
files.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
5 years agoeal: pick IOVA as PA if IOMMU is not available
Anatoly Burakov [Mon, 29 Jul 2019 13:52:34 +0000 (14:52 +0100)]
eal: pick IOVA as PA if IOMMU is not available

When IOMMU is not available, /sys/kernel/iommu_groups will not be
populated. This is happening since at least 3.6 when VFIO support
was added. If the directory is empty, EAL should not pick IOVA as
VA as the default IOVA mode.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
5 years agoexamples/ptpclient: fix delay request message
Harman Kalra [Thu, 25 Jul 2019 14:24:43 +0000 (14:24 +0000)]
examples/ptpclient: fix delay request message

Observed an issue with the length and domain number of the
delay request message sent out by the client. Due to which delay
response from master was not received.

Fixes: ab129e9065a5 ("examples/ptpclient: add minimal PTP client")
Cc: stable@dpdk.org
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
5 years agoexamples/ip_frag: remove Tx fast free offload flag
Sunil Kumar Kori [Thu, 25 Jul 2019 08:24:10 +0000 (13:54 +0530)]
examples/ip_frag: remove Tx fast free offload flag

Application uses different pool to allocate direct and indirect
mbufs which are further spliced together to consturct a fragmented
packet and same is transmitted over the port which is configured
with DEV_TX_OFFLOAD_MBUF_FAST_FREE enabled i.e. all segments
must belong to the same pool. But constructed packet violates
the conditions.

So fixing DEV_TX_OFFLOAD_MBUF_FAST_FREE flag during device
configuration.

Fixes: fdb9eff67f0c ("examples/ip_fragmentation: convert to new offloads API")
Cc: stable@dpdk.org
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
5 years agoapp/testpmd: rename ambiguous VF config variable
David Marchand [Fri, 26 Jul 2019 07:59:49 +0000 (09:59 +0200)]
app/testpmd: rename ambiguous VF config variable

Caught while looking at the rx offloads code.

rx_mode is a global variable for the default rx configuration.
Rename the local rx_mode variable in cmd_set_vf_rxmode_parsed.

Fixes: 7741e4cf16c0 ("app/testpmd: VMDq and DCB updates")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
5 years agoapp/testpmd: fix eth packet dump for small buffers
David Marchand [Wed, 24 Jul 2019 10:58:56 +0000 (12:58 +0200)]
app/testpmd: fix eth packet dump for small buffers

In the rather unlikely case where the first segment is too small to
contain an ethernet header, we can't go and directly dereference the
mbuf data buffer.

Using rte_pktmbuf_read is a little more expensive but this is still
acceptable for a debugging feature.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
5 years agodistributor: fix livelock on flush
Liang Ma [Thu, 25 Jul 2019 09:03:01 +0000 (10:03 +0100)]
distributor: fix livelock on flush

The Distributor autotest can lock if ran enough times. Worker and
distributor threads get into a livelock situation waiting on each
other.

To repeat:
`while sudo sh -c "echo 'distributor_autotest' |
./build/app/test/dpdk-test"; do :; done`

The root cause is where we are flushing on exit, and do not wait for
all worker packets to be returned before exiting.
Add a delay on flush so that all worker packets are returned before
completing the flush.

Bugzilla ID: 316
Fixes: 775003ad2f96 ("distributor: add new burst-capable library")
Cc: stable@dpdk.org
Reported-by: Michael Santana <msantana@redhat.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Tested-by: Michael Santana <msantana@redhat.com>
5 years agodoc: add SPDX tag for OPDL guide
Xiaolong Ye [Mon, 29 Jul 2019 07:32:18 +0000 (15:32 +0800)]
doc: add SPDX tag for OPDL guide

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agodoc: replace license text with SPDX tag
Jerin Jacob [Mon, 29 Jul 2019 13:17:18 +0000 (18:47 +0530)]
doc: replace license text with SPDX tag

Replace mvasm and mvpp2 Marvell PMD driver
documentation license text with SPDX tag.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Liron Himi <lironh@marvell.com>
5 years agoeal: replace license text with SPDX tag
Hemant Agrawal [Mon, 29 Jul 2019 07:33:14 +0000 (13:03 +0530)]
eal: replace license text with SPDX tag

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agoservice: remove experimental banner in API description
David Marchand [Tue, 23 Jul 2019 11:00:09 +0000 (13:00 +0200)]
service: remove experimental banner in API description

This was missed when promoting this API to stable.

Fixes: 7a0ac7cdb454 ("service: promote experimental functions to stable")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Gage Eads <gage.eads@intel.com>
5 years agoeal: sort experimental symbols per release
David Marchand [Sat, 27 Jul 2019 07:21:33 +0000 (09:21 +0200)]
eal: sort experimental symbols per release

Sort the experimental symbols per release to make it easier/quicker to
check for how long we have them.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Michael Santana <msantana@redhat.com>
5 years agoeal: revert parsing option --telemetry
Sean Morrissey [Wed, 24 Jul 2019 15:20:59 +0000 (16:20 +0100)]
eal: revert parsing option --telemetry

This reverts commit debacba0297fbe214b4185a9791e6a9fdf6642ba.

Reverting this patch as it currently breaks the initialization of
telemetry, more investigation is ongoing to fix the issue for the
printed error message for unrecognized argument.

Fixes: debacba0297f ("eal: fix parsing option --telemetry")
Cc: stable@dpdk.org
Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
5 years agoigb_uio: fix build on Linux 5.3 for fall through
Ferruh Yigit [Mon, 29 Jul 2019 12:32:16 +0000 (13:32 +0100)]
igb_uio: fix build on Linux 5.3 for fall through

build error:
kernel/linux/igb_uio/igb_uio.c:
   In function ‘igbuio_pci_enable_interrupts’:
   kernel/linux/igb_uio/igb_uio.c:230:6:
   error: this statement may fall through
   [-Werror=implicit-fallthrough=]
  230 |   if (pci_alloc_irq_vectors(udev->pdev, 1, 1, ....
kernel/linux/igb_uio/igb_uio.c:240:2: note: here
  240 |  case RTE_INTR_MODE_MSI:
      |  ^~~~

The build error is caused by Linux kernel commit in 5.3 that enables the
"-Wimplicit-fallthrough=3" gcc flag.
Commit a035d552a93b ("Makefile: Globally enable fall-through warning")

To fix the error, either a gcc attribute can be provided [1] or a code
comment with some defined syntax need to be provided [2], since there is
already comments, updated them slightly to match the required syntax to
fix the build error.

[1]
"__attribute__ ((fallthrough));"

[2]
[ \t.!]*([Ee]lse,? |[Ii]ntentional(ly)? )?
fall(s | |-)?thr(ough|u)[ \t.!]*(-[^\n\r]*)?

Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agocommon/octeontx2: prevent STP instruction fissure
Jerin Jacob [Fri, 26 Jul 2019 05:24:43 +0000 (10:54 +0530)]
common/octeontx2: prevent STP instruction fissure

OTX2 AP core can sometimes fissure STP instructions when it is more
optimal to send such writes into the pipeline as 2 separate
instructions. However registers should be excluded from such
optimization. This commit ensures that no CSR write is ever fissured
by introducing zero cost workaround by setting STP pre-index by zero to
make sure OTX2 AP core prevent fissure.

Fixes: 8a4f835971f5 ("common/octeontx2: add IO handling APIs")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
5 years agodrivers/octeontx2: fix recursive interrupts
Harman Kalra [Thu, 25 Jul 2019 10:26:54 +0000 (10:26 +0000)]
drivers/octeontx2: fix recursive interrupts

In case of QINT interrupt occurrence, SW fails to clear the QINT
line resulting in recursive interrupts because currently interrupt
handler gets the cause of the interrupt by reading
NIX_LF_RQ[SQ/CQ/AURA/POOL]_OP_INT but does not write 1 to clear
RQ[SQ/CQ/ERR]_INT field in respective NIX_LF_RQ[SQ/CQ/AURA/POOL]_OP_INT
registers.

Fixes: dc47ba15f645 ("net/octeontx2: handle queue specific error interrupts")
Fixes: 50b95c3ea7af ("mempool/octeontx2: add NPA IRQ handler")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agoevent/octeontx2: fix null dereference
Pavan Nikhilesh [Wed, 24 Jul 2019 12:06:34 +0000 (17:36 +0530)]
event/octeontx2: fix null dereference

Fix NULL dereference after rte_realloc and add extra NULL checks.
Fix few memory leak with kvargs.

Coverity issue: 345023, 345022, 345009, 345011, 345026, 344997, 344990
Fixes: ffa4ec0b6063 ("event/octeontx2: allow adapters to resize inflight buffers")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
5 years agonet/mlx5: fix Tx completion request generation
Viacheslav Ovsiienko [Mon, 29 Jul 2019 12:41:05 +0000 (12:41 +0000)]
net/mlx5: fix Tx completion request generation

The packets transmitting in mlx5 is performed by building
Tx descriptors (WQEs) and sending last ones to the NIC.
The descriptor can contain the special flags, telling the NIC
to generate Tx completion notification (CQEs). At the beginning
of tx_burst() routine PMD checks whether there are some Tx
completions and frees the transmitted packet buffers.

The flags to request completion generation must be set once
per specified amount of packets to provide uniform stream
of completions and freeing the Tx queue in uniform fashion.
The previous implementation sets the completion request
generation once per burst, if burst size if big enough it may
latency in CQE generation and freeing large amount of buffers
in tx_burst routine on multiple completions which also
affects the latency and even causes the Tx queue overflow
and Tx drops.

This patches enforces the completion request will be set
in the exact Tx descriptor if specified amount of packets
is already sent.

Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
5 years agonet/mlx5: fix ConnectX-4LX minimal inline data limit
Viacheslav Ovsiienko [Mon, 29 Jul 2019 12:41:04 +0000 (12:41 +0000)]
net/mlx5: fix ConnectX-4LX minimal inline data limit

Mellanox ConnectX-4LX NIC in configurations with disabled
E-Switch can operate without minimal required inline data
into Tx descriptor. There was the hardcoded limit set to
18B in PMD, fixed to be no limit (0B).

Fixes: 38b4b397a57d ("net/mlx5: add Tx configuration and setup")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
5 years agonet/mlx5: fix Tx completion descriptors fetching loop
Viacheslav Ovsiienko [Mon, 29 Jul 2019 12:41:03 +0000 (12:41 +0000)]
net/mlx5: fix Tx completion descriptors fetching loop

This patch limits the amount of fetched and processed
completion descriptors in one tx_burst routine call.

The completion processing involves the buffer freeing
which may be time consuming and introduce the significant
latency, so limiting the amount of processed completions
mitigates the latency issue.

Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
5 years agonet/mlx5: allow LRO per Rx queue
Matan Azrad [Mon, 29 Jul 2019 11:53:29 +0000 (11:53 +0000)]
net/mlx5: allow LRO per Rx queue

Enabling LRO offload per queue makes sense because the user will
probably want to allocate different mempool for LRO queues - the LRO
mempool mbuf size may be bigger than non LRO mempool.

Change the LRO offload to be per queue instead of per port.

If one of the queues is with LRO enabled, all the queues will be
configured via DevX.

If RSS flows direct TCP packets to queues with different LRO enabling,
these flows will not be offloaded with LRO.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: allow implicit LRO flow
Matan Azrad [Mon, 29 Jul 2019 11:53:28 +0000 (11:53 +0000)]
net/mlx5: allow implicit LRO flow

When a user configures LRO in the port offloads, he probably wants each
TCP packet will have a chance to open an LRO session.

The PMD wasn't configure LRO in the flow TIR if the flow is not
explicitly configured TCP item despite the flow included TCP traffic.

For example, the next flows were not LRO offloaded:
pattern eth / end, pattern eth / ip / end, pattern eth / ipv6 / end.

Enable LRO configuration for all the TIRs if LRO is configured in the
port.

No performance impact for non-LRO traffic in these TIRs.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: handle LRO packets in regular Rx queue
Matan Azrad [Mon, 29 Jul 2019 11:53:27 +0000 (11:53 +0000)]
net/mlx5: handle LRO packets in regular Rx queue

When LRO offload is configured in Rx queue, the HW may coalesce TCP
packets from same TCP connection into single packet.

In this case the SW should fix the relevant packet headers because
the HW doesn't update them according to the new created packet
characteristics but provides the update values in the CQE.

Add update header code to the regular Rx burst function to support LRO
feature.

Make sure the first mbuf has enough space to include each TCP header,
otherwise the header update may cross mbufs what complicates the
operation too match.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: fix DevX Rx queue memory alignment
Matan Azrad [Mon, 29 Jul 2019 11:53:26 +0000 (11:53 +0000)]
net/mlx5: fix DevX Rx queue memory alignment

The alignment requested by the FW for WQ buffer allocation is 512.

Change it from cache line alignment to 512.

Fixes: dc9ceff73c99 ("net/mlx5: create advanced RxQ via DevX")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: allow LRO in regular Rx queue
Matan Azrad [Mon, 29 Jul 2019 11:53:25 +0000 (11:53 +0000)]
net/mlx5: allow LRO in regular Rx queue

LRO support was only for MPRQ, hence mprq Rx burst was selected when
LRO was configured in the port.

The current support for MPRQ is suffering from bad memory utilization
since an external mempool is allocated by the PMD for the packets data
in addition to the user mempool, besides that, the user may get packet
data addresses which were not configured by him.

Even though MPRQ has the best performance for packet receiving in the
most cases and because of the above facts it is better to remove the
automatic MPRQ select when LRO is configured.

Move MPRQ to be selected only when the user force it by the PMD
arguments including LRO case.

Allow LRO offload using the regular RQ with the regular Rx burst
function.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: fix DevX Rx queue type
Matan Azrad [Mon, 29 Jul 2019 11:53:24 +0000 (11:53 +0000)]
net/mlx5: fix DevX Rx queue type

When the Rx queue is not in striding RQ mode it should be configured as
cyclic RQ.

In this case the type remains 0 which means linked-list type.

Set the RQ type to be cyclic when the queue is not in striding RQ mode.

Fixes: dc9ceff73c99 ("net/mlx5: create advanced RxQ via DevX")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: fix DevX scattered Rx queue size
Matan Azrad [Mon, 29 Jul 2019 11:53:23 +0000 (11:53 +0000)]
net/mlx5: fix DevX scattered Rx queue size

The WQ size configuration via DevX didn't take into account the maximum
number of segments per packet what wrongly caused to configure bigger
WQE size than the size expected by the PMD in other places.

The scatter mode stride size should be the size of segment multiplied
by the number of maximum segments per packet.
The number of WQEs per WQ should be the number of descriptors divided by
the number of the maximum segments per packet.

Fix the size calculations to the above rule.

Fixes: dc9ceff73c99 ("net/mlx5: create advanced RxQ via DevX")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: support mbuf headroom for LRO packet
Matan Azrad [Mon, 29 Jul 2019 11:53:22 +0000 (11:53 +0000)]
net/mlx5: support mbuf headroom for LRO packet

Patch [1] zeroes the mbuf headroom when the port is configured with LRO
because when working with more than one stride per packet the HW cannot
guaranty an headroom in the start stride of each packet.

Change the solution to support mbuf headroom by adding an empty buffer
as the first packet segment, scatter mode must be enabled to support it.

[1] http://patches.dpdk.org/patch/56912/

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: remove redundant offload flag reset
Matan Azrad [Mon, 29 Jul 2019 11:53:21 +0000 (11:53 +0000)]
net/mlx5: remove redundant offload flag reset

When mbuf is allocated by rte_pktmbuf_alloc the offload flag is reset by
it, so data-path function should not do it again.

Remove the above offload flag reset from MPRQ data-path.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: limit LRO size to maximum Rx packet
Matan Azrad [Mon, 29 Jul 2019 11:53:20 +0000 (11:53 +0000)]
net/mlx5: limit LRO size to maximum Rx packet

The field max_rx_pkt_len in Rx configuration indicates the maximum size
for Rx packet to be received.

There was no any field to indicate the maximum size of LRO packet to be
received by the application.

Assuming the user configures max_rx_pkt_len as the maximum LRO packet
length when LRO is configured on the port, the PMD limits the maximum
LRO packet size received from HW to be max_rx_pkt_len.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: fix Rx scatter mode validation
Matan Azrad [Mon, 29 Jul 2019 11:53:19 +0000 (11:53 +0000)]
net/mlx5: fix Rx scatter mode validation

If the mbuf size of the Rx mempool supplied by the user in the Rx setup
is unable to contain the maximum Rx packet length in addition to the
mbuf head-room, the Rx scatter offload must be configured. Otherwise,
there is not enough space in single mbuf to contain a packet with size
of the maximum Rx packet length.

The PMD did not return an error in the above mentioned case.

Return an error in the above case.

Fixes: 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")
Fixes: edad38fcd00e ("net/mlx: enhance Rx scatter mode detection")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/ice: fix LLDP forward
Ying A Wang [Sun, 28 Jul 2019 20:41:44 +0000 (04:41 +0800)]
net/ice: fix LLDP forward

The patch fix the issue that LLDP packet can't be forwarded to host.

Fixes: 59d151de6673 ("net/ice: stop LLDP by default")
Cc: stable@dpdk.org
Signed-off-by: Ying A Wang <ying.a.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agodoc: replace sfc license text with SPDX tag
Andrew Rybchenko [Mon, 29 Jul 2019 13:19:02 +0000 (14:19 +0100)]
doc: replace sfc license text with SPDX tag

Fix license from BSD-2-Clause to BSD-3-Clause since the file was
lost on the driver license change.

Bump copyright year.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agoethdev: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:39 +0000 (00:43 +0800)]
ethdev: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agoeal: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:43 +0000 (00:43 +0800)]
eal: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agohash: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:42 +0000 (00:43 +0800)]
hash: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agolpm: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:40 +0000 (00:43 +0800)]
lpm: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agoapp/eventdev: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:38 +0000 (00:43 +0800)]
app/eventdev: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agoexamples/qos_sched: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:37 +0000 (00:43 +0800)]
examples/qos_sched: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
5 years agonet/vmxnet3: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:36 +0000 (00:43 +0800)]
net/vmxnet3: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agonet/e1000: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:35 +0000 (00:43 +0800)]
net/e1000: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agonet/i40e: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:34 +0000 (00:43 +0800)]
net/i40e: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agonet/ixgbe: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:33 +0000 (00:43 +0800)]
net/ixgbe: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agonet/enic: restore default log level to info
John Daley [Fri, 26 Jul 2019 20:12:46 +0000 (13:12 -0700)]
net/enic: restore default log level to info

Prior to the fix, RTE_LOGTYPE_INFO messages were displayed by default.
After the fix, only NOTICE level and higher were displayed by default
and INFO level were not. There are INFO level vNIC config related
messages which customers and tech support currently depend on for
debugging and so on and to suddenly hide these messages is not a good
idea.

This patch changes the default log level to RTE_LOG_INFO for enic so
messages are printed as before the fix.

Fixes: bbd8ecc05434 ("net/enic: remove PMD log type references")

Signed-off-by: John Daley <johndale@cisco.com>
5 years agonet/octeontx2: support GRE key parsing
Kiran Kumar K [Fri, 26 Jul 2019 09:03:03 +0000 (14:33 +0530)]
net/octeontx2: support GRE key parsing

Adding support to parse GRE KEY for octeontx2 Flow.
Matching on GRE Key will only work, if checksum and routing
bits in the GRE header are equal to 0.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/octeontx2: support read clock
Harman Kalra [Sun, 28 Jul 2019 09:09:45 +0000 (09:09 +0000)]
net/octeontx2: support read clock

This patch implements read clock api whose purpose is to return
raw clock ticks. Using this API real time ticks spent in
processing a packet can be known:
    <read_clock val at any time> - mbuf->timestamp

Calling mbox for reading raw clock ticks in fastpath is very
expensive so its value is derived from time stamp counter(tsc)
using freq multiplier (ratio of raw clock ticks and tsc) and clock
delta (by how much tsc is lagging from raw clock value).

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/octeontx2: fix PTP performance
Harman Kalra [Sun, 28 Jul 2019 09:09:38 +0000 (09:09 +0000)]
net/octeontx2: fix PTP performance

A huge drop in per core MPPS value was observed when PTP stack is
enabled. The reason behind the bottleneck is HW serialises the
transfer of all SQEs, which seeks timestamp capture, on the same
send DMA path. Hence only those packets which requires timestamp
capture should set SETTSTAMP in send mem alg.
With this patch timestamping would be done only for those packets
with PKT_TX_IEEE1588_TMST set.

Fixes: fb3ae0951abd ("net/octeontx2: support Tx")
Fixes: 8980a153006b ("event/octeontx2: support PTP for SSO")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/octeontx2: fix PTP enable via Rx offload flags
Harman Kalra [Sat, 27 Jul 2019 13:56:22 +0000 (13:56 +0000)]
net/octeontx2: fix PTP enable via Rx offload flags

Earlier implementation for enabling ptp via RX offload flag was
causing segmentation fault as it was getting executed in the
device configuration stage where RX and TX queues were not
configured. As in the ptp enable process rx queues are used for
mbuf setup while tx queues are used for send descriptor setup.
Moving the logic in dev start as all the resources will be
configured.

Fixes: b5dc3140448e ("net/octeontx2: support base PTP")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/octeontx2: fix indirect mbuf handling during Tx
Sunil Kumar Kori [Thu, 25 Jul 2019 08:20:59 +0000 (13:50 +0530)]
net/octeontx2: fix indirect mbuf handling during Tx

Multi segmented packet may be spliced with indirect mbufs also.
Currently driver causes buffer leak for indirect mbufs as they
were not being freed to packet pool.

Patch fixes handling of indirect mbufs for following use cases
- packet contains all indirect mbufs only.
- packet contains mixed mbufs i.e. direct and indirect both.

Fixes: cbd5710db48d ("net/octeontx2: add Tx multi segment version")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
5 years agonet/vhost: do not count unsent packets as errors
David Marchand [Fri, 26 Jul 2019 10:21:28 +0000 (12:21 +0200)]
net/vhost: do not count unsent packets as errors

missed_pkts reflects the number of packets that the driver did not manage
to send.
This is a temporary situation, those packets are not freed and the
application can still retry to send them later.
Hence, we can't count them as transmit failed.

Fixes: 5f05e95cd5d9 ("net/vhost: fix Tx error counting")
Fixes: ee584e9710b9 ("vhost: add driver on top of the library")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
5 years agonet/ring: do not count unsent packets as errors
David Marchand [Fri, 26 Jul 2019 10:21:27 +0000 (12:21 +0200)]
net/ring: do not count unsent packets as errors

err_pkts reflects the number of packets that the driver did not manage
to send.
This is a temporary situation, those packets are not freed and the
application can still retry to send them later.
Hence, we can't count them as transmit failed.

Fixes: e1e4017751f1 ("ring: add new driver")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/memif: do not count unsent packets as errors
David Marchand [Fri, 26 Jul 2019 10:21:26 +0000 (12:21 +0200)]
net/memif: do not count unsent packets as errors

n_err reflects the number of packets that the driver did not manage to
send.
This is a temporary situation, those packets are not freed and the
application can still retry to send them later.
Hence, we can't count them as transmit failed.

Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/kni: do not count unsent packets as errors
David Marchand [Fri, 26 Jul 2019 10:21:25 +0000 (12:21 +0200)]
net/kni: do not count unsent packets as errors

err_pkts reflects the number of packets that the driver did not manage to
send.
This is a temporary situation, those packets are not freed and the
application can still retry to send them later.
Hence, we can't count them as transmit failed.

Fixes: 75e2bc54c018 ("net/kni: add KNI PMD")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/kni: remove unused Rx error counter
David Marchand [Fri, 26 Jul 2019 10:21:24 +0000 (12:21 +0200)]
net/kni: remove unused Rx error counter

The delta between what the application asked to receive and what was
indeed received, can not be called an error counter.
This counter is not reported anywhere, remove it.

Fixes: 75e2bc54c018 ("net/kni: add KNI PMD")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/virtio: remove unused Tx error counter
David Marchand [Fri, 26 Jul 2019 10:21:23 +0000 (12:21 +0200)]
net/virtio: remove unused Tx error counter

This Tx counter has never been used.

Fixes: 9658d17da27b ("virtio: maintain stats per queue")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
5 years agonet/null: remove unused Tx error counter
David Marchand [Fri, 26 Jul 2019 10:21:22 +0000 (12:21 +0200)]
net/null: remove unused Tx error counter

This Tx counter has never been used.

Fixes: c743e50c475f ("null: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/af_xdp: remove unused Tx counter
David Marchand [Fri, 26 Jul 2019 10:21:21 +0000 (12:21 +0200)]
net/af_xdp: remove unused Tx counter

This Tx counter is now unused.

Fixes: 10edf857fde4 ("net/af_xdp: make reserve/submit peek/release consistent")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>