dpdk.git
5 years agoexamples/ipsec-secgw: fix build error log
Marcin Smoczynski [Wed, 8 May 2019 13:09:56 +0000 (15:09 +0200)]
examples/ipsec-secgw: fix build error log

Fix invalid indentation - extra whitespace before error directive which
is causing syntax error when no pkgconfig file for the DPDK is found and
RTE_SDK is not specified.

Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")
Cc: stable@dpdk.org
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
5 years agodoc: add timer library changes to release notes
Erik Gabriel Carrillo [Mon, 6 May 2019 21:29:56 +0000 (16:29 -0500)]
doc: add timer library changes to release notes

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agotimer: allow first subsystem init from secondary
Erik Gabriel Carrillo [Thu, 9 May 2019 19:39:36 +0000 (14:39 -0500)]
timer: allow first subsystem init from secondary

Since memzones can be reserved from secondary processes as well as
primary processes, if the first call to the timer subsystem init
function occurs in a secondary process, we should allow it to succeed.

Fixes: c0749f7096c7 ("timer: allow management in shared memory")

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
5 years agotest/hash: check freeing key with position
Dharmik Thakkar [Thu, 9 May 2019 17:19:07 +0000 (17:19 +0000)]
test/hash: check freeing key with position

This patch adds a unit test for rte_hash_free_key_with_position().

Suggested-by: Linfan <zhongdahulinfan@163.com>
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
5 years agohash: fix total entries count
Dharmik Thakkar [Thu, 9 May 2019 17:19:06 +0000 (17:19 +0000)]
hash: fix total entries count

In rte_hash, with current implementation, it is possible that keys
are stored at indexes greater than the number of total entries.

Currently, in rte_hash_free_key_with_position(), due to incorrect
computation of total_entries, application cannot free keys with
indexes greater than the number of total entries.

This patch fixes this incorrect computation of total_entries.

Bugzilla ID: 261
Fixes: 9d033dac7d7c ("hash: support no free on delete")
Cc: stable@dpdk.org
Reported-by: Linfan <zhongdahulinfan@163.com>
Suggested-by: Linfan <zhongdahulinfan@163.com>
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
5 years agohash: fix position returned in free slots
Dharmik Thakkar [Thu, 9 May 2019 17:19:05 +0000 (17:19 +0000)]
hash: fix position returned in free slots

Currently, in rte_hash_free_key_with_position(), the position returned
to the ring of free_slots leads to an unexpected conflict with a key
already in use.

This patch fixes incorrect position returned to the ring of free_slots.

Bugzilla ID: 261
Fixes: 9d033dac7d7c ("hash: support no free on delete")
Cc: stable@dpdk.org
Reported-by: Linfan <zhongdahulinfan@163.com>
Suggested-by: Linfan <zhongdahulinfan@163.com>
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
5 years agotest/barrier: fix for Power CPUs
David Christensen [Wed, 8 May 2019 21:02:43 +0000 (16:02 -0500)]
test/barrier: fix for Power CPUs

The memory barrier test fails on IBM Power 9 systems.  Add additional
barriers to accommodate the weakly ordered model used on Power CPUs.

Fixes: 93da5b59afc9 ("test: introduce memory barrier test case")
Cc: stable@dpdk.org
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
5 years agotest/barrier: enlarge variables to 64 bits
David Christensen [Wed, 8 May 2019 21:02:32 +0000 (16:02 -0500)]
test/barrier: enlarge variables to 64 bits

Memory barrier failures can be intermittent. Increase the size of the
sum/val/iteration variables to allow tests that can run for days so that
sporadic errors can be identified.

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
5 years agotest/barrier: fix allocation check
David Christensen [Wed, 8 May 2019 21:02:19 +0000 (16:02 -0500)]
test/barrier: fix allocation check

Code tested calloc failures for pt & lpt variables
but not for the sum variable. Add a test for calloc
failure of sum.

Fixes: 93da5b59afc9 ("test: introduce memory barrier test case")
Cc: stable@dpdk.org
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
5 years agotest/barrier: fix typo in log
David Christensen [Wed, 8 May 2019 21:02:08 +0000 (16:02 -0500)]
test/barrier: fix typo in log

Change "much" to "match" in a printf.

Fixes: 93da5b59afc9 ("test: introduce memory barrier test case")
Cc: stable@dpdk.org
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
5 years agotest: call timer subsystem finalize at exit
Erik Gabriel Carrillo [Mon, 6 May 2019 21:03:51 +0000 (16:03 -0500)]
test: call timer subsystem finalize at exit

The eal_flags_autotest checks that no hugepage map files are left behind
after a process exits, which can only be the case if all allocations made
from DPDK heaps were freed back to the freelist, resulting in the
hugepage map files being unlinked automatically.  Add a call to
rte_timer_subsystem_finalize() at application exit time to release
allocations now made by the timer library.

Fixes: c0749f7096c7 ("timer: allow management in shared memory")

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
5 years agopower: fix cache line alignment
Mattias Rönnblom [Sun, 5 May 2019 18:12:16 +0000 (20:12 +0200)]
power: fix cache line alignment

The ACPI and PState CPU frequency scaling drivers used the
__rte_cache_aligned attribute without including rte_memory.h, which
turns what looks as the declaration of a cache line-aligned struct
into a non-aligned struct declaration and the definition of an
instance of the struct.

Fixes: e6c6dc0f96 ("power: add p-state driver compatibility")
Fixes: 445c6528b5 ("power: common interface for guest and host")
Cc: stable@dpdk.org
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
5 years agopower: fix resource leak
Liang Ma [Mon, 8 Apr 2019 16:19:16 +0000 (17:19 +0100)]
power: fix resource leak

Fix the resource leaking issue

Coverity issue: 337668
Fixes: b60fd5f8b1ce8f0a2c ("power: add bit for high frequency cores")

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Tested-by: David Hunt <david.hunt@intel.com>
5 years agoipc: add warnings about correct API usage
Anatoly Burakov [Fri, 3 May 2019 11:50:50 +0000 (12:50 +0100)]
ipc: add warnings about correct API usage

When handling synchronous or asynchronous requests, the reply
must be sent explicitly even if the result of the operation is
an error, to avoid the other side timing out. Make note of this
in documentation explicitly.

Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agoipc: add warnings about not using IPC with memory API
Anatoly Burakov [Fri, 3 May 2019 11:50:49 +0000 (12:50 +0100)]
ipc: add warnings about not using IPC with memory API

IPC and memory-related API's should not be mixed because memory
relies on IPC internally. Add explicit warnings to IPC API and
to the documentation about this.

Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agodoc: fix typo in IPC guide
Anatoly Burakov [Fri, 3 May 2019 11:50:48 +0000 (12:50 +0100)]
doc: fix typo in IPC guide

The word "synchronous" appears twice. Fix it.

Fixes: e22266669e86 ("doc: add IPC guide")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agoipc: unlock on failure
Aaron Conole [Mon, 6 May 2019 13:48:25 +0000 (09:48 -0400)]
ipc: unlock on failure

Coverity issue: 340076
Fixes: a2a06860b8c4 ("ipc: fix memory leak on request failure")
Cc: stable@dpdk.org
Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Tested-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agotest/crypto: return not supported instead of skipped
Ayuj Verma [Thu, 9 May 2019 11:23:21 +0000 (16:53 +0530)]
test/crypto: return not supported instead of skipped

Currently some tests return TEST_SKIPPED/-1 when tests or params
are not supported for particular PMD because of which tests adds to
FAILED test counter in place of Skipped/Unsupported counter.

Since unsupported test is not a failure case,
replace return value TEST_SKIPPED/-1 with -ENOTSUP

- Return -ENOTSUP for unsupported tests
- add NULL check for rte_cryptodev_asym_capability_get()
- Typo correction

Signed-off-by: Ayuj Verma <ayverma@marvell.com>
Signed-off-by: Shally Verma <shallyv@marvell.com>
5 years agoipsec: fix headers install
Marcin Smoczynski [Wed, 8 May 2019 12:12:12 +0000 (14:12 +0200)]
ipsec: fix headers install

Invalid statement is used to indicate header files to install.

Fixed the statement and reformatted recipe file.

Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agodoc: fix typo in mlx5 guide
Yongseok Koh [Wed, 8 May 2019 09:24:09 +0000 (02:24 -0700)]
doc: fix typo in mlx5 guide

Fixes: 43e9d9794cde ("net/mlx5: support upstream rdma-core")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agoapp/testpmd: fix mbuf leak with multi-segment Tx
Andrew Rybchenko [Wed, 8 May 2019 10:27:37 +0000 (11:27 +0100)]
app/testpmd: fix mbuf leak with multi-segment Tx

The last mbuf allocated in bulk is never used and never freed.

Fixes: 01b645dcff7f ("app/testpmd: move txonly prepare in separate function")
Fixes: 561ddcf8d099 ("app/testpmd: allocate txonly segments per bulk")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/mlx5: fix errno for unsupported Direct Rules
Ori Kam [Tue, 7 May 2019 13:41:34 +0000 (13:41 +0000)]
net/mlx5: fix errno for unsupported Direct Rules

When Direct Rules API is not supported we don't set the errno.
This results in failing the function but with errno equals to zero.
The result of this is that a function that failed, is considered as
a function that worked correctly.

This commit fixes this issue by setting the errno to ENOTSUP and
returning this error when error value should be returned.

Since RDMA-CORE are returning positive errno we are also returning
positive error values.

Fixes: 4f84a19779ca ("net/mlx5: add Direct Rules API")

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agonet/mlx5: fix release of Rx queue object
Dekel Peled [Tue, 7 May 2019 07:26:02 +0000 (10:26 +0300)]
net/mlx5: fix release of Rx queue object

Function mlx5_rx_intr_disable() calls mlx5_rxq_ibv_get() and performs
some actions on the returned rxq_ibv.
It doesn't release the rxq_ibv when all is completed with success.

This patch adds call to mlx5_rxq_ibv_release() where it's missing.

Fixes: 09cb5b581762 ("net/mlx5: separate DPDK from verbs Rx queue objects")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agonet/mlx5: fix Multi-Packet RQ mempool name
Yongseok Koh [Mon, 6 May 2019 23:21:58 +0000 (16:21 -0700)]
net/mlx5: fix Multi-Packet RQ mempool name

Currently, the name of MPRQ mempool is set by
snprintf(name, sizeof(name), "%s-mprq", dev->device->name);
For port representor, the name is duplicate of its master and failed to
create such a mempool having the same name. Port ID is used in the name
instead.

Fixes: 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agonet/mlx5: fix init with zero Rx queue
Dekel Peled [Sun, 5 May 2019 11:44:24 +0000 (14:44 +0300)]
net/mlx5: fix init with zero Rx queue

Recent patch [1] added, at the end of mlx5_dev_configure(), a call to
mlx5_proc_priv_init(), initializing process_private data of eth_dev.
This call is not reached if PMD is started with zero Rx queues.
In this case mlx5_dev_configure() returns earlier due to the check:
if (rxqs_n == priv->rxqs_n)
return 0;
In such a scenario, later references to uninitialized process_private
data will result in segmentation fault.
For example see in function txq_uar_init().

This patch changes the check logic. The following code is executed
if (rxqs_n != priv->rxqs_n), and skipped otherwise.
Function mlx5_proc_priv_init() is always invoked, to ensure
process_private data is initialized.

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

Fixes: 120dc4a7dcd3 ("net/mlx5: remove device register remap")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/iavf: enable more link speed
Qi Zhang [Sat, 4 May 2019 14:09:10 +0000 (22:09 +0800)]
net/iavf: enable more link speed

Enable advanced link speed mode (VIRTCHNL_VF_CAP_ADV_LINK_SPEED) so iavf
PMD can identify more link speed that reported by pf.

Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
5 years agonet/i40e: add device id for X710/XXV710 of ipn3ke
Rosen Xu [Sun, 5 May 2019 03:27:02 +0000 (11:27 +0800)]
net/i40e: add device id for X710/XXV710 of ipn3ke

New PCI device ids are created to support X710/XXV710 of Intel FPGA
Programmable Acceleration card N3000, also called ipn3ke.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/ice: fix EEPROM range check
Xiao Wang [Sun, 5 May 2019 05:48:21 +0000 (13:48 +0800)]
net/ice: fix EEPROM range check

The last word should not cross shadow RAM boundary.

Fixes: 68a1ab82ad74 ("net/ice: speed up to retrieve EEPROM")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/ice: clean up minor issues
Xiao Wang [Sun, 5 May 2019 05:45:28 +0000 (13:45 +0800)]
net/ice: clean up minor issues

This patch is a cleanup on comment, variable modifier, coding style.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agoversion: 19.05-rc3
Thomas Monjalon [Sat, 4 May 2019 22:28:48 +0000 (00:28 +0200)]
version: 19.05-rc3

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
5 years agodoc: update release notes for Windows support
Pallavi Kadam [Tue, 23 Apr 2019 18:12:51 +0000 (11:12 -0700)]
doc: update release notes for Windows support

Added documentation for Windows support on 19.05 release.

Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Anand Rawat <anand.rawat@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agodoc: update release notes for new armv8 targets
Jerin Jacob [Thu, 25 Apr 2019 07:41:30 +0000 (13:11 +0530)]
doc: update release notes for new armv8 targets

Added documentation for the new armv8 targets supported in 19.05 release.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agodoc: add guide for debug and troubleshoot
Vipin Varghese [Tue, 9 Apr 2019 06:33:44 +0000 (12:03 +0530)]
doc: add guide for debug and troubleshoot

Add user guide on debugging and troubleshooting for common
issues and bottleneck found in the sample application model.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agodoc: add pictures for debug and troubleshoot guide
Vipin Varghese [Tue, 9 Apr 2019 06:33:43 +0000 (12:03 +0530)]
doc: add pictures for debug and troubleshoot guide

Add svg images for debug and troubleshoot guide.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agodoc: fix broken link in LPM guide
Herakliusz Lipiec [Wed, 24 Apr 2019 15:35:36 +0000 (16:35 +0100)]
doc: fix broken link in LPM guide

Bugzilla ID: 235
Fixes: fc1f2750a3ec ("doc: programmers guide")
Cc: stable@dpdk.org
Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agohash: fix doc about thread/process safety
Yipeng Wang [Mon, 29 Apr 2019 09:40:16 +0000 (02:40 -0700)]
hash: fix doc about thread/process safety

rte_hash_hash is multi-thread safe but not multi-process safe
because of the use of function pointers. Previous document
and comment says the other way around. This commit fixes
the issue.

Fixes: fc1f2750a3ec ("doc: programmers guide")
Fixes: 48a399119619 ("hash: replace with cuckoo hash implementation")
Cc: stable@dpdk.org
Reported-by: Andrey Nikolaev <gentoorion@gmail.com>
Suggested-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agoeventdev: update references to removed function
Erik Gabriel Carrillo [Mon, 29 Apr 2019 14:38:06 +0000 (09:38 -0500)]
eventdev: update references to removed function

Remove references to the (deleted) rte_event_port_enqueue_depth()
function in the Doxygen comments for rte_event_enqueue_burst() and
friends, and replace with references to rte_event_port_attr_get().

Fixes: 78ffab961155 ("eventdev: add port attribute function")
Fixes: c9bf83947e2e ("eventdev: add eth Tx adapter APIs")
Cc: stable@dpdk.org
Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agotest: load test symbols from binary at init
David Marchand [Mon, 29 Apr 2019 14:28:36 +0000 (16:28 +0200)]
test: load test symbols from binary at init

Rather than call nm on the test application binary for each test to
consider, call it once at the object init.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
5 years agotest: clean remaining trace of devargs autotest
David Marchand [Mon, 29 Apr 2019 14:32:45 +0000 (16:32 +0200)]
test: clean remaining trace of devargs autotest

This test has been removed by the commit 83945fbd7c49 ("test: remove
devargs unit tests") which left some trace in meson and reintroduced in
autotest by the second commit 9eabcb682493 ("test: update autotest
list").

Fixes: 83945fbd7c49 ("test: remove devargs unit tests")
Fixes: 9eabcb682493 ("test: update autotest list")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
5 years agoapp/testpmd: revert fixed flag for exact link speed
Ferruh Yigit [Wed, 24 Apr 2019 22:03:09 +0000 (23:03 +0100)]
app/testpmd: revert fixed flag for exact link speed

This reverts commit bdca79053b6aea504d02691d9319fa976062457f.

Not all PMDs support the fixed link speed set, and link speed can be set
even with auto negotiation enabled. Reverting the patch to not break
existing usage.

Fixes: bdca79053b6a ("app/testpmd: set fixed flag for exact link speed")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/netvsc: free all queues on close
Stephen Hemminger [Tue, 30 Apr 2019 18:12:17 +0000 (11:12 -0700)]
net/netvsc: free all queues on close

When dev_close is called, the netvsc driver will clean up all
queues including the primary ring buffer.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
5 years agonet/netvsc: reset mbuf port on VF Rx
Stephen Hemminger [Tue, 30 Apr 2019 18:12:16 +0000 (11:12 -0700)]
net/netvsc: reset mbuf port on VF Rx

Redo the receive logic to set m->port on packets received on VF.

When using VF, still need to check for packets and completions
arriving on the VMBus path even if application is not doing bursting
(ie n_rx == 0).

Also, fix comment.

Fixes: dc7680e8597c ("net/netvsc: support integrated VF")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
5 years agonet/vmxnet3: add VLAN filter capability
Mark Gillott [Wed, 1 May 2019 15:29:42 +0000 (16:29 +0100)]
net/vmxnet3: add VLAN filter capability

The driver supports VLAN filtering, but the option is not included in
the advertised list of capabilities. Thus any attempt to enable VLAN
filtering always fails. Update the list of offload capabilities to
include DEV_RX_OFFLOAD_VLAN_FILTER.

Fixes: 95e4a96ccbf1 ("net/vmxnet3: convert to new Rx offload API")
Cc: stable@dpdk.org
Signed-off-by: Mark Gillott <mgillott@vyatta.att-mail.com>
Acked-by: Yong Wang <yongwang@vmware.com>
5 years agonet/tap: fix potential IPC buffer overrun
Herakliusz Lipiec [Mon, 29 Apr 2019 17:31:21 +0000 (18:31 +0100)]
net/tap: fix potential IPC buffer overrun

When secondary to primary process synchronization occurs
there is no check for number of fds which could cause buffer overrun.

Bugzilla ID: 252
Fixes: c9aa56edec8e ("net/tap: access primary process queues from secondary")
Cc: stable@dpdk.org
Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/mlx5: fix Direct Rules API
Ori Kam [Wed, 1 May 2019 20:40:45 +0000 (20:40 +0000)]
net/mlx5: fix Direct Rules API

The RDMA-CORE Direct Rules API was changed in latest upstream code

This commit update the API accordingly.

Fixes: 4f84a19779ca ("net/mlx5: add Direct Rules API")

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agonet/mlx5: fix max number of queues for NEON Tx
Yongseok Koh [Wed, 1 May 2019 01:37:17 +0000 (18:37 -0700)]
net/mlx5: fix max number of queues for NEON Tx

BlueField SmartNIC has 0xa2d2 as PCI device ID on both ARM and x86 host. On
ARM side, Tx inlining need not be used as PCI bandwidth is not bottleneck.
Vectorized Tx can still be used up to 16 queues. For other archs
(e.g., x86), keep using the default value.

Fixes: 09d8b41699bb ("net/mlx5: make vectorized Tx threshold configurable")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agonet/mlx5: check Tx queue size overflow
Yongseok Koh [Wed, 1 May 2019 01:01:43 +0000 (18:01 -0700)]
net/mlx5: check Tx queue size overflow

If Tx packet inlining is enabled, rdma-core library should allocate large
Tx WQ enough to support it. It is better for PMD to calculate the size of
WQ based on the parameters and return error with appropriate message if it
exceeds the device capability.

Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agonet/mlx5: fix E-Switch flow without port item
Ori Kam [Thu, 25 Apr 2019 12:20:55 +0000 (12:20 +0000)]
net/mlx5: fix E-Switch flow without port item

When creating a flow rule without the port_id pattern item, always the
PF was selected.

This commit fixes this issue, if no port_id pattern item is available
then we use the port that the flow was created on as source port.

Fixes: 822fb3195348 ("net/mlx5: add port id item to Direct Verbs")

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/i40e: fix link speed for X722
Beilei Xing [Tue, 30 Apr 2019 06:56:37 +0000 (14:56 +0800)]
net/i40e: fix link speed for X722

If disable LSC when launching testpmd with X722, shown
link speed is 20G but not 10G. It's caused by wrongly
parsed link speed.
Correct it according to X722 datasheet.

Fixes: eef2daf2e199 ("net/i40e: fix link update no wait")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agotest/bonding: fix MAC assignment for re-run
Krzysztof Kanas [Fri, 26 Apr 2019 22:30:29 +0000 (00:30 +0200)]
test/bonding: fix MAC assignment for re-run

Fix test_set_bonded_port_initialization_mac_assignment so that it works
after 're run' test_link_bonding.

Fixes: f2ef6f21ee2e ("bond: fix mac assignment to slaves")
Cc: stable@dpdk.org
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Acked-by: Chas Williams <chas3@att.com>
5 years agonet/af_xdp: remove resources when port is closed
Xiaolong Ye [Tue, 30 Apr 2019 08:39:46 +0000 (16:39 +0800)]
net/af_xdp: remove resources when port is closed

Since 18.11, it is suggested that driver should release all its private
resources at the dev_close routine. So all resources previously released
in remove routine are now released at the dev_close routine, and the
dev_close routine will be called in driver remove routine in order to
support removing a device without closing its ports.

Above behavior changes are supported by setting RTE_ETH_DEV_CLOSE_REMOVE
flag during probe stage.

Also as af_xdp pmd doesn't allocate MAC addresses dynamically, it needs
to be set as NULL, so it won't be released by rte_eth_dev_release_port()
otherwise, there would be "EAL: Error: Invalid memory" error.

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/mlx5: fix flow action destroy
Yongseok Koh [Wed, 24 Apr 2019 00:56:13 +0000 (17:56 -0700)]
net/mlx5: fix flow action destroy

ibv_destroy_flow_action() refers to QP. QP must not be freed until
corresponding action is destroyed.

Fixes: 3eb004431072 ("net/mlx5: fix release of jump to queue action")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agonet/atlantic: remove extra error check
Igor Russkikh [Mon, 29 Apr 2019 08:20:28 +0000 (08:20 +0000)]
net/atlantic: remove extra error check

Found by Coverity scan - dead code

Coverity issue: 337665
Fixes: 7943ba05f67c ("net/atlantic: add link status and interrupt management")
Cc: stable@dpdk.org
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
5 years agonet/atlantic: fix arguments check
Igor Russkikh [Mon, 29 Apr 2019 08:20:27 +0000 (08:20 +0000)]
net/atlantic: fix arguments check

Found by Coverity scan, two pointer args should be not zero checked

Coverity issue: 337929
Fixes: 2f40244b39ba ("net/atlantic: implement MACsec firmware interface")

Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
5 years agonet/atlantic: use capability bits to detect EEPROM access
Pavel Belous [Mon, 29 Apr 2019 08:20:25 +0000 (08:20 +0000)]
net/atlantic: use capability bits to detect EEPROM access

Its better to use capability bits FW provides to detect whether
firmware has APIs for EEPROM access.

Before that explicit FW version comparison was used and that may
cause conflicts.

Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
5 years agonet/atlantic: fix flow control by sync settings on Rx
Pavel Belous [Mon, 29 Apr 2019 08:20:23 +0000 (08:20 +0000)]
net/atlantic: fix flow control by sync settings on Rx

Driver should track negotiated PHY flow control settings during
link state changes and update MAC level flow control configuration.

Otherwise there could be unexpected pause frames generation which
could lockup the datapath.

Fixes: 4c1c8f76463f ("net/atlantic: add flow control configuration")
Cc: stable@dpdk.org
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
5 years agonet/atlantic: fix offsets for talking with firmware
Pavel Belous [Mon, 29 Apr 2019 08:20:21 +0000 (08:20 +0000)]
net/atlantic: fix offsets for talking with firmware

EEPROM write accesses start using non zero configuration memory
accesses. This revealed an issue where firmware interface was actually
always did the uploads starting with zero offset

Fixes: 86d36773bd42 ("net/atlantic: implement firmware operations")
Cc: stable@dpdk.org
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
5 years agonet/atlantic: check EEPROM dev address validity
Igor Russkikh [Mon, 29 Apr 2019 08:20:19 +0000 (08:20 +0000)]
net/atlantic: check EEPROM dev address validity

Clients may not filling magic field, thus causing garbage
to be passed as a device address.

Limit that to maximum SMbus address.

Fixes: ce4e8d418097 ("net/atlantic: implement EEPROM get/set")
Cc: stable@dpdk.org
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
5 years agonet/atlantic: fix max EEPROM size
Igor Russkikh [Mon, 29 Apr 2019 08:20:17 +0000 (08:20 +0000)]
net/atlantic: fix max EEPROM size

Maximum size should be 256 bytes.
Move declaration to the top of the file

Fixes: ce4e8d418097 ("net/atlantic: implement EEPROM get/set")
Cc: stable@dpdk.org
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
5 years agonet/atlantic: consider EEPROM get/set offset
Pavel Belous [Mon, 29 Apr 2019 08:20:15 +0000 (08:20 +0000)]
net/atlantic: consider EEPROM get/set offset

EEPROM get/set offset logic should take offset into account.
Data transfers to/from FW should also correctly use
dword based transfer interface, taking into account the
remainder.
We also check error code returned from FW.

Fixes: ce4e8d418097 ("net/atlantic: implement EEPROM get/set")
Cc: stable@dpdk.org
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
5 years agonet/atlantic: fix indentation
Igor Russkikh [Mon, 29 Apr 2019 08:20:13 +0000 (08:20 +0000)]
net/atlantic: fix indentation

Make indentation correct. No functional impact.

Fixes: f73061d53b5a ("net/atlantic: use EEPROM magic as a device address")

Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
5 years agonet/atlantic: enable broadcast traffic
Igor Russkikh [Mon, 29 Apr 2019 08:20:09 +0000 (08:20 +0000)]
net/atlantic: enable broadcast traffic

Broadcast was not correctly and fully initialized

Fixes: 7906661edac6 ("net/atlantic: add b0 hardware layer")
Cc: stable@dpdk.org
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
5 years agonet/i40e: fix queue number check
Wei Zhao [Sun, 28 Apr 2019 06:13:18 +0000 (14:13 +0800)]
net/i40e: fix queue number check

Remove invalid queue number check which cause unexpected error return.

Fixes: ac8d22de2394 ("ethdev: flatten RSS configuration in flow API")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Qimai Xiao <qimaix.xiao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/mlx4: support multicast address list interface
Adrien Mazarguil [Thu, 18 Apr 2019 13:10:34 +0000 (15:10 +0200)]
net/mlx4: support multicast address list interface

Since this driver does not distinguish unicast/multicast addresses,
applications could always rely on the standard MAC add/remove/set
interface to configure both types.

As a result, the multicast address list interface never got implemented
(rte_eth_dev_set_mc_addr_list()) however PMD-agnostic applications still
rely on it for compatibility reasons; a wrapper is therefore required.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agonet/mlx5: update memory event callback for shared context
Viacheslav Ovsiienko [Sat, 27 Apr 2019 04:32:57 +0000 (04:32 +0000)]
net/mlx5: update memory event callback for shared context

Mellanox mlx5 PMD implements the list of devices to process the memory
free events to reflect the actual memory state to Memory Regions.
Because this list contains the devices and devices may share the
same context the callback routine may be called multiple times
with the same parameter, that is not optimal. This patch modifies
the list to contain the device contexts instead of device objects
and shared context is included in the list only once.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agonet/mlx5: share Memory Regions for multiport device
Viacheslav Ovsiienko [Sat, 27 Apr 2019 04:32:56 +0000 (04:32 +0000)]
net/mlx5: share Memory Regions for multiport device

The multiport Infiniband device support was introduced [1].
All active ports, belonging to the same Infiniband device use the single
shared Infiniband context of that device and share the resources:
  - QPs are created within shared context
  - Verbs flows are also created with specifying port index
  - DV/DR resources
  - Protection Domain
  - Event Handlers

This patchset adds support for Memory Regions sharing between
ports, created on the base of multiport Infiniband device.
The datapath of mlx5 uses the layered cache subsystem for
allocating/releasing Memory Regions, only the lowest layer L3
is subject to share due to performance issues.

[1] http://patches.dpdk.org/cover/51800/

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: inherit master link settings for representors
Viacheslav Ovsiienko [Sat, 27 Apr 2019 04:19:58 +0000 (04:19 +0000)]
net/mlx5: inherit master link settings for representors

There are some physical link settings can be queried from
Ethernet devices: link status, link speed, speed capabilities,
duplex mode, etc. These setting do not make a lot of sense for
representors due to missing physical link. The new kernel drivers
dropped query for link settings for representors causing the
ioctl call to fail. This patch adds some kind of emulation
of link settings to PMD - representors inherit the link parameters
from the master device. The actual link status (up/down)
is retrieved from the representor device.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agonet/mlx5: fix modification action flags
Ori Kam [Mon, 22 Apr 2019 18:06:56 +0000 (18:06 +0000)]
net/mlx5: fix modification action flags

When creating the modify action using Direct Rules, we need to
add flags to mark, if the action will be done on root table or on
private table.

Fixes: 4f84a19779ca ("net/mlx5: add Direct Rules API")

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agonet/ice: fix Rx statistics
Simei Su [Wed, 24 Apr 2019 07:06:10 +0000 (15:06 +0800)]
net/ice: fix Rx statistics

The RX stats will increase even no packets sent, this patch fix this issue
by modifying ipackets and ibytes statistics based on vsi instead of port
to avoid statistics error.

Fixes: a37bde56314d ("net/ice: support statistics")
Cc: stable@dpdk.org
Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/dpaa2: fix loop increment
Shreyansh Jain [Thu, 25 Apr 2019 13:34:56 +0000 (19:04 +0530)]
net/dpaa2: fix loop increment

Identified by LGTM, the loop was incorrectly incrementing a different
variable and conditional on another.

Fixes: fe2b986ac662 ("net/dpaa2: support generic flow")

Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
5 years agoapp/testpmd: fix unintentional integer overflow
Tiwei Bie [Wed, 24 Apr 2019 02:29:31 +0000 (10:29 +0800)]
app/testpmd: fix unintentional integer overflow

Fix the potential overflow in expression 1 << begin by using 1ULL.

Coverity issue: 279437, 279445
Fixes: c73a9071877a ("app/testpmd: add commands to test new offload API")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
5 years agonet/kni: fix return value check
Ferruh Yigit [Tue, 23 Apr 2019 15:36:21 +0000 (16:36 +0100)]
net/kni: fix return value check

'rte_kni_release()' return value is not checked, adding it.

Coverity issue: 336837
Fixes: 75e2bc54c018 ("net/kni: add KNI PMD")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/ring: fix return value check
Ferruh Yigit [Tue, 23 Apr 2019 15:23:32 +0000 (16:23 +0100)]
net/ring: fix return value check

'rte_eth_dev_get_port_by_name()' return value is not checked caught by
coverity, adding return value check.

Coverity issue: 305853
Fixes: 96cb19521147 ("net/ring: use EAL APIs in PMD specific API")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agonet/ring: check length of ring name
Stephen Hemminger [Tue, 23 Apr 2019 16:53:35 +0000 (09:53 -0700)]
net/ring: check length of ring name

The ring name is passed in as part of this drivers API, but it
doesn't check that the name is not truncated.

Fixes: 96cb19521147 ("net/ring: use EAL APIs in PMD specific API")
Fixes: e1e4017751f1 ("ring: add new driver")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/ring: use calloc style where appropriate
Stephen Hemminger [Tue, 23 Apr 2019 16:53:34 +0000 (09:53 -0700)]
net/ring: use calloc style where appropriate

Use rte_calloc_socket instead of computing size.

Fixes: 651c505af862 ("ring: enhance device setup from rings")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/ring: avoid hard-coded length
Stephen Hemminger [Tue, 23 Apr 2019 16:53:33 +0000 (09:53 -0700)]
net/ring: avoid hard-coded length

Don't hard code string length in two place; use sizeof() instead.
Ring name should use RTE_RING_NAMESIZE.

Fixes: 96cb19521147 ("net/ring: use EAL APIs in PMD specific API")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/ring: fix coding style
Stephen Hemminger [Tue, 23 Apr 2019 16:53:32 +0000 (09:53 -0700)]
net/ring: fix coding style

Whitespace fixes to bring inline with current DPDK style.

Fixes: e1e4017751f1 ("ring: add new driver")
Fixes: a74a99bbb8ed ("ring: free rings when detaching device")
Fixes: 61934c0956d4 ("ring: convert to use of PMD_REGISTER_DRIVER and fix linking")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/ice: fix possible null pointer dereference
Wenzhuo Lu [Wed, 24 Apr 2019 02:43:42 +0000 (10:43 +0800)]
net/ice: fix possible null pointer dereference

Fix the issues reported by Coverity check, "Null-checking
vsi suggests that it may be null, but it has already been
dereferenced on all paths leading to the check."

Coverity issue: 328509, 328519, 328523
Fixes: e0dcf94a0d7f ("net/ice: support VLAN ops")
Fixes: ff963bfa7cb1 ("net/ice: support RSS")
Cc: stable@dpdk.org
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
5 years agoapp/testpmd: fix help info for interactive commands
Agalya Babu RadhaKrishnan [Tue, 23 Apr 2019 13:51:56 +0000 (14:51 +0100)]
app/testpmd: fix help info for interactive commands

Added some missing help info for interactive mode commands

Fixes: 6673fe0ce213 ("app/testpmd: add TM commands to mark packets")
Fixes: c73a9071877a ("app/testpmd: add commands to test new offload API")
Fixes: e977e4199a8d ("app/testpmd: add commands to load/unload BPF filters")
Fixes: c18feafa193c ("app/testpmd: support metadata as flow rule item")
Cc: stable@dpdk.org
Signed-off-by: Agalya Babu RadhaKrishnan <agalyax.babu.radhakrishnan@intel.com>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agodoc: fix interactive commands in testpmd guide
Agalya Babu RadhaKrishnan [Tue, 23 Apr 2019 10:44:27 +0000 (11:44 +0100)]
doc: fix interactive commands in testpmd guide

Added some missing documentation for interactive mode commands

Fixes: 01b2092a5e4b ("testpmd: add dump commands for debug")
Fixes: caf05a1b8608 ("app/testpmd: new command to dump log types")
Fixes: 0f62d63593ed ("app/testpmd: support tunneled TSO in checksum engine")
Fixes: 8fff667578a7 ("app/testpmd: new command to add/remove multicast MAC addresses")
Fixes: ae03d0d18adf ("app/testpmd: command to configure MTU")
Fixes: f79959ea1504 ("app/testpmd: allow to configure RSS hash key")
Fixes: caf05a1b8608 ("app/testpmd: new command to dump log types")
Cc: stable@dpdk.org
Signed-off-by: Agalya Babu RadhaKrishnan <agalyax.babu.radhakrishnan@intel.com>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
5 years agonet/sfc: fix MTU change to check Rx scatter consistency
Igor Romanov [Tue, 23 Apr 2019 08:14:30 +0000 (09:14 +0100)]
net/sfc: fix MTU change to check Rx scatter consistency

Rx queue setup function checks configured MTU to make sure that
no oversized packets can be received. But a following call to
set MTU function might make this check irrelevant.

Add a function to check MTU size against Rx buffer size and
additional Rx queue info, including Rx scatter offload.

Fixes: e961cf425e02 ("net/sfc: support MTU change")
Cc: stable@dpdk.org
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
5 years agonet/mlx5: fix probing if DevX disabled
Viacheslav Ovsiienko [Mon, 22 Apr 2019 12:38:17 +0000 (12:38 +0000)]
net/mlx5: fix probing if DevX disabled

If there is the support of DevX is exposed by rdma-core but
DevX is not supported by or disabled for the specific interface
the mlx5_devx_cmd_query_hca_attr() routine returns an error
preventing the device from successful probing. The routine
should be invoked only in case of enabled DevX.

Fixes: e2b4925ef7c1 ("net/mlx5: support Direct Rules E-Switch")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agonet/mlx5: fix comments mixing Rx and Tx
Dekel Peled [Mon, 22 Apr 2019 15:24:11 +0000 (18:24 +0300)]
net/mlx5: fix comments mixing Rx and Tx

In mlx5_rxq.c, in some comments, text includes "Tx" instead of "Rx".
In mlx5_txq.c, in some comments, text includes "Rx" instead of "Tx".

This patch fixes these typos.

Fixes: faf2667fe8d5 ("net/mlx5: separate DPDK from verbs Tx queue objects")
Fixes: a1366b1a2be3 ("net/mlx5: add reference counter on DPDK Rx queues")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agonet/mlx5: fix Direct Rules build
Yongseok Koh [Sat, 20 Apr 2019 00:02:43 +0000 (17:02 -0700)]
net/mlx5: fix Direct Rules build

All the library calls must be called via the glue layer.

Fixes: b2177648b8de ("net/mlx5: add Direct Rules flow data alloc/free routines")
Fixes: 79e35d0d5979 ("net/mlx5: share Direct Rules/Verbs flow related structures")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agonet/mlx5: replace a port lookup with ethdev API
Thomas Monjalon [Thu, 18 Apr 2019 00:15:29 +0000 (02:15 +0200)]
net/mlx5: replace a port lookup with ethdev API

Looking for an ethdev port is better (and more efficient)
with an ethdev API than an EAL one.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agonet/mlx5: fix initialization for flow group
Ori Kam [Sun, 14 Apr 2019 20:18:55 +0000 (20:18 +0000)]
net/mlx5: fix initialization for flow group

The flow group should be initialized.
For example selecting if the encapsulation is for root or private tables
is based on the flow->group value.

Fixes: 4f84a19779ca ("net/mlx5: add Direct Rules API")

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agodoc: update ice guide for MDD
Wenzhuo Lu [Fri, 12 Apr 2019 03:33:47 +0000 (11:33 +0800)]
doc: update ice guide for MDD

Update ICE document to describe a MDD event.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
5 years agonet/iavf: fix stats reset
Qiming Yang [Mon, 22 Apr 2019 02:18:37 +0000 (10:18 +0800)]
net/iavf: fix stats reset

stats_reset has been missed when support stats in iavf driver.
This patch add statistics reset function.

Fixes: f4a41a6953af ("net/avf: support stats")
Cc: stable@dpdk.org
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agotimer: fix reset/stop in callback for new API
Erik Gabriel Carrillo [Fri, 26 Apr 2019 14:41:24 +0000 (09:41 -0500)]
timer: fix reset/stop in callback for new API

The rte_timer_alt_manage function should track which is the running
timer and whether or not it was updated by a callback in the priv_timer
structure that corresponds to the running lcore, so that restarting
or stopping the timer from the callback works correctly.

Fixes: c0749f7096c7 ("timer: allow management in shared memory")

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
5 years agotimer: fix pointer to local outside scope
Erik Gabriel Carrillo [Wed, 24 Apr 2019 14:33:50 +0000 (09:33 -0500)]
timer: fix pointer to local outside scope

A null array is allowed to be passed as one of the parameters to
rte_timer_alt_manage() as a convenience.  When that happened, an
anonymous array was created using compound literal syntax, and Coverity
detected that the object was out of scope in later uses of it. Create
an object in the proper scope instead.

Coverity issue: 337919
Fixes: c0749f7096c7 ("timer: allow management in shared memory")

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
5 years agoevent/dsw: fix capability flags
Mattias Rönnblom [Fri, 3 May 2019 16:45:53 +0000 (18:45 +0200)]
event/dsw: fix capability flags

The DSW event device didn't set RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT
and RTE_EVENT_DEV_CAP_NONSEQ_MODE, even though it has both these
capabilities.

Fixes: 4540ee9c68 ("event/dsw: add device and queue configuration")
Cc: stable@dpdk.org
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agovfio: expand non-viable group error message
Kevin Traynor [Fri, 26 Apr 2019 16:22:30 +0000 (17:22 +0100)]
vfio: expand non-viable group error message

"VFIO group is not viable" error message is correct
but not very user friendly for something which can
usually be easily rectified.

Add some additional text to give more of a hint.

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
5 years agopower: clarify comment about SST-BF priority core
David Hunt [Thu, 2 May 2019 11:18:15 +0000 (12:18 +0100)]
power: clarify comment about SST-BF priority core

As part of the documentation update on the changes made to the power
library for 19.05, information on SST-BF was added. This patch updates
the comment to clarify that a priority core is an SST-BF high
frequency core.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agodoc: add SST-BF info
David Hunt [Thu, 2 May 2019 11:18:13 +0000 (12:18 +0100)]
doc: add SST-BF info

In the Power Library, a new bit has been added to the mask returned by
rte_power_get_capabilities which indicates whether the core is an
Intel SST-BF high frequency core.

The distributor sample application has been enhanced to be aware of
Intel SST-BF high frequency cores. Docs also contain a link to
the Intel SST-BF application note.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agoipc: replace bool checks with explicit non-zero
Thomas Monjalon [Fri, 3 May 2019 15:35:39 +0000 (17:35 +0200)]
ipc: replace bool checks with explicit non-zero

The function check_input() was returning a bool as error code.
It is changed to return an int, semantically more correct.
While at it, make checks of validate_action_name() return
explicit as described in the coding guidelines.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agomaintainers: claim maintainership of IPC
Anatoly Burakov [Thu, 25 Apr 2019 13:17:51 +0000 (14:17 +0100)]
maintainers: claim maintainership of IPC

IPC is a big part of secondary process infrastructure now,
and I have been de-facto maintainer for it since 18.05.
Update MAINTAINERS file to match.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agoipc: handle more invalid parameter cases
Anatoly Burakov [Mon, 29 Apr 2019 13:59:28 +0000 (14:59 +0100)]
ipc: handle more invalid parameter cases

Length of buffer and number of fd's to send are signed values, so
they can be negative, but the API doesn't check for that. Fix it
by checking for negative values as well.

Fixes: bacaa2754017 ("eal: add channel for multi-process communication")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agoipc: harden message receive
Anatoly Burakov [Mon, 29 Apr 2019 14:22:50 +0000 (15:22 +0100)]
ipc: harden message receive

Currently, IPC does not check received messages for invalid data
and passes them to user code unchanged. This may result in buffer
overruns on reading message data. Fix this by checking the message
length and fd number on receive, and discard any messages that
are not valid.

Fixes: bacaa2754017 ("eal: add channel for multi-process communication")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agoipc: fix send error handling
Anatoly Burakov [Fri, 26 Apr 2019 10:27:17 +0000 (11:27 +0100)]
ipc: fix send error handling

According to manpage, ENOBUFS error indicates that either the
input or the output queue is full. This should be considered
an error, but it is treated as an "ignore" condition. Fix the
code to report an error instead.

Fixes: bacaa2754017 ("eal: add channel for multi-process communication")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
5 years agonet/tap: fix memory leak on IPC request
Herakliusz Lipiec [Thu, 25 Apr 2019 12:48:17 +0000 (13:48 +0100)]
net/tap: fix memory leak on IPC request

When sending synchronous IPC requests, the caller must free the response
buffer if the request was successful and reply is no longer needed.
Fix the code to correctly
use the IPC API.

Bugzilla ID: 228
Fixes: c9aa56edec8e ("net/tap: access primary process queues from secondary")
Cc: stable@dpdk.org
Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>