Jerin Jacob [Sat, 28 Oct 2017 06:22:55 +0000 (11:52 +0530)]
bus/pci: fix VFIO device reset
If the device is not capable of resetting, then Linux kernel updates
the errno as EINVAL.
http://elixir.free-electrons.com/linux/v4.9/source/drivers/vfio/pci/vfio_pci.c#L887
Honor the EINVAL errno value to avoid pci vfio setup failure.
Fixes:
f25f8f367644 ("bus/pci: check VFIO reset ioctl error")
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Jonas Pfefferle <jpf@zurich.ibm.com>
Ferruh Yigit [Mon, 30 Oct 2017 22:32:27 +0000 (22:32 +0000)]
bus/pci: fix VFIO mode
Revert back to using VFIO_PRESENT as a marker to enable compilation
of VFIO-related segments.
VFIO_PRESENT is the combination of user configuration RTE_EAL_VFIO and
kernel version support check.
eal_vfio.h VFIO_PRESENT related check ordered to be compatible with
rte_vfio.h one, no functional modification.
Fixes:
279b581c897d ("vfio: expose functions")
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
Thomas Monjalon [Thu, 26 Oct 2017 23:39:36 +0000 (01:39 +0200)]
version: 17.11-rc2
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Yongseok Koh [Wed, 25 Oct 2017 23:30:40 +0000 (16:30 -0700)]
net/mlx5: fix TSO inline size calculation
When "net/mlx5: replace network to host macros" is rebased for v4,
changes of "net/mlx5: fix calculating TSO inline size" have been
reverted.
Fixes:
6b30a6a8552a ("net/mlx5: replace network to host macros")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Moti Haimovsky [Wed, 25 Oct 2017 15:37:27 +0000 (18:37 +0300)]
net/mlx4: fix no Rx interrupts
This commit addresses the issue of Rx interrupts support with
the new Rx datapath introduced in DPDK version 17.11.
In order to generate an Rx interrupt an event queue is armed with the
consumer index of the Rx completion queue. Since version 17.11 this
index is handled by the PMD so it is now the responsibility of the
PMD to write this value when enabling Rx interrupts.
Fixes:
6681b845034c ("net/mlx4: add Rx bypassing Verbs")
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Moti Haimovsky [Wed, 25 Oct 2017 15:37:26 +0000 (18:37 +0300)]
net/mlx4: introducing consumer index mask
This commit defines MLX4_CQ_DB_CI_MASK which is used when updating
the consumer index of the completion queue instead of the hardcoded
0xffffff used until now.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Srisivasubramanian S [Tue, 24 Oct 2017 04:42:50 +0000 (10:12 +0530)]
net/liquidio: add support for 10GBase-T cards
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Matan Azrad [Sun, 22 Oct 2017 05:51:08 +0000 (05:51 +0000)]
net/failsafe: fix Rx clean race
When removing a device, the fail-safe checks that it is not within its
datapath before cleaning it.
When checking whether an Rx burst should be performed on a device, the
remove flag is not checked. Thus the port could still enter its datapath
and miss a removal round. Furthermore, there is a race between the
thread removing the device and the polling thread.
Check the remove flag before entering a sub-device Rx burst when in safe
mode. This check mitigates the aforementioned race condition.
Fixes:
72a57bfd9a0e ("net/failsafe: add fast burst functions")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Olivier Matz [Mon, 11 Sep 2017 15:13:31 +0000 (17:13 +0200)]
lpm6: fix compilation with -Og
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following
error:
CC rte_lpm6.o
rte_lpm6.c: In function ‘rte_lpm6_add_v1705’:
rte_lpm6.c:442:11: error: ‘tbl_next’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
if (!tbl[tbl_index].valid) {
^
rte_lpm6.c:521:29: note: ‘tbl_next’ was declared here
struct rte_lpm6_tbl_entry *tbl_next;
^~~~~~~~
This is a false positive from gcc. Fix it by initializing tbl_next
to NULL.
Fixes:
5c510e13a9cb ("lpm: add IPv6 support")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Marko Kovacevic [Wed, 25 Oct 2017 15:51:00 +0000 (16:51 +0100)]
doc: add new introduction to sample app guides
Add new Introduction Section into the sample app guides.
Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Herakliusz Lipiec [Wed, 25 Oct 2017 15:50:59 +0000 (16:50 +0100)]
doc: add generic build instructions for sample apps
Moved duplicated, and occasionally outdated, doc sections from each
of the sample app guides chapters to a common chapter at the start.
This reduces the duplication in the docs and provides a single
point of reference for compiling the sample apps.
Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Xueming Li [Thu, 26 Oct 2017 08:29:23 +0000 (16:29 +0800)]
examples/multi_process: fix received message length
Simple_mp example receives message size less than 64 chars while send
side accepts chars less than 128, this leads to different result when
sending text length larger than 64.
This patch uses same buffer length on both message pool and command
line.
Fixes:
af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Nikhil Rao [Tue, 24 Oct 2017 10:32:19 +0000 (16:02 +0530)]
doc: add event eth Rx adapter to release notes
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Pavan Nikhilesh [Wed, 25 Oct 2017 14:50:33 +0000 (20:20 +0530)]
doc: update software event device
Update software event device documentation to include use of service
cores for event distribution.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Pavan Nikhilesh [Wed, 25 Oct 2017 14:50:32 +0000 (20:20 +0530)]
eventdev: remove schedule API
remove eventdev schedule api and enforce sw driver to use service core
feature for event scheduling.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Pavan Nikhilesh [Wed, 25 Oct 2017 14:50:31 +0000 (20:20 +0530)]
examples/eventdev: use service library
Update the sample app eventdev_pipeline_sw_pmd to use service run iter for
event scheduling in case of sw eventdev.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Wed, 25 Oct 2017 14:50:30 +0000 (20:20 +0530)]
test/eventdev: use service iter
Use service run iter for event scheduling instead of calling the event
schedule api directly.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Wed, 25 Oct 2017 14:50:29 +0000 (20:20 +0530)]
app/testeventdev: use service cores
Use service cores for offloading event scheduling in case of
centralized scheduling instead of calling the schedule api directly.
This removes the dependency on dedicated scheduler core specified by
giving command line option --slcore.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Pavan Nikhilesh [Wed, 25 Oct 2017 14:50:28 +0000 (20:20 +0530)]
event/sw: extend service capability
Extend the service capability of the sw event device by exposing service id
to the application.
The application can use service id to configure service cores to run event
scheduling.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Wed, 25 Oct 2017 14:50:27 +0000 (20:20 +0530)]
eventdev: add API to get service id
In case of sw event device the scheduling can be done on a service core
using the service registered at the time of probe.
This patch adds a helper function to get the service id that can be used
by the application to assign a lcore for the service to run on.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Wed, 25 Oct 2017 14:21:44 +0000 (19:51 +0530)]
doc: update eventdev guide
Update the guide with event queue configuration and event enqueue
operation.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Wed, 25 Oct 2017 14:21:43 +0000 (19:51 +0530)]
eventdev: extend queue attribute get function
Add schedule type queue attribute so that it can be queried along with
the queue config structure.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Wed, 25 Oct 2017 14:21:42 +0000 (19:51 +0530)]
eventdev: fix inconsistency in queue config
With the current scheme of event queue configuration the cfg schedule
type macros (RTE_EVENT_QUEUE_CFG_*_ONLY) are inconsistent with the
event schedule type (RTE_SCHED_TYPE_*) this requires unnecessary
conversion between the fastpath and slowpath API's while scheduling
events or configuring event queues.
This patch aims to fix such inconsistency by using event schedule
types (RTE_SCHED_TYPE_*) for event queue configuration.
This patch also fixes example/eventdev_pipeline_sw_pmd as it doesn't
convert RTE_EVENT_QUEUE_CFG_*_ONLY to RTE_SCHED_TYPE_* which leads to
improper events being enqueued to the eventdev.
Fixes:
adb5d5486c39 ("examples/eventdev_pipeline_sw_pmd: add sample app")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Bernard Iremonger [Thu, 26 Oct 2017 10:47:30 +0000 (11:47 +0100)]
flow_classify: fix logging
Set log_level to RTE_LOG_INFO.
The RTE_LIBRTE_CLASSIFY_DEBUG macro has been removed from the
config file, use the log_level instead.
Fixes:
be41ac2a330f ("flow_classify: introduce flow classify library")
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
Nikhil Rao [Thu, 29 Sep 2016 21:24:53 +0000 (02:54 +0530)]
eal/x86: fix atomic cmpset
The original code used movl instead of xchgl, this caused
rte_atomic64_cmpset to use ebx as the lower dword of the source
to cmpxchg8b instead of the lower dword of function argument "src".
Fixes:
af75078fece3 ("first public release")
Cc: stable@dpdk.org
Reported-by: Job Abraham <job.abraham@intel.com>
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Tested-by: Job Abraham <job.abraham@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Jonas Pfefferle [Thu, 26 Oct 2017 15:19:49 +0000 (17:19 +0200)]
bus/pci: check VFIO reset ioctl error
Check return value of device reset ioctl
Coverity issue: 195003
Fixes:
33604c31354a ("vfio: refactor PCI BAR mapping")
Signed-off-by: Jonas Pfefferle <jpf@zurich.ibm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Jianfeng Tan [Tue, 24 Oct 2017 07:44:53 +0000 (07:44 +0000)]
bus/pci: fix UIO bind check
When checking if any devices bound to uio, we did not exclude
those which are blacklisted (or in the case that a whitelist
is specified).
This patch fixes it by only checking whitelisted devices, or
not-blacklisted devices depending on the bus scan mode.
Fixes:
815c7deaed2d ("pci: get IOMMU class on Linux")
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Gaetan Rivet [Thu, 26 Oct 2017 20:00:50 +0000 (22:00 +0200)]
maintainers: claim maintainership of PCI library
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:06:08 +0000 (12:06 +0200)]
pci: introduce library and driver
The PCI lib defines the types and methods allowing to use PCI elements.
The PCI bus implements a bus driver for PCI devices by constructing
rte_bus elements using the PCI lib.
Move the relevant code out of the EAL to its expected place.
Libraries, drivers, unit tests and applications are updated to use the
new rte_bus_pci.h header when necessary.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:06:07 +0000 (12:06 +0200)]
net/bonding: use local prefix namespace
The current name conflicts with the librte_pci naming convention.
Additionally, it is easier to use gdb when having prefixed even private
functions.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:06:06 +0000 (12:06 +0200)]
pci: use EAL exposed configuration
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:06:05 +0000 (12:06 +0200)]
pci: do not expose IOVA mode getter
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:06:04 +0000 (12:06 +0200)]
pci: do not expose match function
This function is private to the PCI bus.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:06:03 +0000 (12:06 +0200)]
pci: do not expose private functions
make the functions
+ rte_pci_detach
+ rte_pci_probe
+ rte_pci_probe_one
+ rte_pci_scan
private as there is no point in using them outside of the rte_bus
framework.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:06:02 +0000 (12:06 +0200)]
pci: use new address parsing function
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:06:01 +0000 (12:06 +0200)]
pci: use new address comparison function
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:06:00 +0000 (12:06 +0200)]
pci: make specialized parsing functions private
Do not expose the minute implementations of PCI parsing.
This leaves only the all-purpose rte_pci_addr_parse, which is simpler to
use.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:05:59 +0000 (12:05 +0200)]
pci: introduce PCI address parsing function
A new single function that is able to parse all currently supported
format:
* Domain-Bus-Device-Function
* Bus-Device-Function
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:05:58 +0000 (12:05 +0200)]
pci: deprecate misnamed functions
Rename misnamed functions and describe the change in a deprecation
notice.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:05:57 +0000 (12:05 +0200)]
pci: avoid over-complicated macro
Using a macro helps writing the code to the detriment of the reader
in this case. This is backward. Write once, read many.
The few LOCs gained is not worth the opacity of the implementation.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:05:56 +0000 (12:05 +0200)]
pci: avoid inlining functions
Parsing operations should not happen in performance critical sections.
Headers should not propose implementations unless duly required.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:05:55 +0000 (12:05 +0200)]
vfio: move PCI related symbols
These symbols are only relevant to PCI operations.
Move them to a private PCI-related header, allowing to remove the
dependency of the PCI subsystem upon private eal_vfio.h.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:05:54 +0000 (12:05 +0200)]
vfio: check PCI dependency in PCI scan
PCI sometimes requires vfio to be enabled.
Move the check from EAL init to PCI bus scan.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:05:53 +0000 (12:05 +0200)]
vfio: remove useless PCI headers
PCI headers are not necessary and are making this module dependent on
the PCI subsystem.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:05:52 +0000 (12:05 +0200)]
vfio: expose functions
The following symbols are used by vfio implementations within the PCI bus.
They need to be publicly available for the PCI bus to be outside the
EAL.
+ vfio_enable;
+ vfio_is_enabled;
+ vfio_noiommu_is_enabled;
+ vfio_release_device;
+ vfio_setup_device;
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:05:51 +0000 (12:05 +0200)]
eal: expose internal config elements
Some internal configuration elements set by the user on the command line
are necessary outside the EAL, when the PCI bus is detached.
Expose:
+ rte_eal_create_uio_dev
+ rte_eal_has_pci
+ rte_eal_vfio_intr_mode
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:05:50 +0000 (12:05 +0200)]
mem: expose function for physical address use
This function was previously private to the EAL layer.
Other subsystems requires it, such as the PCI bus.
In order not to force other components to include stdbool, which is
incompatible with several NIC drivers, the return type has
been changed from bool to int.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:05:49 +0000 (12:05 +0200)]
eal/x86: include common header
The macro RTE_SET_USED is defined in rte_common.h
This header is included through eal_private.h, which includes in turn
rte_pci.h
Once the PCI subsystem is out of the EAL, this will break the
compilation (seen on FreeBSD).
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:05:48 +0000 (12:05 +0200)]
eal: include stdint in private header
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:05:47 +0000 (12:05 +0200)]
bus: include debug header
This header is included through rte_pci.h, which will be removed once
the PCI bus is moved out of the EAL.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Thu, 26 Oct 2017 10:05:46 +0000 (12:05 +0200)]
ethdev: remove useless PCI dependency
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Ferruh Yigit [Wed, 25 Oct 2017 08:36:45 +0000 (09:36 +0100)]
eal: fix build with glibc < 2.12
build error:
CC rte_cycles.o
cc1: warnings being treated as errors
...dpdk/lib/librte_eal/common/arch/x86/rte_cycles.c: In function
‘rdmsr’:
...dpdk/lib/librte_eal/common/arch/x86/rte_cycles.c:67:2: error:
implicit declaration of function ‘pread’
...dpdk/lib/librte_eal/common/arch/x86/rte_cycles.c:67:2: error:
nested extern declaration of ‘pread’
from pread man page:
pread(), pwrite():
_XOPEN_SOURCE >= 500
|| /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
For glibc < 2.12 _XOPEN_SOURCE >= 500 is required.
Adding _GNU_SOURCE define to the file which implies _XOPEN_SOURCE=700
Fixes:
ad3516bb4ae1 ("eal/x86: implement arch-specific TSC freq query")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Shreyansh Jain [Thu, 26 Oct 2017 14:09:06 +0000 (19:39 +0530)]
event/dpaa2: fix shared build
Fixes:
cbc12b0a96f5 ("mk: do not generate LDLIBS from directory dependencies")
Fixes:
b677d4c6d281 ("net/dpaa2: add API for event Rx adapter")
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Shreyansh Jain [Thu, 26 Oct 2017 14:09:05 +0000 (19:39 +0530)]
crypto/dpaa_sec: fix shared build
Various symbols are being used by DPAA Crypto driver which were not exposed
from DPAA bus during initial version. This breaks the shared build.
This patch also adds the LDLIBS line required after (
cbc12b0a9) patch.
Fixes:
c3e85bdcc6e6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Radu Nicolau [Thu, 26 Oct 2017 14:15:14 +0000 (15:15 +0100)]
crypto/dpaa2_sec: forbid build without security lib
Build fails when rte_security is disabled; make rte_security mandatory
Fixes:
0a23d4b6f4c2 ("crypto/dpaa2_sec: support protocol offload IPsec")
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Radu Nicolau [Thu, 26 Oct 2017 14:15:13 +0000 (15:15 +0100)]
examples/ipsec-secgw: fix build without security lib
Build fails when rte_security is disabled; make rte_security mandatory
Fixes:
ec17993a145a ("examples/ipsec-secgw: support security offload")
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Tested-by: David Marchand <david.marchand@6wind.com>
Radu Nicolau [Thu, 26 Oct 2017 14:15:12 +0000 (15:15 +0100)]
net/ixgbe: fix build without security library
Fixes:
9a0752f498d2 ("net/ixgbe: enable inline IPsec")
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Tested-by: David Marchand <david.marchand@6wind.com>
David Harton [Fri, 1 Sep 2017 02:36:28 +0000 (22:36 -0400)]
ethdev: allow returning error on VLAN offload ops
Some devices may not support or fail setting VLAN offload
configuration based on dynamic circumstances so the
vlan_offload_set_t vector is modified to return an int so
the caller can determine success or not.
rte_eth_dev_set_vlan_offload is updated to return the
value provided by the vector when called along with restoring
the original offload configs on failure.
Existing vlan_offload_set_t vectors are modified to return
an int. Majority of cases return 0 but a few that actually
can fail now return their failure codes.
Finally, a vlan_offload_set_t vector is added to virtio
to facilitate dynamically turning VLAN strip on or off.
Signed-off-by: David Harton <dharton@cisco.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tomasz Kulasek [Fri, 20 Oct 2017 15:49:26 +0000 (17:49 +0200)]
net/bonding: fix check slaves link properties
Result of slaves link properties validation is not used when new slave
is added.
This patch uses the value of link_properties_valid() to determinate if
slave can be used in the bonding. If function fails, error is returned
preventing to add slave with invalid link properties.
Coverity issue: 158661
Fixes:
deba8a2f8b0b ("net/bonding: fix link properties management")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Nélio Laranjeiro [Wed, 25 Oct 2017 14:04:36 +0000 (16:04 +0200)]
net/mlx5: fix device stop with multiple regions
LIST macro are not safe when inside a LIST_FOREACH() a LIST_REMOVE() is
called to remove an entry, this behavior is undefined causing some entries
to disappear from the list.
Fixes:
6e78005a9b30 ("net/mlx5: add reference counter on DPDK Tx queues")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Roger Melton [Thu, 12 Oct 2017 17:24:35 +0000 (13:24 -0400)]
net/e1000: correct VLAN tag byte order for i35x LB packets
When copying VLAN tags from the RX descriptor to the vlan_tci field
in the mbuf header, igb_rxtx.c:eth_igb_recv_pkts() and
eth_igb_recv_scattered_pkts() both assume that the VLAN tag is always
little endian. While i350, i354 and /i350vf VLAN non-loopback
packets are stored little endian, VLAN tags in loopback packets (LB)
for those devices are big endian.
For i350, i354 and i350vf VLAN loopback packets, swap the tag when
copying from the RX descriptor to the mbuf header. This will ensure
that the mbuf vlan_tci is always little endian.
Signed-off-by: Roger Melton <rmelton@cisco.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Yongseok Koh [Wed, 25 Oct 2017 00:27:25 +0000 (17:27 -0700)]
net/mlx5: fix Tx doorbell memory barrier
Configuring UAR as IO-mapped makes maximum throughput decline by
noticeable amount. If UAR is configured as write-combining register,
a write memory barrier is needed on ringing a doorbell.
rte_wmb() is mostly effective when the size of a burst is comparatively
small. Revert the register back to write-combining and enforce a write
memory barrier instead, except for vectorized Tx burst routines.
Application can change it by setting MLX5_SHUT_UP_BF under its own
necessity.
Fixes:
9f9bebae5530 ("net/mlx5: don't map doorbell register to write combining")
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Nélio Laranjeiro [Wed, 25 Oct 2017 08:25:22 +0000 (10:25 +0200)]
net/mlx5: fix adjust priority for drop queue
Drop queue should also adjust their priority according the most specific
layer in the pattern they are matching to avoid dropping all the
traffic.
Fixes:
8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Ferruh Yigit [Wed, 25 Oct 2017 17:17:46 +0000 (18:17 +0100)]
net/octeontx: fix build for gcc < 4.6
-Ofast option supported starting from gcc4.6 [1], for older versions
using "-O3 -ffast-math" instead.
[1] build error:
CC octeontx_rxtx.o
cc1: error: invalid option argument ‘-Ofast’
Fixes:
9e747589bd4c ("net/octeontx: add packet transmit burst function")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Olivier Matz [Wed, 25 Oct 2017 15:12:57 +0000 (17:12 +0200)]
mbuf: rename deprecated VLAN flags
PKT_RX_VLAN_PKT and PKT_RX_QINQ_PKT are deprecated for a while.
As explained in [1], these flags were kept to let the applications and
PMDs move to the new flag. There is also a need to support Rx vlan
offload without vlan strip (at least for the ixgbe driver).
This patch renames the old flags for this feature, knowing that some
PMDs were using PKT_RX_VLAN_PKT and PKT_RX_QINQ_PKT to indicate that
the vlan tci has been saved in the mbuf structure.
It is likely that some PMDs do not set the proper flags when doing vlan
offload, and it would be worth making a pass on all of them.
Link: [1] http://dpdk.org/ml/archives/dev/2017-June/067712.html
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Gaetan Rivet [Tue, 24 Oct 2017 10:35:39 +0000 (12:35 +0200)]
pci: propagate PMD removal error value for unplug
If a PCI device detach removal fails, returns the actual removal
operator error value.
Use this value within pci->unplug, as it may help applications solve an
issue with the feature or more accurately warn their users.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Gaetan Rivet [Tue, 24 Oct 2017 10:35:38 +0000 (12:35 +0200)]
ethdev: remove detachable device flag
This flag is not necessary at the ether layer anymore.
Buses are able to advertise their hotplug support. The ether layer can
rely upon this capability instead of a special flag.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Gaetan Rivet [Tue, 24 Oct 2017 10:35:37 +0000 (12:35 +0200)]
ethdev: do not rely on detachable flag in detach
This flag is deprecated and should not be used to check for the device
ability to be detached.
The rte_dev library call will fail with the relevant error code if
detaching this port is not possible.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Ajit Khaparde [Tue, 24 Oct 2017 21:19:53 +0000 (16:19 -0500)]
net/bnxt: check VLANs from pool map only for VMDq
Fixes:
75cd6fb1d901 ("net/bnxt: fix the association of a MACVLAN per VNIC")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Tue, 24 Oct 2017 21:19:52 +0000 (16:19 -0500)]
net/bnxt: fix an unused value
return value stored in "rc" but it has been overwritten before use.
Coverity issue: 147216
Fixes:
7a5b0874440e ("net/bnxt: support to add a VF MAC address")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Tue, 24 Oct 2017 21:19:51 +0000 (16:19 -0500)]
net/bnxt: fix a pointer deref before null check
Coverity issue: 158634
Fixes:
daef48efe5e5 ("net/bnxt: support set MTU")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Tue, 24 Oct 2017 21:19:50 +0000 (16:19 -0500)]
net/bnxt: fix a potential null pointer dereference
Coverity issue: 158634
Fixes:
daef48efe5e5 ("net/bnxt: support set MTU")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Tue, 24 Oct 2017 21:19:49 +0000 (16:19 -0500)]
net/bnxt: fix a potential null pointer dereference
Coverity issue: 195046
Fixes:
f7ecea911ec5 ("net/bnxt: fix interrupt handler")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Tue, 24 Oct 2017 21:19:48 +0000 (16:19 -0500)]
net/bnxt: fix a potential null pointer dereference
Coverity issue: 195017
Fixes:
5ef3b79fdfe6 ("net/bnxt: support flow filter ops")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Tue, 24 Oct 2017 21:19:47 +0000 (16:19 -0500)]
net/bnxt: fix a pointer deref before null check
Coverity issue: 195015
Fixes:
b7435d660a8c ("net/bnxt: add ntuple filtering support")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Tue, 24 Oct 2017 21:19:46 +0000 (16:19 -0500)]
net/bnxt: fix a potential null pointer dereference
Fix a potential null pointer reported by Coverity.
Coverity issue: 195001
Fixes:
5ef3b79fdfe6 ("net/bnxt: support flow filter ops")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Tue, 24 Oct 2017 21:19:45 +0000 (16:19 -0500)]
net/bnxt: fix a bit shift operation
We are left shifting more bits than we should be doing.
This patch fixes that.
Coverity issue: 127546
Fixes:
778b759ba10e ("net/bnxt: add MAC address")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Tue, 24 Oct 2017 21:19:44 +0000 (16:19 -0500)]
net/bnxt: fix redirecting traffic to a VF
The case to handle redirect a flow to a VF is not handled.
This patch fixes it.
Fixes:
5ef3b79fdfe6 ("net/bnxt: support flow filter ops")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Tue, 24 Oct 2017 21:19:43 +0000 (16:19 -0500)]
net/bnxt: remove redundant code parsing pool map
This patch removes some redundant code from bnxt_mq_rx_configure().
Fixes:
75cd6fb1d901 ("net/bnxt: fix the association of a MACVLAN per VNIC")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Tue, 24 Oct 2017 21:19:42 +0000 (16:19 -0500)]
net/bnxt: handle Rx multi queue creation properly
This patch simplifies logic for RSS queue creation.
1) Do not hardcode number of VNIC pools in case of RSS
2) Log a message if Number of queues is > RTE_ETHDEV_QUEUE_STAT_CNTRS
3) Move the check for allocation of l2_filter inside the for loop.
Fixes:
6133f207970c ("net/bnxt: add Rx queue create/destroy")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Tue, 24 Oct 2017 21:19:41 +0000 (16:19 -0500)]
net/bnxt: fix Rx offload capability
We are not setting the rx_offload capabilities. Fixing that.
Fixes:
0a6d2a720078 ("net/bnxt: get device infos")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Tue, 24 Oct 2017 21:19:40 +0000 (16:19 -0500)]
net/bnxt: fix Tx offload capability
We are not indicating VLAN insert capability of HW. Fixing it.
Fixes:
0a6d2a720078 ("net/bnxt: get device infos")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Tue, 24 Oct 2017 21:19:39 +0000 (16:19 -0500)]
net/bnxt: update HWRM to 1.8.2
This patch updates the HWRM API to version 1.8.2
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Elza Mathew [Fri, 20 Oct 2017 17:09:48 +0000 (10:09 -0700)]
app/testpmd: refine xstats show
When using "show port xstats all" command to show xstats, the output
is usually too long to obtain what you really want, especially when
multi-queue is enabled.
Added an option to set whether zero values should be displayed
or not for xstats. The "set xstats-hide-zero on|off" command enables
the user to decide if the zero values should be shown while
displaying xstats.
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Signed-off-by: Elza Mathew <elza.mathew@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Wei Zhao [Tue, 24 Oct 2017 08:45:10 +0000 (16:45 +0800)]
net/i40e: fix queue number error in queue region
when VSI is enabled with smaller number of queues, for example 1 or 6,
it will cause error.
64 is the max number of queues that can be used for RSS, but VSI might
be created with only few queues.
Fixes:
7cbecc2f742 ("net/i40e: support queue region set and flush")
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Luca Boccassi [Tue, 24 Oct 2017 13:19:05 +0000 (14:19 +0100)]
ethdev: document new error code for reset
When VF reset will be supported by drivers, the API will most likely
have to return -EAGAIN to avoid blocking when the VF cannot be reset
because the PF is down.
Document it immediately even if it's not yet supported, so that users
and developers can already take into account about this use case, and
thus avoid an API-incompatible change later on.
This is based on real-world production usage and customer escalations,
using earlier patches from Intel [1].
[1]
http://dpdk.org/ml/archives/dev/2017-October/079692.html
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Luca Boccassi [Tue, 24 Oct 2017 13:19:04 +0000 (14:19 +0100)]
ethdev: document error codes of reset
This new function returns 0 on success and various error codes on
different failures. Attempt to document them.
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Xiao Wang [Tue, 24 Oct 2017 13:45:52 +0000 (06:45 -0700)]
doc: add switch restart support to fm10k guide
Document how DPDK app should handle the event of switch quit-restart
to resume its network without an app-level restart.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Xiao Wang [Tue, 24 Oct 2017 13:45:51 +0000 (06:45 -0700)]
net/fm10k: support switch restart on VF
For VF events indicating a change in the state of the switch manager,
the driver will restore the basic port configurations and then pass this
event to application so that the application can restore any additional
configurations if required.
In this way, once the switch manager restarts, the DPDK application can
resume its network.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Xiao Wang [Tue, 24 Oct 2017 13:45:50 +0000 (06:45 -0700)]
net/fm10k: support switch restart on PF
For PF events indicating a change in the state of the switch manager,
the driver will restore the basic port configurations and then pass this
event to application so that the application can restore any additional
configurations if required.
In this way, once the switch manager restarts, the DPDK application can
resume its network.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Xiao Wang [Tue, 24 Oct 2017 13:45:49 +0000 (06:45 -0700)]
net/fm10k: redefine link status semantics
As fm10k host interface is not directly connected to PHY, marking the
link status as UP doesn't mean a lot to the application.
So, this patch basically redefines the link status as the state of
switch manager: when switch manager is running, it's LINK_UP;
when switch manager goes down by calling the fmTerminate function,
status turns to LINK_DOWN.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Nélio Laranjeiro [Tue, 24 Oct 2017 15:18:18 +0000 (17:18 +0200)]
net/mlx5: fix flow director flow add
Flows are added by priv_flow_create() in the associated list, adding them a
second time corrupts the list causing an infinite loop when parsing it.
Fixes:
4c3e9bcdd52e ("net/mlx5: support flow director")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nélio Laranjeiro [Tue, 24 Oct 2017 15:18:17 +0000 (17:18 +0200)]
net/mlx5: fix reception when VLAN is added
When VLAN is enabled in the Rx side, only packets matching this VLAN are
expected, this also includes the broadcast and all multicast packets.
Fixes:
272733b5ebfd ("net/mlx5: use flow to enable unicast traffic")
Fixes:
6a6b6828fe6a ("net/mlx5: use flow to enable all multi mode")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nélio Laranjeiro [Tue, 24 Oct 2017 15:18:16 +0000 (17:18 +0200)]
net/mlx5: fix mark action with drop action
Marking a packet which will not be received by the NIC is useless, even
if this action remains possible, it blocks the creation of the flow
counter which embed a mark action to a drop queue to be created.
Fixes:
31ba9997f11a ("net/mlx5: fully convert a flow to verbs in validate")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nélio Laranjeiro [Tue, 24 Oct 2017 15:18:15 +0000 (17:18 +0200)]
net/mlx5: fix flow director drop action
Flow director drop action as not been brought back with the new
implementation on top of rte flow.
Fixes:
4c3e9bcdd52e ("net/mlx5: support flow director")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nélio Laranjeiro [Tue, 24 Oct 2017 15:18:14 +0000 (17:18 +0200)]
net/mlx5: fix drop flows when port is stopped
Fix the drop queue rule creation when the port is stopped.
Fixes:
8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nélio Laranjeiro [Tue, 24 Oct 2017 15:18:13 +0000 (17:18 +0200)]
net/mlx5: fix work queue array size
Indirection table size must be in log to communicate with verbs when the
number of queue is not a power of two, the maximum indirection table
size is use, but not converted to log2. This makes a memory corruption.
Fixes:
4c7a0f5ff876 ("net/mlx5: make indirection tables shareable")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nélio Laranjeiro [Tue, 24 Oct 2017 15:18:12 +0000 (17:18 +0200)]
net/mlx5: fix segfault on flow creation
When ports are stopped, the hash Rx queue should not be created.
Fixes:
8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Aviad Yehezkel [Tue, 24 Oct 2017 14:48:16 +0000 (17:48 +0300)]
app/testpmd: fix build without ixgbe and bnxt PMDs
Fixes:
4cfe399f6550 ("net/bnxt: support to set VF rxmode")
Fixes:
36735a932ca7 ("net/bnxt: support set VF QOS and MAC anti spoof")
Cc: stable@dpdk.org
Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Matan Azrad [Tue, 24 Oct 2017 10:05:59 +0000 (10:05 +0000)]
net/mlx4: fix targetless internal rule creation
The corrupted code allowed to create internal rule with no any target
queue in case the rule creation occurred before queues creation.
For example, when user calls rte_eth_dev_default_mac_addr_set after
probe and before dev_configure, mlx4 fails because the RSS queue number
was 0.
The fix prevents internal rules creation before queues creation based on
future creation before traffic start.
Fixes:
7d8675956f57 ("net/mlx4: add RSS support outside flow API")
Fixes:
bdcad2f4843a ("net/mlx4: refactor internal flow rules")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>