dpdk.git
6 years agovhost: add flag for built-in virtio driver
Stefan Hajnoczi [Wed, 31 Jan 2018 17:46:50 +0000 (17:46 +0000)]
vhost: add flag for built-in virtio driver

The librte_vhost API is used in two ways:
1. As a vhost net device backend via rte_vhost_enqueue/dequeue_burst().
2. As a library for implementing vhost device backends.

There is no distinction between the two at the API level or in the
librte_vhost implementation.  For example, device state is kept in
"struct virtio_net" regardless of whether this is actually a net device
backend or whether the built-in virtio_net.c driver is in use.

The virtio_net.c driver should be a librte_vhost API client just like
the vhost-scsi code and have no special access to vhost.h internals.
Unfortunately, fixing this requires significant librte_vhost API
changes.

This patch takes a different approach: keep the librte_vhost API
unchanged but track whether the built-in virtio_net.c driver is in use.
See the next patch for a bug fix that requires knowledge of whether
virtio_net.c is in use.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agonet/mlx5: fix CRC strip capability query
Shahaf Shuler [Thu, 1 Feb 2018 18:53:53 +0000 (20:53 +0200)]
net/mlx5: fix CRC strip capability query

IBV_WQ_FLAGS_SCATTER_FCS is a WQ flag to be used to configure the CRC
strip on a queue upon creation.

Using IBV_RAW_PACKET_CAP_SCATTER_FCS instead to query to capability.
Even though this is RAW_QP capability, it is being used by rdma-core to
indicate for both RAW_QP and WQ.

Fixes: 43e9d9794cde ("net/mlx5: support upstream rdma-core")
Cc: stable@dpdk.org
Reported-by: Alex Rosenbaum <alexr@mellanox.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: fix flow priority on queue action
Nélio Laranjeiro [Wed, 31 Jan 2018 16:13:54 +0000 (17:13 +0100)]
net/mlx5: fix flow priority on queue action

A single queue should have the same verbs priority as an RSS one.

Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: fix port stop by verify flows are still present
Nélio Laranjeiro [Tue, 30 Jan 2018 13:36:52 +0000 (14:36 +0100)]
net/mlx5: fix port stop by verify flows are still present

priv_flow_stop() may be called several times, in such situation flows are
already removed from the NIC and thus all associated objects are no present
in the flow object (ibv_flow, indirection tables, ....).

Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx4: fix drop flow resources leak
Adrien Mazarguil [Wed, 31 Jan 2018 15:33:06 +0000 (16:33 +0100)]
net/mlx4: fix drop flow resources leak

Resources allocated for drop flow rules are not freed properly. This causes
a memory leak and triggers an assertion failure on a reference counter when
compiled in debug mode.

This issue can be reproduced with testpmd by entering the following
commands:

 flow create 0 ingress pattern eth / end actions drop / end
 port start all
 port stop all
 port start all
 port stop all
 quit

The reason is additional references are taken when re-enabling existing
flow rules, a common occurrence when rehashing configuration.

Fixes: d3a7e09234e4 ("net/mlx4: allocate drop flow resources on demand")
Cc: stable@dpdk.org
Reported-by: Moti Haimovsky <motih@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agodoc: fix DDP usage in testpmd
Kirill Rybalchenko [Wed, 31 Jan 2018 11:15:06 +0000 (11:15 +0000)]
doc: fix DDP usage in testpmd

Documentation and help string more clear describe meaning of
arguments for DDP add del function.

Fixes: 856ceb331b0a ("app/testpmd: enable DDP remove profile feature")
Cc: stable@dpdk.org
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agonet/i40e: fix interrupt conflict with multi-driver
Beilei Xing [Fri, 2 Feb 2018 12:05:52 +0000 (20:05 +0800)]
net/i40e: fix interrupt conflict with multi-driver

There's interrupt conflict when using DPDK and Linux i40e
on different ports of the same Ethernet controller, this
patch fixes it by switching from IntN to Int0 if multiple
drivers are used.

Fixes: be6c228d4da3 ("i40e: support Rx interrupt")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/i40e: fix multiple driver support
Beilei Xing [Fri, 2 Feb 2018 12:05:51 +0000 (20:05 +0800)]
net/i40e: fix multiple driver support

This patch provides the option to disable writing some global registers
in PMD, in order to avoid affecting other drivers, when multiple drivers
run on the same NIC and control different physical ports. Because there
are few global resources shared among different physical ports.

Fixes: ec246eeb5da1 ("i40e: use default filter input set on init")
Fixes: 98f055707685 ("i40e: configure input fields for RSS or flow director")
Fixes: f05ec7d77e41 ("i40e: initialize flow director flexible payload setting")
Fixes: e536c2e32883 ("net/i40e: fix parsing QinQ packets type")
Fixes: 19b16e2f6442 ("ethdev: add vlan type when setting ether type")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/i40e: add debug logs when writing global registers
Beilei Xing [Fri, 2 Feb 2018 12:05:50 +0000 (20:05 +0800)]
net/i40e: add debug logs when writing global registers

Add debug logs when writing global registers.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/i40e: warn when writing global registers
Beilei Xing [Fri, 2 Feb 2018 12:05:49 +0000 (20:05 +0800)]
net/i40e: warn when writing global registers

Add warnings when writing global registers.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/i40e: fix CRC strip enabling
Xiaoyun Li [Fri, 2 Feb 2018 05:45:16 +0000 (13:45 +0800)]
net/i40e: fix CRC strip enabling

New testpmd will get CRC strip offload from rx_offload_capa. I40evf
cannot disable CRC strip. And in fact, it is enabled by PF. This
patch solves the issue by adding CRC strip flag into rx_offload_capa
in i40e and i40evf.

Fixes: 8b9bd0efe0b6 ("app/testpmd: disable Rx VLAN offloads by default")

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
6 years agonet/i40e: update Rx checksum offload
Beilei Xing [Wed, 31 Jan 2018 03:34:13 +0000 (11:34 +0800)]
net/i40e: update Rx checksum offload

HW supports outer IP Rx checksum offload, this patch updates Rx
checksum offload for both PF and VF.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
6 years agonet/sfc: support meson build
Ivan Malov [Sat, 3 Feb 2018 13:46:34 +0000 (13:46 +0000)]
net/sfc: support meson build

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc: rename version map file
Ivan Malov [Sat, 3 Feb 2018 13:46:33 +0000 (13:46 +0000)]
net/sfc: rename version map file

The version map filename does not comply with the format
used by meson build rules for drivers (i.e. on the upper
level) and needs to be revisited. This patch removes efx
postfix from the driver title in the filename.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agotest/kni: fix dependency for BSD meson build
Bruce Richardson [Thu, 1 Feb 2018 14:20:11 +0000 (14:20 +0000)]
test/kni: fix dependency for BSD meson build

The KNI library is not built on FreeBSD, so it needs to be an
optional rather than a mandatory dependency for building the autotest
binary.

Fixes: b5dc795a8a55 ("test: build app with meson as dpdk-test")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agotest/power: fix dependency for BSD meson build
Bruce Richardson [Thu, 1 Feb 2018 14:20:10 +0000 (14:20 +0000)]
test/power: fix dependency for BSD meson build

The power library is not built on FreeBSD, so it needs to be an
optional rather than a mandatory dependency for building the autotest
binary.

Fixes: b5dc795a8a55 ("test: build app with meson as dpdk-test")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agotest: skip when required lib not available
Bruce Richardson [Thu, 1 Feb 2018 14:20:09 +0000 (14:20 +0000)]
test: skip when required lib not available

The power management and KNI libraries are not compiled on a FreeBSD
platform, which means that the tests can't run. Add in stub code for
these cases, allowing the tests to still be compiled, but to report
as skipped in those cases.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
6 years agobuild: fix dependency on execinfo for BSD meson builds
Bruce Richardson [Thu, 1 Feb 2018 14:20:08 +0000 (14:20 +0000)]
build: fix dependency on execinfo for BSD meson builds

The binaries and apps in DPDK all need to be linked against the
execinfo library on FreeBSD so add this as a dependency in cases
where it is found. It's available by default on BSD, but not
at all on Linux

Fixes: 16ade738fd0d ("app/testpmd: build with meson")
Fixes: 89f0711f9ddf ("examples: build some samples with meson")
Fixes: b5dc795a8a55 ("test: build app with meson as dpdk-test")
Fixes: 2ff67267b049 ("app/eventdev: build with meson")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agoeal/bsd: fix kernel modules build with meson
Bruce Richardson [Thu, 1 Feb 2018 14:20:07 +0000 (14:20 +0000)]
eal/bsd: fix kernel modules build with meson

The kernel module source file directory passed via VPATH was wrong,
which caused the source files to be not found via make. Rather than
explicitly passing VPATH, make use of the fact that the full path
to the source files is passed by meson, so split that into directory
part - to be used as VPATH - and file part - to be used as the source
filename.

Fixes: 610beca42ea4 ("build: remove library special cases")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agonet/i40e: fix dependencies for AVX2 build with meson
Bruce Richardson [Wed, 31 Jan 2018 17:09:05 +0000 (17:09 +0000)]
net/i40e: fix dependencies for AVX2 build with meson

The AVX2 code path includes files from the ethdev, hash and kvargs libs.
These are not listed as dependencies in the case where AVX2 is not in
the default instruction set for the build e.g. machine=nehalem. This
leads to compiler errors as the header files needed cannot be found.

Fixes: e940646b20fa ("drivers/net: build Intel NIC PMDs with meson")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agousertools/devbind: fix kernel module reporting
Anatoly Burakov [Wed, 24 Jan 2018 10:26:12 +0000 (10:26 +0000)]
usertools/devbind: fix kernel module reporting

lspci reports kernel modules in "Module" string, but devbind
expects it to be "Module_str". Fix it up similar to how we fix
up "Driver" to be "Driver_str".

Fixes: c3ce205d5729 ("usertools: optimize lspci invocation")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agousertools/devbind: remove unused function
Anatoly Burakov [Wed, 24 Jan 2018 13:16:06 +0000 (13:16 +0000)]
usertools/devbind: remove unused function

Fixes: 629395b063e8 ("igb_uio: remove PCI id table")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agotest/mempool: get best pool via the new API
Hemant Agrawal [Mon, 5 Feb 2018 07:43:11 +0000 (13:13 +0530)]
test/mempool: get best pool via the new API

This patch replaces the uses of default mempool ops API
with newly supported best_mempool_ops API.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agotest/memzone: handle previously allocated memzones
Anatoly Burakov [Thu, 1 Feb 2018 10:14:50 +0000 (10:14 +0000)]
test/memzone: handle previously allocated memzones

Currently, memzone autotest expects there to be no memzones
present by the time the test is run. Some hardware drivers
will allocate memzones for internal use during initialization,
resulting in tests failing due to unexpected memzones being
allocated before the test was run.

Fix this by making sure all memzones allocated by this test
have a common prefix, and making callback increment a counter
on encountering memzones with this prefix. Also, separately
increment another counter that will count total number of
memzones left after test, and compares it to previously stored
number of memzones, to ensure that we didn't accidentally
allocated/freed any memzones we weren't supposed to. This
also doubles as a test for correct operation of memzone_walk().

Fixes: 71330483a193 ("test/memzone: fix memory leak")
Cc: stable@dpdk.org
Signed-off-by: Phil Yang <phil.yang@arm.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
6 years agotest/memzone: add test for count in EAL config
Anatoly Burakov [Thu, 1 Feb 2018 10:14:49 +0000 (10:14 +0000)]
test/memzone: add test for count in EAL config

Ensure that memzone count in eal mem config is incremented and
decremented whenever memzones are allocated and freed.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
6 years agotest: clean up memory for function reentrancy test
Anatoly Burakov [Wed, 31 Jan 2018 14:17:32 +0000 (14:17 +0000)]
test: clean up memory for function reentrancy test

Function reentrancy test limits maximum number of iterations based
on the number of memzones and cores, however it doesn't free the
memzones after the fact, so on a machine with big amount of cores
the tests will fail due to running out of memzones.

Fix this by introducing cleanup functions for ring and mempool
reentrancy tests.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
6 years agopmdinfogen: fix resource leak of file object
Bruce Richardson [Fri, 2 Feb 2018 12:00:58 +0000 (12:00 +0000)]
pmdinfogen: fix resource leak of file object

Coverity flags an issue where the resources used by the FILE object for
the temporary input file are leaked. This is a very minor issue, but is
easily fixed, while also avoiding later problems where we try to close
an invalid file descriptor in the failure case.

The fix is to use "dup()" to get a new file descriptor number rather than
using the value directly from fileno. This allows us to close the file
opened with tmpfile() within in scope block, while allowing the duplicate
to pass to the outer block and be closed when the function terminates.

As a side-effect I/O in the function is therefore changed from using stdio
fread/fwrite to read/write system calls.

Coverity issue: 260399
Fixes: 0d68533617e3 ("pmdinfogen: allow using stdin and stdout")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
6 years agombuf: fix logic of user mempool ops API
Nipun Gupta [Fri, 2 Feb 2018 08:03:01 +0000 (13:33 +0530)]
mbuf: fix logic of user mempool ops API

The existing rte_eal_mbuf_default mempool ops can return the compile time
default ops name if the user has not provided command line inputs for
mempool ops name. It will break the logic of best mempool ops as it will
never return platform hw mempool ops.

This patch introduces a new API to just return the user mempool ops only.

Fixes: 8b0f7f434132 ("mbuf: maintain user and compile time mempool ops name")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
6 years agomempool: fix physical contiguous check
Andrew Rybchenko [Thu, 1 Feb 2018 14:02:23 +0000 (14:02 +0000)]
mempool: fix physical contiguous check

There is not specified dependency between rte_mempool_populate_default()
and rte_mempool_populate_iova(). So, the second should not rely on the
fact that the first adds capability flags to the mempool flags.

Fixes: 65cf769f5e6a ("mempool: detect physical contiguous objects")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agoevent/dpaa: fix portal allocation
Nipun Gupta [Mon, 5 Feb 2018 05:21:57 +0000 (10:51 +0530)]
event/dpaa: fix portal allocation

Checking if portal has been allocated is now required at the
caller of rte_dpaa_portal_init() API. This patch adds check
in the dpaa eventdev driver.

Fixes: 5d944582d028 ("bus/dpaa: check portal presence in the caller function")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agoevent/dpaa: rename vdev with dpaa1
Nipun Gupta [Mon, 5 Feb 2018 05:21:56 +0000 (10:51 +0530)]
event/dpaa: rename vdev with dpaa1

DPAA2 eventdev is named as event_dpaa2 which conflicts with
event_dpaa when both are compiled in together. So event_dpaa
is required to renamed.

Fixes: 1ee9569576f6 ("config: enable dpaaX drivers for generic ARMv8")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agobus/dpaa: fix mempool ops registration
Nipun Gupta [Mon, 5 Feb 2018 05:21:55 +0000 (10:51 +0530)]
bus/dpaa: fix mempool ops registration

Fixes: 2bd0d5b951a9 ("bus/dpaa: register platform HW mempool on runtime")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Shreyansh Jain <Shreyansh.jain@nxp.com>
6 years agobus/fslmc: fix mempool ops registration
Nipun Gupta [Mon, 5 Feb 2018 05:21:54 +0000 (10:51 +0530)]
bus/fslmc: fix mempool ops registration

Fixes: 8824b74d8f5f ("bus/fslmc: register platform HW mempool on runtime")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agobus/vdev: continue probing after a device failure
Moti Haimovsky [Mon, 5 Feb 2018 17:15:03 +0000 (19:15 +0200)]
bus/vdev: continue probing after a device failure

This commit modifies vdev_probe to continue probing all the devices
regardless of device probing failures.

Cc: stable@dpdk.org
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
6 years agoeal: add error check for core options
Marko Kovacevic [Fri, 2 Feb 2018 14:51:28 +0000 (14:51 +0000)]
eal: add error check for core options

Error information on current core usage list, mask or map
were incomplete. Added states to differentiate core usage
and to inform user.

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agoigb_uio: print IRQ as decimal number
Tonghao Zhang [Tue, 23 Jan 2018 16:17:34 +0000 (08:17 -0800)]
igb_uio: print IRQ as decimal number

The kernel uses the '%d' or '%ld' to print irq num.
But igb_uio may use the '%lx', then the log may confuse
the user what irq num has been used. The log is show as
below.

igb_uio 0000:00:03.0: irq 24 for MSI/MSI-X
igb_uio 0000:00:03.0: uio device registered with irq 18

kernel version: 3.10.0-514.16.1.el7

For avoiding to be confused, change the igb_uio irq
print type.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
6 years agomk: fix external build
Marko Kovacevic [Mon, 5 Feb 2018 15:45:31 +0000 (15:45 +0000)]
mk: fix external build

Code commit for 'make -f' support, breaks the build in cases where
entries in $(MAKEFILE_LIST) are absolute paths. This commit uses
notdir and firstword to ensure that only the local filename is used.

Fixes: 3a5c339d51a4 ("mk: support renamed Makefile in external project")
Cc: stable@dpdk.org
Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
6 years agonet/tap: fix icc build
Zhiyong Yang [Thu, 1 Feb 2018 04:43:00 +0000 (12:43 +0800)]
net/tap: fix icc build

The following error is reported when compiling 18.02-rc2 using ICC,
"transfer of control bypasses initialization of".
The patch fixes the issue.

Fixes: 1911c5edc6cd ("net/tap: fix eBPF RSS map key handling")

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
6 years agoversion: 18.02-rc2
Thomas Monjalon [Thu, 1 Feb 2018 02:09:10 +0000 (03:09 +0100)]
version: 18.02-rc2

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
6 years agodoc: add procinfo restriction with vdev
Marko Kovacevic [Wed, 24 Jan 2018 16:47:26 +0000 (16:47 +0000)]
doc: add procinfo restriction with vdev

Note added to outline that using
proc_info for virtual devices is not supported

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
6 years agodoc: add procinfo restriction with shared library
Vipin Varghese [Tue, 30 Jan 2018 12:17:02 +0000 (17:47 +0530)]
doc: add procinfo restriction with shared library

added note category to procinfo guide, to intimate users in shared
library mode. Procinfo requires same NIC libraries to probe the NIC
devices as Primary Application.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
6 years agodoc: add a restriction to multi-process support
Junjie Chen [Wed, 29 Nov 2017 17:17:13 +0000 (12:17 -0500)]
doc: add a restriction to multi-process support

This patch add a restriction to multi-process support: secondary
processes should only run alongside primary process with same DPDK
version, so that secondary processes can use the same hugepage mmap
layout as primary process.

Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agoevent/opdl: fix license header and SPDX tags
Bruce Richardson [Tue, 23 Jan 2018 14:11:33 +0000 (14:11 +0000)]
event/opdl: fix license header and SPDX tags

This patch ensures that the OPDL files all contain correct SPDX tags.
The following changes were made to achieve this:
* replace license text with SPDX tag
* correct occurences where SPDX tag was not on first line of file
* ensure license years were correct

Fixes: 4236ce9bf5bf ("event/opdl: add OPDL ring infrastructure library")
Fixes: 3c7f3dcfb099 ("event/opdl: add PMD main body and helper function")
Fixes: d548ef513cd7 ("event/opdl: add unit tests")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Liang Ma <liang.j.ma@intel.com>
6 years agodoc: replace license text with SPDX tags on SVG images
Bruce Richardson [Tue, 23 Jan 2018 13:33:37 +0000 (13:33 +0000)]
doc: replace license text with SPDX tags on SVG images

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agoconfig: replace Intel license headers with SPDX tags
Bruce Richardson [Tue, 23 Jan 2018 14:21:16 +0000 (14:21 +0000)]
config: replace Intel license headers with SPDX tags

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agotest: use SPDX tags in 6WIND copyrighted files
Olivier Matz [Mon, 29 Jan 2018 13:11:29 +0000 (14:11 +0100)]
test: use SPDX tags in 6WIND copyrighted files

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agoapp/testpmd: use SPDX tags in 6WIND copyrighted files
Olivier Matz [Mon, 29 Jan 2018 13:11:28 +0000 (14:11 +0100)]
app/testpmd: use SPDX tags in 6WIND copyrighted files

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agonet/ixgbe: use SPDX tags in 6WIND copyrighted files
Olivier Matz [Mon, 29 Jan 2018 13:11:35 +0000 (14:11 +0100)]
net/ixgbe: use SPDX tags in 6WIND copyrighted files

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agonet/failsafe: use SPDX tags in 6WIND copyrighted files
Olivier Matz [Mon, 29 Jan 2018 13:11:34 +0000 (14:11 +0100)]
net/failsafe: use SPDX tags in 6WIND copyrighted files

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agonet/tap: use SPDX tags in 6WIND copyrighted files
Olivier Matz [Mon, 29 Jan 2018 13:11:36 +0000 (14:11 +0100)]
net/tap: use SPDX tags in 6WIND copyrighted files

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agonet/af_packet: use SPDX tags in 6WIND copyrighted files
Olivier Matz [Mon, 29 Jan 2018 13:11:33 +0000 (14:11 +0100)]
net/af_packet: use SPDX tags in 6WIND copyrighted files

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agonet/mlx4: use SPDX tags in 6WIND copyrighted files
Olivier Matz [Mon, 29 Jan 2018 13:11:31 +0000 (14:11 +0100)]
net/mlx4: use SPDX tags in 6WIND copyrighted files

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agonet/mlx5: use SPDX tags in 6WIND copyrighted files
Olivier Matz [Mon, 29 Jan 2018 13:11:30 +0000 (14:11 +0100)]
net/mlx5: use SPDX tags in 6WIND copyrighted files

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agoethdev: use SPDX tags in 6WIND copyrighted files
Olivier Matz [Mon, 29 Jan 2018 13:11:26 +0000 (14:11 +0100)]
ethdev: use SPDX tags in 6WIND copyrighted files

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agobus/pci: use SPDX tags in 6WIND copyrighted files
Olivier Matz [Mon, 29 Jan 2018 13:11:32 +0000 (14:11 +0100)]
bus/pci: use SPDX tags in 6WIND copyrighted files

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agopci: use SPDX tags in 6WIND copyrighted files
Olivier Matz [Mon, 29 Jan 2018 13:11:27 +0000 (14:11 +0100)]
pci: use SPDX tags in 6WIND copyrighted files

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agoeal: use SPDX tags in 6WIND copyrighted files
Olivier Matz [Mon, 29 Jan 2018 13:11:25 +0000 (14:11 +0100)]
eal: use SPDX tags in 6WIND copyrighted files

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agonet: use SPDX tags
Olivier Matz [Mon, 29 Jan 2018 13:11:24 +0000 (14:11 +0100)]
net: use SPDX tags

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agokvargs: use SPDX tags
Olivier Matz [Mon, 29 Jan 2018 13:11:23 +0000 (14:11 +0100)]
kvargs: use SPDX tags

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agomempool: use SPDX tags
Olivier Matz [Mon, 29 Jan 2018 13:11:22 +0000 (14:11 +0100)]
mempool: use SPDX tags

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agombuf: use SPDX tags
Olivier Matz [Mon, 29 Jan 2018 13:11:21 +0000 (14:11 +0100)]
mbuf: use SPDX tags

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agocmdline: use SPDX tags
Olivier Matz [Mon, 29 Jan 2018 13:11:20 +0000 (14:11 +0100)]
cmdline: use SPDX tags

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agoring: convert license headers to SPDX tags
Jia He [Mon, 22 Jan 2018 07:13:48 +0000 (23:13 -0800)]
ring: convert license headers to SPDX tags

Signed-off-by: Jia He <jia.he@hxt-semitech.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agoexamples/flow_filtering: add delay to wait link update
Beilei Xing [Wed, 24 Jan 2018 10:15:34 +0000 (18:15 +0800)]
examples/flow_filtering: add delay to wait link update

Add up to 9s delay for getting link status to make sure NIC updates
link status successfully, just like other applications such as
testpmd and l2fwd.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
6 years agoexamples/bond: check mbuf allocation
Radu Nicolau [Wed, 24 Jan 2018 13:16:46 +0000 (13:16 +0000)]
examples/bond: check mbuf allocation

Coverity issue: 257008
Fixes: cc7e8ae84faa ("examples/bond: add example application for link bonding mode 6")
Cc: stable@dpdk.org
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
6 years agoexamples/vm_power_manager: fix set VF MAC address
David Coyle [Tue, 23 Jan 2018 14:14:15 +0000 (14:14 +0000)]
examples/vm_power_manager: fix set VF MAC address

Current code only sets mac address of first VF. Fix code so that it
continues through the loop and sets the mac address of each VF.

Fixes: c9a4779135c9 ("examples/vm_power_mgr: set MAC address of VF")
Cc: stable@dpdk.org
Signed-off-by: David Coyle <david.coyle@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
6 years agotest/pmd_perf: declare variables as static
Pablo de Lara [Fri, 19 Jan 2018 14:37:13 +0000 (14:37 +0000)]
test/pmd_perf: declare variables as static

Some variables in the PMD perf test were declared as global,
but they are only used in this test, so they should actually
be declared as static.

Fixes: 002ade70e933 ("app/test: measure cycles per packet in Rx/Tx")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agokni: set initial value for MTU
Hemant Agrawal [Thu, 18 Jan 2018 06:13:00 +0000 (11:43 +0530)]
kni: set initial value for MTU

Configure initial application provided  mtu on the KNI interface.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agokni: support promiscuous mode set
Hemant Agrawal [Thu, 18 Jan 2018 06:12:59 +0000 (11:42 +0530)]
kni: support promiscuous mode set

Inform userspace app about promisc mode change

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agokni: support MAC address change
Hemant Agrawal [Thu, 18 Jan 2018 06:12:58 +0000 (11:42 +0530)]
kni: support MAC address change

This patch adds following:
1. Option to configure the mac address during create. Generate random
   address only if the user has not provided any valid address.
2. Inform usespace, if mac address is being changed in linux.
3. Implement default handling of mac address change in the corresponding
   ethernet device.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agolpm: fix allocation of an existing object
Pavan Nikhilesh [Tue, 30 Jan 2018 18:51:54 +0000 (00:21 +0530)]
lpm: fix allocation of an existing object

Fix rte_lpm_create_*() functions to return NULL and set rte_errno to
EEXIST when lpm object name already exists.
This is the behavior described in the API documentation in the header
file.

Fixes: 134975073af3 ("lib: remove unnecessary pointer cast")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agocrypto/qat: fix allocation check and leak
Yong Wang [Thu, 25 Jan 2018 06:53:04 +0000 (01:53 -0500)]
crypto/qat: fix allocation check and leak

There are several func calls to rte_zmalloc() which don't do null
point check on the return value. And before return, the memory is not
freed. Fix it by adding null point check and rte_free().

Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices")
Fixes: e09231eaa2af ("crypto/qat: add SGL capability")
Cc: stable@dpdk.org
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/tap: remove speed argument
Vipin Varghese [Fri, 26 Jan 2018 22:27:26 +0000 (03:57 +0530)]
net/tap: remove speed argument

TAP is a virtual device created on Kernel. The speed of interface is
set by Kernel to a fixed static value. But this does not prevent using
RX or TX to rate limit. Hence removing the option from user arguments.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/bond: fix vdev name
Radu Nicolau [Thu, 25 Jan 2018 16:26:26 +0000 (16:26 +0000)]
examples/bond: fix vdev name

Fixes: 73db5bad ("net: align ethdev and eal driver names")
Cc: stable@dpdk.org
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agonet/bonding: fix burst hash computation
Radu Nicolau [Mon, 29 Jan 2018 14:36:03 +0000 (14:36 +0000)]
net/bonding: fix burst hash computation

Wrong function was used for l23 and l34 hashing
slave index was incremented twice.

Fixes: 09150784a776 ("net/bonding: burst mode hash calculation")
Cc: stable@dpdk.org
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
6 years agonet/avf: fix uninitialized variables
Jingjing Wu [Tue, 30 Jan 2018 03:32:58 +0000 (11:32 +0800)]
net/avf: fix uninitialized variables

This patch fixes the coverity UNINIT issue.

Coverity issue: 257016, 257036
Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Reported-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/avf: fix unchecked return in link update
Jingjing Wu [Tue, 30 Jan 2018 09:10:36 +0000 (17:10 +0800)]
net/avf: fix unchecked return in link update

This patch fixes the coverity CHECKED_RETURN issue.

Coverity issue: 257045
Fixes: 48de41ca11f0 ("net/avf: enable link status update")

Reported-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/dpaa2: fix Tx only mode
Hemant Agrawal [Tue, 30 Jan 2018 15:24:09 +0000 (20:54 +0530)]
net/dpaa2: fix Tx only mode

Fixes: 043b36f621dd ("net/dpaa2: support more than 16 burst size in Rx")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/tap: fix eBPF RSS map key handling
Ophir Munk [Tue, 30 Jan 2018 16:00:29 +0000 (16:00 +0000)]
net/tap: fix eBPF RSS map key handling

This commit addresses a case of RSS and non RSS flows mixture.
In the corrupted code, if a non-RSS flow is destroyed, it has an eBPF map
index 0 (initialized upon flow creation). This might unintentionally remove
RSS entry 0 from eBPF map.
To fix this issue, add an offset to the real index during a KEY_CMD_GET
operation, and subtract this offset during a KEY_CMD_RELEASE operation, in
order to restore the real index.
Thus, if a non RSS flow is falsely trying to release map entry 0 - The
offset subtraction will calculate the real map index as an
out-of-range value, and the release operation will be silently ignored.

Fixes: 036d721a8229 ("net/tap: implement RSS using eBPF")

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
6 years agonet/tap: fix eBPF file descriptors leakage
Ophir Munk [Tue, 30 Jan 2018 16:00:28 +0000 (16:00 +0000)]
net/tap: fix eBPF file descriptors leakage

When a user creates an RSS rule, the tap PMD dynamically allocates
a 'flow' data structure, and uploads BPF programs (represented by file
descriptors) to the kernel.
The kernel might reject the rule (due to filters overlap, for example)
in which case, flow memory should be freed and BPF file descriptors
should be closed.
In the corrupted code there were scenarios where BPF file descriptors
were not closed.
The fix is to add a new function - tap_flow_free(), which will make sure
to always close BPF file descriptors before freeing the flow allocated
memory.

Fixes: 036d721a8229 ("net/tap: implement RSS using eBPF")

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
6 years agonet/null: support MTU update
Mallesh Koujalagi [Wed, 31 Jan 2018 02:08:15 +0000 (18:08 -0800)]
net/null: support MTU update

NULL device is failed to attach ovs, reported operation not supported
and configuration failed.

To attach ovs:
$VSCTL add-port ovs-br dpdk1 -- set Interface dpdk1 type=dpdk \
        options:dpdk-devargs=eth_null0,size=64,copy=1

Signed-off-by: Mallesh Koujalagi <malleshx.koujalagi@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/mlx5: spawn rdma-core dependency plug-in
Adrien Mazarguil [Tue, 30 Jan 2018 15:34:58 +0000 (16:34 +0100)]
net/mlx5: spawn rdma-core dependency plug-in

When mlx5 is not compiled directly as an independent shared object (e.g.
CONFIG_RTE_BUILD_SHARED_LIB not enabled for performance reasons), DPDK
applications inherit its dependencies on libibverbs and libmlx5 through
rte.app.mk.

This is an issue both when DPDK is delivered as a binary package (Linux
distributions) and for end users because rdma-core then propagates as a
mandatory dependency for everything.

Application writers relying on binary DPDK packages are not necessarily
aware of this fact and may end up delivering packages with broken
dependencies.

This patch therefore introduces an intermediate internal plug-in
hard-linked with rdma-core (to preserve symbol versioning) loaded by the
PMD through dlopen(), so that a missing rdma-core does not cause unresolved
symbols, allowing applications to start normally.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: move rdma-core calls to separate file
Nelio Laranjeiro [Tue, 30 Jan 2018 15:34:56 +0000 (16:34 +0100)]
net/mlx5: move rdma-core calls to separate file

This lays the groundwork for externalizing rdma-core as an optional
run-time dependency instead of a mandatory one.

No functional change.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx4: spawn rdma-core dependency plug-in
Adrien Mazarguil [Tue, 30 Jan 2018 15:34:54 +0000 (16:34 +0100)]
net/mlx4: spawn rdma-core dependency plug-in

When mlx4 is not compiled directly as an independent shared object (e.g.
CONFIG_RTE_BUILD_SHARED_LIB not enabled for performance reasons), DPDK
applications inherit its dependencies on libibverbs and libmlx4 through
rte.app.mk.

This is an issue both when DPDK is delivered as a binary package (Linux
distributions) and for end users because rdma-core then propagates as a
mandatory dependency for everything.

Application writers relying on binary DPDK packages are not necessarily
aware of this fact and may end up delivering packages with broken
dependencies.

This patch therefore introduces an intermediate internal plug-in
hard-linked with rdma-core (to preserve symbol versioning) loaded by the
PMD through dlopen(), so that a missing rdma-core does not cause unresolved
symbols, allowing applications to start normally.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx4: move rdma-core calls to separate file
Adrien Mazarguil [Tue, 30 Jan 2018 15:34:52 +0000 (16:34 +0100)]
net/mlx4: move rdma-core calls to separate file

This lays the groundwork for externalizing rdma-core as an optional
run-time dependency instead of a mandatory one.

No functional change.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/ixgbe: fix reset error handling
Wei Zhao [Mon, 29 Jan 2018 08:07:26 +0000 (16:07 +0800)]
net/ixgbe: fix reset error handling

Add error handling for resetting HW.

Fixes: 0a45657a6794 ("pci: rework interrupt handling")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/i40e: fix flow RSS return error
Wei Zhao [Fri, 26 Jan 2018 08:46:51 +0000 (16:46 +0800)]
net/i40e: fix flow RSS return error

This patch fixes issues reported by Coverity check. Function
parse_rss_action and i40e_config_rss_filter might return at wrong
time which will cause error for RSS configuration and parser. Hash
function variable with 32 bits width might also cause error when
it needs more than 32 bits, so change this variable to 64 bits.

Coverity issue: 257020, 257024, 257037
Fixes: ecad87d22383 ("net/i40e: move RSS to flow API")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agoexamples: increase default ring sizes to 1024
Kevin Laatz [Fri, 12 Jan 2018 10:48:44 +0000 (10:48 +0000)]
examples: increase default ring sizes to 1024

Increase the default RX/TX ring sizes to 1024/1024 to
accommodate for NICs with higher throughput (25G, 40G etc)

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agotest: increase default ring sizes to 1024
Kevin Laatz [Fri, 12 Jan 2018 10:48:46 +0000 (10:48 +0000)]
test: increase default ring sizes to 1024

Increase the default RX/TX ring sizes to 1024/1024 to
accommodate for NICs with higher throughput (25G, 40G etc)

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agoapp/testpmd: increase default ring sizes to 1024
Kevin Laatz [Fri, 12 Jan 2018 10:48:45 +0000 (10:48 +0000)]
app/testpmd: increase default ring sizes to 1024

Increase the default RX/TX ring sizes to 1024/1024 to
accommodate for NICs with higher throughput (25G, 40G etc)

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agodoc: fix testpmd commands for TM capabilities
Tomasz Duszynski [Sun, 28 Jan 2018 15:08:14 +0000 (16:08 +0100)]
doc: fix testpmd commands for TM capabilities

Command used for querying node or level capabilities requires
argument which specifies which set of capabilities to show.

Thus trying to show node/level capabilities using current
documentation will not work. Fix that by adding missing
arguments to command documentation.

Fixes: 5b590fbe09b6 ("app/testpmd: add traffic management forwarding mode")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoapp/testpmd: add meter to flow actions table
Tomasz Duszynski [Sun, 28 Jan 2018 11:58:39 +0000 (12:58 +0100)]
app/testpmd: add meter to flow actions table

Since METER action is supported by the testpmd application
suitable entry should exist in flow actions information table.

Without that testpmd will return error on adding a new flow to
the list of flows attached to a given port.

Fixes: 30ffb4e67ee3 ("app/testpmd: add commands traffic metering and policing")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agoapp/testpmd: fix allocation check in TM config
Jasvinder Singh [Mon, 22 Jan 2018 15:45:53 +0000 (15:45 +0000)]
app/testpmd: fix allocation check in TM config

Calloc() function might returns NULL due to insufficient space. Therefore,
check for handling memory allocation failure is added.

Coverity issue: 257030
Fixes: 5b590fbe09b6 ("app/testpmd: add traffic management forwarding mode")
Cc: stable@dpdk.org
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoapp/testpmd: fix allocation check in MTR parsing
Jasvinder Singh [Mon, 22 Jan 2018 15:15:04 +0000 (15:15 +0000)]
app/testpmd: fix allocation check in MTR parsing

Malloc() function might return NULL due to insufficient space. Therefore,
check for handling memory allocation failure is added.

Coverity issue: 257039
Fixes: e63b50162aa3 ("app/testpmd: clean metering and policing commands")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoapp/testpmd: move variables definition in source
Georgios Katsikas [Wed, 24 Jan 2018 11:53:36 +0000 (12:53 +0100)]
app/testpmd: move variables definition in source

This patch moves the definition of 3 variables in testpmd.h
into the respective .c file. The idea behind this move is
to allow external applications to compile against testpmd
without throwing compilation errors related to multiple
definition of variables.

Also, an extern dcb_q_mapping in testpmd.h is removed
since it appears that this variable is not defined
elsewhere in the tree.

Signed-off-by: Georgios Katsikas <katsikas.gp@gmail.com>
6 years agoapp/testpmd: change log level at run time
Elza Mathew [Mon, 22 Jan 2018 22:09:45 +0000 (14:09 -0800)]
app/testpmd: change log level at run time

Introduced a run time command to change the
log level for a given log type. Added the
necessary documentation.

Signed-off-by: Elza Mathew <elza.mathew@intel.com>
6 years agoapp/testpmd: fix port id size
Remy Horton [Fri, 19 Jan 2018 13:27:22 +0000 (13:27 +0000)]
app/testpmd: fix port id size

The word size of port_id is now 16 bits, but there were parsing directives
that assumed it was still of type UINT8, resulting in incorrect commandline
parse results.

Fixes: f14a210a65fe ("app: fix port id type")
Cc: stable@dpdk.org
Signed-off-by: Remy Horton <remy.horton@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoapp/testpmd: fix SW checksum calculation enabling
Jiayu Hu [Thu, 25 Jan 2018 02:13:44 +0000 (10:13 +0800)]
app/testpmd: fix SW checksum calculation enabling

In current design, we can't enable SW checksum calculation
for the devices which don't have checksum offloading abilities
via the command "csum set ip|tcp|udp|sctp|outer-ip sw <port_id>".
But SW checksum calculation shouldn't depend on HW offloading
abilities. This patch is to fix this issue.

Fixes: 3926dd2b6668 ("app/testpmd: enforce offload capabilities check")

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Shahaf Shuler <shahafs@mellanox.com>
6 years agoapp/testpmd: disable Rx VLAN offloads by default
Moti Haimovsky [Wed, 31 Jan 2018 17:32:03 +0000 (19:32 +0200)]
app/testpmd: disable Rx VLAN offloads by default

Removed the hardcoded preconfigured Rx VLAN offload configuration
from testpmd and changed the Rx offload command line parameters from
disable to enable.

It has been decided by the Technical Board that testers who wish to
use these offloads will now have to explicitly write them in the
command-line when running testpmd.
The agreement is to keep two exceptions enabled by default in 18.02:
Rx CRC strip and Tx fast free.

Motivation:
Some PMDs such at the mlx4 may not implement all the offloads.
After the offload API rework assuming no offload is enabled by default,
  commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
  commit cba7f53b717d ("ethdev: introduce Tx queue offloads API") trying
to enable a not supported offload is clearly an error which will cause
configuration failing.

Considering that testpmd is an application to test the PMD, it should
not fail on a configuration which was not explicitly requested.
The behavior of this test application is then turned to an opt-in
model.

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agoapp/testpmd: fix invalid port detach
Matan Azrad [Tue, 30 Jan 2018 14:13:40 +0000 (14:13 +0000)]
app/testpmd: fix invalid port detach

Using registration to all ports includes also the ports which should not
be used by the application.

It is nice to print each port event by testpmd but in case of RMV
event, testpmd tries to detach the port and this case is problematic
when the port should not be used by the application.

Check the port validation before detach API calling.

Fixes: 4fb82244b394 ("app/testpmd: extend event printing")

Signed-off-by: Matan Azrad <matan@mellanox.com>