dpdk.git
6 years agomem: rename segment address from physical to IOVA
Santosh Shukla [Fri, 20 Oct 2017 12:31:33 +0000 (18:01 +0530)]
mem: rename segment address from physical to IOVA

Renaming rte_memseg {.phys_addr} to {.iova}
Keep the deprecated name in an anonymous union to avoid breaking
the API.

Use rte_iova_t and RTE_BAD_IOVA where appropriate in
memory segment handling.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
6 years agomem: introduce IOVA type
Thomas Monjalon [Fri, 3 Nov 2017 23:36:47 +0000 (00:36 +0100)]
mem: introduce IOVA type

The IO virtual addresses may be used instead of physical addresses.
As IOVA is more generic, it should be used in most places instead
of physical address wording.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agomem: hide physical address error in VA mode
Thomas Monjalon [Sat, 4 Nov 2017 22:09:03 +0000 (23:09 +0100)]
mem: hide physical address error in VA mode

If the IOVA mode is not using physical addresses,
no need to log an error about physical address issue.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agomem: remove old function from symbol list
Thomas Monjalon [Fri, 3 Nov 2017 11:21:04 +0000 (12:21 +0100)]
mem: remove old function from symbol list

The function rte_mem_phy2mch() was removed with the support
of Xen dom0.

Fixes: a7cb2e20d23c ("mem: remove API to get physical address in dom0")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
6 years agoremove useless memzone includes
Thomas Monjalon [Sat, 4 Nov 2017 00:43:57 +0000 (01:43 +0100)]
remove useless memzone includes

The memzone header is often included without good reason.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agoremove include of generated config header
Thomas Monjalon [Thu, 2 Nov 2017 21:35:02 +0000 (22:35 +0100)]
remove include of generated config header

The file rte_config.h is generated and automatically included
with -include option.
The explicit includes in drivers and libraries are useless.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
6 years agouse macro to declare constructor functions
Thomas Monjalon [Thu, 2 Nov 2017 22:06:38 +0000 (23:06 +0100)]
use macro to declare constructor functions

It is easier to find all constructor functions when they use
the same macros RTE_INIT or RTE_INIT_PRIO.

The macro definitions are moved from rte_eal.h to rte_common.h.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
6 years agomk: remove useless list of core libraries
Thomas Monjalon [Mon, 6 Nov 2017 11:21:20 +0000 (12:21 +0100)]
mk: remove useless list of core libraries

When moving the library dependencies handling from top Makefiles
to library Makefiles, the list core-libs became useless.

Fixes: cbc12b0a96f5 ("mk: do not generate LDLIBS from directory dependencies")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
6 years agoconfig: fix bnx2x option for armv7a
Ferruh Yigit [Tue, 31 Oct 2017 17:39:24 +0000 (17:39 +0000)]
config: fix bnx2x option for armv7a

Fixes: 02a8686263de ("mk: introduce ARMv7 architecture")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agobuildtools: fix icc build
Ferruh Yigit [Thu, 2 Nov 2017 00:25:10 +0000 (00:25 +0000)]
buildtools: fix icc build

There are random build errors in test reports [1]. Build error
is not directly related to DPDK but observed during DPDK build.

When I get similar unexpected build errors in my system, found
out that /dev/null is invalid.

It seems ICC overwrites the /dev/null with "icc -o /dev/null" instead
of sending output to /dev/null. This is not always reproducible, so
hard to say what exactly is triggering the error.

I suspect test-report build errors can be because of the same reason,
and it is good to add a protection for this case.

Instead of sending output to /dev/null save it to the tmp folder and
remove it back when done.

[1]
http://dpdk.org/ml/archives/test-report/2017-November/034053.html
Failure #3

/usr/src/linux-headers-4.4.0-97-generic/include/linux/sysfs.h:517:37:
error: pointer targets in passing argument 2 of ‘kernfs_find_and_get’
differ in signedness [-Werror=pointer-sign]
  return kernfs_find_and_get(parent, name);

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agopci: fix namespace prefix of new functions
Gaetan Rivet [Mon, 6 Nov 2017 16:08:59 +0000 (17:08 +0100)]
pci: fix namespace prefix of new functions

Some symbols were introduced with the wrong prefix.
Add the usual "rte_" prefix when needed.

Fixes: c752998b5e2e ("pci: introduce library and driver")

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
6 years agovfio: fix namespace prefix of newly exposed functions
Gaetan Rivet [Mon, 6 Nov 2017 16:08:58 +0000 (17:08 +0100)]
vfio: fix namespace prefix of newly exposed functions

Exposed VFIO functions simply uses a "vfio" prefix.
Use the proper "rte_vfio" prefix for those symbols.

Fixes: 279b581c897d ("vfio: expose functions")

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
6 years agobus/pci: fix VFIO device reset
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>
6 years agobus/pci: fix VFIO mode
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>
6 years agoversion: 17.11-rc2
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>
6 years agonet/mlx5: fix TSO inline size calculation
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>
6 years agonet/mlx4: fix no Rx interrupts
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>
6 years agonet/mlx4: introducing consumer index mask
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>
6 years agonet/liquidio: add support for 10GBase-T cards
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>
6 years agonet/failsafe: fix Rx clean race
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>
6 years agolpm6: fix compilation with -Og
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>
6 years agodoc: add new introduction to sample app guides
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>
6 years agodoc: add generic build instructions for sample apps
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>
6 years agoexamples/multi_process: fix received message length
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>
6 years agodoc: add event eth Rx adapter to release notes
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>
6 years agodoc: update software event device
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>
6 years agoeventdev: remove schedule API
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>
6 years agoexamples/eventdev: use service library
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>
6 years agotest/eventdev: use service iter
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>
6 years agoapp/testeventdev: use service cores
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>
6 years agoevent/sw: extend service capability
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>
6 years agoeventdev: add API to get service id
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>
6 years agodoc: update eventdev guide
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>
6 years agoeventdev: extend queue attribute get function
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>
6 years agoeventdev: fix inconsistency in queue config
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>
6 years agoflow_classify: fix logging
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>
6 years agoeal/x86: fix atomic cmpset
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>
6 years agobus/pci: check VFIO reset ioctl error
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>
6 years agobus/pci: fix UIO bind check
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>
6 years agomaintainers: claim maintainership of PCI library
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>
6 years agopci: introduce library and driver
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>
6 years agonet/bonding: use local prefix namespace
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>
6 years agopci: use EAL exposed configuration
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>
6 years agopci: do not expose IOVA mode getter
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>
6 years agopci: do not expose match function
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>
6 years agopci: do not expose private functions
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>
6 years agopci: use new address parsing function
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>
6 years agopci: use new address comparison function
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>
6 years agopci: make specialized parsing functions private
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>
6 years agopci: introduce PCI address parsing function
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>
6 years agopci: deprecate misnamed functions
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>
6 years agopci: avoid over-complicated macro
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>
6 years agopci: avoid inlining functions
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>
6 years agovfio: move PCI related symbols
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>
6 years agovfio: check PCI dependency in PCI scan
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>
6 years agovfio: remove useless PCI headers
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>
6 years agovfio: expose functions
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>
6 years agoeal: expose internal config elements
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>
6 years agomem: expose function for physical address use
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>
6 years agoeal/x86: include common header
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>
6 years agoeal: include stdint in private header
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>
6 years agobus: include debug header
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>
6 years agoethdev: remove useless PCI dependency
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>
6 years agoeal: fix build with glibc < 2.12
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>
6 years agoevent/dpaa2: fix shared build
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>
6 years agocrypto/dpaa_sec: fix shared build
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>
6 years agocrypto/dpaa2_sec: forbid build without security lib
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>
6 years agoexamples/ipsec-secgw: fix build without security lib
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>
6 years agonet/ixgbe: fix build without security library
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>
6 years agoethdev: allow returning error on VLAN offload ops
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>
6 years agonet/bonding: fix check slaves link properties
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>
6 years agonet/mlx5: fix device stop with multiple regions
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>
6 years agonet/e1000: correct VLAN tag byte order for i35x LB packets
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>
6 years agonet/mlx5: fix Tx doorbell memory barrier
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>
6 years agonet/mlx5: fix adjust priority for drop queue
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>
6 years agonet/octeontx: fix build for gcc < 4.6
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>
6 years agombuf: rename deprecated VLAN flags
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>
6 years agopci: propagate PMD removal error value for unplug
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>
6 years agoethdev: remove detachable device flag
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>
6 years agoethdev: do not rely on detachable flag in detach
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>
6 years agonet/bnxt: check VLANs from pool map only for VMDq
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>
6 years agonet/bnxt: fix an unused value
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>
6 years agonet/bnxt: fix a pointer deref before null check
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>
6 years agonet/bnxt: fix a potential null pointer dereference
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>
6 years agonet/bnxt: fix a potential null pointer dereference
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>
6 years agonet/bnxt: fix a potential null pointer dereference
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>
6 years agonet/bnxt: fix a pointer deref before null check
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>
6 years agonet/bnxt: fix a potential null pointer dereference
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>
6 years agonet/bnxt: fix a bit shift operation
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>
6 years agonet/bnxt: fix redirecting traffic to a VF
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>
6 years agonet/bnxt: remove redundant code parsing pool map
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>
6 years agonet/bnxt: handle Rx multi queue creation properly
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>
6 years agonet/bnxt: fix Rx offload capability
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>
6 years agonet/bnxt: fix Tx offload capability
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>
6 years agonet/bnxt: update HWRM to 1.8.2
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>
6 years agoapp/testpmd: refine xstats show
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>
6 years agonet/i40e: fix queue number error in queue region
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>
6 years agoethdev: document new error code for reset
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>
6 years agoethdev: document error codes of reset
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>
6 years agodoc: add switch restart support to fm10k guide
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>