Commit Graph

4412 Commits

Author SHA1 Message Date
Ferruh Yigit
996672d351 bus/dpaa: fix build when assert enabled
Enabling CONFIG_RTE_ENABLE_ASSERT cause build error because some fields
protected by RTE_LIBRTE_DPAA_HWDEBUG macro accessed within DPAA_ASSERT.

All DPAA_ASSERT macro usage causing the build error wrapped with
RTE_LIBRTE_DPAA_HWDEBUG macro.

Fixes: f38f61e982 ("bus/dpaa: add BMAN hardware interfaces")
Fixes: c47ff048b9 ("bus/dpaa: add QMAN driver core routines")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2017-12-23 16:26:14 +01:00
Shahaf Shuler
0384f21dff net/mlx5: fix flow mark action on port start
Mark action flag was not set on the flow, causing the rx burst function
after port start to ignore the flow mark.

Fixes: 8086cf08b2 ("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>
2017-11-15 09:06:31 +01:00
Andrew Rybchenko
048da2530d net/sfc: avoid Tx queue setup failure if thresholds are set
Tx queue prefetch, host and writeback thresholds are used for
performance fine-tuning and not applicable to Solarflare NICs.
It is safe to just log warning and do not fail Tx queue setup
to be more friendly to DPDK applications which hardcode it.

Fixes: b1b7ad933b ("net/sfc: set up and release Tx queues")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-11-14 18:57:22 +01:00
Andrew Rybchenko
fdd7361b68 net/sfc: avoid Rx queue setup failure if thresholds are set
Rx queue prefetch, host and writeback thresholds are used for
performance fine-tuning and not applicable to Solarflare NICs.
It is safe to just log warning and do not fail Rx queue setup
to be more friendly to DPDK applications which hardcode it.

Fixes: ce35b05c63 ("net/sfc: implement Rx queue setup release operations")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-11-14 18:55:41 +01:00
Thierry Herbelot
cb98affeef net/mlx5: fix build without soft counters
total_length is only visible when SOFT_COUNTERS are enabled

Fixes: 3f13f8c23a ("net/mlx5: support hardware TSO")
Cc: stable@dpdk.org

Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-11-14 18:44:24 +01:00
Nelio Laranjeiro
e49f113654 net/mlx5: fix flow director deletion
The specification are wrongly computed causing the rule to not be match
correctly for deletion.

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

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2017-11-14 06:31:18 +01:00
Jerin Jacob
82bf1caf5f bus/pci: fix a typo in doxygen file description
Fixes: 764bf26873 ("add FreeBSD support")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-11-12 19:50:43 +01:00
Pengzhen Liu
43d18765c0 net/virtio: fix memory leak on failure
In function eth_virtio_dev_init(), dynamic memory stored
in "eth_dev->data->mac_addrs" variable and it is not freed
when function return,
this is a possible memory leak.

Fixes: 8ced1542f7 ("net/virtio: eth_dev->data->mac_addrs is not freed")
Cc: stable@dpdk.org

Signed-off-by: Pengzhen Liu <liupengzhen3@huawei.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
2017-11-12 19:50:43 +01:00
Zhiyong Yang
fe19d49cb5 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: cb482cb3a3 ("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>
2017-11-11 15:54:16 +01:00
Edward Makarov
b113cb5ee6 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: 1884087198 ("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>
2017-11-11 15:54:16 +01:00
Matan Azrad
46d7b08b91 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: c3c977bbec ("net/mlx4: add Tx bypassing Verbs")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-11-11 15:54:16 +01:00
Ajit Khaparde
9a82633c27 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: 7bc8e9a227 ("net/bnxt: support async link notification")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-11-10 09:42:25 +00:00
Ajit Khaparde
1ccdd771d6 net/bnxt: fix duplicate creation of ntuple filter
Prevent the creation of duplicate 5tuple filters.

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

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-11-10 09:42:10 +00:00
Alejandro Lucero
7c90eef52f net/nfp: fix possible memory leak
Memory allocated was not being released in any exit path.

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

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-11-10 09:31:24 +00:00
Alejandro Lucero
fee720e929 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: ad60bca348 ("net/nfp: read PF port MAC addr using NSP")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-11-10 09:31:24 +00:00
Alejandro Lucero
1fdbf9b06a 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: d12206e005 ("net/nfp: add NSP user space interface")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-11-10 09:31:24 +00:00
Alejandro Lucero
f5cba91b09 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: f37d8a4b67 ("net/nfp: add NSP FW upload command")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-11-10 09:31:24 +00:00
Alejandro Lucero
eb04bc1052 net/nfp: fix resource leak
File descriptor is not released in any potential exit path
inside the function.

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

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-11-10 09:31:24 +00:00
Alejandro Lucero
965f0aaa7c net/nfp: fix memory allocation
If the function actually returns a null value, a null pointer
dereference will occur.

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

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-11-10 09:31:24 +00:00
Alejandro Lucero
9b634927a7 net/nfp: fix stats struct initial value
Not all struct fields will be written and random data could
confuse readers.

Coverity issue: 140755
Fixes: 92aa491b88 ("nfp: add statistics")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-11-10 09:31:18 +00:00
Ilya V. Matveychikov
6c293ffd63 drivers/net: fix number of segment storage type
Fixes: 97cb466d65 ("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>
2017-11-10 09:17:13 +00:00
Shahaf Shuler
8ec50cd624 net/mlx4: fix rxq interrupt memory corruption
intr_vec allocation size was wrong causing a memory corruption.

Fixes: 0a2ae70319 ("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>
2017-11-10 09:04:20 +00:00
Shahaf Shuler
b2e0e28e30 net/mlx5: fix rxq interrupt memory corruption
intr_vec allocation size was wrong causing a memory corruption.

Fixes: e1016cb733 ("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>
2017-11-10 08:56:26 +00:00
Nélio Laranjeiro
4daae08e7f 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: 4c3e9bcdd5 ("net/mlx5: support flow director")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-11-10 08:27:27 +00:00
Harish Patil
1282943aa0 net/qede: fix default config option
Restore the default configuration as in previous releases and
add a debug msg.

Fixes: f07aa795c9 ("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>
2017-11-10 08:12:20 +00:00
Moti Haimovsky
78214fb882 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: aee4a03fee ("net/mlx4: enhance Rx packet type offloads")

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-11-10 02:29:56 +00:00
Xiaoyun Li
79f47fc1b7 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: 96a9fd03c2 ("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>
2017-11-10 02:05:15 +00:00
Shijith Thotton
92f3ea373e net/liquidio: support device reset in driver
Reset device during init and close if bound to igb_uio.

Fixes: 369db3ae8e ("igb_uio: remove device reset in release")
Cc: stable@dpdk.org

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
2017-11-08 21:30:14 +01:00
Jasvinder Singh
9527e24458 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: 299a89de91 ("net/softnic: add TM capabilities ops")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-11-08 20:44:56 +01:00
Ferruh Yigit
e8f8f59518 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: 2af14ca79c ("net/qede: support 100G")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-11-08 01:26:04 +01:00
Rasesh Mody
2c93d5baf9 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: e0947ed912 ("net/qede: add support for VXLAN UDP port config over VF")
Fixes: 739a5b2f2b ("net/qede/base: use passed ptt handler")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-11-08 00:49:59 +01:00
Rasesh Mody
5b5f9675d3 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: 1379423, 1379428
Fixes: 22d07d939c ("net/qede/base: update")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-11-08 00:49:59 +01:00
Rasesh Mody
fac6b33a5e net/qede/base: fix return code init of filter functions
Fix for uninitialized scalar variable for filter APIs

Coverity issue: 1445717, 1445718, 1445721, 1445722
Fixes: 2e2f392b24 ("net/qede/base: upgrade the FW to 8.20.0.0")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-11-08 00:49:59 +01:00
Rasesh Mody
feea1b85ce net/qede: fix PF translation table release
Appropriately release the ptt[PF translation table] handler that is
acquired in error case

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

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-11-08 00:49:59 +01:00
Rasesh Mody
a96b86a12b net/qede: remove duplicate includes
Fixes: ec94dbc573 ("qede: add base driver")
Fixes: 2ea6f76aff ("qede: add core driver")
Fixes: 622075356e ("net/qede: support ntuple and flow director filter")
Fixes: 52d94b57e1 ("net/qede: add slowpath support for VXLAN tunneling")
Fixes: 8b3ee85efe ("net/qede: fix RSS table entries for 100G adapter")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-11-08 00:49:59 +01:00
Rasesh Mody
8aab5d6fab 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: 86a2265e59 ("qede: add SRIOV support")
Fixes: ec94dbc573 ("qede: add base driver")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-11-08 00:49:59 +01:00
Harish Patil
2d62f169f1 net/qede: fix VXLAN filter deletion
Initialize ucast parameters before checking if filters exists.

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

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-11-08 00:49:59 +01:00
Harish Patil
f07aa795c9 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: 2ea6f76aff ("qede: add core driver")
Cc: stable@dpdk.org

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-11-08 00:49:59 +01:00
Yongseok Koh
6c897093f2 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: ea16068c00 ("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>
2017-11-08 00:49:59 +01:00
Nélio Laranjeiro
ab95b7e7b2 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: 4c3e9bcdd5 ("net/mlx5: support flow director")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-11-08 00:49:59 +01:00
Jonas Pfefferle
f1b7c6b7f5 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: b48e0e2d9c ("bus/pci: fix IOMMU class for sPAPR")

Signed-off-by: Jonas Pfefferle <jpf@zurich.ibm.com>
2017-11-07 17:04:09 +01:00
Jianfeng Tan
d22fcb225c 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>
2017-11-07 16:54:07 +01:00
Jianfeng Tan
d4a586d29e 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>
2017-11-07 16:54:07 +01:00
Hemant Agrawal
116ff44aa8 crypto/dpaa_sec: rename mbuf physical address to IOVA
buf_physaddr is getting deprecated in mbuf.

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

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-11-07 15:39:47 +01:00
Hemant Agrawal
6eaf4e7c33 bus/fslmc: set IOVA mode as physical
Setting the default iova mode as physical.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-11-07 15:39:31 +01:00
Hemant Agrawal
d5a4e3a00c bus/dpaa: set IOVA mode as physical
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-11-07 14:51:21 +01:00
Maxime Coquelin
447e0d3797 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>
2017-11-07 14:19:30 +01:00
Olivier Gournet
a49b617b86 net/mlx5: fix socket field initialization
Fixes: a1366b1a2b ("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>
2017-11-07 12:52:19 +01:00
Moti Haimovsky
aee4a03fee 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>
2017-11-07 12:47:13 +01:00
Stefan Baranoff
e59196e01c 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: 4c173302c3 ("pcap: add new driver")
Cc: stable@dpdk.org

Signed-off-by: Stefan Baranoff <sbaranoff@gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-11-07 10:42:42 +01:00