dpdk.git
7 years agocrypto/kasumi: remove check for SSE4
Bruce Richardson [Tue, 20 Jun 2017 15:23:05 +0000 (16:23 +0100)]
crypto/kasumi: remove check for SSE4

Since SSE4 is now part of the minimum requirements for DPDK, we don't need
to check for its presence any more.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
7 years agocrypto/aesni_mb: remove check for SSE4
Bruce Richardson [Tue, 20 Jun 2017 15:23:04 +0000 (16:23 +0100)]
crypto/aesni_mb: remove check for SSE4

Since SSE4 is now part of the minimum requirements for DPDK, we don't need
to check for its presence any more.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
7 years agotable: remove check for SSE4
Bruce Richardson [Tue, 20 Jun 2017 15:23:03 +0000 (16:23 +0100)]
table: remove check for SSE4

Since SSE4 is now part of the minimum requirements for DPDK, we don't need
the scalar version on x86.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
7 years agosched: remove check for SSE4
Bruce Richardson [Tue, 20 Jun 2017 15:23:03 +0000 (16:23 +0100)]
sched: remove check for SSE4

Since SSE4 is now part of the minimum requirements for DPDK, we don't need
to check for its presence any more.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
7 years agonet: remove check for SSE4
Bruce Richardson [Tue, 20 Jun 2017 15:23:02 +0000 (16:23 +0100)]
net: remove check for SSE4

Since SSE4 is now part of the minimum requirements for DPDK, we don't need
to check for its presence any more.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
7 years agoip_frag: check for x86 rather than SSE4
Bruce Richardson [Tue, 20 Jun 2017 15:23:01 +0000 (16:23 +0100)]
ip_frag: check for x86 rather than SSE4

Since SSE4 is now part of the minimum requirements for DPDK, we don't need
to check for its presence any more.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
7 years agohash: remove checks for SSE
Bruce Richardson [Tue, 20 Jun 2017 15:23:00 +0000 (16:23 +0100)]
hash: remove checks for SSE

Since SSE4 is now part of the minimum requirements for DPDK, we don't need
a fallback case to handle selection of algorithm when SSE4 is unavailable.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
7 years agodistributor: remove checks for SSE4
Bruce Richardson [Tue, 20 Jun 2017 15:22:58 +0000 (16:22 +0100)]
distributor: remove checks for SSE4

Since SSE4 is now part of the minimum requirements for DPDK, we now longer
need this check.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
7 years agoacl: remove checks for SSE4
Bruce Richardson [Tue, 20 Jun 2017 15:22:57 +0000 (16:22 +0100)]
acl: remove checks for SSE4

Since SSE4 is now part of the minimum requirements for DPDK, we now longer
need this check.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
7 years agoeal: remove unneeded conditionals for SSE headers
Bruce Richardson [Tue, 20 Jun 2017 15:22:59 +0000 (16:22 +0100)]
eal: remove unneeded conditionals for SSE headers

Our x86 baseline is to have support for SSE4.2, so therefore there is no
point in conditions around the inclusion of SSE1 - SSE4 headers.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
7 years agomk: require SSE4.2 support on all x86 platforms
Bruce Richardson [Tue, 20 Jun 2017 15:22:56 +0000 (16:22 +0100)]
mk: require SSE4.2 support on all x86 platforms

Increase the default baseline from "core2" architecture to "corei7". This
means that all builds will have SSE4.2 support included, and we can remove
special case manipulation of CFLAGS for the same. Naturally, this does mean
that some machines that previously could run DPDK now can't do so, but
hardware with SSE4.2 has been around for almost a decade now, so this
should not be a major problem.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
7 years agocontigmem: do not zero pages during each mmap
Tiwei Bie [Sun, 4 Jun 2017 05:53:24 +0000 (13:53 +0800)]
contigmem: do not zero pages during each mmap

Don't zero the pages during each mmap. Instead, only zero the pages
when they are not already mmapped. Otherwise, the multi-process
support will be broken, as the pages will be zeroed when secondary
processes map the memory. Besides, track the open and mmap operations
on the cdev, and prevent the module from being unloaded when it is
still in use.

Fixes: 82f931805506 ("contigmem: zero all pages during mmap")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agocontigmem: free allocated memory on error
Tiwei Bie [Sun, 4 Jun 2017 05:53:23 +0000 (13:53 +0800)]
contigmem: free allocated memory on error

Fixes: 764bf26873b9 ("add FreeBSD support")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoeal: use new hotplug API in attach
Jan Blunck [Fri, 30 Jun 2017 18:19:43 +0000 (20:19 +0200)]
eal: use new hotplug API in attach

Using the new hotplug API allows attach to be backwards compatible while
decoupling it from the concrete bus implementations.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
7 years agoethdev: use device handle to detach
Jan Blunck [Fri, 30 Jun 2017 18:19:42 +0000 (20:19 +0200)]
ethdev: use device handle to detach

This is changing the API of rte_eal_dev_detach().

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
7 years agoeal: add hotplug add/remove device
Jan Blunck [Fri, 30 Jun 2017 18:19:41 +0000 (20:19 +0200)]
eal: add hotplug add/remove device

Signed-off-by: Jan Blunck <jblunck@infradead.org>
7 years agobus/pci: implement plug/unplug operations
Gaetan Rivet [Fri, 30 Jun 2017 18:19:40 +0000 (20:19 +0200)]
bus/pci: implement plug/unplug operations

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
7 years agobus/vdev: implement unplug operation
Jan Blunck [Fri, 30 Jun 2017 18:19:39 +0000 (20:19 +0200)]
bus/vdev: implement unplug operation

Signed-off-by: Jan Blunck <jblunck@infradead.org>
7 years agobus: introduce device plug/unplug
Jan Blunck [Fri, 30 Jun 2017 18:19:38 +0000 (20:19 +0200)]
bus: introduce device plug/unplug

This allows the buses to plug and probe specific devices.
This is meant to be a building block for hotplug support.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
7 years agobus: add helper to find bus by name
Jan Blunck [Fri, 30 Jun 2017 18:19:37 +0000 (20:19 +0200)]
bus: add helper to find bus by name

Signed-off-by: Jan Blunck <jblunck@infradead.org>
7 years agobus: add helper to find which bus holds a device
Jan Blunck [Fri, 30 Jun 2017 18:19:35 +0000 (20:19 +0200)]
bus: add helper to find which bus holds a device

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
7 years agobus: require to implement device finding
Jan Blunck [Fri, 30 Jun 2017 18:19:36 +0000 (20:19 +0200)]
bus: require to implement device finding

Signed-off-by: Jan Blunck <jblunck@infradead.org>
7 years agobus/fslmc: implement method to find device
Jan Blunck [Fri, 30 Jun 2017 18:19:34 +0000 (20:19 +0200)]
bus/fslmc: implement method to find device

Signed-off-by: Jan Blunck <jblunck@infradead.org>
7 years agobus/pci: implement method to find device
Jan Blunck [Fri, 30 Jun 2017 18:19:33 +0000 (20:19 +0200)]
bus/pci: implement method to find device

Signed-off-by: Jan Blunck <jblunck@infradead.org>
7 years agobus/vdev: implement method to find device
Jan Blunck [Fri, 30 Jun 2017 18:19:32 +0000 (20:19 +0200)]
bus/vdev: implement method to find device

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
7 years agobus: add method to find device
Jan Blunck [Fri, 30 Jun 2017 18:19:31 +0000 (20:19 +0200)]
bus: add method to find device

This new method allows buses to expose their devices in a controlled
manner. A comparison function is provided by the user to discriminate
between devices, using arbitrary data as identifier.

It is possible to start an iteration from a specific point, in order to
continue a search.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
7 years agobus: add iterator to find a bus
Jan Blunck [Fri, 30 Jun 2017 18:19:30 +0000 (20:19 +0200)]
bus: add iterator to find a bus

This helper allows to iterate over all registered buses and find one
matching data used as parameter.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
7 years agobus/vdev: use standard bus registration
Gaetan Rivet [Tue, 27 Jun 2017 16:11:15 +0000 (18:11 +0200)]
bus/vdev: use standard bus registration

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
7 years agoeal: switch to architecture specific pause function
Jerin Jacob [Mon, 5 Jun 2017 08:58:43 +0000 (14:28 +0530)]
eal: switch to architecture specific pause function

Remove rte_pause() definition from rte_common.h and
switchover to architecture specific rte_pause.h

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agoeal/ppc64: add empty pause function
Jerin Jacob [Mon, 5 Jun 2017 08:58:42 +0000 (14:28 +0530)]
eal/ppc64: add empty pause function

The patch does not provide any functional change for ppc64
with respect to existing rte_pause() definition.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
7 years agoeal/x86: copy pause function
Jerin Jacob [Mon, 5 Jun 2017 08:58:41 +0000 (14:28 +0530)]
eal/x86: copy pause function

The patch does not provide any functional change for x86
with respect to existing rte_pause() definition.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agoeal/arm64: add pause function
Jerin Jacob [Mon, 5 Jun 2017 08:58:40 +0000 (14:28 +0530)]
eal/arm64: add pause function

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
7 years agoeal/arm32: add empty pause function
Jerin Jacob [Mon, 5 Jun 2017 08:58:39 +0000 (14:28 +0530)]
eal/arm32: add empty pause function

The patch does not provide any functional change for ARM32
with respect to existing rte_pause() definition.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Jan Viktorin <viktorin@rehivetech.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
7 years agoeal: introduce architecture specific pause function
Jerin Jacob [Mon, 5 Jun 2017 08:58:38 +0000 (14:28 +0530)]
eal: introduce architecture specific pause function

Each architecture may have different instructions for optimized
and power consumption aware rte_pause() implementation.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agomk: allow exec-env specific targets
Jerin Jacob [Tue, 6 Jun 2017 12:58:36 +0000 (18:28 +0530)]
mk: allow exec-env specific targets

Add a hook in generic rte.sdkbuild.mk file
to include exec-env specific targets.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agoconfig: support clang for ARMv8 Linux
Ashwin Sekhar T K [Fri, 12 May 2017 05:45:47 +0000 (22:45 -0700)]
config: support clang for ARMv8 Linux

Moved all common defines from defconfig_arm64-armv8a-linuxapp-gcc
to common_armv8a_linuxapp.

Created new config arm64-armv8a-linuxapp-clang which adds the
clang support to armv8a.

Now defconfigs arm64-armv8a-linuxapp-gcc/clang contain only the
CONFIG_RTE_TOOLCHAIN* defines and all other common defines are
inherited from common_armv8a_linuxapp.

Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agoeal/arm: fix build with clang
Ashwin Sekhar T K [Fri, 12 May 2017 05:45:46 +0000 (22:45 -0700)]
eal/arm: fix build with clang

Fixed warning -Wasm-operand-widths seen with armv8a
clang compilation.

Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agoacl: fix build with ARMv8 clang
Ashwin Sekhar T K [Fri, 12 May 2017 05:45:45 +0000 (22:45 -0700)]
acl: fix build with ARMv8 clang

Fixed warning -Wunknown-warning-option seen with
armv8a clang compilation.

Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/thunderx: fix build with clang
Ashwin Sekhar T K [Fri, 12 May 2017 05:45:44 +0000 (22:45 -0700)]
net/thunderx: fix build with clang

Replaced usage of %a0 in inline assembly with [%x0]

Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agohash: compile ARMv8 CRC32 support conditionally
Ashwin Sekhar T K [Fri, 12 May 2017 05:45:43 +0000 (22:45 -0700)]
hash: compile ARMv8 CRC32 support conditionally

Compile the armv8a CRC32 support only if the machine
has the CRC extensions i.e if RTE_MACHINE_CPUFLAG_CRC32
is defined.

Removed the .arch assembly directives as these are no
more necessary.

Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agoeal: pause while busy-waiting for lcore slave
Ashwin Sekhar T K [Fri, 12 May 2017 05:45:42 +0000 (22:45 -0700)]
eal: pause while busy-waiting for lcore slave

Instead of simply busy-waiting for slave in rte_eal_wait_lcore()
do rte_pause(). This will give power savings.

This also fixes warning -Wempty-body seen with armv8a clang
compilation.

Suggested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agotable: add NEON implementation of LRU strategy 3
Ashwin Sekhar T K [Fri, 28 Apr 2017 08:58:31 +0000 (01:58 -0700)]
table: add NEON implementation of LRU strategy 3

* Added new file rte_lru_arm64.h for holding arm64 specific
  definitions
* Verified the changes with table_autotest unit test case

Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
7 years agotable: separate out x86-specific from LRU header
Ashwin Sekhar T K [Fri, 28 Apr 2017 08:58:30 +0000 (01:58 -0700)]
table: separate out x86-specific from LRU header

* Moved all x86 related lru defines to rte_lru_x86.h while
  retaining all common defines in rte_lru.h
* Verified the changes with table_autotest unit test case

Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
7 years agoefd: support lookup using NEON intrinsics
Ashwin Sekhar T K [Thu, 27 Apr 2017 12:44:18 +0000 (05:44 -0700)]
efd: support lookup using NEON intrinsics

* Added file lib/librte_efd/rte_efd_arm64.h to hold arm64
  specific definitions
* Verified the changes with efd_autotest unit test case

Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
7 years agosched: add NEON optimizations
Ashwin Sekhar T K [Fri, 28 Apr 2017 06:15:48 +0000 (23:15 -0700)]
sched: add NEON optimizations

* Removed setting CONFIG_RTE_SCHED_VECTOR=n from armv8a config
  so that the setting from common_base is taken as the default
  setting for armv8a
* Verified the changes with sched_autotest unit test case

Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
7 years agohash: support NEON for Toeplitz algo
Ashwin Sekhar T K [Thu, 27 Apr 2017 12:33:49 +0000 (05:33 -0700)]
hash: support NEON for Toeplitz algo

Verified the changes with thash_autotest unit test case

Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
7 years agoapp/testpmd: fix comments for bonding commands
RongQiang Xie [Thu, 15 Jun 2017 10:20:48 +0000 (18:20 +0800)]
app/testpmd: fix comments for bonding commands

Because the comments in function cmd_add_bonding_slave_parsed() and
cmd_remove_bonding_slave_parsed() is 'Set the primary slave for
a bonded device',so fix it with 'add the slave for a bonded device'
and 'remove the slave from a bonded device'.

Signed-off-by: RongQiang Xie <xie.rongqiang@zte.com.cn>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agoeal: introduce integer log2 function
Olivier Matz [Thu, 6 Apr 2017 14:15:36 +0000 (16:15 +0200)]
eal: introduce integer log2 function

At some places, the log2() function is used despite this function
works on float. This introduces a dependency to the math lib but
most of the time it is not required because we want an integer log2.

Add a new helper to do this job and fix nfp driver.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
7 years agoethdev: fix a typo in global API introduction
Nikhil Rao [Mon, 1 Aug 2016 05:49:48 +0000 (11:19 +0530)]
ethdev: fix a typo in global API introduction

This patch fixes a typo in the eth device API doc, device
config. not stored between calls to rte_eth_dev_start/stop()
should be restored before a call to rte_eth_dev_start()
instead of after a call to rte_eth_dev_start().

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agodoc: fix typos in virtio howto guide
Yong Wang [Mon, 19 Jun 2017 10:14:23 +0000 (06:14 -0400)]
doc: fix typos in virtio howto guide

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agodoc: fix typos in perf guide
Xingyou Chen [Thu, 8 Jun 2017 02:14:24 +0000 (10:14 +0800)]
doc: fix typos in perf guide

Signed-off-by: Xingyou Chen <niatlantice@gmail.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agodoc: fix typo in Linux guide
Harrison McCullough [Mon, 19 Jun 2017 13:38:40 +0000 (13:38 +0000)]
doc: fix typo in Linux guide

Signed-off-by: Harrison McCullough <harrison_mccullough@labs.att.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agodoc: fix a typo in sample apps guide
Rami Rosen [Sat, 17 Jun 2017 20:13:45 +0000 (23:13 +0300)]
doc: fix a typo in sample apps guide

This patch fixes a trivial typo in the sample apps guide.
commit 35b09d76f89e ("doc: use corelist instead of coremask") replaced
the usage of coremask (-c) with corelist (-l).
As a result of this patch, we have
./build/ipv4_multicast -l 0-3 -n 3 -- -p 0x3 -q 1
in the sample app guide, while the explanation immediately following
says:
In this command:
• The -c option enables cores 0, 1, 2 and 3

This patch fixes the
explanation to have "-l" instead of "-c".

Fixes: 35b09d76f89e ("doc: use corelist instead of coremask")
Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agoethdev: fix a typo
Rami Rosen [Sat, 17 Jun 2017 20:21:48 +0000 (23:21 +0300)]
ethdev: fix a typo

This patch fixes a trivial typo in rte_ethdev.h; it should be
"RX multicast OFF" and not "RX multicast OF".

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
7 years agoethdev: add return values to callback process API
Bernard Iremonger [Thu, 15 Jun 2017 12:29:50 +0000 (13:29 +0100)]
ethdev: add return values to callback process API

Change the rte_eth_dev_callback_process function to return int,
and add a void *ret_param parameter.
The new parameter is used by ixgbe and i40e instead of abusing
the user data of the callback.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
7 years agoring: use aligned memzone allocation
Daniel Verkamp [Fri, 2 Jun 2017 20:12:13 +0000 (13:12 -0700)]
ring: use aligned memzone allocation

rte_memzone_reserve() provides cache line alignment, but
struct rte_ring may require more than cache line alignment: on x86-64,
it needs 128-byte alignment due to PROD_ALIGN and CONS_ALIGN, which are
128 bytes, but cache line size is 64 bytes.

Fixes runtime warnings with UBSan enabled.

Fixes: d9f0d3a1ffd4 ("ring: remove split cacheline build setting")
Cc: stable@dpdk.org
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
7 years agokni: allocate no more mbuf than empty slots in queue
Gowrishankar Muthukrishnan [Thu, 11 May 2017 11:51:26 +0000 (17:21 +0530)]
kni: allocate no more mbuf than empty slots in queue

In kni_allocate_mbufs(), we attempt to add max_burst (32) count of mbuf
always into alloc_q, which is excessively leading too many rte_pktmbuf_
free() when alloc_q is contending at high packet rate (for eg 10Gig data).
In a situation when alloc_q fifo can only accommodate very few (or zero)
mbuf, create only what needed and add in fifo.

With this patch, we could stop random network stall in KNI at higher packet
rate (eg 1G or 10G data between vEth0 and PMD) sufficiently exhausting
alloc_q on above condition. I tested i40e PMD for this purpose in ppc64le.

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agombuf: fix debug checks for headroom and tailroom
Vasily Philipov [Wed, 28 Jun 2017 12:25:12 +0000 (15:25 +0300)]
mbuf: fix debug checks for headroom and tailroom

rte_pktmbuf_headroom() and rte_pktmbuf_tailroom() should be usable
with any segment, not only with headered ones, so is_header should be 0
when we call for sanity check inside them.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agombuf: reduce pktmbuf init cycles
Jerin Jacob [Tue, 27 Jun 2017 11:57:51 +0000 (17:27 +0530)]
mbuf: reduce pktmbuf init cycles

There is no need for initializing the complete
packet buffer with zero as the packet data area will be
overwritten by the NIC Rx HW anyway.

The testpmd configures the packet mempool
with around 180k buffers with
2176B size. In existing scheme, the init routine
needs to memset around ~370MB vs the proposed scheme
requires only around ~22MB on 128B cache aligned system.

Useful in running DPDK in HW simulators/emulators,
where millions of cycles have an impact on boot time.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agoconfig: enable vhost NUMA awareness by default
Ilya Maximets [Thu, 29 Jun 2017 05:59:20 +0000 (08:59 +0300)]
config: enable vhost NUMA awareness by default

It is safe to enable LIBRTE_VHOST_NUMA by default for all
configurations where libnuma is already a default dependency.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agomem: balanced allocation of hugepages
Ilya Maximets [Thu, 29 Jun 2017 05:59:19 +0000 (08:59 +0300)]
mem: balanced allocation of hugepages

Currently EAL allocates hugepages one by one not paying attention
from which NUMA node allocation was done.

Such behaviour leads to allocation failure if number of available
hugepages for application limited by cgroups or hugetlbfs and
memory requested not only from the first socket.

Example:
# 90 x 1GB hugepages availavle in a system

cgcreate -g hugetlb:/test
# Limit to 32GB of hugepages
cgset -r hugetlb.1GB.limit_in_bytes=34359738368 test
# Request 4GB from each of 2 sockets
cgexec -g hugetlb:test testpmd --socket-mem=4096,4096 ...

EAL: SIGBUS: Cannot mmap more hugepages of size 1024 MB
EAL: 32 not 90 hugepages of size 1024 MB allocated
EAL: Not enough memory available on socket 1!
     Requested: 4096MB, available: 0MB
PANIC in rte_eal_init():
Cannot init memory

This happens beacause all allocated pages are
on socket 0.

Fix this issue by setting mempolicy MPOL_PREFERRED for each hugepage
to one of requested nodes using following schema:

1) Allocate essential hugepages:
1.1) Allocate as many hugepages from numa N to
     only fit requested memory for this numa.
1.2) repeat 1.1 for all numa nodes.
2) Try to map all remaining free hugepages in a round-robin
   fashion.
3) Sort pages and choose the most suitable.

In this case all essential memory will be allocated and all remaining
pages will be fairly distributed between all requested nodes.

New config option RTE_EAL_NUMA_AWARE_HUGEPAGES introduced and
enabled by default for linuxapp except armv7 and dpaa2.
Enabling of this option adds libnuma as a dependency for EAL.

Fixes: 77988fc08dc5 ("mem: fix allocating all free hugepages")

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agomaintainers: update for i40e
Beilei Xing [Thu, 29 Jun 2017 01:11:38 +0000 (09:11 +0800)]
maintainers: update for i40e

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
7 years agocrypto/scheduler: remove deprecated functions
Fan Zhang [Thu, 25 May 2017 07:29:47 +0000 (08:29 +0100)]
crypto/scheduler: remove deprecated functions

This patch remove the deprecated functions as well as notice for
scheduler mode set/get API changes.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
7 years agotest/crypto: fix overflow
Pablo de Lara [Wed, 28 Jun 2017 09:31:03 +0000 (10:31 +0100)]
test/crypto: fix overflow

In one of the SNOW3G unit tests, insufficient memory
was allocated, leading to a buffer overflow.

Fixes: 2b52e1e95aab ("app/test: add SNOW 3G UEA2 with offset")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
7 years agocryptodev: fix device stop function
Kirill Rybalchenko [Wed, 14 Jun 2017 08:42:46 +0000 (09:42 +0100)]
cryptodev: fix device stop function

Flag dev_started should be cleared after dev_stop() function call
because the flag is checked inside the dev_stop() function.

Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto devices")
Cc: stable@dpdk.org
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
7 years agodoc: fix typo in l2fwd-crypto usage
Pablo de Lara [Thu, 22 Jun 2017 12:02:35 +0000 (13:02 +0100)]
doc: fix typo in l2fwd-crypto usage

Fixes: ba7b86b1419b ("doc: add l2fwd-crypto sample app guide")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agoapp/crypto-perf: fix error message
Pablo de Lara [Thu, 22 Jun 2017 12:02:34 +0000 (13:02 +0100)]
app/crypto-perf: fix error message

Fixes: f6cefe253cc8 ("app/crypto-perf: add range/list of sizes")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agoexamples/l2fwd-crypto: fix auth info display
Pablo de Lara [Thu, 22 Jun 2017 12:02:33 +0000 (13:02 +0100)]
examples/l2fwd-crypto: fix auth info display

Fixes: 4790f99d2d31 ("examples/l2fwd-crypto: use cryptodev algorithm parser")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agoexamples/l2fwd-crypto: fix application help
Pablo de Lara [Thu, 22 Jun 2017 12:02:32 +0000 (13:02 +0100)]
examples/l2fwd-crypto: fix application help

Chain parameter can be CIPHER_HASH, HASH_CIPHER,
CIPHER_ONLY or HASH_ONLY, but only the first two
were shown in the application help.

Fixes: 1a75e9f3fadb ("examples/l2fwd-crypto: add cipher/hash only cases")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agotest/crypto: use existing algorithm strings
Pablo de Lara [Thu, 22 Jun 2017 12:02:31 +0000 (13:02 +0100)]
test/crypto: use existing algorithm strings

Instead of using duplicated functions to get the algorithm
strings, use the functions from the cryptodev library.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agotest/crypto: remove offsets in wireless algo vectors
Pablo de Lara [Thu, 22 Jun 2017 12:02:30 +0000 (13:02 +0100)]
test/crypto: remove offsets in wireless algo vectors

Instead of passing the authentication and cipher offset
from the test vectors, just get them from the IV and AAD lengths.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agotest/crypto: remove unnecessary offset
Pablo de Lara [Thu, 22 Jun 2017 12:02:29 +0000 (13:02 +0100)]
test/crypto: remove unnecessary offset

For AES/DES tests, there is no need to leave out
the first block from the crypto operation.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agotest/crypto: fix wrong AAD setting
Pablo de Lara [Thu, 22 Jun 2017 12:02:28 +0000 (13:02 +0100)]
test/crypto: fix wrong AAD setting

AAD should not point at IV for AES algorithms.
For AES-GCM, AAD will point at additional data in the mbuf.
For the other algorithms (such as 3DES CBC), AAD is not used.

Fixes: ffbe3be0d4b5 ("app/test: add libcrypto")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agocrypto/aesni_mb: remove assert checks
Pablo de Lara [Thu, 22 Jun 2017 12:02:27 +0000 (13:02 +0100)]
crypto/aesni_mb: remove assert checks

Some assert checks in the driver were
incorrect, but they are not necessary anyway,
as application will panic in any case.

Fixes: 0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agocryptodev: remove unused driver struct
Pablo de Lara [Wed, 21 Jun 2017 06:30:33 +0000 (07:30 +0100)]
cryptodev: remove unused driver struct

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agocryptodev: remove unused PCI probe/remove
Pablo de Lara [Wed, 21 Jun 2017 06:30:20 +0000 (07:30 +0100)]
cryptodev: remove unused PCI probe/remove

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agocrypto/dpaa2_sec: do not use cryptodev driver
Pablo de Lara [Wed, 21 Jun 2017 06:30:06 +0000 (07:30 +0100)]
crypto/dpaa2_sec: do not use cryptodev driver

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
7 years agocrypto/qat: do not use cryptodev driver
Pablo de Lara [Wed, 21 Jun 2017 06:28:26 +0000 (07:28 +0100)]
crypto/qat: do not use cryptodev driver

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agocryptodev: add PCI driver helpers
Pablo de Lara [Wed, 21 Jun 2017 06:28:25 +0000 (07:28 +0100)]
cryptodev: add PCI driver helpers

Add PCI probe/remove/init/uninit functions in a separate
file rte_cryptodev_pci.h, which do not use cryptodev driver,
in order to be removed in next commits.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agocryptodev: release device if PCI probing fails
Pablo de Lara [Wed, 21 Jun 2017 06:28:24 +0000 (07:28 +0100)]
cryptodev: release device if PCI probing fails

Call rte_cryptodev_pmd_release_device() if probing a
PCI crypto device, instead of accessing the variables
directly. This will be useful when rte_cryptodev_pci_probe()
gets moved to a separate file.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agocryptodev: move vdev functions to a separate file
Pablo de Lara [Tue, 27 Jun 2017 21:16:33 +0000 (22:16 +0100)]
cryptodev: move vdev functions to a separate file

Move all functions handling virtual devices to a separate
header file "rte_cryptodev_vdev.h", in order to leave only
generic functions for any device in the rest of the files.

It also creates the file "rte_cryptodev_pmd.c", with the
implementations of these functions.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agocryptodev: set PCI info only when device is PCI
Pablo de Lara [Wed, 21 Jun 2017 06:28:22 +0000 (07:28 +0100)]
cryptodev: set PCI info only when device is PCI

Do not set PCI information in the device information structure
for any crypto device, just for the ones that are PCI, so
this is set internally in the PCI crypto PMDs (only QAT now).

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agocryptodev: simplify device list retrieval logic
Pablo de Lara [Wed, 21 Jun 2017 06:28:21 +0000 (07:28 +0100)]
cryptodev: simplify device list retrieval logic

rte_cryptodev_devices_get() function returns an array of devices
sharing the same driver.

Instead of having two different paths depending on the device being
virtual or physical, retrieve the driver name from rte_device structure.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agocryptodev: rename device retrieval argument
Pablo de Lara [Wed, 21 Jun 2017 06:28:20 +0000 (07:28 +0100)]
cryptodev: rename device retrieval argument

rte_cryptodev_devices_get() function was parsing a crypto
device name as an argument, but the function actually
returns device identifiers of devices that share the
same crypto driver, so the argument should be driver name, instead.

Fixes: 38227c0e3ad2 ("cryptodev: retrieve device info")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agocryptodev: set driver name for all devices
Pablo de Lara [Wed, 21 Jun 2017 06:28:19 +0000 (07:28 +0100)]
cryptodev: set driver name for all devices

When retrieving device information for a crypto driver,
driver name was only set when it was a PCI driver.
Getting the driver name from rte_device structure
allows rte_cryptodev_get_info() function to return it
regardless they are virtual or physical devices.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agocryptodev: store device pointer in virtual devices
Pablo de Lara [Wed, 21 Jun 2017 06:28:18 +0000 (07:28 +0100)]
cryptodev: store device pointer in virtual devices

Only non virtual devices were storing the pointer to
rte_device structure in rte_cryptodev, which will be needed
to retrieve the driver name for any device.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agoexamples/l2fwd-crypto: fix option parsing
Pablo de Lara [Wed, 24 May 2017 10:28:02 +0000 (11:28 +0100)]
examples/l2fwd-crypto: fix option parsing

Statistics period time option is parsed with -T argument,
but -t was accepted by mistake, instead.

Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
7 years agocrypto/aesni_gcm: fix leading spaces
Pablo de Lara [Mon, 22 May 2017 10:52:34 +0000 (11:52 +0100)]
crypto/aesni_gcm: fix leading spaces

Fixes: 26c2e4ad5ad4 ("cryptodev: add capabilities discovery")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
7 years agomem: fix malloc element resize with padding
Jamie Lavigne [Thu, 8 Jun 2017 19:12:17 +0000 (19:12 +0000)]
mem: fix malloc element resize with padding

Currently when a malloc_elem is split after resizing, any padding
present in the elem is ignored.  This causes the resized elem to be too
small when padding is present, and user data can overwrite the beginning
of the following malloc_elem.

Solve this by including the size of the padding when computing where to
split the malloc_elem.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Jamie Lavigne <lavignen@amazon.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
7 years agotest/mbuf: remove global mempool
Santosh Shukla [Mon, 26 Jun 2017 10:04:54 +0000 (10:04 +0000)]
test/mbuf: remove global mempool

Currently, pool resources are allocated statically
and are not freed. Results of that test can not run more than once.

Fix removes static dependency from test application and
now allocating and freeing resources dynamically.
Test runs for more than once.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agopci: reduce debug log verbosity when probing
Ferruh Yigit [Tue, 27 Jun 2017 14:23:34 +0000 (15:23 +0100)]
pci: reduce debug log verbosity when probing

When debug level logging enabled (--log-level=8) each driver failed to
probe the device printed, like:

EAL: Driver (net_ark) doesn't match the device
EAL: Driver (net_avp) doesn't match the device
EAL: Driver (net_bnxt) doesn't match the device
EAL: Driver (net_cxgbe) doesn't match the device
EAL: Driver (net_e1000_igb) doesn't match the device
EAL: Driver (net_e1000_igb_vf) doesn't match the device
EAL: Driver (net_e1000_em) doesn't match the device
EAL: Driver (net_ena) doesn't match the device
EAL: Driver (net_enic) doesn't match the device
EAL: Driver (net_fm10k) doesn't match the device
EAL: Driver (net_i40e) doesn't match the device
EAL: Driver (net_i40e_vf) doesn't match the device
....

Overall hundreds of similar lines printed, because all drivers printed
for all devices. This is too much noise and there is already a log
message printed when device matched.

Removing the debug log completely.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agomk: fix excluding files when installing docs
Luca Boccassi [Fri, 23 Jun 2017 18:41:47 +0000 (19:41 +0100)]
mk: fix excluding files when installing docs

The --exclude parameter must be passed before the input directory to
tar, otherwise it's silently ignored and the .doctrees directory is
installed by make install-doc.

Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agomk: use make silent flag to print HTML doc version
Luca Boccassi [Fri, 23 Jun 2017 18:41:46 +0000 (19:41 +0100)]
mk: use make silent flag to print HTML doc version

Depending on the environment, make might echo the command being ran.
In mk/rte.sdkdoc.mk make is used to print the DPDK version to be
piped to doxygen. This causes the following to be written:

<div id="projectname">DPDK
&#160;<span id="projectnumber">/usr/bin/make-f/build/dpdk-jYjqnr/
 dpdk-16.11.2/mk/rte.sdkconfig.mkshowversion</span>
</div>

Use -s (--silent) to prevent echoing.

Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agoethdev: add missing symbol in map
Luca Boccassi [Thu, 22 Jun 2017 12:04:59 +0000 (13:04 +0100)]
ethdev: add missing symbol in map

The function rte_eth_tx_done_cleanup() was missing in the map file
so it cannot be used by applications linking to shared libraries.
pktgen uses it since version 3.2.0.

Fixes: 44a718c457b5 ("ethdev: add API to free consumed buffers in Tx ring")
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
7 years agopci: set default numa node for broken systems
Tonghao Zhang [Thu, 11 May 2017 01:56:33 +0000 (18:56 -0700)]
pci: set default numa node for broken systems

The NUMA node information for PCI devices provided through
sysfs is invalid for AMD Opteron(TM) Processor 62xx and 63xx
on Red Hat Enterprise Linux 6, and VMs on some hypervisors.
It is good to see more checking for valid values.

Typical wrong numa node in some VMs:
$ cat /sys/devices/pci0000:00/0000:00:18.6/numa_node
-1

Signed-off-by: Tonghao Zhang <nic@opencloud.tech>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
7 years agoring: fix return value for dequeue
Anand B Jyoti [Fri, 2 Jun 2017 06:29:51 +0000 (11:59 +0530)]
ring: fix return value for dequeue

The error return code for rte_ring_sc_dequeue_bulk() and
rte_ring_mc_dequeue_bulk() function should be -ENOENT rather
than -ENOBUFS as described in the function description.

Fixes: cfa7c9e6fc1f ("ring: make bulk and burst return values consistent")
Cc: stable@dpdk.org
Signed-off-by: Anand B Jyoti <anand.b.jyoti@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agoeventdev: define default value for dequeue timeout
Jerin Jacob [Thu, 18 May 2017 08:48:27 +0000 (14:18 +0530)]
eventdev: define default value for dequeue timeout

Defining the value 0 as default value for dequeue timeout
will help the application reduce the configuration setup
if the application is interested only in default
timeout value.

removed "min_dequeue_limit" negative testcase as
min_dequeue_limit value could be zero(which is
default timeout now) if driver has
dev_info->min_dequeue_timeout_ns  = 1.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agotest/eventdev: verify priority test prerequisite
Jerin Jacob [Thu, 1 Jun 2017 06:41:23 +0000 (12:11 +0530)]
test/eventdev: verify priority test prerequisite

octeontx specific priority test expects priority of each
event queue to be a unique value. Verify that condition
before it processes to test the priority.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agoevent/octeontx: fix missing enqueue SMP barrier
Jerin Jacob [Fri, 9 Jun 2017 13:16:03 +0000 (18:46 +0530)]
event/octeontx: fix missing enqueue SMP barrier

Typically RTE_EVENT_OP_NEW issued by the producer
lcore. To reflect the write changes issued by the
producer lcore on worker lcore, an SMP write barrier
is required on producer enqueue. Fixing the missing
rte_smp_wmb() on enqueue with RTE_EVENT_OP_NEW.

Fixes: f10d322eff76 ("event/octeontx: support worker enqueue")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
7 years agoevent/octeontx: improve dequeue performance
Jerin Jacob [Fri, 9 Jun 2017 12:06:50 +0000 (17:36 +0530)]
event/octeontx: improve dequeue performance

switch tag wait is a costly operation as it may
translate to IOB read if core swtag cache is not updated.
Do tag switch wait only when there is a tag request on
the same hardware work slot.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>