dpdk.git
6 years agoeal/x86: revert select optimized memcpy at run-time
Xiaoyun Li [Fri, 3 Nov 2017 12:47:23 +0000 (20:47 +0800)]
eal/x86: revert select optimized memcpy at run-time

Revert the patchset run-time Linking support including the following
3 commits:

Fixes: 84cc318424d4 ("eal/x86: select optimized memcpy at run-time")
Fixes: c7fbc80fe60f ("test: select memcpy alignment unit at run-time")
Fixes: 5f180ae32962 ("efd: move AVX2 lookup in its own compilation unit")

The patchset would cause perf drop in vhost/virtio loopback performance
test. Because the run-time dispatch must cost at least a function call
comparing to the compile-time dispatch. And the reference cpu cycles value
is small. And in the test, when using 128-256 bytes packet, it would cause
16%-20% perf drop with mergeble path. When using 256 bytes packet, it would
cause 13% perf drop with vector path.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
6 years agoigb_uio: prevent reset for bnx2x devices
Ferruh Yigit [Mon, 6 Nov 2017 18:48:15 +0000 (18:48 +0000)]
igb_uio: prevent reset for bnx2x devices

Some devices are having problem on device reset that happens during DPDK
application exit [1].

Create a static list of devices and exclude them from device reset.

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

Fixes: b58eedfc7dd5 ("igb_uio: issue FLR during open and release of device file")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agobus/pci: fix namespace of sysfs path function
Thomas Monjalon [Mon, 6 Nov 2017 01:56:09 +0000 (02:56 +0100)]
bus/pci: fix namespace of sysfs path function

The function pci_get_sysfs_path was moved from EAL to the PCI driver.

The namespace is now fixed by adding "rte_" prefix.
The map files are fixed by removing the symbol from EAL and adding
it to the PCI driver.

It is an API break but it is probably not used by applications.
Anyway this API is already broken by the move in a new header file.

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

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
6 years agobus/pci: fix IOMMU class for sPAPR
Jonas Pfefferle [Fri, 3 Nov 2017 12:05:19 +0000 (13:05 +0100)]
bus/pci: fix IOMMU class for sPAPR

PPC64 sPAPR iommu does not support iova as va.
Use pa mode instead.

Fixes: 815c7deaed2d ("pci: get IOMMU class on Linux")

Signed-off-by: Jonas Pfefferle <jpf@zurich.ibm.com>
6 years agoeal/linux: force IOVA as PA mode if KNI module inserted
Ferruh Yigit [Thu, 2 Nov 2017 00:06:00 +0000 (00:06 +0000)]
eal/linux: force IOVA as PA mode if KNI module inserted

Fix kernel crash with KNI because KNI requires physical addresses.

When IOVA VA mode used, memzones and mbufs physical address fields
contain virtual addresses. But KNI relies on these fields to enable
kernel access for buffers. Those fields having virtual address cause
crash in kernel.

This is a workaround until KNI fixed properly to work with virtual
addresses.

Fixes: 72d013644bd6 ("mem: honor IOVA mode in malloc virt2phy")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoeal: fix version map experimental section
Harry van Haaren [Wed, 25 Oct 2017 12:29:49 +0000 (13:29 +0100)]
eal: fix version map experimental section

Before this commit, the EXPERIMENTAL version of ABI
derived from the DPDK_17.08 tag. In parallel there
was a DPDK_17.11 tag.

Experimental map should always derive from the latest ABI,
so this patch moves the 17.11 section above EXPERIMENTAL,
and updates EXPERIMENTAL to derive from the 17.11 map.

Fixes: aadc3eb002d3 ("pci: export match function")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
6 years agomempool: increase ABI version
Thomas Monjalon [Mon, 6 Nov 2017 10:54:26 +0000 (11:54 +0100)]
mempool: increase ABI version

API and ABI of mempool library has been changed in 17.11.

Fixes: 02604520b2f2 ("mempool: remove unused flags argument")
Fixes: 0cc0f8aaa35d ("mempool: change flags from int to unsigned int")
Fixes: 6eac187bff30 ("mempool: add flags arg in xmem size and usage")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agodoc: add IOVA aware API changes in release notes
Thomas Monjalon [Fri, 20 Oct 2017 12:31:35 +0000 (18:01 +0530)]
doc: add IOVA aware API changes in release notes

The wording changes have been done in the API without breaking
the ABI. The deprecated fields and symbols can be removed later
when an another ABI change will be required.
The deprecation notice can be removed.

The release notes describe the new available API with IOVA wording.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agodrivers/net: rename physical address type to IOVA
Santosh Shukla [Fri, 20 Oct 2017 12:31:31 +0000 (18:01 +0530)]
drivers/net: rename physical address type to IOVA

Renamed data type from phys_addr_t to rte_iova_t.

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 agocryptodev: rename physical address type to IOVA
Santosh Shukla [Fri, 20 Oct 2017 12:31:31 +0000 (18:01 +0530)]
cryptodev: rename physical address type to IOVA

Renamed data type from phys_addr_t to rte_iova_t.

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 agombuf: rename data address helpers to IOVA
Thomas Monjalon [Sun, 5 Nov 2017 23:22:55 +0000 (00:22 +0100)]
mbuf: rename data address helpers to IOVA

The following inline functions and macros have been renamed to be
consistent with the IOVA wording:

rte_mbuf_data_dma_addr         -> rte_mbuf_data_iova
rte_mbuf_data_dma_addr_default -> rte_mbuf_data_iova_default
rte_pktmbuf_mtophys            -> rte_pktmbuf_iova
rte_pktmbuf_mtophys_offset     -> rte_pktmbuf_iova_offset

The deprecated functions and macros are kept to avoid breaking the API.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
6 years agombuf: rename physical address to IOVA
Santosh Shukla [Fri, 20 Oct 2017 12:31:32 +0000 (18:01 +0530)]
mbuf: rename physical address to IOVA

Rename buf_physaddr to buf_iova.
Keep the deprecated name in an anonymous union to avoid breaking
the API.

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>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
6 years agomempool: rename populate functions to IOVA
Thomas Monjalon [Sun, 5 Nov 2017 22:26:24 +0000 (23:26 +0100)]
mempool: rename populate functions to IOVA

The functions rte_mempool_populate_phys() and
rte_mempool_populate_phys_tab() are renamed to
rte_mempool_populate_iova() and rte_mempool_populate_iova_tab().
The deprecated functions are kept as aliases to avoid breaking the API.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
6 years agomempool: rename address mapping function to IOVA
Thomas Monjalon [Sun, 5 Nov 2017 18:02:29 +0000 (19:02 +0100)]
mempool: rename address mapping function to IOVA

The function rte_mempool_virt2phy() is renamed to rte_mempool_virt2iova().
The new function has one less parameter because it is unused.
The deprecated function is kept as an alias to avoid breaking the API.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
6 years agomempool: rename addresses from physical to IOVA
Thomas Monjalon [Fri, 20 Oct 2017 12:31:31 +0000 (18:01 +0530)]
mempool: rename addresses from physical to IOVA

The struct fields phys_addr_t rte_mempool_objhdr.physaddr and
rte_mempool_memhdr.phys_addr are renamed to rte_iova_t iova.
The deprecated names are kept in an anonymous union to avoid breaking
the API.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
6 years agomemzone: rename address from physical to IOVA
Thomas Monjalon [Sat, 4 Nov 2017 01:22:28 +0000 (02:22 +0100)]
memzone: rename address from physical to IOVA

The struct rte_memzone field .phys_addr is renamed to .iova.
The deprecated name is kept in an anonymous union to avoid breaking
the API.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agomalloc: use pointer diff macro in IOVA mapping
Santosh Shukla [Fri, 20 Oct 2017 12:31:36 +0000 (18:01 +0530)]
malloc: use pointer diff macro in IOVA mapping

Use RTE_PTR_DIFF macro in rte_mem_virt2iova api.

Suggested-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agomalloc: rename address mapping function to IOVA
Thomas Monjalon [Sat, 4 Nov 2017 01:22:21 +0000 (02:22 +0100)]
malloc: rename address mapping function to IOVA

The function rte_malloc_virt2phy() is renamed to rte_malloc_virt2iova().
The deprecated name is kept as an alias to avoid breaking the API.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agomem: rename address mapping function to IOVA
Thomas Monjalon [Sat, 4 Nov 2017 16:15:04 +0000 (17:15 +0100)]
mem: rename address mapping function to IOVA

The function rte_mem_virt2phy() is kept and used in functions which
works only with physical addresses.
For all other calls this function is replaced by rte_mem_virt2iova()
which does a direct mapping (no conversion) in the VA case.

Note: the new function rte_mem_virt2iova() function matches the
behaviour implemented in rte_mem_virt2phy() by the commit
680f6c12600f ("mem: honor IOVA mode in virt2phy")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>