dpdk.git
6 years agonet/mlx5: avoid stripping the glue library
Timothy Redaelli [Tue, 31 Jul 2018 13:15:28 +0000 (15:15 +0200)]
net/mlx5: avoid stripping the glue library

Stripping binaries at build time is usually a bad thing since it makes
impossible to generate (split) debug symbols and this can lead to a more
difficult debugging.

Fixes: 59b91bec12c6 ("net/mlx5: spawn rdma-core dependency plug-in")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
6 years agonet/mlx4: avoid stripping the glue library
Timothy Redaelli [Tue, 31 Jul 2018 13:15:27 +0000 (15:15 +0200)]
net/mlx4: avoid stripping the glue library

Stripping binaries at build time is usually a bad thing since it makes
impossible to generate (split) debug symbols and this can lead to a more
difficult debugging.

Fixes: 27cea11686ff ("net/mlx4: spawn rdma-core dependency plug-in")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
6 years agonet/mlx5: fix flow count action for shared counter
Shahaf Shuler [Sun, 29 Jul 2018 10:43:32 +0000 (13:43 +0300)]
net/mlx5: fix flow count action for shared counter

According to commit fb8fd96d4251 ("ethdev: add shared counter to flow
API") the counter id should be taken into account only when the shared
flag is set.

Fixes: 60bd8c9747e8 ("net/mlx5: add count flow action")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
6 years agonet/mlx4: check RSS queues number limitation
Moti Haimovsky [Wed, 25 Jul 2018 14:47:39 +0000 (17:47 +0300)]
net/mlx4: check RSS queues number limitation

This patch verifies that the number of Rx queues configured for RSS
is supported by the device hardware.
RSS support in mlx4 requires contiguous chunk of QPs to be reserved,
there is a hardware limitation on the amount of contiguous QPs which
is reported by the hardware. Ignoring this value will cause Rx queues
creation to fail.

Cc: stable@dpdk.org
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
6 years agonet/dpaa2: remove loop for unused pool entries
Gavin Hu [Tue, 31 Jul 2018 07:51:37 +0000 (15:51 +0800)]
net/dpaa2: remove loop for unused pool entries

Currently only one buffer pool is configured and in use,
looping for up to maxmum 8 times is unnecessary and might
be buggy as assigned uninititalized values.

The fix is to loop for the configured times with initialize
with valid values.

Fixes: 16bbc98a3e ("bus/fslmc: update MC to 10.3.x")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agonet/bnx2x: move SPDX tags to source files
Rasesh Mody [Fri, 27 Jul 2018 15:47:27 +0000 (08:47 -0700)]
net/bnx2x: move SPDX tags to source files

We were using LICENSE.bnx2x_pmd to reference inclusion of SPDX licensing
tag from all the source file. Remove the LICENSE.bnx2x_pmd file and
directly include SPDX tags in source files.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/bnx2x: fix copyright
Rasesh Mody [Fri, 27 Jul 2018 15:45:00 +0000 (08:45 -0700)]
net/bnx2x: fix copyright

Originally the PMD had "QLogic Corporation" copyright. When we submitted
commit e3de5dad2a5d ("net/bnx2x: change copyright info to Cavium"),
the "Qlogic Corporation" copyright was accidentally replaced
with "Cavium Inc". So now we see multiple Cavium copyright messages.
We're changing it to "Broadcom Corporation" copyright.

Fixes: e3de5dad2a5d ("net/bnx2x: change copyright info to Cavium")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/bnx2x: bump version to 1.0.6.1
Rasesh Mody [Fri, 3 Aug 2018 04:42:46 +0000 (21:42 -0700)]
net/bnx2x: bump version to 1.0.6.1

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/bnx2x: fix poll link status
Rasesh Mody [Fri, 3 Aug 2018 04:42:45 +0000 (21:42 -0700)]
net/bnx2x: fix poll link status

The PMD has been modified to invoke the polling function in the link
management code which detects the peer speed/mode, configure the link
and update the status accordingly. This patch is the fix for the link
down issue seen when we do dev_stop() and dev_start() from an
application.

Fixes: 540a211084a7 ("bnx2x: driver core")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/bnx2x: fix FW command timeout during stop
Rasesh Mody [Wed, 1 Aug 2018 18:19:20 +0000 (11:19 -0700)]
net/bnx2x: fix FW command timeout during stop

This patch fixes firmware command timeout error seen during device stop
while stopping queues. It patially reverts an earlier preventive change
commit 91b7e432bcef ("net/bnx2x: disable fast path interrupts") to now
enable fast path interrupts.

The original issue of performance degradation is not observed anymore,
with or without the fix.

Fixes: 91b7e432bcef ("net/bnx2x: disable fast path interrupts")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede: fix MAC address removal failure message
Shahed Shaikh [Tue, 24 Jul 2018 22:18:44 +0000 (15:18 -0700)]
net/qede: fix MAC address removal failure message

Don't treat MAC address removal failure as a fatal error
and print in logs.

Fixes: 77fac1b54fc9 ("net/qede: fix filtering code")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
6 years agonet/qede/base: fix GRC attention callback
Rasesh Mody [Tue, 24 Jul 2018 22:18:43 +0000 (15:18 -0700)]
net/qede/base: fix GRC attention callback

Treat any attention which is not for timeout event as invalid
and return status accordingly. The HW error handler logs and clears
the HW attention. Without this fix we can see flood of GRC attentions.

Fixes: e6051bd6b07d ("qede: add interrupt handling support")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: fix to clear HW indication
Rasesh Mody [Tue, 24 Jul 2018 22:18:42 +0000 (15:18 -0700)]
net/qede/base: fix to clear HW indication

VDMs may cause the was_error indication to be set after the driver
clears it. Clear the indication after the internal FID_enable for
the PF is set.

Fixes: 60c78a5e258a ("net/qede/base: fix recovery from previous ungraceful exit")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede: fix interrupt handler unregister
Shahed Shaikh [Tue, 24 Jul 2018 22:18:41 +0000 (15:18 -0700)]
net/qede: fix interrupt handler unregister

Commit 023d7a0449f11 ("net/qede: fix legacy interrupt mode")
added a handler for legacy interrupt mode but forgot to
unregister same handler in rte_intr_callback_unregister()

Fixes: 245aec289338 ("net/qede: fix legacy interrupt mode")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
6 years agonet/bnxt: fix RETA size
Ajit Khaparde [Thu, 26 Jul 2018 01:15:48 +0000 (18:15 -0700)]
net/bnxt: fix RETA size

The reta_size being indicated in the bnxt_dev_info_get_op was incorrect.
Set it to the value supported by the hardware.

Fixes: 0a6d2a720078 ("net/bnxt: get device infos")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Tested-by: Randy Schacher <stuart.schacher@broadcom.com>
6 years agonet/bnxt: check access denied for HWRM commands
Ajit Khaparde [Thu, 26 Jul 2018 01:15:47 +0000 (18:15 -0700)]
net/bnxt: check access denied for HWRM commands

Firmware can restrict access to certain resources in the hardware
depending on various factors. In such cases when the PMD tries to
configure these resources the firmware will return
HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED error. Parse this and return
the standard EACCES error to the applications.

Fixes: 804e746c7b73 ("net/bnxt: add hardware resource manager init code")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: fix lock release on NVM write failure
Ajit Khaparde [Thu, 26 Jul 2018 01:15:46 +0000 (18:15 -0700)]
net/bnxt: fix lock release on NVM write failure

In bnxt_hwrm_flash_nvram, before attempting to allocate a buffer
we are grabbing the rte_spinlock. And if the allocation fails we
are returning before releasing the spinlock. We avoid the situation
by calling HWRM_PREP which grabs the lock after the buffer is
allocated successfully.

Fixes: 19e6af01bb36 ("net/bnxt: support get/set EEPROM")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
6 years agonet/bnxt: fix memory leaks in NVM commands
Ajit Khaparde [Thu, 26 Jul 2018 01:15:45 +0000 (18:15 -0700)]
net/bnxt: fix memory leaks in NVM commands

In some cases we may not be freeing up memory allocated for certain
NVM commands because the code might have bailed out before reaching
rte_free(). This patch moves some code around to ensure the allocated
memory is freed before exiting the function.

Fixes: 19e6af01bb36 ("net/bnxt: support get/set EEPROM")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Michael Wildt <michael.wildt@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
6 years agonet/bnxt: fix filter freeing
Somnath Kotur [Thu, 26 Jul 2018 01:15:44 +0000 (18:15 -0700)]
net/bnxt: fix filter freeing

bnxt_clear_hwrm_vnic_filters() was removing the created filter from HW,
but not clearing the internal data structures by removing it from the
struct bnxt_vnic_info->filter list.

Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/cxgbevf: do not allocate control queues
Shagun Agrawal [Thu, 26 Jul 2018 07:28:06 +0000 (12:58 +0530)]
net/cxgbevf: do not allocate control queues

Control queues can not be allocated for VFs. So, add check to
only allocate control queues for PFs. This fixes adapter crash
when an attempt is made to allocate control queues for VFs.

Fixes: 3a3aaabc ("net/cxgbe: add control queue to communicate filter requests")

Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: fix null dereference on CLIP failure
Shagun Agrawal [Thu, 26 Jul 2018 08:19:32 +0000 (13:49 +0530)]
net/cxgbe: fix null dereference on CLIP failure

Coverity issue: 302872
Fixes: 3f2c1e209cfc ("net/cxgbe: add Compressed Local IP region")

Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/enic: reset VXLAN port during initialization
Hyong Youb Kim [Tue, 31 Jul 2018 21:26:13 +0000 (14:26 -0700)]
net/enic: reset VXLAN port during initialization

The NIC persists the vxlan port number across vNIC init/de-init
(e.g. restart testpmd). So, explicitly reset the setting to the
default value (4789) as part of the initialization.

Fixes: 8a4efd17410c ("net/enic: add handlers to add/delete vxlan port number")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
6 years agonet/enic: revert mbuf fast free offload
Hyong Youb Kim [Thu, 26 Jul 2018 02:30:28 +0000 (19:30 -0700)]
net/enic: revert mbuf fast free offload

This reverts the patch that enabled mbuf fast free.

There are two main reasons.

First, enic_fast_free_wq_bufs is broken. When
DEV_TX_OFFLOAD_MBUF_FAST_FREE is enabled, the driver calls this
function to free transmitted mbufs. This function currently does not
reset next and nb_segs. This is simply wrong as the fast-free flag
does not imply anything about next and nb_segs.

We could fix enic_fast_free_wq_bufs by making it to call
rte_pktmbuf_prefree_seg to reset the required fields. But, it negates
most of cycle saving.

Second, there are customer applications that blindly enable all Tx
offloads supported by the device. Some of these applications do not
satisfy the requirements of mbuf fast free (i.e. a single pool per
queue and refcnt = 1), and end up crashing or behaving badly.

Fixes: bcaa54c1a148 ("net/enic: support mbuf fast free offload")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
6 years agonet/octeontx: fix stop clearing Rx/Tx functions
Pavan Nikhilesh [Tue, 24 Jul 2018 10:43:50 +0000 (16:13 +0530)]
net/octeontx: fix stop clearing Rx/Tx functions

On dev_stop the Rx/Tx_burst functions are being set to NULL, this causes
a SEGFAULT in cases where control path calls stop and a paket is still
being processed by a worker.
Instead clear the fastpath functions in dev_close.

Fixes: da6c687471a3 ("net/octeontx: add start and stop support")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agonet/virtio-user: fix parameters string
Tiwei Bie [Mon, 30 Jul 2018 08:28:04 +0000 (16:28 +0800)]
net/virtio-user: fix parameters string

Add the missing param "server" to param string.
Also add the missing spaces after params.

Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agonet/virtio: remove unused offloads macro
Tiwei Bie [Wed, 25 Jul 2018 07:42:08 +0000 (15:42 +0800)]
net/virtio: remove unused offloads macro

This macro isn't used any more after below commit:

Fixes: a4996bd89c42 ("ethdev: new Rx/Tx offloads API")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
6 years agonet/virtio: remove unnecessary Rx error assignments
Tiwei Bie [Wed, 25 Jul 2018 07:42:06 +0000 (15:42 +0800)]
net/virtio: remove unnecessary Rx error assignments

Remove the unnecessary assignments in Rx functions
as they are useless and misleading.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
6 years agovhost: remove unused variable
Tiwei Bie [Wed, 25 Jul 2018 07:42:07 +0000 (15:42 +0800)]
vhost: remove unused variable

The nr_updated is just increased and not really used.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
6 years agoethdev: decrease log level of ownership change
Stephen Hemminger [Wed, 1 Aug 2018 17:43:56 +0000 (10:43 -0700)]
ethdev: decrease log level of ownership change

Changing ownership of a port is a normal event, and should
not be logged at ERR priority. Downgrade to a DEBUG message.

Fixes: bea1e0c70cfc ("ethdev: convert static log type usage to dynamic")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Matan Azrad <matan@mellanox.com>
6 years agoraw/skeleton: implement queue count API
Shreyansh Jain [Tue, 31 Jul 2018 10:33:03 +0000 (16:03 +0530)]
raw/skeleton: implement queue count API

Use the rte_rawdev_queue_count API in skeleton and add its unit test
case.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agorawdev: fix missing queue count API
Shreyansh Jain [Tue, 31 Jul 2018 10:33:02 +0000 (16:03 +0530)]
rawdev: fix missing queue count API

Rawdev queue count API prototype was declared, but the definition was
missing from the library. This patch implements the function.

This API is used to query the device about the count of queues it has
been configured with.

Fixes: c88b3f2558ed ("rawdev: introduce raw device library")
Cc: stable@dpdk.org
Suggested-by: Keith Wiles <keith.wiles@intel.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agolatency: free up the memzone
Reshma Pattan [Thu, 26 Jul 2018 16:50:08 +0000 (17:50 +0100)]
latency: free up the memzone

Free up the memzone allocated during the
rte_latencystats_init().

Fixes: 5cd3cac9ed ("latency: added new library for latency stats")
CC: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
6 years agoeal/bsd: silence unsupported interrupts error
Anatoly Burakov [Fri, 27 Jul 2018 08:24:35 +0000 (09:24 +0100)]
eal/bsd: silence unsupported interrupts error

Currently, nic_uio driver does not support interrupts, so any
attempts to install an interrupt handler will fail with a
not supported error, which will cause an error message that is
confusing to the user.

Silence this error by moving it to debug log level, and reword
the message to avoid containing the word "Error", to avoid
triggering DTS test failures [1].

[1] https://git.dpdk.org/tools/dts/tree/tests/TestSuite_scatter.py?#n110

Fixes: 23150bd8d8a8 ("eal/bsd: add interrupt thread")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agovfio: revert retry logic for MSI-X BAR mapping
Anatoly Burakov [Mon, 30 Jul 2018 10:59:06 +0000 (11:59 +0100)]
vfio: revert retry logic for MSI-X BAR mapping

This reverts commit d4774a568ba0a5923229974a002972c83eb04570.

The patch is incomplete because kernel 4.16+, while being capable
of mapping MSI-X BARs, will also report if such a capability is
available. Without checking this capability, gratuitous errors
are displayed on kernels <4.16 while VFIO is attempting to mmap
MSI-X BAR and fails, which can be confusing to the user.

Fixes: d4774a568ba0 ("vfio: fix workaround of BAR mapping")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agoethdev: remove unused forward declaration
Rami Rosen [Wed, 25 Jul 2018 08:30:04 +0000 (11:30 +0300)]
ethdev: remove unused forward declaration

The forward declaraion of rte_pci_device in rte_ethdev.h
is not needed anymore.

Fixes: cd8c7c7ce241 ("ethdev: replace bus specific struct with generic dev")
Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agoethdev: clarify usage of TM node parent update
Ben Shelton [Tue, 10 Jul 2018 15:33:01 +0000 (10:33 -0500)]
ethdev: clarify usage of TM node parent update

The node parent update API function may be used to update the
priority/weight of an existing node.  Update the documentation to
indicate that this use case is supported.

Signed-off-by: Ben Shelton <benjamin.h.shelton@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agodevtools: fix checkpatch with dash
Gavin Hu [Wed, 1 Aug 2018 05:22:57 +0000 (13:22 +0800)]
devtools: fix checkpatch with dash

When running checkpatch.sh, it generates the following error
on some linux distributions(like Debian) with Dash as the
default shell interpreter.
trap: SIGINT: bad trap

The fix is to replace SIGINT with INT signal, it works for
both bash and dash.

Fixes: 4bec48184e ("devtools: add checks for ABI symbol addition")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Tested-by: Vipin Varghese <vipin.varghese@intel.com>
6 years agoapp/testpmd: fix DCB config
Konstantin Ananyev [Tue, 31 Jul 2018 14:43:34 +0000 (15:43 +0100)]
app/testpmd: fix DCB config

After adding RSS hash offload check, default rss_hf will fail on devices
that do not support all bits. This will lead to dcb config failure. The
patch fixes this issue by reading current valid rss_conf from the device.

Fixes: 8863a1fbfc66 ("ethdev: add supported hash function check")
Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class")
Cc: stable@dpdk.org
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
6 years agoapp/testpmd: set and clear keep CRC offload flag
Bernard Iremonger [Wed, 1 Aug 2018 08:13:19 +0000 (09:13 +0100)]
app/testpmd: set and clear keep CRC offload flag

If the "port config all crc-strip on" command is issued,
The DEV_RX_OFFLOAD_KEEP_CRC offload flag should be cleared.

If the "port config all crc-strip off command is issued,
The DEV_RX_OFFLOAD_KEEP_CRC offload flag should be set.

Fixes: 70815c9ecadd ("ethdev: add new offload flag to keep CRC")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agotest: remove CRC offload for bonding slave
Reshma Pattan [Wed, 1 Aug 2018 12:19:18 +0000 (13:19 +0100)]
test: remove CRC offload for bonding slave

Link bonding unit tests uses net_null vdev as slaves,
and trying to configure DEV_RX_OFFLOAD_CRC_STRIP as offload
flags to vdev is not correct as vdev doesn't support offloads.

The unit test is reporting this as failure, so fix this by
removing the offloads.

Fixes: c6698a3e8f ("ethdev: convert remaining apps to new offload API")

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
6 years agotest: fix uninitialized port configuration
Radu Nicolau [Tue, 31 Jul 2018 14:16:21 +0000 (15:16 +0100)]
test: fix uninitialized port configuration

test_pmd_ring_pair_create_attach() uses an uninitialized
struct rte_eth_conf object

Fixes: 51f567129c94 ("app/test: add pmd_ring")
Cc: stable@dpdk.org
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
6 years agotest: add fbarray autotest to script
Anatoly Burakov [Wed, 1 Aug 2018 11:52:54 +0000 (12:52 +0100)]
test: add fbarray autotest to script

Fbarray autotests were added, but the script command was missing.
Add it, so that fbarray autotest can be executed as part of
autotest script.

Fixes: 7985860c18af ("test/fbarray: add autotests")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agomk: remove unnecessary test rules
Reshma Pattan [Fri, 27 Jul 2018 09:40:20 +0000 (10:40 +0100)]
mk: remove unnecessary test rules

make rule test-basic is duplicate of test rule.
removed unused test-mempool and test-ring make rules.

Fixes: a3df7f8d9c ("mk: rename test related rules")
CC: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agomk: update targets for classified tests
Jananee Parthasarathy [Fri, 27 Jul 2018 09:40:19 +0000 (10:40 +0100)]
mk: update targets for classified tests

Makefiles are updated with new test case lists.
Test cases are classified as -
P1 - Main test cases,
P2 - Cryptodev/driver test cases,
P3 - Perf test cases which takes longer than 10s,
P4 - Logging/Dump test cases.

Makefile is updated with different targets
for the above classified groups.
Test cases for different targets are listed accordingly.

Cc: stable@dpdk.org
Signed-off-by: Jananee Parthasarathy <jananeex.m.parthasarathy@intel.com>
Reviewed-by: Reshma Pattan <reshma.pattan@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agotest: update autotest list
Jananee Parthasarathy [Fri, 27 Jul 2018 09:40:18 +0000 (10:40 +0100)]
test: update autotest list

Autotest is enhanced with additional test cases
being added to autotest_data.py

Removed non existing PCI autotest.

Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Signed-off-by: Jananee Parthasarathy <jananeex.m.parthasarathy@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agotest: parallelize unit tests
Anatoly Burakov [Fri, 27 Jul 2018 09:40:17 +0000 (10:40 +0100)]
test: parallelize unit tests

Now that everything else is in place, we can run unit tests in a
different fashion to what they were running as before. Previously,
we had all autotests as part of groups (largely obtained through
trial and error) to ensure parallel execution while still limiting
amounts of memory used by those tests.

This is no longer necessary, and as of previous commit, all tests
are now in the same group (still broken into two categories). They
still run one-by-one though. Fix this by initializing child
processes in multiprocessing Pool initialization, and putting all
tests on the queue, so that tests are executed by the first idle
worker. Tests are also affinitized to different NUMA nodes using
taskset in a round-robin fashion, to prevent over-exhausting
memory on any given NUMA node.

Non-parallel tests are executed in similar fashion, but on a
separate queue which will have only one pool worker, ensuring
non-parallel execution.

Support for FreeBSD is also added to ensure that on FreeBSD, all
tests are run sequentially even for the parallel section.

Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agotest: remove autotest grouping
Anatoly Burakov [Fri, 27 Jul 2018 09:40:16 +0000 (10:40 +0100)]
test: remove autotest grouping

Previously, all autotests were grouped into (seemingly arbitrary)
groups. The goal was to run all tests in parallel (so that autotest
finishes faster), but we couldn't just do it willy-nilly because
DPDK couldn't allocate and free hugepages on-demand, so we had to
find autotest groupings that could work memory-wise and still be
fast enough to not hold up shorter tests. The inflexibility of
memory subsystem has now been fixed for 18.05, so grouping
autotests is no longer necessary.

Thus, this commit moves all autotests into two groups -
parallel(izable) autotests, and non-arallel(izable) autotests
(typically performance tests). Note that this particular commit
makes running autotests dog slow because while the tests are now
in a single group, the test function itself hasn't changed much,
so all autotests are now run one-by-one, starting and stopping
the DPDK test application.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agotest: improve filtering
Anatoly Burakov [Fri, 27 Jul 2018 09:40:15 +0000 (10:40 +0100)]
test: improve filtering

Improve code for filtering test groups. Also, move reading binary
symbols into filtering stage, so that tests that are meant to be
skipped are never attempted to be executed in the first place.
Before running tests, print out any tests that were skipped because
they weren't compiled.

Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agotest: print autotest categories
Anatoly Burakov [Fri, 27 Jul 2018 09:40:14 +0000 (10:40 +0100)]
test: print autotest categories

Help visually identify parallel vs. non-parallel autotests.

Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agotest: make autotest runner python 2/3 compliant
Anatoly Burakov [Fri, 27 Jul 2018 09:40:13 +0000 (10:40 +0100)]
test: make autotest runner python 2/3 compliant

Autotest runner was still using python 2-style print syntax. Fix
it by importing print function from the future, and fix the calls
to be python-3 style.

Fixes: 54ca545dce4b ("make python scripts python2/3 compliant")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agotest: fix code on report
Anatoly Burakov [Fri, 27 Jul 2018 09:40:12 +0000 (10:40 +0100)]
test: fix code on report

There are no reports defined for any test, so this codepath was
never triggered, but it's still wrong because it's referencing
variables that aren't there. Fix it by passing target into the
test function, and reference correct log variable.

Fixes: e2cc79b75d9f ("app: rework autotest.py")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agotest: fix result printing
Anatoly Burakov [Fri, 27 Jul 2018 09:40:11 +0000 (10:40 +0100)]
test: fix result printing

Previously, printing was done using tuple syntax, which caused
output to appear as a tuple as opposed to being one string. Fix
this by using addition operator instead.

Fixes: 54ca545dce4b ("make python scripts python2/3 compliant")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agodevtools: alert on new calls to exit from libs
Arnon Warshavsky [Thu, 26 Jul 2018 22:10:58 +0000 (01:10 +0300)]
devtools: alert on new calls to exit from libs

This patch adds a new function that is called
per every checked patch,
and alerts for new instances of rte_panic/rte_exit.
The check excludes comments, and alerts in the case
of a positive balance between additions and removals.

Signed-off-by: Arnon Warshavsky <arnon@qwilt.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Kevin Traynor <ktraynor@redhat.com>
6 years agoversion: 18.08-rc2
Thomas Monjalon [Thu, 26 Jul 2018 21:59:06 +0000 (23:59 +0200)]
version: 18.08-rc2

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
6 years agorawdev: remove experimental tag
Shreyansh Jain [Thu, 14 Jun 2018 13:19:00 +0000 (18:49 +0530)]
rawdev: remove experimental tag

Besides the librawdev, removing experimental from skeleton_rawdev
dummy driver as well.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agovfio: remove experimental tag
Hemant Agrawal [Fri, 8 Jun 2018 09:40:11 +0000 (15:10 +0530)]
vfio: remove experimental tag

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agombuf: remove experimental tag from pool ops
Hemant Agrawal [Tue, 5 Jun 2018 06:24:11 +0000 (11:54 +0530)]
mbuf: remove experimental tag from pool ops

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
6 years agodoc: fix typo in vdev_netvsc guide
Stephen Hemminger [Wed, 25 Jul 2018 17:51:46 +0000 (10:51 -0700)]
doc: fix typo in vdev_netvsc guide

Fixes: 56252de779a6 ("net/vdev_netvsc: add automatic probing")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
6 years agobuildtools: change license to SPDX
Hemant Agrawal [Tue, 5 Jun 2018 07:50:25 +0000 (13:20 +0530)]
buildtools: change license to SPDX

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
6 years agodoc: update VM power manager sample guide
David Hunt [Wed, 25 Jul 2018 13:00:09 +0000 (14:00 +0100)]
doc: update VM power manager sample guide

Add information on the ability of guest app to sent
a policy to the host app.

Add information on the branch ratio out-of-band method
of workload monitoring and power management.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agodoc: fix bonding command in testpmd
Shreyansh Jain [Wed, 25 Jul 2018 11:31:32 +0000 (17:01 +0530)]
doc: fix bonding command in testpmd

Fixes: ac718398f477 ("doc: testpmd application user guide")
Cc: stable@dpdk.org
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
6 years agotest/hash: fix potential memory leak
Pablo de Lara [Tue, 17 Jul 2018 13:31:51 +0000 (14:31 +0100)]
test/hash: fix potential memory leak

In the multiwriter test, if "found" array allocation failed,
the memory of "keys" array, which was successfully allocated
could not be freed, since by this time, tbl_multiwriter_test_params.keys
was not set to this array, which is the pointer freed when finishing
the test or when a failure happens.

To solve this, tbl_multiwriter_test_params.keys is set to the "keys"
address, just after allocating and filling the array.

Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agotest/hash: fix multiwriter with non consecutive cores
Pablo de Lara [Tue, 17 Jul 2018 13:31:50 +0000 (14:31 +0100)]
test/hash: fix multiwriter with non consecutive cores

When non consecutive cores are passed into the test application,
the distribution of the keys that each thread needs to insert
is not correct, since it assumes that there are no cores skipped
between the master core and the worker core.

Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agotest/bonding: do not request CRC strip offload
Ferruh Yigit [Fri, 20 Jul 2018 15:59:41 +0000 (16:59 +0100)]
test/bonding: do not request CRC strip offload

bonding PMD doesn't announce CRC STRIP offload support, don't request
this offload in unit test otherwise unit test fails.

Fixes: f52f1a65e461 ("ethdev: force offloading API rules")
Cc: stable@dpdk.org
Reported-by: Meijuan Zhao <meijuanx.zhao@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agotest/flow_classify: fix return types
Reshma Pattan [Tue, 17 Jul 2018 16:44:45 +0000 (17:44 +0100)]
test/flow_classify: fix return types

UTs should return either TEST_SUCCESS or TEST_FAILED only.
They should not return 0, -1 and any other value.

Fixes: 9c9befea4f ("test: add flow classify unit tests")
CC: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agotest: fix file prefix discovery
Anatoly Burakov [Wed, 25 Jul 2018 13:44:26 +0000 (14:44 +0100)]
test: fix file prefix discovery

Config file has moved, but the tests weren't updated to point to
its new location. Update the code to find current prefix.

Also, this function is duplicated across multiple tests, so move it
into process.h and force compile failures for any attempts to use
it on platforms other than Linux.

Fixes: adf1d867361c ("eal: move runtime config file to new location")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
6 years agotest: fix EAL flags autotest on FreeBSD
Anatoly Burakov [Mon, 16 Jul 2018 16:34:04 +0000 (17:34 +0100)]
test: fix EAL flags autotest on FreeBSD

FreeBSD does not support running multiple primary processes
concurrently, because all DPDK instances will allocate memory
from the same place (memory provided by contigmem driver).
While it is technically possible to launch a DPDK process
using no-shconf switch, it will actually corrupt main process'
for the above reason.

Fix EAL flags autotest to not run primary processes unless
both no-shconf and no-huge are specified.

Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Changqing Wu <changqingx.wu@intel.com>
6 years agobus/pci: fix a typo
Rami Rosen [Thu, 26 Jul 2018 18:31:23 +0000 (21:31 +0300)]
bus/pci: fix a typo

This patch fixes a trivial typo in pci_common.c.

Fixes: 23eaa9059ec2 ("bus/pci: use given name as generic name")
Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agometrics: disallow null as metric name
Remy Horton [Mon, 2 Jul 2018 13:46:08 +0000 (14:46 +0100)]
metrics: disallow null as metric name

This patch adds a sanity check so that names passed into
rte_metrics_reg_names() and the wrapper rte_metrics_reg_name()
cannot be NULL.

Fixes: 349950ddb9c5 ("metrics: add information metrics library")
Cc: stable@dpdk.org
Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agometrics: do not fail silently when uninitialised
Remy Horton [Mon, 2 Jul 2018 14:55:47 +0000 (15:55 +0100)]
metrics: do not fail silently when uninitialised

If rte_metrics_init() had not been called and hence the internal
metric storage is not allocated, rte_metrics_get_values() and
rte_metrics_get_name() would silently fail by returning zero
(i.e. no metrics registered). This patch changes the result of
this scenario to an explicit fail by returning -EIO.

Fixes: 349950ddb9c5 ("metrics: add information metrics library")
Cc: stable@dpdk.org
Signed-off-by: Remy Horton <remy.horton@intel.com>
6 years agometrics: add check for invalid key
Remy Horton [Fri, 6 Jul 2018 13:21:19 +0000 (14:21 +0100)]
metrics: add check for invalid key

This patchset adds a check to rte_metrics_update_values()
that prevents the updating of metrics when presented with
an invalid metric key. Previously, doing the latter could
result in a crash.

Fixes: 349950ddb9c5 ("metrics: add information metrics library")
Cc: stable@dpdk.org
Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agobitrate: add sanity check on parameters
Remy Horton [Thu, 12 Jul 2018 10:49:48 +0000 (11:49 +0100)]
bitrate: add sanity check on parameters

If rte_stats_bitrate_reg() or rte_stats_bitrate_calc() are
passed NULL as the parameter for the stats structure, the
result is a crash. Fixed by adding a sanity check that makes
sure the passed-in pointer is not NULL.

Fixes: 2ad7ba9a6567 ("bitrate: add bitrate statistics library")
Cc: stable@dpdk.org
Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/l3fwd: remove useless include
Rami Rosen [Mon, 2 Jul 2018 17:55:23 +0000 (20:55 +0300)]
examples/l3fwd: remove useless include

This patch removes unneeded include of rte_mempool.h in
two modules in examples/l3fwd.

Fixes: 268888b5b020 ("examples/l3fwd: modularize")
Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
6 years agoexamples/exception_path: fix out-of-bounds read
Bruce Richardson [Mon, 16 Jul 2018 16:03:47 +0000 (17:03 +0100)]
examples/exception_path: fix out-of-bounds read

When printing out stats from the exception_path app, all possible
lcore_ids are iterated. However, the app only supports up to 64 cores.
To prevent possible errors, and to remove coverity warnings,
explicitly check for out-of-range lcore ids before printing.

Coverity issue: 268335
Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agoapp/testpmd: fix help for TM commit command
Krzysztof Kanas [Wed, 25 Jul 2018 12:41:49 +0000 (14:41 +0200)]
app/testpmd: fix help for TM commit command

Fixes: 996cb153af06 ("app/testpmd: add commands for TM nodes and hierarchy commit")

Signed-off-by: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
6 years agoapp/testpmd: fix crash on TM command error
Krzysztof Kanas [Wed, 25 Jul 2018 12:41:48 +0000 (14:41 +0200)]
app/testpmd: fix crash on TM command error

print_err_msg uses message field that may be not initialized causing
segmentation fault.

Fixes: 12f76f5247e2 ("app/testpmd: add command to resume a TM node")

Signed-off-by: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
6 years agoapp/testpmd: fix buffer leak in TM command
Nithin Dabilpuram [Thu, 5 Jul 2018 05:45:46 +0000 (11:15 +0530)]
app/testpmd: fix buffer leak in TM command

Free the buffer allocated for shared_shaper_id array in
case of configuration without shared shapers.

Fixes: 996cb153af06 ("app/testpmd: add commands for TM nodes and hierarchy commit")

Signed-off-by: Nithin Dabilpuram <nithin.dabilpuram@caviumnetworks.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoapp/testpmd: remove logically dead code
Kevin Laatz [Tue, 17 Jul 2018 10:34:05 +0000 (11:34 +0100)]
app/testpmd: remove logically dead code

Remove logically dead code, tm_port_rate cannot be greater than
UINT32_MAX.

Coverity issue: 302846
Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode")

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
6 years agoservice: improve checks of coremasks
Harry van Haaren [Thu, 26 Jul 2018 16:31:59 +0000 (17:31 +0100)]
service: improve checks of coremasks

This commit improves the error checking performed on the
core masks (or lists) of the service cores, in particular
with respect to the data-plane (RTE) cores of DPDK.

With this commit, invalid configurations are detected at
runtime, and warning messages are printed to inform the user.

For example specifying the coremask as 0xf, and the service
coremask as 0xff00 is invalid as not all service-cores are
contained within the coremask. A warning is now printed to
inform the user.

Reported-by: Vipin Varghese <vipin.varghese@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Vipin Varghese <vipin.varghese@intel.com>
6 years agoapp/eventdev: use proper teardown sequence
Pavan Nikhilesh [Tue, 24 Jul 2018 12:14:50 +0000 (17:44 +0530)]
app/eventdev: use proper teardown sequence

Use proper teardown sequence when SIGINT is caught to prevent
eventdev from going into undefined state.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agoevent/octeontx: remove unnecessary port start and stop
Pavan Nikhilesh [Thu, 19 Jul 2018 11:47:47 +0000 (17:17 +0530)]
event/octeontx: remove unnecessary port start and stop

Modifying port state is not necessary when starting/stopping Rx adapter
as it is same as starting/stopping ethdev.

Fixes: 45a914c5bd71 ("event/octeontx: support event Rx adapter")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agoevent/octeontx: prefetch mbuf instead of wqe
Pavan Nikhilesh [Tue, 17 Jul 2018 14:33:45 +0000 (20:03 +0530)]
event/octeontx: prefetch mbuf instead of wqe

Prefetch mbuf pointer instead of wqe when SSO receives pkt from PKI.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agoapp/eventdev: fix order test service init
Pavan Nikhilesh [Fri, 13 Jul 2018 08:51:14 +0000 (14:21 +0530)]
app/eventdev: fix order test service init

Previous modification to evt_service_setup() broke order_queue/atq
tests.

Fixes: b0333c55dfa5 ("app/eventdev: add service core configuration")
Cc: stable@dpdk.org
Reported-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agoexamples/ip_pipeline: add example script for RSS
Cristian Dumitrescu [Thu, 26 Jul 2018 13:38:04 +0000 (14:38 +0100)]
examples/ip_pipeline: add example script for RSS

Add example script to demonstrate Receive Side Scaling (RSS).

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agonet/softnic: add command for default tmgr hierarchy
Cristian Dumitrescu [Wed, 25 Jul 2018 17:10:07 +0000 (18:10 +0100)]
net/softnic: add command for default tmgr hierarchy

Add support for creating default Traffic Manager (TMGR) hierarchy through
firmware CLI script.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agonet/softnic: add command for tmgr hierarchy commit
Cristian Dumitrescu [Wed, 25 Jul 2018 17:10:06 +0000 (18:10 +0100)]
net/softnic: add command for tmgr hierarchy commit

Add support for Traffic Manager (TMGR) hierarchy commit through
firmware CLI script.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agonet/softnic: add command for tmgr node addition
Cristian Dumitrescu [Wed, 25 Jul 2018 17:10:05 +0000 (18:10 +0100)]
net/softnic: add command for tmgr node addition

Add support for adding Traffic Manager (TMGR) hierarchy node through
firmware CLI script.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agonet/softnic: add command for tmgr shared shaper
Cristian Dumitrescu [Wed, 25 Jul 2018 17:10:04 +0000 (18:10 +0100)]
net/softnic: add command for tmgr shared shaper

Add support to create Traffic Manager (TMGR) shared shaper through
firmware CLI script.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agonet/softnic: add command for tmgr shaper profile
Cristian Dumitrescu [Wed, 25 Jul 2018 17:10:03 +0000 (18:10 +0100)]
net/softnic: add command for tmgr shaper profile

Add support to create Traffic Manager (TMGR) shaper profile
through firmware CLI script.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agonet/softnic: add command for tmgr create
Cristian Dumitrescu [Wed, 25 Jul 2018 17:10:02 +0000 (18:10 +0100)]
net/softnic: add command for tmgr create

Add support to create Traffic Manager (TMGR) object through firmware
CLI script.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoexamples/ip_pipeline: add help command
Kevin Laatz [Fri, 20 Jul 2018 15:54:27 +0000 (16:54 +0100)]
examples/ip_pipeline: add help command

Add a help to the existing application cli. This will enable users to
display the usage help with descriptions within the cli.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agoring: fix sign conversion warning
Andy Green [Mon, 28 May 2018 09:03:43 +0000 (17:03 +0800)]
ring: fix sign conversion warning

On gcc 5.4.0 / native aarch64 from Ubuntu 16.04:

In function '__rte_ring_do_dequeue':
rte_ring.h: 385:35: warning:
conversion to 'int' from 'unsigned int' may change
the sign of the result [-Wsign-conversion]
  n = __rte_ring_move_cons_head(r, is_sc, n, behavior,
                                   ^

Fixes: e8ed5056c8 ("ring: remove signed type flip-flopping")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
6 years agoring: fix declaration after statement
Andy Green [Mon, 28 May 2018 09:03:38 +0000 (17:03 +0800)]
ring: fix declaration after statement

On gcc 5.4.0 / native aarch64 from Ubuntu 16.04:

In function '__rte_ring_move_prod_head':
rte_ring_c11_mem.h:69:3: warning:
ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   const uint32_t cons_tail = r->cons.tail;
   ^

In function '__rte_ring_move_cons_head':
rte_ring_c11_mem.h:136:3: warning:
ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   const uint32_t prod_tail = r->prod.tail;
   ^

Fixes: 39368ebfc6 ("ring: introduce C11 memory model barrier option")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
6 years agomaintainers: update for szedata2 PMD
Matej Vido [Tue, 17 Jul 2018 13:52:18 +0000 (15:52 +0200)]
maintainers: update for szedata2 PMD

I will no longer be maintaining szedata2 PMD.
Jan will take over this role.

Signed-off-by: Matej Vido <matejvido@gmail.com>
Acked-by: Jan Remes <remes@netcope.com>
6 years agoapp/testpmd: revert softnic integration in CLI thread
Moti Haimovsky [Wed, 25 Jul 2018 15:30:09 +0000 (18:30 +0300)]
app/testpmd: revert softnic integration in CLI thread

This patch reverts the testpmd CLI prompt routine modifications done
in order to support softnic.
The reason of doing so is due to testpmd abnormal exit observed on
several setups caused by the softnic modifications to this routine,
for example: When running testpmd with tap interface
(testpmd
 -n 4 --vdev=net_tap0,iface=tap0,remote=eth1 -- --burst=64
 --mbcache=512 -i --nb-cores=7 --rxq=2 --txq=2 --txd=512
 --rxd=512 --port-topology=chained --forward-mode=rxonly)
testpmd crashes seconds after presenting its prompt with the following
error:
  testpmd> PANIC in prompt():
  CLI poll error (-1)

  Thread 1 "testpmd" received signal SIGABRT, Aborted.
  0x00007ffff668e0d0 in raise () from /lib64/libc.so.6
  (gdb) bt
  #0  0x00007ffff668e0d0 in raise () from /lib64/libc.so.6
  #1  0x00007ffff668f6b1 in abort () from /lib64/libc.so.6
  #2  0x0000000000468027 in __rte_panic ()
  #3  0x00000000004876ed in prompt ()
  #4  0x000000000046dffc in main ()

When running testpmd with bare-metal device
(testpmd -n 4 --socket-mem=1024,1024 -w 04:00.0  --
 --burst=64 --mbcache=512 -i --nb-cores=7
 --rxq=64 --txq=4 --txd=16 --rxd=16)
and pressing CTRL+D right after testpmd prompt is presented then
the program crashes while presenting the same messages as above.

Needless to say that this behavior is not observed when using the
previous CLI prompt routine.

Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode")

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
6 years agodrivers/net: fix crash in secondary process
Ferruh Yigit [Fri, 20 Jul 2018 14:54:23 +0000 (15:54 +0100)]
drivers/net: fix crash in secondary process

Calling rte_eth_dev_info_get() on secondary process cause a crash
because eth_dev->device is not set properly.

Fixes: ee27edbe0c10 ("drivers/net: share vdev data to secondary process")
Cc: stable@dpdk.org
Reported-by: Vipin Varghese <vipin.varghese@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agovhost: release locks on RARP packet failure
Tiwei Bie [Wed, 25 Jul 2018 14:18:11 +0000 (22:18 +0800)]
vhost: release locks on RARP packet failure

Fixes: eefac9536a90 ("vhost: postpone device creation until rings are mapped")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
6 years agovhost: fix overflow on shadow used ring
Tiwei Bie [Wed, 25 Jul 2018 13:51:37 +0000 (21:51 +0800)]
vhost: fix overflow on shadow used ring

The shadow used ring's size is the same as the vq's size,
so we shouldn't try more than "vq size" times. Besides,
the element pointed by avail->idx isn't available to the
device, so we will return error when try "vq size" times.

Fixes: 24e4844048e1 ("vhost: unify Rx mergeable and non-mergeable paths")
Fixes: a922401f35cc ("vhost: add Rx support for packed ring")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
6 years agovhost: fix return value on dequeue path
Jiayu Hu [Wed, 25 Jul 2018 08:21:42 +0000 (16:21 +0800)]
vhost: fix return value on dequeue path

This patch fixes the incorrect return value for rte_vhost_dequeue_burst()
when virtqueue is not enabled or virtqueue address translation fails.

Fixes: 62250c1d0978 ("vhost: extract split ring handling from Rx and Tx functions")

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Acked-by: Tiwei Bie <tiwei.bie@intel.com>
6 years agonet/mlx5: fix linkage of glue lib with gcc 4.7.2
Yaroslav Brustinov [Thu, 19 Jul 2018 10:00:22 +0000 (13:00 +0300)]
net/mlx5: fix linkage of glue lib with gcc 4.7.2

addressing a gcc 4.7.2 bug that cannot be reproduced with latter
versions:

"bin/ld: Warning: alignment 8 of symbol `mlx5_glue' in
src/dpdk/drivers/net/mlx5/mlx5_glue.c.21.o is smaller than 16 in
src/dpdk/drivers/net/mlx5/mlx5_rxq.c.21.o"

Fix it be forcing the alignment of the glue lib.

Fixes: 0e83b8e536c1 ("net/mlx5: move rdma-core calls to separate file")
Cc: stable@dpdk.org
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>