dpdk.git
6 years agotest/pipeline: fix return type of stub miss
David Hunt [Thu, 10 May 2018 07:38:15 +0000 (08:38 +0100)]
test/pipeline: fix return type of stub miss

New warning with gcc 8.1:
The table_action_stub_miss() function was incorrectly
declared as returning a typedef of
rte_pipeline_table_action_handler_miss, instead of what it
should have been, an int.
Changed this to declare the function as returning an int, and
now when the action_handler_miss is set to table_action_stub_miss
(cast as rte_pipeline_table_action_handler_miss), gcc 8.1 no
longer complains about the cast.

Fixes: 5205954791cb ("app/test: packet framework unit tests")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agotest/distributor: fix return type of thread function
David Hunt [Thu, 10 May 2018 01:25:38 +0000 (02:25 +0100)]
test/distributor: fix return type of thread function

New warning with gcc 8.1:
When casting the function pointer passed to
rte_eal_remote_launch() as an lcore_function_t *,
it expects the cast function to return an int, but
instead it was returning void. Fixed to return
an int.

Fixes: c3eabff124e6 ("distributor: add unit tests")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agotest/reorder: fix freeing mbuf twice
Reshma Pattan [Fri, 4 May 2018 10:47:06 +0000 (11:47 +0100)]
test/reorder: fix freeing mbuf twice

mbufs are being freed twice in error, once in rte_mempool_put_bulk()
and then in rte_reorder_free(). Refactor the code so that we use
rte_reorder_free() to free mbufs in the reorder buffer, and use
rte_pktmbuf_free() to free any unused or drained mbufs.

Fixes: d0c9b58d71 ("app/test: new reorder unit test")
Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reviewed-by: David Hunt <david.hunt@intel.com>
6 years agohash: explicit casts for truncation in CRC32c
Andy Green [Sat, 12 May 2018 02:00:37 +0000 (10:00 +0800)]
hash: explicit casts for truncation in CRC32c

In function 'crc32c_sse42_u64_mimic':
rte_hash_crc.h:402:40:
warning: conversion from 'uint64_t' {aka 'long unsigned int'}
to 'uint32_t' {aka 'unsigned int'} may change value [-Wconversion]
  init_val = crc32c_sse42_u32(d.u32[0], init_val);

Fixes: 00bf774bab0b ("hash: add assembly implementation of CRC32 intrinsics")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agohash: move stack declaration at top of CRC32c function
Andy Green [Sat, 12 May 2018 02:00:32 +0000 (10:00 +0800)]
hash: move stack declaration at top of CRC32c function

In function 'crc32c_2words':
rte_hash_crc.h:347:2:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  uint32_t crc, term1, term2;

Fixes: d983cf41698f ("hash: add software CRC32 implementation")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agoethdev: explicit cast of buffered Tx number
Andy Green [Sat, 12 May 2018 02:00:27 +0000 (10:00 +0800)]
ethdev: explicit cast of buffered Tx number

In function 'rte_eth_tx_buffer_flush':
rte_ethdev.h:4248:55:
warning: conversion from 'int' to 'uint16_t'
{aka 'short unsigned int'} may change value [-Wconversion]
   buffer->error_callback(&buffer->pkts[sent], to_send - sent,

Fixes: d6c99e62c852 ("ethdev: add buffered Tx")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agonet: move stack variable at top of VLAN strip function
Andy Green [Sat, 12 May 2018 02:00:17 +0000 (10:00 +0800)]
net: move stack variable at top of VLAN strip function

In function 'rte_vlan_strip':
rte_ether.h:357:2:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  struct vlan_hdr *vh = (struct vlan_hdr *)(eh + 1);

Fixes: c974021a5949 ("ether: add soft vlan encap/decap")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agospinlock/x86: move stack declaration before code
Andy Green [Sat, 12 May 2018 01:59:17 +0000 (09:59 +0800)]
spinlock/x86: move stack declaration before code

In function 'rte_try_tm':
rte_spinlock.h:82:2:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  int retries = RTE_RTM_MAX_RETRIES;

Fixes: ba7468997ea6 ("spinlock: add HTM lock elision for x86")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agoeal: declare trace buffer at top of own block
Andy Green [Sat, 12 May 2018 01:59:32 +0000 (09:59 +0800)]
eal: declare trace buffer at top of own block

rte_dev.h:54:2:
warning: ISO C90 forbids mixed declarations and
code [-Wdeclaration-after-statement]
  char buffer[vsnprintf(NULL, 0, fmt, ap) + 1];

Fixes: b974e4a40cb5 ("ethdev: make error checking macros public")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agoeal: explicit cast of core id when getting index
Andy Green [Sat, 12 May 2018 01:59:07 +0000 (09:59 +0800)]
eal: explicit cast of core id when getting index

rte_lcore.h: In function 'rte_lcore_index':
rte_lcore.h:122:14:
warning: conversion to 'int' from 'unsigned int' may change
the sign of the result [-Wsign-conversion]
   lcore_id = rte_lcore_id();

Fixes: 5583037a7950 ("eal: get relative core index")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agoeal: explicit cast of builtin for bsf32
Andy Green [Sat, 12 May 2018 01:58:57 +0000 (09:58 +0800)]
eal: explicit cast of builtin for bsf32

rte_common.h:416:9:
warning: conversion to 'uint32_t' {aka 'unsigned int'} from
'int' may change the sign of the result [-Wsign-conversion]
  return __builtin_ctz(v);
         ^~~~~~~~~~~~~~~~

The builtin is defined to return int, but we want to
return it as uint32_t.  Its only defined valid return
values are positive integers or zero, which is OK for
uint32_t.  So just add an explicit cast.

Fixes: 03f6bced5bba ("eal: use intrinsic function")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agobus/fpga: use strlcpy instead of strncpy
Pablo de Lara [Sat, 12 May 2018 07:02:17 +0000 (08:02 +0100)]
bus/fpga: use strlcpy instead of strncpy

Gcc 8 reports a build error:

drivers/bus/ifpga/ifpga_bus.c:161:2: error: ‘strncpy’ specified
bound 256 equals destination size [-Werror=stringop-truncation]
  strncpy(afu_pr_conf.bs_path, path, sizeof(afu_pr_conf.bs_path));
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocrypto/ccp: add meson build
Ravi Kumar [Thu, 3 May 2018 07:19:23 +0000 (03:19 -0400)]
crypto/ccp: add meson build

Signed-off-by: Ravi Kumar <Ravi1.kumar@amd.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agobuild: ensure compatibility with future meson versions
Bruce Richardson [Fri, 27 Apr 2018 13:49:28 +0000 (14:49 +0100)]
build: ensure compatibility with future meson versions

Meson 0.46 fixed a bug where "extract_all_objects" would not recursively
extract objects not compiled from source for a target. To keep backward
compatibility, a "recursive" keyword-arg was added to make this optional.
The value is "false" by default for now, but will change to "true" in
future, so we hard-code it to "false" in our code to ensure future
compatibility.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
6 years agobuild: fix check for libbsd in meson
Bruce Richardson [Fri, 27 Apr 2018 13:49:27 +0000 (14:49 +0100)]
build: fix check for libbsd in meson

When we check for libbsd we were just checking for the library itself.
However, on some distros, e.g. CentOS, libbsd will be found even though
it's not usable by DPDK as it's missing the string header. Therefore we
should check for both the library and the header file.

Fixes: 5364de644a4b ("eal: support strlcpy function")

Signed-off-by: Bruce Richarson <bruce.richardson@intel.com>
Reported-by: Vladimir Medvedkin <medvedkinv@gmail.com>
Acked-by: Vladimir Medvedkin <medvedkinv@gmail.com>
Acked-by: Luca Boccassi <bluca@debian.org>
6 years agokernel: fix cross-build of Linux modules with meson
Bruce Richardson [Fri, 27 Apr 2018 13:49:26 +0000 (14:49 +0100)]
kernel: fix cross-build of Linux modules with meson

When cross-compiling, if no kernel_dir was specified, then the kernel
modules were still being compiled for the build machine. Fix this by
only building modules on cross-compile when we have a kernel_dir value
set. Print out a message indicating why we are skipping kernel
compilation, and in case that the headers for kernel compile are not
found, print a warning instead of erroring out.

Fixes: a52f4574f798 ("igb_uio: build with meson")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
6 years agonet/i40e: fix missing defines for non-AVX build
Bruce Richardson [Tue, 8 May 2018 20:10:17 +0000 (21:10 +0100)]
net/i40e: fix missing defines for non-AVX build

For non-AVX builds, the cflags used for compiling the i40e driver files
are not passed to the call to build the AVX-specific code path. This can
cause build failures.

../drivers/net/i40e/i40e_ethdev.h:888:42: error: ‘I40E_PFQF_HKEY_MAX_INDEX’ undeclared here (not in a function)

Fixes: e940646b20fa ("drivers/net: build Intel NIC PMDs with meson")

Reported-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agodoc: add BPF library guide
Konstantin Ananyev [Thu, 10 May 2018 10:23:11 +0000 (11:23 +0100)]
doc: add BPF library guide

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agotest/bpf: introduce functional test
Konstantin Ananyev [Thu, 10 May 2018 10:23:10 +0000 (11:23 +0100)]
test/bpf: introduce functional test

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agotest/bpf: add samples
Konstantin Ananyev [Thu, 10 May 2018 10:23:09 +0000 (11:23 +0100)]
test/bpf: add samples

Add few simple eBPF programs as an example.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoapp/testpmd: add commands to load/unload BPF filters
Konstantin Ananyev [Thu, 10 May 2018 10:23:08 +0000 (11:23 +0100)]
app/testpmd: add commands to load/unload BPF filters

Introduce new testpmd commands to load/unload RX/TX BPF-based filters.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agobpf: introduce basic Rx/Tx filters
Konstantin Ananyev [Thu, 10 May 2018 10:23:07 +0000 (11:23 +0100)]
bpf: introduce basic Rx/Tx filters

Introduce API to install BPF based filters on ethdev RX/TX path.
Current implementation is pure SW one, based on ethdev RX/TX
callback mechanism.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agobpf: add JIT compilation for x86_64 ISA
Konstantin Ananyev [Thu, 10 May 2018 10:23:06 +0000 (11:23 +0100)]
bpf: add JIT compilation for x86_64 ISA

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agobpf: add more checks
Konstantin Ananyev [Thu, 10 May 2018 10:23:05 +0000 (11:23 +0100)]
bpf: add more checks

Add checks for:
 - all instructions are valid ones
   (known opcodes, correct syntax, valid reg/off/imm values, etc.)
 - no unreachable instructions
 - no loops
 - basic stack boundaries checks
 - division by zero

Still need to add checks for:
 - use/return only initialized registers and stack data.
 - memory boundaries violation

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agobpf: add ability to load eBPF program from ELF object file
Konstantin Ananyev [Thu, 10 May 2018 10:23:04 +0000 (11:23 +0100)]
bpf: add ability to load eBPF program from ELF object file

Introduce rte_bpf_elf_load() function to provide ability to
load eBPF program from ELF object file.
It also adds dependency on libelf.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agobpf: add BPF loading and execution framework
Konstantin Ananyev [Thu, 10 May 2018 10:23:03 +0000 (11:23 +0100)]
bpf: add BPF loading and execution framework

librte_bpf provides a framework to load and execute eBPF bytecode
inside user-space dpdk based applications.
It supports basic set of features from eBPF spec
(https://www.kernel.org/doc/Documentation/networking/filter.txt).

Not currently supported features:
 - JIT
 - cBPF
 - tail-pointer call
 - eBPF MAP
 - skb
 - function calls for 32-bit apps
 - mbuf pointer as input parameter for 32-bit apps

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoraw/ifpga: add Intel FPGA bus rawdev driver
Rosen Xu [Fri, 11 May 2018 08:31:31 +0000 (16:31 +0800)]
raw/ifpga: add Intel FPGA bus rawdev driver

Add Intel FPGA BUS Rawdev Driver which is based on
librte_rawdev library.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agoraw/ifpga/base: add Intel FPGA OPAE share code
Tianfei Zhang [Fri, 11 May 2018 08:31:30 +0000 (16:31 +0800)]
raw/ifpga/base: add Intel FPGA OPAE share code

This patch adds Intel FPGA Open Programmable Acceleration
Engine (OPAE)[1] base driver code, in order to support Intel
FPGA devices under DPDK. The base code currently supports
Intel FPGA solutions including integrated solution (Intel(R)
Xeon(R) CPU with FPGAs) and discrete solution (Intel(R)
Programmable Acceleration Card with Intel(R) Arria(R) 10 FPGA)
and it could be extended to support more FPGA devices in the
future. Please refer to [1][2] for more introduction on OPAE
and Intel FPGAs.

[1] https://01.org/OPAE
[2] https://www.altera.com/solutions/acceleration-hub/overview.html

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Signed-off-by: Hao Wu <hao.wu@intel.com>
Signed-off-by: Yilun Xu <yilun.xu@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agobus/ifpga: add Intel FPGA bus library
Rosen Xu [Fri, 11 May 2018 08:31:29 +0000 (16:31 +0800)]
bus/ifpga: add Intel FPGA bus library

Defined FPGA-BUS for Acceleration Drivers of AFUs

1. FPGA PCI Scan (1st Scan) follows DPDK UIO/VFIO PCI Scan Process,
probe Intel FPGA Rawdev Driver, it will be covered in following patches.

2. AFU Scan(2nd Scan) bind DPDK driver to FPGA Partial-Bitstream.
This scan is trigged by hotplug of IFPGA Rawdev probe, in this scan
the AFUs will be created and their drivers are also probed.

This patch will introduce rte_afu_device which describe the AFU device
listed in the FPGA-BUS.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agocrypto/ccp: support run-time CPU based auth
Ravi Kumar [Thu, 10 May 2018 09:20:10 +0000 (05:20 -0400)]
crypto/ccp: support run-time CPU based auth

CCP PMD supports authentication offload to either of CCP or CPU.
The earlier version of patch provides this option as compile time.
This patch changes this option from compile time to run time.
User can pass "ccp_auth_opt=1" as an additional arguments to vdev
parameter to enable authentication operations on CPU.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agobbdev: change names of baseband devices
Kamil Chalupnik [Thu, 26 Apr 2018 14:31:14 +0000 (16:31 +0200)]
bbdev: change names of baseband devices

Change baseband device name:
 - from turbo_sw to baseband_turbo_sw
 - from bbdev_null to baseband_null
To keep backwards compatibility the old names are still valid

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agodoc: add compression driver and ISA-L PMD guides
Lee Daly [Wed, 9 May 2018 16:14:35 +0000 (17:14 +0100)]
doc: add compression driver and ISA-L PMD guides

This adds general compression drivers feature guide
as well as the ISA-L PMD documentation and guide.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocompress/isal: add ISA-L decomp functionality
Lee Daly [Wed, 9 May 2018 16:14:34 +0000 (17:14 +0100)]
compress/isal: add ISA-L decomp functionality

Adds decompression functionality, similar to compression,
this sets internal ISA-L structures, provides input & output mbuf
addresses, executes decompression, which ISA-L calls inflate and
finally error checks.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Acked-by: Greg Tucker <greg.b.tucker@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocompress/isal: add ISA-L compression functionality
Lee Daly [Wed, 9 May 2018 16:14:33 +0000 (17:14 +0100)]
compress/isal: add ISA-L compression functionality

Adds compression functionality, this sets internal ISA-L
structures, provides input & output mbuf addresses,
executes compression, which ISA-L calls deflate,
and finally error checks.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Acked-by: Greg Tucker <greg.b.tucker@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocompress/isal: add stats related ops
Lee Daly [Wed, 9 May 2018 16:14:32 +0000 (17:14 +0100)]
compress/isal: add stats related ops

Add functions for statistic retrieval and resetting.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocompress/isal: support burst enqueue/dequeue
Lee Daly [Wed, 9 May 2018 16:14:31 +0000 (17:14 +0100)]
compress/isal: support burst enqueue/dequeue

This patchs adds support for the compressdev enqueue_burst
and dequeue_burst API operations.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocompress/isal: add queue pair related ops
Lee Daly [Wed, 9 May 2018 16:14:30 +0000 (17:14 +0100)]
compress/isal: add queue pair related ops

This adds queue pair operations such as setup and release.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocompress/isal: add private xform related ops
Lee Daly [Wed, 9 May 2018 16:14:29 +0000 (17:14 +0100)]
compress/isal: add private xform related ops

This patch  creates, configures and frees the private xform, taking the
applications xform and using it to populate the PMDs own private xform
with the information which will be required for the compress/decompress
functions. This information includes the level, algorithm,
type of huffman code, type of checksum etc.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocompress/isal: add basic PMD ops
Lee Daly [Wed, 9 May 2018 16:14:28 +0000 (17:14 +0100)]
compress/isal: add basic PMD ops

Add basic device poll mode driver operations to
give ability to start, stop, close device etc.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocompress/isal: add device init and de-init
Lee Daly [Wed, 9 May 2018 16:14:27 +0000 (17:14 +0100)]
compress/isal: add device init and de-init

This patch adds device initialization functionality such as
probe and create, also adding deinitialize functionality.
Dynamic logging component also added.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocompress/isal: add skeleton ISA-L compression PMD
Lee Daly [Wed, 9 May 2018 16:14:26 +0000 (17:14 +0100)]
compress/isal: add skeleton ISA-L compression PMD

Adding basic skeleton of the ISA-L compression driver.
No compression functionality, but lays the foundation for
operations in the rest of the patchset.

The ISA-L compression driver utilizes Intel's ISA-L compression
library and compressdev API.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agodoc: update bbdev test app guide
Kamil Chalupnik [Wed, 9 May 2018 14:55:02 +0000 (16:55 +0200)]
doc: update bbdev test app guide

Update the test app documentation:
- description of tests added
- usage of test app updated

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agodoc: add shared lib building instructions for bbdev
Kamil Chalupnik [Wed, 9 May 2018 14:51:04 +0000 (16:51 +0200)]
doc: add shared lib building instructions for bbdev

Added a note to enable building as a shared lib.

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agodoc: update bbdev guide
Kamil Chalupnik [Wed, 9 May 2018 14:46:39 +0000 (16:46 +0200)]
doc: update bbdev guide

Update the documentation describing Wireless Baseband Device:
- device capabilities updated
- input/output data buffers description added
- details about implementation of turbo encode/decode
  operation added

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agoapp/bbdev: improve readability
Kamil Chalupnik [Wed, 9 May 2018 14:42:10 +0000 (16:42 +0200)]
app/bbdev: improve readability

Improve readability of test application by replacing
int values with rte_bbdev_event_type enum.

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agoapp/bbdev: add new test vectors
Kamil Chalupnik [Wed, 9 May 2018 14:39:13 +0000 (16:39 +0200)]
app/bbdev: add new test vectors

Creation of new vectors to test and validate BBDevice capabilities
Test app documentation updated accordingly

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agoapp/bbdev: update default test vectors
Kamil Chalupnik [Wed, 9 May 2018 14:37:01 +0000 (16:37 +0200)]
app/bbdev: update default test vectors

Update test vectors directory for Wireless Baseband Device:
- update test vectors names
- python script used for tests execution updated

Update the test app documentation:
- vector test names updated

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agobbdev: split queue groups
Kamil Chalupnik [Wed, 9 May 2018 14:35:03 +0000 (16:35 +0200)]
bbdev: split queue groups

Splitting Queue Groups into UL/DL Groups in Turbo Software
Driver. They are independent for Decode/Encode.
Release note updated accordingly.

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agobbdev: measure offload cost
Kamil Chalupnik [Wed, 9 May 2018 14:30:02 +0000 (16:30 +0200)]
bbdev: measure offload cost

New test created to measure offload cost.
Changes were introduced in API, turbo software driver
and test application

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agobaseband/turbo_sw: support optional CRC overlap
Kamil Chalupnik [Wed, 9 May 2018 14:28:03 +0000 (16:28 +0200)]
baseband/turbo_sw: support optional CRC overlap

Support for optional CRC overlap in decode processing implemented
in Turbo Software driver

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agobaseband/turbo_sw: increase internal buffers
Kamil Chalupnik [Wed, 9 May 2018 14:25:55 +0000 (16:25 +0200)]
baseband/turbo_sw: increase internal buffers

Sizes of the internal buffers used by decoding were increased due to
problem with memory for large vectors

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agobaseband/turbo_sw: scale likelihood ratio input
Kamil Chalupnik [Wed, 9 May 2018 14:23:16 +0000 (16:23 +0200)]
baseband/turbo_sw: scale likelihood ratio input

Update Turbo Software driver for Wireless Baseband Device:
- function scaling input LLR values to specific range [-16, 16] added
- new test vectors to check device capabilities added
- release note updated accordingly

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agobaseband/turbo_sw: move macros to bbdev library
Kamil Chalupnik [Wed, 9 May 2018 14:20:22 +0000 (16:20 +0200)]
baseband/turbo_sw: move macros to bbdev library

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agobaseband/turbo_sw: optimize memory copy
Kamil Chalupnik [Wed, 9 May 2018 14:17:56 +0000 (16:17 +0200)]
baseband/turbo_sw: optimize memory copy

Optimization of Turbo Software driver by limiting or changing
usage of memory copying function.

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agobaseband/turbo_sw: support FlexRAN 1.4.0
Kamil Chalupnik [Wed, 9 May 2018 14:14:29 +0000 (16:14 +0200)]
baseband/turbo_sw: support FlexRAN 1.4.0

Adjusting BaseBand drivers code to changes in FlexRAN 1.4.0:
- update usage of crc functions after API changes

Update the documentation describing Wireless Baseband Device:
- FlexRAN releases mapping table added
- download and build instructions for BBDEV turbo_sw driver in
  compliance with FlexRAN 1.4.0 release added

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agoexamples/ipsec-secgw: limit inflight packets count
Radu Nicolau [Wed, 9 May 2018 08:58:41 +0000 (09:58 +0100)]
examples/ipsec-secgw: limit inflight packets count

Revert previous patch that introduce a performance
degradation in certain scenarios and add a configurable
limit for number inflight packets.

Revert
commit 84d4b5e4ec48 ("examples/ipsec-secgw: improve IPsec dequeue logic")
Cc: stable@dpdk.org
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
6 years agoapp/crypto-perf: check minimum lcore number
Pablo de Lara [Wed, 9 May 2018 09:44:21 +0000 (10:44 +0100)]
app/crypto-perf: check minimum lcore number

The crypto performance application requires at least
two cores: one master core that launches the other slaves
and one core acting as slave running the crypto device.

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
6 years agotest/crypto: enhance scheduler unit tests
Reshma Pattan [Fri, 13 Apr 2018 09:00:26 +0000 (10:00 +0100)]
test/crypto: enhance scheduler unit tests

Unit test cases for Multi-core mode, Fail-over mode,
anf Packet distribution mode are added to improve code coverage.

Signed-off-by: Jananee Parthasarathy <jananeex.m.parthasarathy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocrypto/dpaa2_sec: remove IOVA conversion for fle address
Hemant Agrawal [Wed, 9 May 2018 12:43:24 +0000 (18:13 +0530)]
crypto/dpaa2_sec: remove IOVA conversion for fle address

fle is already in virtual addressing mode - no need to perform
address conversion for it.

Fixes: 8d1f3a5d751b ("crypto/dpaa2_sec: support crypto operation")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
6 years agoapp/crypto-perf: fix burst size calculation
Tomasz Jozwiak [Thu, 26 Apr 2018 09:05:49 +0000 (11:05 +0200)]
app/crypto-perf: fix burst size calculation

This patch fixes segmentation fault in pmd_cyclecount_bench_ops
function in case when state->opts->nb_descriptors is not
natural multiple of burst size.
To reproduce run: dpdk-test-crypto-perf with params:
  --ptest pmd-cyclecount --pmd-cyclecount-delay-ms 5 \
  --devtype crypto_qat --optype cipher-then-auth \
  --cipher-algo aes-cbc --cipher-op encrypt \
  --cipher-key-sz 16 --cipher-iv-sz 16 \
  --auth-algo sha2-256-hmac \
  --auth-op generate --auth-key-sz 64 --digest-sz 32 \
  --total-ops 10000 --burst-sz 255 --buffer-sz 1024 --silent

Fixes: 96dfeb609be1 ("app/crypto-perf: add new PMD benchmarking mode")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocrypto/dpaa_sec: update maximum queue pairs to 8
Nipun Gupta [Tue, 8 May 2018 11:24:55 +0000 (16:54 +0530)]
crypto/dpaa_sec: update maximum queue pairs to 8

The underlying hardware can support multiple queue pairs.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
6 years agotest/compress: add invalid configuration tests
Pablo de Lara [Fri, 4 May 2018 10:22:18 +0000 (11:22 +0100)]
test/compress: add invalid configuration tests

Add tests that check if device configuration
is not successful when providing invalid parameters.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
6 years agotest/compress: add multi xform test
Pablo de Lara [Fri, 4 May 2018 10:22:17 +0000 (11:22 +0100)]
test/compress: add multi xform test

Add test that checks if multiple xforms can be
handled on a single enqueue call.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
6 years agotest/compress: add multi level test
Pablo de Lara [Fri, 4 May 2018 10:22:16 +0000 (11:22 +0100)]
test/compress: add multi level test

Add test that checks if all compression levels
are supported and compress a buffer correctly.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
6 years agotest/compress: add multi op test
Pablo de Lara [Fri, 4 May 2018 10:22:15 +0000 (11:22 +0100)]
test/compress: add multi op test

Add test that checks if multiple operations with
different buffers can be handled on a single enqueue call.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
6 years agotest/compress: add initial unit tests
Pablo de Lara [Fri, 4 May 2018 10:22:14 +0000 (11:22 +0100)]
test/compress: add initial unit tests

This commit introduces the initial tests for compressdev,
performing basic compression and decompression operations
of sample test buffers, using the Zlib library in one direction
and compressdev in another direction, to make sure that
the library is compatible with Zlib.

Due to the use of Zlib API, the test is disabled by default,
to avoid adding a new dependency on DPDK.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
6 years agodoc: add compressdev library guide
Ashish Gupta [Fri, 27 Apr 2018 13:24:07 +0000 (14:24 +0100)]
doc: add compressdev library guide

Add section in programmer’s guide for Compressdev library.

Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
6 years agocompressdev: get device id from name
Fiona Trahe [Fri, 27 Apr 2018 13:24:06 +0000 (14:24 +0100)]
compressdev: get device id from name

Added API to retrieve the device id provided the device name.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
6 years agocompressdev: add device capabilities
Fiona Trahe [Fri, 27 Apr 2018 13:24:05 +0000 (14:24 +0100)]
compressdev: add device capabilities

Added structure which each PMD will fill out,
providing the capabilities of each driver
(containing mainly which compression services
it supports).

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
6 years agocompressdev: add device stats
Fiona Trahe [Fri, 27 Apr 2018 13:24:04 +0000 (14:24 +0100)]
compressdev: add device stats

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
6 years agocompressdev: add compression service feature flags
Fiona Trahe [Fri, 27 Apr 2018 13:24:03 +0000 (14:24 +0100)]
compressdev: add compression service feature flags

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
6 years agocompressdev: add device feature flags
Fiona Trahe [Fri, 27 Apr 2018 13:24:02 +0000 (14:24 +0100)]
compressdev: add device feature flags

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
6 years agocompressdev: support hash operations
Shally Verma [Fri, 27 Apr 2018 13:24:01 +0000 (14:24 +0100)]
compressdev: support hash operations

- Added hash algo enumeration and params in xform and rte_comp_op
- Updated compress/decompress xform to input hash algorithm
- Updated struct rte_comp_op to input hash buffer

User in capability query will know about support hashes via
device info comp_feature_flag. If supported, application can initialize
desired algorithm enumeration in xform structure and pass valid hash
buffer during enqueue_burst().

Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
6 years agocompressdev: support stateful operations
Fiona Trahe [Fri, 27 Apr 2018 13:24:00 +0000 (14:24 +0100)]
compressdev: support stateful operations

Added stream data (stream) in compression operation,
which will contain the private data from each PMD
to support stateful operations.
Also, added functions to create/free this data.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
6 years agocompressdev: support stateless operations
Fiona Trahe [Fri, 27 Apr 2018 13:23:59 +0000 (14:23 +0100)]
compressdev: support stateless operations

Added private transform data (priv_xform) in compression
operation, which will contain the private data from each
PMD to support stateless operations.
Also, added functions to create/free this data.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
6 years agocompressdev: add operation management
Fiona Trahe [Fri, 27 Apr 2018 13:23:58 +0000 (14:23 +0100)]
compressdev: add operation management

Added functions to allocate and free compression operations.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
6 years agocompressdev: add enqueue/dequeue functions
Fiona Trahe [Fri, 27 Apr 2018 13:23:57 +0000 (14:23 +0100)]
compressdev: add enqueue/dequeue functions

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
6 years agocompressdev: add compression specific data
Fiona Trahe [Fri, 27 Apr 2018 13:23:56 +0000 (14:23 +0100)]
compressdev: add compression specific data

Added structures and enums specific to compression,
including the compression operation structure and the
different supported algorithms, checksums and compression
levels.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
6 years agocompressdev: add queue pair management
Fiona Trahe [Fri, 27 Apr 2018 13:23:55 +0000 (14:23 +0100)]
compressdev: add queue pair management

Add functions to manage device queue pairs.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
6 years agocompressdev: add basic device management
Fiona Trahe [Fri, 27 Apr 2018 13:23:54 +0000 (14:23 +0100)]
compressdev: add basic device management

Add basic functions to manage compress devices,
including driver and device allocation, and the basic
interface with compressdev PMDs.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
6 years agocrypto/scheduler: fix memory leak
Pablo de Lara [Thu, 26 Apr 2018 15:09:50 +0000 (16:09 +0100)]
crypto/scheduler: fix memory leak

If private context creation fails, the memory
allocated for it and for some of the rings created
was being leaked.
In case of failure, it must be freed.

Fixes: 4c07e0552f0a ("crypto/scheduler: add multicore scheduling mode")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
6 years agocrypto/scheduler: set null pointer after freeing
Pablo de Lara [Thu, 26 Apr 2018 15:09:49 +0000 (16:09 +0100)]
crypto/scheduler: set null pointer after freeing

When freeing memory, pointers should be set to NULL,
to avoid memory corruption/segmentation faults.

Fixes: 31439ee72b2c ("crypto/scheduler: add API implementations")
Fixes: 50e14527b9d1 ("crypto/scheduler: improve parameters parsing")
Fixes: 57523e682bb7 ("crypto/scheduler: register operation functions")
Fixes: a783aa634410 ("crypto/scheduler: add packet size based mode")
Fixes: 4c07e0552f0a ("crypto/scheduler: add multicore scheduling mode")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
6 years agocrypto/mrvl: rename PMD to mvsam
Tomasz Duszynski [Tue, 8 May 2018 08:14:04 +0000 (10:14 +0200)]
crypto/mrvl: rename PMD to mvsam

Picking a company stock ticker for a PMD name might not be a best approach
in a long run since name is too generic.

This patch addresses that and renames mrvl to mvsam.

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
6 years agoeventdev: make ethdev port identifiers 16-bit
Nikhil Rao [Wed, 9 May 2018 20:52:40 +0000 (02:22 +0530)]
eventdev: make ethdev port identifiers 16-bit

Ethernet port ID data size has been extended to 16 bits size 17.11
Update the Rx event adapter interface and implementation accordingly.

This commit bumps the library version to refect the ABI change
caused by extending the ethernet port parameter in Rx adapter
functions from 8 to 16 bits.

Fixes: 9c38b704d280 ("eventdev: add eth Rx adapter implementation")
Cc: stable@dpdk.org
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
6 years agodoc: add event crypto adapter guide
Abhinandan Gujjar [Wed, 9 May 2018 08:18:01 +0000 (13:48 +0530)]
doc: add event crypto adapter guide

Add entries in the programmer's guide, API index, maintainer's file
and release notes for the event crypto adapter.

Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
6 years agotest: add event crypto adapter auto-test
Abhinandan Gujjar [Wed, 9 May 2018 09:20:34 +0000 (14:50 +0530)]
test: add event crypto adapter auto-test

Added testsuite to test the crypto adapter functionality.
The testsuite detects the HW/SW event & crypto devices and
their capabilities. Depending upon the capability, adapter
is confgured and modes are tested.

Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
6 years agoeventdev: add crypto adapter implementation
Abhinandan Gujjar [Wed, 9 May 2018 08:17:59 +0000 (13:47 +0530)]
eventdev: add crypto adapter implementation

This patch adds common code for the crypto adapter to support
SW and HW based transfer mechanisms. The adapter uses an EAL
service core function for SW based packet transfer and uses
the eventdev PMD functions to configure HW based packet
transfer between the crypto device and the event device.
This patch also adds adapter to the meson build system &
updates the necessary makefile & map file.

Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
6 years agoeventdev: add driver interface of crypto adapter
Abhinandan Gujjar [Wed, 9 May 2018 08:17:58 +0000 (13:47 +0530)]
eventdev: add driver interface of crypto adapter

This patch defines capabilities & functions to be called
for eventdev PMDs.

Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
6 years agoeventdev: introduce event crypto adapter
Abhinandan Gujjar [Wed, 9 May 2018 08:17:57 +0000 (13:47 +0530)]
eventdev: introduce event crypto adapter

This patch introduces event crypto adapter APIs. It
also provides information on working model/adapter
modes & their usage. Application is expected to use
this interface to transfer packets between the crypto
device & the event device.

Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
6 years agoevent/dpaa2: remove link from info structure
Ashish Jain [Wed, 9 May 2018 09:20:53 +0000 (14:50 +0530)]
event/dpaa2: remove link from info structure

Removing use of link data under evq_info_t structure which was
used to check whether the the associated evq has been linked
or not. Since, an evq can be linked to multiple event ports,
thus setting the link variable only allowed the first event
port to be associated with the evq. This led to huge performance
drop in case of multiple event ports as I/O only worked on
first event port associated with the evq.

Fixes: 0ce3ce7c275c ("event/dpaa2: add configuration functions")
Cc: stable@dpdk.org
Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agoevent/dpaa2: remove check on epoll return
Nipun Gupta [Wed, 9 May 2018 09:20:52 +0000 (14:50 +0530)]
event/dpaa2: remove check on epoll return

Driver shouldn't take decision on signals received. The return
from epoll was blocking on EINTR which is not the right use-case.

Fixes: 36d87bb92230 ("event/dpaa2: handle timeout using interrupts in dequeue")
Cc: stable@dpdk.org
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agotest: fix build with gcc 4.8.5
Erik Gabriel Carrillo [Mon, 7 May 2018 19:12:52 +0000 (14:12 -0500)]
test: fix build with gcc 4.8.5

Build errors occur on CentOS 7 with GCC 4.8.5 20150623 in the
event_timer_adapter_test autotest; the
-Werror=missing-field-initializers option causes the compiler to emit
messages like "error: missing initializer for field ‘priority’ of
‘struct <anonymous>’" in several places.

Add -Wno-missing-field-initializers to the test's CFLAGS to allow the
current syntax if we are using GCC 5.0 or lower.

Fixes: d1f3385d0076 ("test: add event timer adapter auto-test")

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agomk: disable OcteonTx for buggy compilers
Pavan Nikhilesh [Mon, 7 May 2018 12:30:42 +0000 (18:00 +0530)]
mk: disable OcteonTx for buggy compilers

Disable octeontx for gcc 4.8.5 as compiler is emitting "internal
compiler error" for aarch64.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Tested-by: Ali Alnubani <alialnu@mellanox.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agoevent/octeontx: fix SPDX tag placement
Pavan Nikhilesh [Mon, 23 Apr 2018 12:38:33 +0000 (18:08 +0530)]
event/octeontx: fix SPDX tag placement

Fixes: fd5baf09cdf9 ("event/octeontx: probe timvf PCIe devices")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agoeventdev: convert eth Rx adapter files to SPDX license tag
Nikhil Rao [Tue, 24 Apr 2018 22:32:21 +0000 (04:02 +0530)]
eventdev: convert eth Rx adapter files to SPDX license tag

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agodoc: update release notes for OcteonTx TIM driver
Pavan Nikhilesh [Fri, 20 Apr 2018 08:08:33 +0000 (13:38 +0530)]
doc: update release notes for OcteonTx TIM driver

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
6 years agoevent/octeontx: fix build with clang 6
Pavan Nikhilesh [Tue, 8 May 2018 21:26:00 +0000 (02:56 +0530)]
event/octeontx: fix build with clang 6

Clang 6 & 7 fail to naturally align packed structs due to this clang
can't use 8byte atomic primitives and splits them into lesser atomic
primitives. To use lesser atomic primitives we need to link libatomic
(-latomic), instead supply alignment attribute to the compiler.

timvf_worker.c:(.text+0x498): undefined reference to `__atomic_fetch_add_8'
timvf_worker.c:(.text+0x525): undefined reference to `__atomic_store_2'
timvf_worker.c:(.text+0x557): undefined reference to `__atomic_fetch_add_4'
timvf_worker.c:(.text+0x5de): undefined reference to `__atomic_store_2'

Fixes: f874c1eb1519 ("event/octeontx: create and free timer adapter")

Reported-by: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agotable: add dedicated params struct for cuckoo hash
Jasvinder Singh [Tue, 8 May 2018 14:17:18 +0000 (15:17 +0100)]
table: add dedicated params struct for cuckoo hash

Add dedicated parameter structure for cuckoo hash. The cuckoo hash from
librte_hash uses slightly different prototype for the hash function (no
key_mask parameter, 32-bit seed and return value) that require either
of the following approaches:
   1/ Function pointer conversion: gcc 8.1 warning [1], misleading [2]
   2/ Union within the parameter structure: pollutes a very generic API
      parameter structure with some implementation dependent detail
      (i.e. key mask not available for one of the available
      implementations)
   3/ Using opaque pointer for hash function: same issue from 2/
   4/ Different parameter structure: avoid issue from 2/; hopefully,
      it won't be long before librte_hash implements the key mask feature,
      so the generic API structure could be used.

[1] http://www.dpdk.org/ml/archives/dev/2018-April/094950.html
[2] http://www.dpdk.org/ml/archives/dev/2018-April/096250.html

Fixes: 5a80bf0ae613 ("table: add cuckoo hash")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agoexamples/ip_pipeline: replace strncpy with strlcpy
Jasvinder Singh [Tue, 17 Apr 2018 13:17:19 +0000 (14:17 +0100)]
examples/ip_pipeline: replace strncpy with strlcpy

The destination string may not have a null termination if
the source string's length is equal to the sizeof.

Fix by replacing strncpy with strlcpy that guarantees NULL-termination.

[merged several commits]

Coverty issue: 272606
Fixes: d75c371e9b46 ("examples/ip_pipeline: add pipeline object")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Coverty issue: 272594
Fixes: 133c2c6565d6 ("examples/ip_pipeline: add link object")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Coverty issue: 272603
Fixes: 2f74ae28e23f ("examples/ip_pipeline: add tap object")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Coverity issue: 272588
Fixes: 6bfe74f8c93e ("examples/ip_pipeline: add mempool object")
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>
Coverity issue: 272592
Fixes: 25961ff3bcb9 ("examples/ip_pipeline: add traffic manager object")
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>
Coverity issue: 272562
Fixes: 9a408cc8ac ("examples/ip_pipeline: add KNI object")
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>
Coverity issue: 272580
Fixes: 719374345c ("examples/ip_pipeline: add action profile objects")
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>
Coverity issue: 272572
Fixes: 719374345cee ("examples/ip_pipeline: add action profile objects")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Coverity issue: 272563
Fixes: 8245472c58c8 ("examples/ip_pipeline: add sw queue object")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agoexamples/ip_pipeline: remove dead code in table command
Fan Zhang [Mon, 16 Apr 2018 10:58:20 +0000 (11:58 +0100)]
examples/ip_pipeline: remove dead code in table command

Coverity issue: 272567
Fixes: d75c371e9b46 ("examples/ip_pipeline: add pipeline object")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>