dpdk.git
5 years agonet/mlx5: support flow action search in a list
Moti Haimovsky [Mon, 9 Sep 2019 15:56:43 +0000 (18:56 +0300)]
net/mlx5: support flow action search in a list

This commit adds a helper routine that supports searching for a
specific action in a list of actions.

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: fix Tx descriptor with VLAN insertions
Viacheslav Ovsiienko [Tue, 3 Sep 2019 12:35:05 +0000 (12:35 +0000)]
net/mlx5: fix Tx descriptor with VLAN insertions

If VLAN tag insertion transmit offload is engaged
(DEV_TX_OFFLOAD_VLAN_INSERT in tx queue configuration is set)
the transmit descriptor may be built with wrong format, due to
packet length is not adjusted. Also, the ring buffer wrap up
is not handled correctly.

Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
5 years agoevent/dpaa: support crypto adapter
Akhil Goyal [Fri, 4 Oct 2019 11:26:59 +0000 (16:56 +0530)]
event/dpaa: support crypto adapter

event dpaa device support both ethernet as well as
crypto queues to be attached to it. eth_rx_adapter
provide infrastructure to attach ethernet queues and
crypto_adapter provide support for crypto queues.

This patch add support for dpaa_eventdev to attach
dpaa_sec queues.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa_sec: support event crypto adapter
Akhil Goyal [Fri, 4 Oct 2019 11:26:58 +0000 (16:56 +0530)]
crypto/dpaa_sec: support event crypto adapter

dpaa_sec hw queues can be attached to a hw dpaa event
device and the application can configure the event
crypto adapter to access the dpaa_sec packets using
hardware events.
This patch defines APIs which can be used by the
dpaa event device to attach/detach dpaa_sec queues.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/octeontx: fix global log variable definition
Anoob Joseph [Fri, 4 Oct 2019 09:44:35 +0000 (15:14 +0530)]
crypto/octeontx: fix global log variable definition

'cpt_logtype' & 'otx_cryptodev_driver_id' global variables are defined
in a header file which was causing multiple definitions of the
variables. Fixed it by moving the required vars to the .c file and
introducing a new macro so the CPT_LOG macros in common/cpt would use
the associated PMD log var.

Issue has been detected by '-fno-common' gcc flag.

Fixes: bfe2ae495ee2 ("crypto/octeontx: add PMD skeleton")
Cc: stable@dpdk.org
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agocrypto/virtio: allocate private data by NUMA affinity
Xiao Wang [Wed, 4 Sep 2019 13:21:51 +0000 (21:21 +0800)]
crypto/virtio: allocate private data by NUMA affinity

It's better to allocate device private data on the same NUMA node with
device, rather than with the main thread. This helps avoid cross-NUMA
access for worker thread.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Jay Zhou <jianjay.zhou@huawei.com>
5 years agoapp/bbdev: enable fpga_lte_fec support in shared builds
Bruce Richardson [Fri, 4 Oct 2019 17:19:13 +0000 (18:19 +0100)]
app/bbdev: enable fpga_lte_fec support in shared builds

Now that the necessary function is exported from the fpga_lte_fec driver,
we can enable the code paths using it in shared-library builds.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
5 years agobaseband/fpga_lte_fec: add public API to map file
Bruce Richardson [Fri, 4 Oct 2019 17:19:12 +0000 (18:19 +0100)]
baseband/fpga_lte_fec: add public API to map file

To allow shared library builds of e.g. test-bbdev app, we need to export
the configure function. Since this needs to be exported as experimental by
default, we update the header file to add the experimental tag there too.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agodrivers/baseband: remove override of driver names
Bruce Richardson [Fri, 4 Oct 2019 17:19:11 +0000 (18:19 +0100)]
drivers/baseband: remove override of driver names

Now that all driver names follow a consistent pattern, remove the override
of the name in each driver which adds the prefix. Instead we can just add
the prefix at a higher level.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agobaseband/fpga_lte_fec: align naming to other bbdevs
Bruce Richardson [Fri, 4 Oct 2019 17:19:10 +0000 (18:19 +0100)]
baseband/fpga_lte_fec: align naming to other bbdevs

The fpga_lte_fec is the only bbdev driver that does not use bbdev in the
name, so modify it to keep consistency with the other bbdev drivers. This
will then allow later simplification due to all drivers using the same
basic naming format.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agodrivers/baseband: align meson defines with make
Bruce Richardson [Fri, 4 Oct 2019 17:19:09 +0000 (18:19 +0100)]
drivers/baseband: align meson defines with make

For baseband drivers, the macros used to indicate the presence of a
particular driver were subtly different from that used in make. The make
values hand "PMD" before the individual driver name, while in meson it came
afterwards. Update meson to put the "PMD" part first.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agocrypto/qat: handle Single Pass Crypto Requests on GEN3
Adam Dybkowski [Tue, 8 Oct 2019 12:44:33 +0000 (14:44 +0200)]
crypto/qat: handle Single Pass Crypto Requests on GEN3

This patch improves the performance of AES GCM by using
the Single Pass Crypto Request functionality when running
on GEN3 QAT. Falls back to the classic 2-pass mode on older
hardware.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
5 years agocommon/qat: add GEN3 definitions
Adam Dybkowski [Tue, 8 Oct 2019 12:44:32 +0000 (14:44 +0200)]
common/qat: add GEN3 definitions

This patch adds few definitions specific to GEN3 QAT.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
5 years agotest/crypto: add more AES-GCM cases for QAT
Adam Dybkowski [Tue, 8 Oct 2019 12:44:31 +0000 (14:44 +0200)]
test/crypto: add more AES-GCM cases for QAT

This patch adds 256-bit AES GCM tests for QAT PMD
(which already existed for AESNI and OpenSSL) and also adds
a number of negative unit tests for AES GCM for QAT PMD, in order
to verify authenticated encryption and decryption with modified data.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
5 years agodrivers/crypto: remove some invalid comments
Thierry Herbelot [Mon, 30 Sep 2019 07:51:44 +0000 (09:51 +0200)]
drivers/crypto: remove some invalid comments

A comment valid in AESNI PMD was copied and pasted in other code

Fixes: 8a61c83af2fa ("crypto/mrvl: add mrvl crypto driver")
Fixes: 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")
Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
Cc: stable@dpdk.org
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agotest/crypto: add cases for Nitrox
Nagadheeraj Rottela [Tue, 1 Oct 2019 06:41:36 +0000 (06:41 +0000)]
test/crypto: add cases for Nitrox

Add aes chain test cases for Nitrox in-pace and
out-of-place operations.

Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/nitrox: add cipher auth chain processing
Nagadheeraj Rottela [Tue, 1 Oct 2019 06:41:33 +0000 (06:41 +0000)]
crypto/nitrox: add cipher auth chain processing

Add cipher auth crypto chain processing functionality in symmetric
request manager. Update the release notes.

Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/nitrox: add burst enqueue and dequeue ops
Nagadheeraj Rottela [Tue, 1 Oct 2019 06:41:31 +0000 (06:41 +0000)]
crypto/nitrox: add burst enqueue and dequeue ops

Add burst enqueue and dequeue operations along with interface for
symmetric request manager.

Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/nitrox: add session management
Nagadheeraj Rottela [Tue, 1 Oct 2019 06:41:29 +0000 (06:41 +0000)]
crypto/nitrox: add session management

Add all the session management operations.

Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/nitrox: add hardware queue management
Nagadheeraj Rottela [Tue, 1 Oct 2019 06:41:27 +0000 (06:41 +0000)]
crypto/nitrox: add hardware queue management

Add hardware queue management code corresponding to
queue pair setup and release functions.

Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/nitrox: add software queue management
Nagadheeraj Rottela [Tue, 1 Oct 2019 06:41:25 +0000 (06:41 +0000)]
crypto/nitrox: add software queue management

Add software queue management code corresponding to
queue pair setup and release functions.

Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/nitrox: create symmetric cryptodev
Nagadheeraj Rottela [Tue, 1 Oct 2019 06:41:23 +0000 (06:41 +0000)]
crypto/nitrox: create symmetric cryptodev

Add Nitrox symmetric cryptodev with following operations,
- dev_configure
- dev_start
- dev_stop
- dev_close
- dev_infos_get

Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/nitrox: introduce Nitrox driver
Nagadheeraj Rottela [Tue, 1 Oct 2019 06:41:20 +0000 (06:41 +0000)]
crypto/nitrox: introduce Nitrox driver

Add bare minimum Nitrox PMD library which handles pci probe, remove and
hardware initialization. Add logs, documentation and update maintainers
file.

Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agoapp/crypto-perf: add check for out-of-place case
Hemant Agrawal [Fri, 27 Sep 2019 08:03:15 +0000 (13:33 +0530)]
app/crypto-perf: add check for out-of-place case

Segmented frames not supported for out-of-place case.
This patch returns err if such config is requested.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocommon/cpt: support new firmware
Ankur Dwivedi [Wed, 14 Aug 2019 09:40:31 +0000 (15:10 +0530)]
common/cpt: support new firmware

With the latest firmware, there are few changes for zuc and snow3g.

1. The iv_source is present in bitfield 7 of minor opcode. In the
old firmware this was present in bitfield 6.

2. Algorithm type is a 2 bit field in new firmware. In the old
firmware it was named as cipher type and it was a 1 bit field.

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
5 years agocryptodev: fix initialization on multi-process
Julien Meunier [Wed, 7 Aug 2019 08:39:23 +0000 (11:39 +0300)]
cryptodev: fix initialization on multi-process

Primary process is responsible to initialize the data struct of each
crypto devices.

Secondary process should not override this data during the
initialization.

Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto devices")
Cc: stable@dpdk.org
Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agotest/crypto: add negative cases for NXP drivers
Hemant Agrawal [Tue, 1 Oct 2019 11:41:19 +0000 (17:11 +0530)]
test/crypto: add negative cases for NXP drivers

Negative cases with wrong cipher/auth text added
to dpaa_sec and dpaa2_sec PMD test suites.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agotest/crypto: change failure condition check
Hemant Agrawal [Tue, 1 Oct 2019 11:41:18 +0000 (17:11 +0530)]
test/crypto: change failure condition check

In some of the cases, the test is looking for a specific
failure returned from the CryptoDev. Not all cryptodev
support returning specific errors.
This patch changes such checks to NOT-SUCCESS

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agoexamples/ipsec-secgw: update required Scapy version
Marcin Smoczynski [Wed, 2 Oct 2019 08:50:15 +0000 (10:50 +0200)]
examples/ipsec-secgw: update required Scapy version

Update Scapy version requirement from 2.4.3rc1 to 2.4.3, which has been
used because 2.4.2 had a bug which made this version unable to install.
Accept future versions of Scapy too.

Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
5 years agotest/crypto: support wireless algos for dpaa2-sec
Akhil Goyal [Mon, 30 Sep 2019 19:27:46 +0000 (00:57 +0530)]
test/crypto: support wireless algos for dpaa2-sec

SNOW and ZUC plain crypto operations for cipher only
and auth only are now supported in dpaa2_sec.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
5 years agotest/crypto: add PDCP cases for scatter gather
Akhil Goyal [Mon, 30 Sep 2019 19:27:45 +0000 (00:57 +0530)]
test/crypto: add PDCP cases for scatter gather

Test cases for PDCP with scattered input and output
buffers are added for both inplace and out of place scenarios.
1. input SG - output non SG
2. input and output both SG and inplace buffers
3. input and output both SG with different segment sizes
4. input SG and output non-SG

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
5 years agotest/crypto: add PDCP U-Plane decap cases
Akhil Goyal [Mon, 30 Sep 2019 19:27:44 +0000 (00:57 +0530)]
test/crypto: add PDCP U-Plane decap cases

This patch add test cases for user plane PDCP
5/7/12/15/18 bit SN test cases for decapsulation of
cipher only and 12/18 bit for cipher + integrity
for all algo combinations.

Test vectors are reused from the encap cases
by swapping the input and output data.

The case are added to DPAA_SEC and DPAA2_SEC
testsuite.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
5 years agotest/crypto: add PDCP U-Plane encap with integrity cases
Akhil Goyal [Mon, 30 Sep 2019 19:27:43 +0000 (00:57 +0530)]
test/crypto: add PDCP U-Plane encap with integrity cases

PDCP User/Data plane can optionally support integrity
along with confidentiality.
This patch add test cases and test vectors for all
supported algos combos for cipher+integrity for 12
and 18bit SN.

The test cases are added in DPAA_SEC and DPAA2_SEC
test suite as a reference.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
5 years agotest/crypto: add PDCP U-Plane encap cases
Akhil Goyal [Mon, 30 Sep 2019 19:27:42 +0000 (00:57 +0530)]
test/crypto: add PDCP U-Plane encap cases

PDCP User/Data plane can support 5/7/12/15/18 bit
sequence number. This patch add test cases and test
vectors for all supported algos for cipher only.
(NULL, AES, SNOW, ZUC ciphers)

The test cases are added in DPAA_SEC and DPAA2_SEC
test suite as a reference.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
5 years agotest/crypto: add PDCP C-Plane decap cases
Akhil Goyal [Mon, 30 Sep 2019 19:27:41 +0000 (00:57 +0530)]
test/crypto: add PDCP C-Plane decap cases

This patch add test cases for control plane PDCP
5 and 12 bit SN test cases for decapsulation of
cipher+integrity for all algo combinations

Test vectors are reused from the encap cases
by swapping the input and output data.

The case are added to DPAA_SEC and DPAA2_SEC testsuite.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
5 years agotest/crypto: add PDCP C-Plane encap cases
Akhil Goyal [Mon, 30 Sep 2019 19:27:40 +0000 (00:57 +0530)]
test/crypto: add PDCP C-Plane encap cases

PDCP control plane can support 5 bit and 12 bit
sequence number. This patch add test cases and test
vectors for all supported algo combinations of cipher+integrity
(NULL+NULL, NULL+AES, NULL+SNOW, NULL+ZUC,
 AES+NULL,  AES+SNOW, AES+AES,   AES+ZUC,
 SNOW+NULL, SNOW+AES, SNOW+SNOW, SNOW+ZUC,
 ZUC+NULL,  ZUC+AES,  ZUC+SNOW,  ZUC+ZUC).

The test cases are added in DPAA_SEC and DPAA2_SEC
test suite as a reference.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
5 years agoexamples/fips_validation: fix null dereferences
Chaitanya Babu Talluri [Wed, 25 Sep 2019 06:31:34 +0000 (07:31 +0100)]
examples/fips_validation: fix null dereferences

One issue caught by Coverity 343408
*deref_parm: Directly dereferencing parameter val->val.

In writeback_tdes_hex_str(), tmp_val is initialised to null.
tmp_val.val is updated only if keys are found.
If keys are not found,it doesn't fails but continues
to invoke writeback_hex_str(),where val->val is accessed
without null check.

The fix is to return the error,
if keys are not found in writeback_tdes_hex_str().

Coverity issue: 343408
Fixes: 527cbf3d5e ("examples/fips_validation: support TDES parsing")
Cc: stable@dpdk.org
Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa2_sec: improve debug logging
Hemant Agrawal [Mon, 30 Sep 2019 14:41:04 +0000 (20:11 +0530)]
crypto/dpaa2_sec: improve debug logging

unnecessary debug logs in data path are removed
and hardware debug logs are compiled off.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa_sec: change per device pool to per qp
Akhil Goyal [Mon, 30 Sep 2019 14:41:03 +0000 (20:11 +0530)]
crypto/dpaa_sec: change per device pool to per qp

In cases where single cryptodev is used by multiple cores
using multiple queues, there will be contention for mempool
resources and may eventually get exhausted.
Basically, mempool should be defined per core.
Now since qp is used per core, mempools are defined in qp setup.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa_sec: allocate context dynamically for SG
Hemant Agrawal [Mon, 30 Sep 2019 14:41:02 +0000 (20:11 +0530)]
crypto/dpaa_sec: allocate context dynamically for SG

This patch allocate/clean the SEC context dynamically
based on the number of SG entries in the buffer.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa2_sec: allocate context as per num segs
Hemant Agrawal [Mon, 30 Sep 2019 14:41:01 +0000 (20:11 +0530)]
crypto/dpaa2_sec: allocate context as per num segs

DPAA2_SEC hardware can support any number of SG entries.
This patch allocate as many SG entries as are required.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa2_sec: support ZUC ciphering/integrity
Hemant Agrawal [Mon, 30 Sep 2019 14:41:00 +0000 (20:11 +0530)]
crypto/dpaa2_sec: support ZUC ciphering/integrity

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa2_sec/hw: support ZUCE and ZUCA
Vakul Garg [Mon, 30 Sep 2019 14:40:59 +0000 (20:10 +0530)]
crypto/dpaa2_sec/hw: support ZUCE and ZUCA

This patch add support for ZUC Encryption and ZUC Authentication.
Before passing to CAAM, the 16-byte ZUCA IV is converted to 8-byte
format which consists of 38-bits of count||bearer|direction.

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa2_sec/hw: support KASUMI
Vakul Garg [Mon, 30 Sep 2019 14:40:58 +0000 (20:10 +0530)]
crypto/dpaa2_sec/hw: support KASUMI

Add Kasumi processing for non PDCP proto offload cases.
Also add support for pre-computed IV in Kasumi-f9

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa2_sec: support SNOW3G cipher/integrity
Hemant Agrawal [Mon, 30 Sep 2019 14:40:57 +0000 (20:10 +0530)]
crypto/dpaa2_sec: support SNOW3G cipher/integrity

Adding basic framework to use snow3g f8 and f9 based
ciphering or integrity with direct crypto apis.
This patch does not support any combo usages yet.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa2_sec/hw: support SNOW-f9
Vakul Garg [Mon, 30 Sep 2019 14:40:56 +0000 (20:10 +0530)]
crypto/dpaa2_sec/hw: support SNOW-f9

Add support for snow-f9 in non pdcp protocol offload mode.
This essentially add support to pass pre-computed IV to SEC.

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa2_sec/hw: support SNOW-f8
Vakul Garg [Mon, 30 Sep 2019 14:40:55 +0000 (20:10 +0530)]
crypto/dpaa2_sec/hw: support SNOW-f8

This patch add support for non-protocol offload mode
of snow-f8 algo

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa2_sec/hw: support SNOW-SNOW 18-bit PDCP
Vakul Garg [Mon, 30 Sep 2019 14:40:54 +0000 (20:10 +0530)]
crypto/dpaa2_sec/hw: support SNOW-SNOW 18-bit PDCP

This patch support SNOW-SNOW (enc-auth) 18bit PDCP case
for devices which do not support PROTOCOL command

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa2_sec/hw: support ZUC-ZUC 18-bit PDCP
Vakul Garg [Mon, 30 Sep 2019 14:40:53 +0000 (20:10 +0530)]
crypto/dpaa2_sec/hw: support ZUC-ZUC 18-bit PDCP

This patch support ZUC-ZUC PDCP enc-auth case for
devices which do not support PROTOCOL command for 18bit.

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa2_sec/hw: support AES-AES 18-bit PDCP
Vakul Garg [Mon, 30 Sep 2019 14:40:52 +0000 (20:10 +0530)]
crypto/dpaa2_sec/hw: support AES-AES 18-bit PDCP

This patch support AES-AES PDCP enc-auth case for
devices which do not support PROTOCOL command for 18bit

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa2_sec/hw: support 18-bit PDCP enc-auth
Vakul Garg [Mon, 30 Sep 2019 14:40:51 +0000 (20:10 +0530)]
crypto/dpaa2_sec/hw: support 18-bit PDCP enc-auth

This patch support following algo combinations(ENC-AUTH).
- AES-SNOW
- SNOW-AES
- AES-ZUC
- ZUC-AES
- SNOW-ZUC
- ZUC-SNOW

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa2_sec: disable write-safe for PDCP
Vakul Garg [Mon, 30 Sep 2019 14:40:50 +0000 (20:10 +0530)]
crypto/dpaa2_sec: disable write-safe for PDCP

PDCP descriptors in some cases internally use commands which overwrite
memory with extra '0s' if write-safe is kept enabled. This breaks
correct functional behavior of PDCP apis and they in many cases give
incorrect crypto output. There we disable 'write-safe' bit in FLC for
PDCP cases. If there is a performance drop, then write-safe would be
enabled selectively through a separate patch.

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa2_sec: support scatter gather for proto offloads
Hemant Agrawal [Mon, 30 Sep 2019 14:40:49 +0000 (20:10 +0530)]
crypto/dpaa2_sec: support scatter gather for proto offloads

This patch add support for chained input or output
mbufs for PDCP and ipsec protocol offload cases.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa_sec: support scatter gather for PDCP
Akhil Goyal [Mon, 30 Sep 2019 14:40:48 +0000 (20:10 +0530)]
crypto/dpaa_sec: support scatter gather for PDCP

This patch add support for chained input or output
mbufs for PDCP operations.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa2_sec/hw: update 12-bit SN desc for NULL auth
Akhil Goyal [Mon, 30 Sep 2019 14:40:47 +0000 (20:10 +0530)]
crypto/dpaa2_sec/hw: update 12-bit SN desc for NULL auth

For sec era 8, NULL auth using protocol command does not add
4 bytes of null MAC-I and treat NULL integrity as no integrity which
is not correct.
Hence converting this particular case of null integrity on 12b SN
on SEC ERA 8 from protocol offload to non-protocol offload case.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
5 years agocrypto/dpaa2_sec: support CAAM HW era 10
Hemant Agrawal [Mon, 30 Sep 2019 14:40:46 +0000 (20:10 +0530)]
crypto/dpaa2_sec: support CAAM HW era 10

Adding minimal support for CAAM HW era 10  (used in LX2)
Primary changes are:
1. increased shard desc length form 6 bit to 7 bits
2. support for several PDCP operations as PROTOCOL offload.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa2_sec: update desc for PDCP 18-bit enc-auth
Akhil Goyal [Mon, 30 Sep 2019 14:40:45 +0000 (20:10 +0530)]
crypto/dpaa2_sec: update desc for PDCP 18-bit enc-auth

Support following cases
int-only (NULL-NULL, NULL-SNOW, NULL-AES, NULL-ZUC)
enc-only (SNOW-NULL, AES-NULL, ZUC-NULL)

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaax_sec: support HFN override
Akhil Goyal [Mon, 30 Sep 2019 14:40:44 +0000 (20:10 +0530)]
crypto/dpaax_sec: support HFN override

Per packet HFN override is supported in NXP PMDs
(dpaa2_sec and dpaa_sec). DPOVRD register can be
updated with the per packet value if it is enabled
in session configuration. The value is read from
the IV offset.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agosecurity: add HFN override option in PDCP
Akhil Goyal [Mon, 30 Sep 2019 14:40:43 +0000 (20:10 +0530)]
security: add HFN override option in PDCP

HFN can be given as a per packet value also.
As we do not have IV in case of PDCP, and HFN is
used to generate IV. IV field can be used to get the
per packet HFN while enq/deq
If hfn_ovrd field in pdcp_xform is set,
application is expected to set the per packet HFN
in place of IV. Driver will extract the HFN and perform
operations accordingly.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
5 years agocrypto/dpaax_sec: support PDCP U-Plane with integrity
Vakul Garg [Mon, 30 Sep 2019 14:40:42 +0000 (20:10 +0530)]
crypto/dpaax_sec: support PDCP U-Plane with integrity

PDCP u-plane may optionally support integrity as well.
This patch add support for supporting integrity along with
confidentiality.

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaax_sec: support PDCP 12-bit C-Plane
Vakul Garg [Mon, 30 Sep 2019 14:40:41 +0000 (20:10 +0530)]
crypto/dpaax_sec: support PDCP 12-bit C-Plane

Added support for 12-bit c-plane. We implement it using 'u-plane for RN'
protocol descriptors. This is because 'c-plane' protocol descriptors
assume 5-bit sequence numbers. Since the crypto processing remains same
irrespective of c-plane or u-plane, we choose 'u-plane for RN' protocol
descriptors to implement 12-bit c-plane. 'U-plane for RN' protocol
descriptors support both confidentiality and integrity (required for
c-plane) for 7/12/15 bit sequence numbers.

For little endian platforms, incorrect IV is generated if MOVE command
is used in pdcp non-proto descriptors. This is because MOVE command
treats data as word. We changed MOVE to MOVEB since we require data to
be treated as byte array. The change works on both ls1046, ls2088.

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agoapp/compress-perf: add --external-mbufs option
Adam Dybkowski [Tue, 24 Sep 2019 14:10:33 +0000 (16:10 +0200)]
app/compress-perf: add --external-mbufs option

This patch adds new performance measurement option --external-mbufs
that allocates and uses memzones as external buffers instead of
putting the data directly inside mbufs.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
5 years agotest/compress: add external buffer case
Adam Dybkowski [Tue, 24 Sep 2019 14:10:32 +0000 (16:10 +0200)]
test/compress: add external buffer case

Adds a new test to verify external buffer in mbuf APIs.
Initialize fields in test_data_params structures by name
for better readability.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
5 years agotest/compress: add stateful decompression
Adam Dybkowski [Fri, 20 Sep 2019 20:06:28 +0000 (22:06 +0200)]
test/compress: add stateful decompression

This patch adds two new tests that cover the stateful
decompression feature.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
5 years agocompress/qat: add stateful decompression
Adam Dybkowski [Fri, 20 Sep 2019 20:06:27 +0000 (22:06 +0200)]
compress/qat: add stateful decompression

This patch adds the stateful decompression feature
to the DPDK QAT PMD.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
5 years agocommon/qat: add RAM bank definitions
Adam Dybkowski [Fri, 20 Sep 2019 20:06:26 +0000 (22:06 +0200)]
common/qat: add RAM bank definitions

This patch adds QAT RAM bank definitions and related macros.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
5 years agoexamples/ipsec-secgw: fix over MTU packet crash
Marcin Smoczynski [Tue, 24 Sep 2019 10:55:08 +0000 (12:55 +0200)]
examples/ipsec-secgw: fix over MTU packet crash

When sending an encrypted packet which size after encapsulation exceeds
MTU, ipsec-secgw application tries to fragment it. If --reassemble
option has not been set it results with a segmantation fault, because
fragmentation buckets have not been initialized.

Fix crashing by adding extra check if --ressemble option has not been
set and packet exceeds MTU after encapsulation - drop it.

Fixes: b01d1cd213 ("examples/ipsec-secgw: support fragmentation and reassembly")
Cc: stable@dpdk.org
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agodoc: fix AESNI-GCM limitations in crypto guide
Fan Zhang [Tue, 17 Sep 2019 12:06:46 +0000 (13:06 +0100)]
doc: fix AESNI-GCM limitations in crypto guide

This patch fixes the aesni-gcm cryptodev documentation by
filling the lacked unsupported chained mbuf description.

Fixes: 6f16aab09a91 ("crypto/aesni_gcm: migrate to Multi-buffer library")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
5 years agoapp/compress-perf: fix out-of-bounds read
Lavanya Govindarajan [Thu, 26 Sep 2019 13:30:05 +0000 (14:30 +0100)]
app/compress-perf: fix out-of-bounds read

One issue caught by Coverity 344984
*overrun-local: Overrunning array cperf_test_type_strs of 2 8-byte elements

The array cperf_test_type_strs defined in app/test-compress-perf conflicts
with the same name being defined in app/test-crypto-perf. Due to which
coverity reports error.

The fix is to rename "cperf_test_type_strs" into "comp_perf_test_type_strs"
in app/test-compress-perf to avoid name confusion.

Coverity issue: 344984
Fixes: 424dd6c8c1 ("app/compress-perf: add weak functions for multicore test")
Fixes: 1a9b0f3504 ("app/compress-perf: add --ptest option")
Fixes: 424dd6c8c1 ("app/compress-perf: add weak functions for multicore test")
Cc: stable@dpdk.org
Signed-off-by: Lavanya Govindarajan <lavanyax.govindarajan@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agoexamples/ipsec-secgw: support IPv6 tunnel for lookaside proto
Akhil Goyal [Thu, 5 Sep 2019 12:48:07 +0000 (18:18 +0530)]
examples/ipsec-secgw: support IPv6 tunnel for lookaside proto

IPv6 tunnels are already supported in case of inline and
lookaside none cases. In case of protocol offload, the details
for IPv6 header need to be added in session configuration
for security session create.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
5 years agocrypto/dpaa2_sec: support IPv6 tunnel for protocol offload
Akhil Goyal [Thu, 5 Sep 2019 12:48:06 +0000 (18:18 +0530)]
crypto/dpaa2_sec: support IPv6 tunnel for protocol offload

outer IP header is formed at the time of session initialization
using the ipsec xform. This outer IP header will be appended by
hardware for each packet.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa_sec: support IPv6 tunnel for protocol offload
Akhil Goyal [Thu, 5 Sep 2019 12:48:05 +0000 (18:18 +0530)]
crypto/dpaa_sec: support IPv6 tunnel for protocol offload

outer IP header is formed at the time of session initialization
using the ipsec xform. This outer IP header will be appended by
hardware for each packet.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/octeontx: enable unbinding
Thierry Herbelot [Fri, 13 Sep 2019 06:40:03 +0000 (08:40 +0200)]
crypto/octeontx: enable unbinding

Like for Ethernet ports, the OCTEON TX crypto engines must
first be unbound from their kernel module, then rebound to
vfio-pci, before being used in DPDK.

As this capability is detected at runtime by dpdk-pmdinfo,
add the info in the PMD registering directives.

Then an external script can be used for bind and unbind.

Fixes: bfe2ae495ee2 ("crypto/octeontx: add PMD skeleton")
Cc: stable@dpdk.org
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
5 years agocrypto/dpaa_sec: fix IOVA table
Thierry Herbelot [Thu, 12 Sep 2019 08:38:21 +0000 (10:38 +0200)]
crypto/dpaa_sec: fix IOVA table

dpaa_sec needs translations between physical and virtual addresses.
V to P translation is relatively fast, as memory is managed in
contiguous segments.

The result of each V to P translation is used to update the DPAA iova
table, which should be updated by a Mem event callback, but is not.
Then the DPAA iova table has entries for all needed memory ranges.

With this patch, dpaa_mem_ptov will always use dpaax_iova_table_get_va,
which ensures optimal performance.

Fixes: 5a7dbb934d75 ("dpaa: enable dpaax library")
Cc: stable@dpdk.org
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agocrypto/qat: fix digest length in XCBC capability
Fiona Trahe [Tue, 10 Sep 2019 16:32:10 +0000 (17:32 +0100)]
crypto/qat: fix digest length in XCBC capability

Digest length in RTE_CRYPTO_AUTH_AES_XCBC_MAC capability
was incorrectly marked 16 bytes, should be 12.

Fixes: 6a3c87bc6a6c ("crypto/qat: refactor capabilities infrastructure")
Cc: stable@dpdk.org
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
5 years agocrypto/aesni_mb: update chain order for AES-CCM
Pablo de Lara [Thu, 5 Sep 2019 14:45:06 +0000 (15:45 +0100)]
crypto/aesni_mb: update chain order for AES-CCM

Up to version 0.52 of the IPSec Multi buffer library,
the chain order for AES-CCM was CIPHER_HASH when encrypting.
However, after this version, the order has been reversed in the library
since, when encrypting, hashing is done first and then ciphering.

Therefore, order is changed to be compatible with newer versions
of the library.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
5 years agotest/crypto: fix armv8 virtual PMD autotest
Ruifeng Wang [Thu, 5 Sep 2019 08:10:44 +0000 (16:10 +0800)]
test/crypto: fix armv8 virtual PMD autotest

armv8 cryptodev virtual PMD autotest failed with output:
CRYPTODEV: [CRYPTODEV_NAME_ARMV8_CRYPTO_PMD]
armv8_crypto_pmd_qp_create_processed_ops_ring() line 210:
Unable to reuse existing ring armv8_crypto_pmd_0_qp_0 for processed ops
CRYPTODEV: rte_cryptodev_stop() line 942:
Device with dev_id=0 already stopped
+ TestCase [ 0] : test_AES_chain_armv8_all failed

This is due to the ring size used in ut_setup is bigger than that used
in testsuite_setup.
Fix this issue by enlarge ring size used in testsuite_setup accordingly.

Fixes: 24054e3640a2 ("test/crypto: use separate session mempools")
Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
5 years agosecurity: fix doxygen fields
Radu Nicolau [Wed, 4 Sep 2019 11:03:11 +0000 (12:03 +0100)]
security: fix doxygen fields

Replace /**< with /** for multiline doxygen comments.

Fixes: c261d1431bd8 ("security: introduce security API and framework")
Cc: stable@dpdk.org
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
5 years agosecurity: add IPsec statistics
Radu Nicolau [Tue, 3 Sep 2019 13:06:03 +0000 (14:06 +0100)]
security: add IPsec statistics

Update IPsec statistics struct definition, add per SA
statistics collection enable flag.

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
5 years agodrivers/crypto: enable ESN in NXP drivers
Akhil Goyal [Mon, 2 Sep 2019 12:27:00 +0000 (17:57 +0530)]
drivers/crypto: enable ESN in NXP drivers

If the application enables the use of ESN in the
ipsec_xform for security session create, pdb options
are set for enabling ESN.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaa_sec: detach queues in session destroy
Akhil Goyal [Mon, 2 Sep 2019 12:26:03 +0000 (17:56 +0530)]
crypto/dpaa_sec: detach queues in session destroy

crypto queues need to be detached while session destroy
so that they can be reused.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/caam_jr: integrate DPAAX table
Gagandeep Singh [Mon, 2 Sep 2019 12:27:47 +0000 (17:57 +0530)]
crypto/caam_jr: integrate DPAAX table

Virtual to physical conversions are optimized using the
DPAAX tables. This patch integrates DPAAX with caam_jr PMD.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/caam_jr: reduce function traces in critical path
Hemant Agrawal [Mon, 2 Sep 2019 12:27:46 +0000 (17:57 +0530)]
crypto/caam_jr: reduce function traces in critical path

Reducing the functional traces from data path and critical session path

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agoexamples/ipsec-secgw: add offload error handling
Michael Shamis [Sun, 25 Aug 2019 11:04:48 +0000 (14:04 +0300)]
examples/ipsec-secgw: add offload error handling

Added error handler for offload mode.

Signed-off-by: Michael Shamis <michaelsh@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agoexamples/ipsec-secgw: fix access to freed packet
Anoob Joseph [Thu, 22 Aug 2019 08:28:55 +0000 (13:58 +0530)]
examples/ipsec-secgw: fix access to freed packet

For unknown/unsupported packets, the packet would get checked for inline
offloads after the packet is freed.

Fixes: 0ccfd14bc10d ("examples/ipsec-secgw: support inline protocol")
Cc: stable@dpdk.org
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agotest/compress: rework error checks
Adam Dybkowski [Mon, 19 Aug 2019 20:31:47 +0000 (22:31 +0200)]
test/compress: rework error checks

This patch fixes the return value of the test_deflate_comp_decomp
function on capabilities retrieval error to be -ENOTSUP.

It also fixes passing of the test_deflate_comp_decomp function's
return value to the upper level (as the test suite function return
value).

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Artur Trybula <arturx.trybula@intel.com>
5 years agoexamples/ipsec-secgw: fix unchecked return value
Bernard Iremonger [Wed, 7 Aug 2019 12:30:12 +0000 (13:30 +0100)]
examples/ipsec-secgw: fix unchecked return value

Check the return value of the rte_eth_dev_rss_hash_conf_get function.

Coverity issue: 344970
Fixes: 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with inline crypto")
Cc: stable@dpdk.org
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agoapp/compress-perf: fix floating point exception
Adam Dybkowski [Tue, 6 Aug 2019 10:37:38 +0000 (12:37 +0200)]
app/compress-perf: fix floating point exception

This patch fixes the floating point exception that happened
when the number of cores to be used during the benchmark
was zero. After the fix such situation is detected, the error
message is printed and the benchmark application exits.

Fixes: 424dd6c8c1a8 ("app/compress-perf: add weak functions for multicore test")
Cc: stable@dpdk.org
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Artur Trybula <arturx.trybula@intel.com>
5 years agoapp/compress-perf: fix memory deallocation
Adam Dybkowski [Tue, 6 Aug 2019 09:40:53 +0000 (11:40 +0200)]
app/compress-perf: fix memory deallocation

This patch fixes the memory deallocation issue which happened
after unsuccessful allocation (e.g. due to the out of memory)
and produced the segmentation fault.

Fixes: 424dd6c8c1 ("app/compress-perf: add weak functions for multicore test")
Cc: stable@dpdk.org
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Artur Trybula <arturx.trybula@intel.com>
5 years agocompress/isal: shorten queue pair name
Adam Dybkowski [Tue, 6 Aug 2019 09:09:54 +0000 (11:09 +0200)]
compress/isal: shorten queue pair name

This patch shortens the queue pair name created when initializing
the queue pair of the ISAL PIM, based on the device and qp ids.

Suggested-by: Paul Luse <paul.e.luse@intel.com>
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
5 years agobus/pci: fix Intel IOMMU sysfs access check
Stephen Hemminger [Tue, 13 Aug 2019 15:38:22 +0000 (08:38 -0700)]
bus/pci: fix Intel IOMMU sysfs access check

Just open the sysfs file and handle failure, rather than using access().
This eliminates Coverity warnings about TOCTOU
"time of check versus time of use"; although for this sysfs file that is
not really an issue anyway.

Coverity issue: 347276
Fixes: 54a328f552ff ("bus/pci: forbid IOVA mode if IOMMU address width too small")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: David Marchand <david.marchand@redhat.com>
5 years agobuildtools: make experimental symbol check lighter
David Marchand [Mon, 12 Aug 2019 07:02:28 +0000 (09:02 +0200)]
buildtools: make experimental symbol check lighter

Dumping every object file for every symbol is too heavy.
Use a temporary storage.

Before:
$ rm -rf master && make defconfig O=master
$ time make EXTRA_CFLAGS=-g O=master
[...]
real 2m24.063s
user 1m16.985s
sys 1m46.372s

After:
$ rm -rf master && make defconfig O=master
$ time make EXTRA_CFLAGS=-g O=master
[...]
real 1m37.110s
user 0m49.417s
sys 0m51.803s

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
5 years agoremove useless include of EAL memory config header
David Marchand [Mon, 12 Aug 2019 06:53:33 +0000 (08:53 +0200)]
remove useless include of EAL memory config header

Restrict this header inclusion to its real users.

Fixes: 028669bc9f0d ("eal: hide shared memory config")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agomaintainers: add David for main branch
Ferruh Yigit [Thu, 26 Sep 2019 10:12:55 +0000 (11:12 +0100)]
maintainers: add David for main branch

David will be co-maintaining the top level tree with Thomas,
Welcome and best luck J

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
5 years agodevtools: fix test of ninja install
Thomas Monjalon [Sat, 14 Sep 2019 08:56:32 +0000 (10:56 +0200)]
devtools: fix test of ninja install

When trying to compile some examples with libdpdk.pc,
the right environment (for default target) was not loaded.
The consequence is to not detect some dependencies because
of missing directories in PKG_CONFIG_PATH.

The environment preparation is moved to a dedicate function,
and called for the default target (cc),
before testing the install output of the default build.

Fixes: 272236741258 ("devtools: load target-specific compilation environment")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
5 years agodevtools: test nfb and AF_XDP build with make
Thomas Monjalon [Fri, 13 Sep 2019 21:03:30 +0000 (23:03 +0200)]
devtools: test nfb and AF_XDP build with make

The nfb PMD is disabled by default because of its dependency
on netcope-common package.
The variable DPDK_DEP_NFB was introduced but not used to notify
the dependency availability in the build test script.

The AF_XDP PMD is disabled by default because of its dependency
on libbpf on Linux.
An option was missing to notify the dependency availability
in the build test script.

Fixes: 6435f9a0ac22 ("net/nfb: add new netcope driver")
Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
5 years agotest/interrupt: account for race with callback
Aaron Conole [Thu, 8 Aug 2019 17:38:35 +0000 (13:38 -0400)]
test/interrupt: account for race with callback

Because the eal interrupt framework can race when invoking the callback
and a separate unregister call, the test needs to accommodate the chance
that the two collide.  Do this by checking the return value of unregister
against the race-condition flag (EAGAIN).

Fixes: f1a6c22424ce ("app/test: update interrupts test")
Cc: stable@dpdk.org
Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
5 years agoci: exit setup on any error
David Marchand [Thu, 8 Aug 2019 12:22:17 +0000 (14:22 +0200)]
ci: exit setup on any error

-e is preferrable so that we can catch errors in the middle of this
script.
An example is this Travis job [1] that should have errored at the meson
install step rather than go to the build step.

Adding debug mode as it can help post-mortem.

1: https://travis-ci.com/DPDK/dpdk/jobs/223511683

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Michael Santana <msantana@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
5 years agoci: add missing dependencies for documentation
David Marchand [Tue, 13 Aug 2019 13:22:16 +0000 (15:22 +0200)]
ci: add missing dependencies for documentation

Install missing dependencies so that doc can be generated.
While at it, explicitly configure that we want the doc to be generated.
Missing dependencies are then reported as an error rather than silently
ignored.

Because of these extra dependencies, only build them in dedicated travis
jobs.

Fixes: ad2b2cfb1ea3 ("ci: enable unit tests with Travis")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
5 years agodevtools: fix check of ccache for meson build
Thomas Monjalon [Fri, 13 Sep 2019 07:26:27 +0000 (09:26 +0200)]
devtools: fix check of ccache for meson build

The meson build test fails if ccache is not available.
The use of ccache must be optional.
And if used, the compiler to check is the last word of $CC.

Fixes: e0ae780e6569 ("devtools: test compiler availability only once")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>