dpdk.git
6 years agopdump: fix possible mbuf leak on failure
Ilya V. Matveychikov [Fri, 10 Nov 2017 13:55:16 +0000 (16:55 +0300)]
pdump: fix possible mbuf leak on failure

If pdump_pktmbuf_copy_data() fails it's possible to have segment leak
as rte_pktmbuf_free() only handles m_dup chain but not the seg just
allocated and yet not chained.

Fixes: 278f945402c5 ("pdump: add new library for packet capture")

Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
6 years agoexamples/ipv4_multicast: fix segments number type
Ilya V. Matveychikov [Fri, 10 Nov 2017 13:57:25 +0000 (16:57 +0300)]
examples/ipv4_multicast: fix segments number type

Fixes: 97cb466d65c9 ("mbuf: use 2 bytes for port and nb segments")

Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
6 years agotest/memory: fix autotest parsing
Radoslaw Biernacki [Thu, 9 Nov 2017 18:14:32 +0000 (19:14 +0100)]
test/memory: fix autotest parsing

This patch fixes three problems in memory autotest:
 - the regex for IOVA
 - missing validation of second and following output lines
 - propagation of error to consecutive tests
 - conversion base for mem size (hex indtead of dec)
First fix is for changes introduced with IOVA, the regex was not
updated which lead to unit test failure.  Patch now also uses loop for
line outputs processing to verify more than just one line. By this we
also satisfy the pexpect() and scan the "Test OK"/"Test Failed" so in
case of error all output lines are consumed and does not break the
consecutive test (error does not propagate).

Fixes: 7ba49d39f14c ("mem: rename segment address from physical to IOVA")
Fixes: b4ce15aa2bc7 ("app/test: fix memory autotest")

Signed-off-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
6 years agotest/memzone: fix memory leak
Radoslaw Biernacki [Wed, 8 Nov 2017 12:33:14 +0000 (13:33 +0100)]
test/memzone: fix memory leak

This patch fixes the memory leaks in memzone_autotest. Those memory leaks
lead to failures in tests from the same testing group due to out of memory
problems.  With introduction of rte_memzone_free() it is now possible to
free the memzone.  Fix uses this API call to make a clean after each test
case.

Fixes: ff909fe21f0a ("mem: introduce memzone freeing")
Cc: stable@dpdk.org
Signed-off-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
6 years agoapp/testpmd: remove port status check from TM command
Jasvinder Singh [Fri, 10 Nov 2017 10:30:49 +0000 (10:30 +0000)]
app/testpmd: remove port status check from TM command

Currently, testpmd CLI doesn't permit to add leaf and non-leaf node when
port is started. It doesn't work in case of i40e device as DCB
configuration is deleted when port is stopped. Therefore, removes the
port status check before invoking leaf and nonleaf node API in the cli.
If needed, device can add port status check at the driver layer.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agoeal: fix an include guard comment
Jerin Jacob [Wed, 8 Nov 2017 07:04:55 +0000 (12:34 +0530)]
eal: fix an include guard comment

Fixes: af75078fece3 ("first public release")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agonet/virtio: fix Rx interrupt with VFIO
Zhiyong Yang [Thu, 9 Nov 2017 09:21:24 +0000 (17:21 +0800)]
net/virtio: fix Rx interrupt with VFIO

When running l3fwd-power to test virtio rxq interrupt using vfio
pci noiommu mode, startup fails. In the function virtio_read_caps,
the code if (flags & PCI_MSIX_ENABLE) intends to double check
if vfio msix is enabled or not. However, it is not enable at that
time. So use_msix is assigned to "0", not "1", which causes the
failure of configuring rxq intr in l3fwd-power.
This patch adds the function "vtpci_msix_detect" to detect the status
of msix when interrupt changes happen.
In the meanwhile, virtio_intr_enable/disable are introduced to wrap
rte_intr_enable/disable to enhance the ability to detect msix.
use_msix can indicate three different msix status by:
VIRTIO_MSIX_NONE (0)
VIRTIO_MSIX_DISABLED (1)
VIRTIO_MSIX_ENABLED (2)

Fixes: cb482cb3a305 ("net/virtio: fix MAC address read")
Cc: stable@dpdk.org
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agonet/mlx5: fix link speed bitmasks
Edward Makarov [Fri, 10 Nov 2017 14:18:04 +0000 (14:18 +0000)]
net/mlx5: fix link speed bitmasks

The constant ETHTOOL_LINK_MODE_1000baseT_Full_BIT and the others like
that in mlx5_link_update_unlocked_gs must be bit masks but unfortunately
they are bit numbers. This commit fixes the issue.

Fixes: 188408719888 ("net/mlx5: fix support for newer link speeds")
Cc: stable@dpdk.org
Signed-off-by: Edward Makarov <makarov@kraftway.ru>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx4: fix missing stamp during Tx completion
Matan Azrad [Fri, 10 Nov 2017 08:27:18 +0000 (08:27 +0000)]
net/mlx4: fix missing stamp during Tx completion

After processing completed packets, the owner bit of each TXBB comprised
in its WQEs must be invalidated. The loop stops short of processing the
last WQE.

Fixes: c3c977bbecbd ("net/mlx4: add Tx bypassing Verbs")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/bnxt: fix link handling and configuration
Ajit Khaparde [Thu, 9 Nov 2017 17:46:28 +0000 (11:46 -0600)]
net/bnxt: fix link handling and configuration

Remove a case where we were sending a deprecated field to the FW.
There is no need to send auto_link_speed to the FW.
Also set the auto_mode correctly depending on the setting requested.

Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: fix duplicate creation of ntuple filter
Ajit Khaparde [Thu, 9 Nov 2017 17:46:27 +0000 (11:46 -0600)]
net/bnxt: fix duplicate creation of ntuple filter

Prevent the creation of duplicate 5tuple filters.

Fixes: b7435d660a8c ("net/bnxt: add ntuple filtering support")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/nfp: fix possible memory leak
Alejandro Lucero [Wed, 8 Nov 2017 14:42:23 +0000 (14:42 +0000)]
net/nfp: fix possible memory leak

Memory allocated was not being released in any exit path.

Coverity issue: 195030
Fixes: 48e2255f1b63 ("net/nfp: add NSP support for HW link configuration")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agonet/nfp: fix null pointer check
Alejandro Lucero [Wed, 8 Nov 2017 14:36:32 +0000 (14:36 +0000)]
net/nfp: fix null pointer check

First, the received pointer was not checked before. Then the pointer
from malloc was not the one used in the existing check.

Coverity issue: 195027
Fixes: ad60bca34899 ("net/nfp: read PF port MAC addr using NSP")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agonet/nfp: fix possible bad shif operation
Alejandro Lucero [Wed, 8 Nov 2017 12:28:11 +0000 (12:28 +0000)]
net/nfp: fix possible bad shif operation

We do not know how big can the BAR be, but we know anything less
than 1MB is an error. This BAR needs to be big enough for accessing
most of NFP internals.

Coverity issue: 195024
Fixes: d12206e00590 ("net/nfp: add NSP user space interface")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agonet/nfp: fix checking function return value
Alejandro Lucero [Wed, 8 Nov 2017 12:19:48 +0000 (12:19 +0000)]
net/nfp: fix checking function return value

The fstat function could return a value that indicates an error condition.
If this is not checked, the error condition may not be handled correctly.

Coverity issue: 195019
Fixes: f37d8a4b67b2 ("net/nfp: add NSP FW upload command")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agonet/nfp: fix resource leak
Alejandro Lucero [Wed, 8 Nov 2017 12:14:13 +0000 (12:14 +0000)]
net/nfp: fix resource leak

File descriptor is not released in any potential exit path
inside the function.

Coverity issue: 195018
Fixes: f37d8a4b67b2 ("net/nfp: add NSP FW upload command")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agonet/nfp: fix memory allocation
Alejandro Lucero [Wed, 8 Nov 2017 12:07:14 +0000 (12:07 +0000)]
net/nfp: fix memory allocation

If the function actually returns a null value, a null pointer
dereference will occur.

Coverity issue: 195013
Fixes: dd63df2bfff3 ("net/nfp: add NSP symbol resolution command")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agonet/nfp: fix stats struct initial value
Alejandro Lucero [Wed, 8 Nov 2017 11:59:45 +0000 (11:59 +0000)]
net/nfp: fix stats struct initial value

Not all struct fields will be written and random data could
confuse readers.

Coverity issue: 140755
Fixes: 92aa491b881e ("nfp: add statistics")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agodrivers/net: fix number of segment storage type
Ilya V. Matveychikov [Thu, 9 Nov 2017 13:54:09 +0000 (17:54 +0400)]
drivers/net: fix number of segment storage type

Fixes: 97cb466d65c9 ("mbuf: use 2 bytes for port and nb segments")
Cc: stable@dpdk.org
Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/mlx4: fix rxq interrupt memory corruption
Shahaf Shuler [Thu, 9 Nov 2017 13:50:49 +0000 (15:50 +0200)]
net/mlx4: fix rxq interrupt memory corruption

intr_vec allocation size was wrong causing a memory corruption.

Fixes: 0a2ae703192c ("net/mlx4: fix Rx interrupts management")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: fix rxq interrupt memory corruption
Shahaf Shuler [Thu, 9 Nov 2017 13:10:14 +0000 (15:10 +0200)]
net/mlx5: fix rxq interrupt memory corruption

intr_vec allocation size was wrong causing a memory corruption.

Fixes: e1016cb73383 ("net/mlx5: fix Rx interrupts management")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: fix flow director rules comparison
Nélio Laranjeiro [Thu, 9 Nov 2017 12:43:06 +0000 (13:43 +0100)]
net/mlx5: fix flow director rules comparison

When deleting/replacing a flow director rule the first rule of the list
was always the one replaced instead of the corresponding one.

Fixes: 4c3e9bcdd52e ("net/mlx5: support flow director")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/qede: fix default config option
Harish Patil [Thu, 9 Nov 2017 06:52:20 +0000 (22:52 -0800)]
net/qede: fix default config option

Restore the default configuration as in previous releases and
add a debug msg.

Fixes: f07aa795c92a ("net/qede: disable per-VF Tx switching feature")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agodoc: update qede PMD NIC guide
Rasesh Mody [Thu, 9 Nov 2017 06:52:19 +0000 (22:52 -0800)]
doc: update qede PMD NIC guide

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/mlx4: fix Rx packet type offloads
Moti Haimovsky [Thu, 9 Nov 2017 08:59:33 +0000 (10:59 +0200)]
net/mlx4: fix Rx packet type offloads

This patch improves Rx packet type offload report in case the device is
a virtual function device.
In these devices we observed that the L2 tunnel flag is set also for
non-tunneled packets, this leads to a complete misinterpretation of the
packet type being received.
This issue occurs since the tunnel_mode is not set to 0x7 by the driver
for virtual devices and therefore the value in the L2 tunnel flag is
meaningless and should be ignored.

Fixes: aee4a03fee4f ("net/mlx4: enhance Rx packet type offloads")

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/i40e: fix VF cannot forward packets issue
Xiaoyun Li [Thu, 9 Nov 2017 06:30:14 +0000 (14:30 +0800)]
net/i40e: fix VF cannot forward packets issue

When Rx interrupt is not enabled, there is no need to check if interrupt
allow others. It will cause VF cannot forwarding packets issue. This patch
fixes this issue.

Fixes: 96a9fd03c25f ("net/i40e: fix Rx queue interrupt mapping in VF")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
6 years agosecurity: fix anonymous unions in structure definitions
Akhil Goyal [Thu, 9 Nov 2017 12:23:57 +0000 (17:53 +0530)]
security: fix anonymous unions in structure definitions

Fixes: c261d1431bd8 ("security: introduce security API and framework")

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agoexamples/ipsec-secgw: fix build with gcc 4.5.1
Radu Nicolau [Thu, 9 Nov 2017 09:57:21 +0000 (09:57 +0000)]
examples/ipsec-secgw: fix build with gcc 4.5.1

On SUSE11 with gcc 4.5.1 the following build error occurred,
most likely because of improper handling of annonymous unions:

examples/ipsec-secgw/ipsec.c:87:4 error:
unknown field ‘ipsec’ specified in initializer

Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agonet/liquidio: support device reset in driver
Shijith Thotton [Wed, 8 Nov 2017 12:04:07 +0000 (17:34 +0530)]
net/liquidio: support device reset in driver

Reset device during init and close if bound to igb_uio.

Fixes: 369db3ae8e91 ("igb_uio: remove device reset in release")
Cc: stable@dpdk.org
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
6 years agonet/softnic: fix build with gcc 4.5.1
Jasvinder Singh [Wed, 8 Nov 2017 10:25:08 +0000 (10:25 +0000)]
net/softnic: fix build with gcc 4.5.1

Fix the build error due to improper handling of unions
on SUSE11 (gcc 4.5.1).

drivers/net/softnic/rte_eth_softnic_tm.c:588:3
error: unknown field 'nonleaf' specified in initializer

Fixes: 299a89de916a ("net/softnic: add TM capabilities ops")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agoversion: 17.11-rc3
Thomas Monjalon [Wed, 8 Nov 2017 01:51:44 +0000 (02:51 +0100)]
version: 17.11-rc3

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
6 years agodoc: adjust column width of PMD overview tables
Thomas Monjalon [Mon, 6 Nov 2017 14:40:54 +0000 (15:40 +0100)]
doc: adjust column width of PMD overview tables

The net PMD overview table is big and required to be shrunk.
The crypto PMD tables had variable column sizes: the latest
columns were smaller.

The minimum width is set to 0.9em without any forced padding.
The maximum width is set to 2em.
The width of the first column set by sphinx is overridden to 0
for full elasticity.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agodoc: move dom0 removal notice in removed items
Thomas Monjalon [Mon, 6 Nov 2017 14:45:29 +0000 (15:45 +0100)]
doc: move dom0 removal notice in removed items

Since the release notes has a new section for removed items,
the dom0 removal notice can be moved there.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
6 years agodoc: add DPAA2 event adapter to release notes
Shreyansh Jain [Thu, 26 Oct 2017 14:25:58 +0000 (19:55 +0530)]
doc: add DPAA2 event adapter to release notes

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agodoc: add security library to release notes
Akhil Goyal [Tue, 7 Nov 2017 06:44:28 +0000 (12:14 +0530)]
doc: add security library to release notes

Removed the deprication notice for ABI breakage and updated
release notes for rte_security.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
6 years agodoc: update IPsec multi-buffer library version
Pablo de Lara [Tue, 7 Nov 2017 09:55:56 +0000 (09:55 +0000)]
doc: update IPsec multi-buffer library version

A new library of the IPsec Multi-buffer library has been
released (0.47), which is used by the AESNI GCM PMD.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agodoc: fix a typo in EAL guide
Rami Rosen [Sun, 29 Oct 2017 13:24:44 +0000 (15:24 +0200)]
doc: fix a typo in EAL guide

This patch fixes a trivial typo in DPDK programmer's guide:
it should be rte_cpu_get_features() instead of rte_cpu_get_feature().

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agonet/qede: fix icc build
Ferruh Yigit [Tue, 7 Nov 2017 23:38:11 +0000 (23:38 +0000)]
net/qede: fix icc build

observed icc version "icc (ICC) 18.0.0 20170811"

build error:
.../dpdk/drivers/net/qede/qede_ethdev.c(1475):
error #279: controlling expression is constant
assert(false && "Unable to start periodic timer");
^

Warning disabled in Makefile.

Fixes: 2af14ca79c0a ("net/qede: support 100G")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/qede: fix null pointer dereferences
Rasesh Mody [Tue, 7 Nov 2017 08:34:25 +0000 (00:34 -0800)]
net/qede: fix null pointer dereferences

Fix null pointer dereferences in qede_vxlan_enable() and
qede_conf_udp_dst_port()

Coverity issue: 195010, 195012, 198439
Fixes: e0947ed912f7 ("net/qede: add support for VXLAN UDP port config over VF")
Fixes: 739a5b2f2b49 ("net/qede/base: use passed ptt handler")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: fix division by zero
Rasesh Mody [Tue, 7 Nov 2017 08:34:24 +0000 (00:34 -0800)]
net/qede/base: fix division by zero

Fix division by zero in calculating the regpair elements per page
Remove unused API ecore_cxt_free_proto_ilt()

Coverity issue: 13794231379428
Fixes: 22d07d939c3c ("net/qede/base: update")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: fix return code init of filter functions
Rasesh Mody [Tue, 7 Nov 2017 08:34:23 +0000 (00:34 -0800)]
net/qede/base: fix return code init of filter functions

Fix for uninitialized scalar variable for filter APIs

Coverity issue: 1445717144571814457211445722
Fixes: 2e2f392b249a ("net/qede/base: upgrade the FW to 8.20.0.0")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede: fix PF translation table release
Rasesh Mody [Tue, 7 Nov 2017 08:34:22 +0000 (00:34 -0800)]
net/qede: fix PF translation table release

Appropriately release the ptt[PF translation table] handler that is
acquired in error case

Fixes: e0947ed912f7 ("net/qede: add support for VXLAN UDP port config over VF")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede: remove duplicate includes
Rasesh Mody [Tue, 7 Nov 2017 08:34:21 +0000 (00:34 -0800)]
net/qede: remove duplicate includes

Fixes: ec94dbc57362 ("qede: add base driver")
Fixes: 2ea6f76aff40 ("qede: add core driver")
Fixes: 622075356e8f ("net/qede: support ntuple and flow director filter")
Fixes: 52d94b57e1c7 ("net/qede: add slowpath support for VXLAN tunneling")
Fixes: 8b3ee85efe11 ("net/qede: fix RSS table entries for 100G adapter")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede: fix device link structure
Rasesh Mody [Tue, 7 Nov 2017 08:34:20 +0000 (00:34 -0800)]
net/qede: fix device link structure

8ea656f8c app/testpmd: request link status interrupt
requires QEDE PMD to populate the device link structure without
having to query the driver for link status change event.
This patch updates the device link structure when link status event is
received.
Remove unused param from qed_link_update()

Fixes: 86a2265e59d7 ("qede: add SRIOV support")
Fixes: ec94dbc57362 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede: fix VXLAN filter deletion
Harish Patil [Tue, 7 Nov 2017 08:34:19 +0000 (00:34 -0800)]
net/qede: fix VXLAN filter deletion

Initialize ucast parameters before checking if filters exists.

Fixes: e0947ed912f7 ("net/qede: add support for VXLAN UDP port config over VF")

Signed-off-by: Harish Patil <harish.patil@cavium.com>
6 years agonet/qede: disable per-VF Tx switching feature
Harish Patil [Tue, 7 Nov 2017 08:34:18 +0000 (00:34 -0800)]
net/qede: disable per-VF Tx switching feature

Provide a knob to control per-VF Tx switching feature by adding a config
option, CONFIG_RTE_LIBRTE_QEDE_VF_TX_SWITCH. By default, it will be kept
in disabled state for better performance with small sized frames.

Fixes: 2ea6f76aff40 ("qede: add core driver")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
6 years agonet/mlx5: fix tunneled TCP/UDP packet type
Yongseok Koh [Tue, 7 Nov 2017 19:04:49 +0000 (11:04 -0800)]
net/mlx5: fix tunneled TCP/UDP packet type

If tunneled bit is set in the HW descriptor, the l4_hdr_type bits
describe the inner packet.

Fixes: ea16068c0064 ("net/mlx5: fix L4 packet type support")
Cc: stable@dpdk.org
Reported-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
6 years agonet/mlx5: fix flow director delete with drop action
Nélio Laranjeiro [Mon, 6 Nov 2017 10:41:41 +0000 (11:41 +0100)]
net/mlx5: fix flow director delete with drop action

Removing a flow director rule with a drop action ends by not removing it
due to a missing verbs drop specification in the conversion process between
the flow director and generic flow API.

Fixes: 4c3e9bcdd52e ("net/mlx5: support flow director")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agoigb_uio: remove device reset in release
Ferruh Yigit [Tue, 7 Nov 2017 22:29:13 +0000 (22:29 +0000)]
igb_uio: remove device reset in release

More error reported for device reset in release() [1],
when device pass-through to the guest, host kernel crash on guest exit.

Removing the reset completely.

This is close to reverting commit b58eedfc7dd5 [2], taking into account
previous fix to remove reset in open as well [3], but not exactly same.

With latest code, interrupts are enabled in uio open() callback and
disabled in uio release() callback, so when a DPDK application exit
device interrupts are disabled. Previously interrupts were only enabled
once in igb_uio module insert and disabled in module removal.

Also with latest code device set as bus master in open() and master
cleared in release(), clearing bus master should prevent further DMA
which was one of the target of the initial patch.

The initial intention was also to reset the device to be sure it has
been left in proper state, but currently that part is missing because of
reported problem(s).

Still igb_uio should be safer comparing to the pre b58eedfc7dd5 state.

[1]
http://dpdk.org/ml/archives/dev/2017-November/081459.html

[2]
b58eedfc7dd5 ("igb_uio: issue FLR during open and release of device file")

[3]
f73b38e9245d ("igb_uio: remove device reset in open")

Fixes: e3a64deae2d5 ("igb_uio: prevent reset for bnx2x devices")
Fixes: b58eedfc7dd5 ("igb_uio: issue FLR during open and release of device file")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agodevtools: add script to get maintainers from patch
Ferruh Yigit [Fri, 4 Aug 2017 14:01:25 +0000 (15:01 +0100)]
devtools: add script to get maintainers from patch

This is a wrapper to Linux kernel get_maintainer.pl file and only
supports parsing MAINTAINERS file (no git fallback etc..)

Requires DPDK_GETMAINTAINER_PATH devel config option set, please check
devtools/load-devel-config.

DPDK_GETMAINTAINER_PATH should be full path to the get_maintainer.pl
script, like:
DPDK_GETMAINTAINER_PATH=~/linux/scripts/get_maintainer.pl

Can be used individually:
./devtools/get-maintainer.sh <my.patch>

Or via git send-email, to add maintainers automatically:
git send-email --to-cmd ./devtools/get-maintainer.sh \
--cc dev@dpdk.org HEAD -4

Currently there is an ugly workaround to be able to use Linux script out
of the kernel tree, later better method can replace it.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agodevtools: rework ABI checker script
Olivier Matz [Thu, 5 Oct 2017 07:53:27 +0000 (09:53 +0200)]
devtools: rework ABI checker script

The initial version of the script had some limitations:
- cannot work on a non-clean workspace
- environment variables are not documented
- no compilation log in case of failure
- return success even it abi is incompatible

This patch addresses these issues and rework the code.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
6 years agodevtools: rename build dependency of mlx drivers
Thomas Monjalon [Wed, 11 Oct 2017 13:28:58 +0000 (15:28 +0200)]
devtools: rename build dependency of mlx drivers

The Mellanox drivers were requiring MOFED at compilation time.
It is now possible to use the upstream rdma-core package.
So the dependency option is renamed in the build tool.

Fixes: 43e9d9794cde ("net/mlx5: support upstream rdma-core")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agousertools: fix device binding with python 3
Omri Mor [Fri, 6 Oct 2017 21:38:38 +0000 (16:38 -0500)]
usertools: fix device binding with python 3

When using Python 3, dpdk-devbind.py fails to detect modules other than
igb_uio.

Fixes: bb9f408550d1 ("tools: support binding to built-in kernel modules")

Signed-off-by: Omri Mor <omrimor2@illinois.edu>
6 years agobuildtools: check allocation error in pmdinfogen
Yong Wang [Fri, 15 Sep 2017 11:33:08 +0000 (07:33 -0400)]
buildtools: check allocation error in pmdinfogen

In func locate_pmd_entries(), pointer 'new' returned from call to func
'calloc' may be NULL. It is dereferenced without null point check.

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
6 years agoeventdev: remove experimental label
Jerin Jacob [Mon, 16 Oct 2017 10:32:55 +0000 (16:02 +0530)]
eventdev: remove experimental label

The eventdev API was introduced in DPDK 17.05 release.
Since then it
- has been reviewed and iterated for 17.08, 17.11 releases
- three drivers were implemented using the API.
- introduced another subsystem like service core and ethdev-eventdev Rx
adapter APIs to abstract the difference between HW and SW
eventdev implementations in a transparent way.
- had extensive use by the app/test-eventdev/ and
examples/eventdev_pipeline_sw_pmd/

I believe the API is now stable and the EXPERIMENTAL label
should be removed.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agodoc: add event eth Rx adapter guide
Nikhil Rao [Tue, 24 Oct 2017 09:13:29 +0000 (14:43 +0530)]
doc: add event eth Rx adapter guide

Add programmer's guide doc to explain the use of the
Event Ethernet Rx Adapter library.

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agodoc: add flow classify guides
Bernard Iremonger [Fri, 3 Nov 2017 11:13:55 +0000 (11:13 +0000)]
doc: add flow classify guides

The Flow Classify Library Programmers Guide documents
librte_flow_classify.

The Flow Classify Sample Application Guide documents the
flow_classify sample application which is used to
demonstrate the use of the Flow Classify Library,
librte_flow_classify.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agodoc: add basic howto for flow API
Ori Kam [Wed, 25 Oct 2017 14:51:16 +0000 (17:51 +0300)]
doc: add basic howto for flow API

As the rte_flow is a new complex module in the DPDK.
In order to ease developers in to using this feature
it was suggested to supply a simple howto doc.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agoexamples/flow_filtering: add simple demo of flow API
Ori Kam [Wed, 1 Nov 2017 09:42:37 +0000 (11:42 +0200)]
examples/flow_filtering: add simple demo of flow API

This application shows a simple usage of the
rte_flow API for hardware filtering offloading.

In this demo we are filtering specific IP to
specific target queue, while sending all the
rest of the packets to other queue.

Signed-off-by: Ori Kam <orika@mellanox.com>
6 years agoexamples: remove dependency on PCI
Bruce Richardson [Fri, 3 Nov 2017 13:46:27 +0000 (13:46 +0000)]
examples: remove dependency on PCI

All PCI functionality should be hidden from apps via the PCI bus driver,
the EAL and individual device drivers. Therefore remove the inclusion of
rte_pci.h from sample apps.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agoapp/testpmd: fix topology error message
Pablo de Lara [Tue, 7 Nov 2017 18:11:26 +0000 (18:11 +0000)]
app/testpmd: fix topology error message

Fixes: 3e2006d6186c ("app/testpmd: add loopback topology")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agoapp/testpmd: fix forwarding between non consecutive ports
Ophir Munk [Tue, 7 Nov 2017 13:52:30 +0000 (13:52 +0000)]
app/testpmd: fix forwarding between non consecutive ports

When defining two failsafe devices in testpmd the port numbers of the
failsafe devices may not be consecutive.
For example: if failsafe device includes a PCI device and a TAP device
then failsafe port numbers would be 0 and 3.
Port 0 - failsafe #1 device
Port 1 - PCI #1 device
Port 2 - TAP #1 device
Port 3 - failsafe #2 device
Port 4 - PCI #2 device
Port 5 - TAP #2 device

If forwarding is defined between the failsafe devices including a peer
address the forwarding should be between peer addresses of ports 0
and 3. Instead testpmd establishes forwarding between peer addresses
of consecutive ports 0 and 1. This commit fixes this bug.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agoapp/crypto-perf: add help option
Pablo de Lara [Wed, 11 Oct 2017 00:29:11 +0000 (01:29 +0100)]
app/crypto-perf: add help option

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
6 years agotest/memcpy_perf: provide perf ratio and test time
Herbert Guan [Wed, 25 Oct 2017 07:13:46 +0000 (15:13 +0800)]
test/memcpy_perf: provide perf ratio and test time

The printed time values presented in TSC is not straight forward
showing the performance difference.  And if the high resolution
counter is not enabled, time value is too small to show the actual
performance (e.g. "1 - 1" seems the same but in fact the perfomance
diffs by 50% or more).
With the performance difference ratio caculated and printed, it'll be
easier for people to read and compare the performance between
rte_memcpy() and memcpy().
Since the TSC values' units may diff a lot on different platforms,
the total execution time of aligned/unaligned memcpy test are
provided to allow comparation between platforms.

Signed-off-by: Herbert Guan <herbert.guan@arm.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
6 years agotest/pmd_perf: fix crash with multiple devices
Daniel Mrzyglod [Fri, 27 Oct 2017 16:24:08 +0000 (18:24 +0200)]
test/pmd_perf: fix crash with multiple devices

Error can be reproduce if we run pmd_perf_autotest with more then
one device in such way:
RTE>>set_rxtx_sc poll_before_xmit
RTE>>pmd_perf_autotest

if first burst was value less than MAX_PKT_BURST in the end we overwrite
pkts_burst table for rx which was supposed for another interface.

Fixes: 002ade70e933 ("app/test: measure cycles per packet in Rx/Tx")
Cc: stable@dpdk.org
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
6 years agobus/pci: fix PPC condition for IOMMU class
Jonas Pfefferle [Tue, 7 Nov 2017 14:52:20 +0000 (15:52 +0100)]
bus/pci: fix PPC condition for IOMMU class

This fixes the use of an never defined PPC64 define in
ret_pci_get_iommu_class.

Fixes: b48e0e2d9cb4 ("bus/pci: fix IOMMU class for sPAPR")

Signed-off-by: Jonas Pfefferle <jpf@zurich.ibm.com>
6 years agobus/vdev: change log type
Jianfeng Tan [Tue, 7 Nov 2017 06:54:22 +0000 (06:54 +0000)]
bus/vdev: change log type

Use specialized dynamic log type for vdev bus logging.

Suggested-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Suggested-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
6 years agobus/vdev: move code from EAL into a new driver
Jianfeng Tan [Tue, 7 Nov 2017 06:54:21 +0000 (06:54 +0000)]
bus/vdev: move code from EAL into a new driver

Move the vdev bus from lib/librte_eal to drivers/bus.

As the crypto vdev helper function refers to data structure
in rte_vdev.h, so we move those helper function into drivers/bus
too.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
6 years agoeal: remove dependency on vdev in attach
Jianfeng Tan [Tue, 7 Nov 2017 06:54:20 +0000 (06:54 +0000)]
eal: remove dependency on vdev in attach

We can call bus->plug() to avoid calling rte_vdev_init() explicitly.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
6 years agocryptodev: remove vdev create function
Jianfeng Tan [Tue, 7 Nov 2017 06:54:19 +0000 (06:54 +0000)]
cryptodev: remove vdev create function

Remove rte_cryptodev_create_vdev() for duplication.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocrypto/dpaa_sec: rename mbuf physical address to IOVA
Hemant Agrawal [Tue, 7 Nov 2017 12:15:08 +0000 (17:45 +0530)]
crypto/dpaa_sec: rename mbuf physical address to IOVA

buf_physaddr is getting deprecated in mbuf.

Fixes: 455da5453987 ("mbuf: rename physical address to IOVA")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agobus/fslmc: set IOVA mode as physical
Hemant Agrawal [Tue, 7 Nov 2017 12:15:06 +0000 (17:45 +0530)]
bus/fslmc: set IOVA mode as physical

Setting the default iova mode as physical.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agobus/dpaa: set IOVA mode as physical
Hemant Agrawal [Tue, 7 Nov 2017 12:15:07 +0000 (17:45 +0530)]
bus/dpaa: set IOVA mode as physical

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/vhost: add parameter to enable IOMMU feature
Maxime Coquelin [Mon, 6 Nov 2017 20:38:12 +0000 (21:38 +0100)]
net/vhost: add parameter to enable IOMMU feature

Introduce a new iommu-support parameter to Vhost PMD that
passes the RTE_VHOST_USER_IOMMU_SUPPORT flag at vhost
device register time.

Default value is 0, meaning that IOMMU support is disabled
if not specified explicitly.

Example to enable IOMMU support for a given device:

--vdev 'net_vhost0,iface=/tmp/vhost-user2,iommu-support=1'

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Tested-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Acked-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
6 years agovhost: add flag to enable IOMMU support
Maxime Coquelin [Mon, 6 Nov 2017 20:38:11 +0000 (21:38 +0100)]
vhost: add flag to enable IOMMU support

Qemu versions from v2.7.0 to v2.9.0 have their reply-ack protocol
feature implementation broken with multiqueue. The reply-ack
protocol feature is optional except for IOMMU feature.

This patch introduce a new RTE_VHOST_USER_IOMMU_SUPPORT flag to
enable VIRTIO_F_IOMMU_PLATFORM virtio feature.

By default, the IOMMU support is now disabled.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Tested-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Acked-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
6 years agovhost: disable reply-ack feature if IOMMU disabled
Maxime Coquelin [Mon, 6 Nov 2017 20:38:10 +0000 (21:38 +0100)]
vhost: disable reply-ack feature if IOMMU disabled

If the application has disabled VIRTIO_F_IOMMU_PLATFORM, disable
VHOST_USER_PROTOCOL_F_REPLY_ACK protocol feature that is only
mandatory with IOMMU for now.

This is done to provide a way for the application to support
multiqueue with old Qemu versions (v2.7.0 to v2.9.0) that have
reply-ack feature broken.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Tested-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Acked-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
6 years agonet/mlx5: fix socket field initialization
Olivier Gournet [Tue, 7 Nov 2017 09:59:37 +0000 (10:59 +0100)]
net/mlx5: fix socket field initialization

Fixes: a1366b1a2be3 ("net/mlx5: add reference counter on DPDK Rx queues")

Signed-off-by: Olivier Gournet <ogournet@corp.free.fr>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx4: enhance Rx packet type offloads
Moti Haimovsky [Sun, 5 Nov 2017 17:26:56 +0000 (19:26 +0200)]
net/mlx4: enhance Rx packet type offloads

This patch enhances the Rx packet type offload to also report the L4
protocol information in the hw ptype filled by the PMD for each received
packet.

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/pcap: fix memory leak in dumper open
Stefan Baranoff [Sun, 5 Nov 2017 17:24:45 +0000 (12:24 -0500)]
net/pcap: fix memory leak in dumper open

In open_single_tx_pcap there is a call to pcap_open_dead which calls
malloc to create and return a pcap_t. That object is never freed in
this case. Other places it is freed by passing it back similar to the
way the pcap_dumper_t is in this case.

The pcap_t is only used to create the pcap_dumper_t and is never used
again so freeing it here is safe and much simpler than trying to pass
it back to be freed in eth_dev_stop along with the other
pcap_t/pcap_dumper_t objects.

Fixes: 4c173302c307 ("pcap: add new driver")
Cc: stable@dpdk.org
Signed-off-by: Stefan Baranoff <sbaranoff@gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/kni: remove driver struct forward declaration
Rami Rosen [Sat, 4 Nov 2017 12:03:49 +0000 (14:03 +0200)]
net/kni: remove driver struct forward declaration

This patch removes the forward declaration of eth_kni_drv
in rte_eth_kni.c; this forward declaration was made unnecessary
by commit 050fe6e9ff970ff92d842912136be8f9f52e171f
("drivers/net: use ethdev allocation helper for vdev"), which
removes the usage of eth_kni_drv in the eth_kni_create() method.

Fixes: 050fe6e9ff97 ("drivers/net: use ethdev allocation helper for vdev")
Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/mlx5: fix flow creation on port start
Shahaf Shuler [Mon, 6 Nov 2017 14:00:25 +0000 (16:00 +0200)]
net/mlx5: fix flow creation on port start

While the PMD avoids from creating hash RXQ with no hash fields and
array of queues after the port was already started, it lacks such
protection when re-creating the flows after the port restarts.

This may lead to inconsistent behavior for flows depending if they were
created before or after the port start.

Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agodoc: update mlx5 guide
Shahaf Shuler [Mon, 30 Oct 2017 10:58:25 +0000 (12:58 +0200)]
doc: update mlx5 guide

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agonet/igb: fix Rx interrupt with VFIO and MSI-X
Xiaoyun Li [Mon, 6 Nov 2017 02:41:40 +0000 (10:41 +0800)]
net/igb: fix Rx interrupt with VFIO and MSI-X

When using VFIO and MSIX interrupt mode, cannot get Rx interrupts. Because
when enabling the interrupt vectors, the offset is computed in a way which
only supports IGB_UIO. But the offset should be different when using VFIO.
This patch fixes this issue.

Fixes: c3cd3de0ab50 ("igb: enable Rx queue interrupts for PF")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agoexamples/flow_classify: fix fseek error handling
Bernard Iremonger [Wed, 1 Nov 2017 12:10:29 +0000 (12:10 +0000)]
examples/flow_classify: fix fseek error handling

Check return value of fseek and exit if non zero.

Coverity issue: 143435
Fixes: bab16ddaf2c1 ("examples/flow_classify: add sample application")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoexamples/l3fwd: fix aliasing in port grouping
Guduri Prathyusha [Fri, 3 Nov 2017 10:43:51 +0000 (16:13 +0530)]
examples/l3fwd: fix aliasing in port grouping

With -f-strict-aliasing enabled by default from -O2, gcc > 5.x gives
undefined behavior in port_groupx4 in ARM. 'pn' and 'pnum' are
two different pointers pointing to same chunk of memory and
with -f-strict-aliasing the pointers are assumed to be pointing to
different memory and compiler reorders instructions that depend on
pnum and pn. This breaks port grouping algorithm.

This patch eliminates the above problem by introducing a compiler
barrier between the instructions that depend on pnum, pn and lp.

Fixes: 569b290cdb36 ("examples/l3fwd: add NEON implementation")
Cc: stable@dpdk.org
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
6 years agoexamples/l3fwd: fix NEON instructions
Guduri Prathyusha [Mon, 30 Oct 2017 07:31:26 +0000 (13:01 +0530)]
examples/l3fwd: fix NEON instructions

To group consecutive packets with same destination port in bursts of 4
neon intrinsic data types dp1 and dp2 are calculated such that if
dst_port[]={a,b,c,d,e,f,g,h,i...} dp1 should contain: <a,b,c,d> and
dp2 should contain: <b,c,d,e> in the first iteration. dp1 should
be <e,f,g,h> and dp2 should be <f,g,h,i> in the next iteration.

Whereas the existing code incorrectly calculates dp1 as <d,e,f,g> from
second iteration.

This patch fixes the incorrect ARM NEON instructions on dp1.

Fixes: 569b290cdb36 ("examples/l3fwd: add NEON implementation")
Cc: stable@dpdk.org
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agoexamples/ip_pipeline: use crc32 in hash functions for arm64
Jianbo Liu [Fri, 27 Oct 2017 09:25:18 +0000 (17:25 +0800)]
examples/ip_pipeline: use crc32 in hash functions for arm64

Implement the same hash functions with crc32 on arm platform.

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agoexamples/ip_pipeline: avoid hash table create failure
Jianbo Liu [Fri, 27 Oct 2017 02:55:19 +0000 (10:55 +0800)]
examples/ip_pipeline: avoid hash table create failure

Hash table function will check if the input bucket size is power of 2,
so the parameter should be rounded up before sending to the creating
function.

Signed-off-by: Jianbo Liu <jianbo.liu@arm.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agoapp/crypto-perf: fix crypto op init
Pablo de Lara [Mon, 6 Nov 2017 09:36:04 +0000 (09:36 +0000)]
app/crypto-perf: fix crypto op init

The mempool and the physical address of the crypto operation
at mempool initialization were not being set,
leading to incorrect physical addresses.

Fixes: bf9d6702eca9 ("app/crypto-perf: use single mempool")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
6 years agodoc: fix description of TM function in testpmd
Jasvinder Singh [Thu, 26 Oct 2017 11:06:50 +0000 (12:06 +0100)]
doc: fix description of TM function in testpmd

Fixes: 5b590fbe09b6 ("app/testpmd: add traffic management forwarding mode")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agoapp/testpmd: fix potential memory leak
Kirill Rybalchenko [Thu, 2 Nov 2017 10:13:41 +0000 (10:13 +0000)]
app/testpmd: fix potential memory leak

Fix potential memory leak in cmd_ddp_info_parsed() function.

Coverity issue: 195044
Fixes: a8e005696c7b ("app/testpmd: get ddp profile protocol info")

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoapp/testpmd: fix a typo in a command description
Pavel Shirshov [Mon, 30 Oct 2017 06:56:36 +0000 (23:56 -0700)]
app/testpmd: fix a typo in a command description

Fixes: 26faac80327f ("app/testpmd: unify help strings")
Cc: stable@dpdk.org
Signed-off-by: Pavel Shirshov <pavel.shirshov@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoapp/testpmd: allow TM hierarchy commit on running port
Jasvinder Singh [Fri, 27 Oct 2017 09:46:19 +0000 (10:46 +0100)]
app/testpmd: allow TM hierarchy commit on running port

Some drivers might allow to commit the traffic management hierarchy
while being in running state. Therefore, removes port status check
before invoking hierarchy commit API in the cli. If needed, device can
add port status check at the driver layer.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoapp/testpmd: fix memory access error for metering CLI
Jasvinder Singh [Fri, 27 Oct 2017 09:17:35 +0000 (10:17 +0100)]
app/testpmd: fix memory access error for metering CLI

Fix memory access (out of bounds write) error, color and
action assignments.

Coverity issue: 198437
Fixes: 30ffb4e67ee3 ("app/testpmd: add commands traffic metering and policing")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoapp/testpmd: fix null pointer dereference
Jasvinder Singh [Fri, 27 Oct 2017 09:10:18 +0000 (10:10 +0100)]
app/testpmd: fix null pointer dereference

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

Coverity issue: 198442,198444
Fixes: 996cb153af06 ("app/testpmd: add commands for TM nodes and hierarchy commit")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/failsafe: fix VLAN stripping configuration
Ophir Munk [Thu, 2 Nov 2017 17:27:03 +0000 (17:27 +0000)]
net/failsafe: fix VLAN stripping configuration

failsafe device has vlan stripping configured at startup however once
a sub device is found as non-capable of vlan-stripping failsafe
updates it configuration and removes vlan stripping from it.
This update occurs only once at startup. Following a later plugin
attempt and in case of vlan stripping mismatch between failsafe
configuration and device capability - failsafe cannot recover and the
device remains constantly in plug out state.

The sequence of events leading to this situation is described as
follows:
1. Start testpmd with failsafe where mlx4 is a sub device (not capable
of vlan stripping). Expected printout:
PMD: net_failsafe: Disabling VLAN stripping offload
2. Execute:
testpmd> port stop all
testpmd> port config all max-pkt-len 2048
testpmd> port start all
3. Do a plug out (e.g. disable sriov)
4. Do a plug in (e.g. enable sriov)
5. Expected result: failsafe successfully configures and starts its sub
devices
Actual result: failsafe is continuously failing with these messages:
PMD: net_failsafe: VLAN stripping offload requested but not supported by
sub_device 0
PMD: net_failsafe: device already configured, cannot fix live
configuration
PMD: net_failsafe: Unable to synchronize sub device state

Root cause analysis: at startup failsafe removes vlan stripping from its
configuration. After executing "port config all max-pkt-len 2048"
testpmd marks failsafe in need for configuration update.
After executing "port start all" testpmd overrides failsafe
configuration with its own configuration which includes vlan stripping

During the plugin attempt failsafe refuses to update its configuration
by removing vlan stripping since it has already updated its
configuration at startup.

The fix is for failsafe to stop validation and disabling non-supported
offloads in its sub-devices.

Fixes: bbc6a53dda44 ("net/failsafe: support Rx offload capabilities")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agonet/mlx5: fix some typos
Thomas Monjalon [Thu, 2 Nov 2017 19:31:58 +0000 (20:31 +0100)]
net/mlx5: fix some typos

Fixes: 570acdb1da8a ("net/mlx5: add vectorized Rx/Tx burst for ARM")
Fixes: 3c2ddbd413e3 ("net/mlx5: separate shareable vector functions")
Fixes: f8b9a3bad467 ("net/mlx5: install a socket to exchange a file descriptor")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
6 years agodoc: add i40e limitation of VF VLAN strip
Beilei Xing [Fri, 3 Nov 2017 03:40:56 +0000 (11:40 +0800)]
doc: add i40e limitation of VF VLAN strip

This patch adds limitation of VF VLAN strip function.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agonet/mlx4: share memory region resources
Adrien Mazarguil [Thu, 2 Nov 2017 18:14:22 +0000 (19:14 +0100)]
net/mlx4: share memory region resources

Memory regions assigned to hardware and used during Tx/Rx are mapped to
mbuf pools. Each Rx queue creates its own MR based on the mempool
provided during queue setup, while each Tx queue looks up and registers
MRs for all existing mbuf pools instead.

Since most applications use few large mbuf pools (usually only a single
one per NUMA node) common to all Tx/Rx queues, the above approach wastes
hardware resources due to redundant MRs. This negatively affects
performance, particularly with large numbers of queues.

This patch therefore makes the entire MR registration common to all
queues using a reference count. A spinlock is added to protect against
asynchronous registration that may occur from the Tx side where new
mempools are discovered based on mbuf data.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx4: fix function prototypes
Adrien Mazarguil [Thu, 2 Nov 2017 18:14:19 +0000 (19:14 +0100)]
net/mlx4: fix function prototypes

This is done for consistency with the rest of the code.

Fixes: 078b8b452e6b ("net/mlx4: add RSS flow rule action support")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>