summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2017-08-03test/crypto: fix error messagePablo de Lara
Fixes: 7a364faef185 ("cryptodev: remove crypto device type enumeration") Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: John McNamara <john.mcnamara@intel.com>
2017-07-31test/bonding: fix device nameTomasz Kulasek
Bonding devices name must start with "net_bonding" prefix. Fixes: 9bf4901d1a11 ("bus/vdev: remove probe with driver name option") Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-07-31test/bonding: fix namespace of the RSS testsDaniel Mrzyglod
Drivers are looking by name of the device so change namespace to proper one. Fixes: 43b630244e7e ("app/test: add dynamic bonding RSS configuration") Cc: stable@dpdk.org Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-07-31test/bonding: fix parameters of a balance TxHerbert Guan
When test case "test_balance_l23_tx_burst_ipv4_toggle_ip_addr" is calling balance_l23_tx_burst(), the ip_addr instead of mac_addr should be toggled according to the test name. Fixes: 92073ef961ee ("bond: unit tests") Cc: stable@dpdk.org Signed-off-by: Herbert Guan <herbert.guan@arm.com> Acked-by: Jianbo Liu <jianbo.liu@linaro.org> Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-07-31test/bonding: fix memory corruptionsHerbert Guan
There were double-free problems in some test cases, which will cause a duplicated mbuf will be added into mempool. After double-free, some new allocated mbuf will hold a same address and thus cause the memory corruption. Another minor issue is that in some test cases, allocated mbuf will not be released after test case exits. Hopefully these leaked mbuf will be released by the next test case in its setup phase when stopping the virtual pmd ports, while this do is a memory leak of the exited test case. To fix above 2 issues, this patch will do: 1) Release virtual pmd ports' tx queue in the clean up function remove_slaves_and_stop_bonded_device() of each test cases. 2) Do not release allocated mbufs for test bursts. These mbufs will be released in remove_slaves_and_stop_bonded_device() when test case exits. Fixes: 92073ef961ee ("bond: unit tests") Signed-off-by: Herbert Guan <herbert.guan@arm.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-07-31test: fix virtual device name not setTomasz Kulasek
Device name in device structure in virtual device used in link_bonding_autotest is not set what causes segmentation fault when rte_eth_dev_allocated is called. Fixes: a1e7c17555e8 ("ethdev: use device name from device structure") Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-07-27cryptodev: fix session init return valuePablo de Lara
When calling rte_cryptodev_sym_session_init(), if there was an error, it returned -1, instead of returning the specific error code, which can be valuable for the application for error handling. Fixes: b3bbd9e5f265 ("cryptodev: support device independent sessions") Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-19cryptodev: rename ADD fieldPablo de Lara
Additional Authenticated Data (AAD) is called "aad" in most places of cryptodev, but it was called "add_auth_data" in the AEAD transform transform (aead_xform). This field is renamed to "aad_length" in order to keep consistency. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-19cryptodev: fix KASUMI F9 expected parametersPablo de Lara
For KASUMI F9 algorithm, COUNT, FRESH and DIRECTION input values need to be contiguous with the message, as described in the KASUMI and QAT PMD documentation. Before, the COUNT and FRESH values were set as part of the AAD (now IV), but always set before the beginning of the message. Since now the IV is set after the crypto operation, it is not possible to have these values in the expected location. Therefore, as these are required to be contiguous, cryptodev API will expect these them to be passed as a single buffer, already constructed, so authentication IV parameters not needed anymore. Fixes: 681f540da52b ("cryptodev: do not use AAD in wireless algorithms") Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-19doc: remove incorrect limitation on QAT PMDPablo de Lara
QAT supports authentication only operations, for any authentication algorithm (such as SHA1-HMAC), as long as it is supported by QAT, so it means that it is not necessary to create a chained operation in order to use these algorithms. Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices") CC: stable@dpdk.org Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-07-19test/crypto-perf: fix ARMv8 session creationSrisivasubramanian S
Session was NULL as test_crypto_session not initialised. Fixes: b3bbd9e5f265 ("cryptodev: support device independent sessions") Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
2017-07-19test/bonding: add test case for agg selection in mode4Daniel Mrzyglod
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-07-20devargs: restore device type APIGaetan Rivet
Revert "devargs: make device types generic" This commit broke the rte_devargs API by changing the meaning of the rte_devtype enum. Restore the previous API, unit tests and function calls. Introduce parallel enum that acts as translation between previous API and current structures. Restoring the previous API means that -w and -b are not usable anymore with any bus having implemented the "parse" operation. Only PCI devices can be used with -w and -b, virtual devices are declared using vdev. This (partially) reverts commit bd279a79366f50a4893fb84db91bbf64b56f9fb1. Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-07-16service: add unit testsHarry van Haaren
Add a bunch of unit tests, to ensure that the service core functions are operating as expected. As part of these tests a dummy service is registered which allows identifying if a service callback has been invoked by using the CPU tick counter. This allows identifying if functions to start and stop service lcores are actually having effect. Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-07-16test: remove duplicate includesStephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2017-07-14test/alarm: add delay toleranceQiming Yang
Because accuracy of timing to the microsecond is not guaranteed in rte_eal_alarm_set, this function will not be called before the requested time, but may be called a period of time afterwards which can not be calculated. In order to ensure test alarm running success, this patch added the delay time before check the flag. Signed-off-by: Qiming Yang <qiming.yang@intel.com> Acked-by: Jing Chen <jing.d.chen@intel.com>
2017-07-10test: add unit test for integer log2 functionJerin Jacob
add a unit testcase for rte_log2_u32. Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
2017-07-10bus/vdev: remove probe with driver name optionFerruh Yigit
Virtual device/driver probing done via name. A new alternative method introduced to probe the device with providing driver name in devargs as "driver=<driver_name>". This patch removes alternative method and fixes virtual device usages with proper device names. Fixes: 87c3bf29c642 ("test: do not short-circuit null device creation") Fixes: d39670086a63 ("eal: parse driver argument before probing drivers") Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-07-09devargs: make device types genericGaetan Rivet
rte_devargs now represents any device from any bus. The related devtypes do not identify a bus anymore, only which scan policy the device subscribes to. The bus itself is identified by a bus handle previously introduced. Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-07-09devargs: make device representation genericGaetan Rivet
Remove the dependency of this subsystem upon bus specific device representation. Devargs only validates that a device declaration is correct and handled by a bus. The device interpretation is done afterward within the bus. Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-07-09test: include PCI header directlyGaetan Rivet
In devargs rework, rte_pci.h won't be included via rte_devargs.h anymore. Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-07-08update Cavium Inc copyright headersJerin Jacob
Replace the incorrect reference to "Cavium Networks", "Cavium Ltd" company name with correct the "Cavium, Inc" company name in copyright headers. Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-07-07test/eventdev: add auto-tests for event ring functionsBruce Richardson
Add some basic tests for the event ring functions. Not everything needs testing as there is so much code re-use from the rte_ring code. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-07-07test/ring: add unit tests for exact size ringsBruce Richardson
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-07-06cryptodev: add mempool pointer in queue pair setupPablo de Lara
The session mempool pointer is needed in each queue pair, if session-less operations are being handled. Therefore, the API is changed to accept this parameter, as the session mempool is created outside the device configuration function, similar to what ethdev does with the rx queues. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2017-07-06cryptodev: support device independent sessionsSlawomir Mrozowicz
Change crypto device's session management to make it device independent and simplify architecture when session is intended to be used on more than one device. Sessions private data is agnostic to underlying device by adding an indirection in the sessions private data using the crypto driver identifier. A single session can contain indirections to multiple device types. New function rte_cryptodev_sym_session_init has been created, to initialize the driver private session data per driver to be used on a same session, and rte_cryptodev_sym_session_clear to clear this data before calling rte_cryptodev_sym_session_free. Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2017-07-06cryptodev: do not create session mempool internallySlawomir Mrozowicz
Instead of creating the session mempool while configuring the crypto device, apps will create the mempool themselves. This way, it gives flexibility to the user to have a single mempool for all devices (as long as the objects are big enough to contain the biggest private session size) or separate mempools for different drivers. Also, since the mempool is now created outside the device configuration function, now it needs to be passed through this function, which will be eventually passed when setting up the queue pairs, as ethernet devices do. Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2017-07-06cryptodev: remove crypto device driver nameSlawomir Mrozowicz
Remove crypto device driver name string definitions from librte_cryptodev, which avoid to library changes every time a new crypto driver was added. The driver name is predefined internaly in the each PMD. The applications could use the crypto device driver names based on options with the driver name string provided in command line. Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-07-06cryptodev: remove crypto device type enumerationSlawomir Mrozowicz
Changes device type identification to be based on a unique driver id replacing the current device type enumeration, which needed library changes every time a new crypto driver was added. The driver id is assigned dynamically during driver registration using the new macro RTE_PMD_REGISTER_CRYPTO_DRIVER which returns a unique uint8_t identifier for that driver. New APIs are also introduced to allow retrieval of the driver id using the driver name. Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-07-06test/crypto: extend AES-GCM 192/256 to other PMDsPablo de Lara
QAT, OpenSSL and DPAA2 PMDs support 192-bit and 256-bit key sizes for AES-GCM, apart from 128-bit keys. Therefore, these tests that were only used by AES-NI MB PMD are extended to these other two PMDs. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-07-06test/crypto: add AES-GCM 192Pablo de Lara
Added AES GCM tests for 192-bit keys, now that AES GCM PMD supports it. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-07-06test/crypto: rename some testsPablo de Lara
AES-GCM tests are used for AES-NI MB, OpenSSL, QAT and DPAA2_SEC PMDs, so they are not specific to the first one. Therefore, _mb_ prefix can be removed. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-07-06test/crypto: add 12-byte IV AES-CTR test casesPablo de Lara
AESNI MB PMD supports now 12-byte IVs, so some tests are added to check that, apart from the ones with 16-byte IVs, as this is still compatible. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-07-06crypto/dpaa2_sec: support AES-GCM and CTRAkhil Goyal
AES-GCM support is added as per the AEAD type of crypto operations. Support for AES-CTR is also added. test/crypto and documentation is also updated for dpaa2_sec to add supported algorithms. Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
2017-07-06cryptodev: remove AAD from authentication structurePablo de Lara
Now that AAD is only used in AEAD algorithms, there is no need to keep AAD in the authentication structure. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-06cryptodev: use AES-GCM/CCM as AEAD algorithmsPablo de Lara
Now that all the structures/functions for AEAD algorithms are in place, migrate the two supported algorithms AES-GCM and AES-CCM to these, instead of using cipher and authentication parameters. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-06cryptodev: set AES-GMAC as auth-only algoPablo de Lara
AES-GMAC is an authentication algorithm, based on AES-GCM without encryption. To simplify its usage, now it can be used setting the authentication parameters, without requiring to concatenate a ciphering transform. Therefore, it is not required to set AAD, but authentication data length and offset, giving the user the option to have Scatter-Gather List in the input buffer, as long as the driver supports it. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-06cryptodev: remove digest length from crypto opPablo de Lara
Digest length was duplicated in the authentication transform and the crypto operation structures. Since digest length is not expected to change in a same session, it is removed from the crypto operation. Also, the length has been shrunk to 16 bits, which should be sufficient for any digest. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-06cryptodev: remove AAD length from crypto opPablo de Lara
Additional authenticated data (AAD) information was duplicated in the authentication transform and in the crypto operation structures. Since AAD length is not meant to be changed in a same session, it is removed from the crypto operation structure. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-06cryptodev: do not use AAD in wireless algorithmsPablo de Lara
For wireless algorithms (SNOW3G, KASUMI, ZUC), the IV for the authentication algorithms (F9, UIA2 and EIA3) was taken from the AAD parameter, as there was no IV parameter in the authentication structure. Now that IV is available for all algorithms, there is need to keep doing this, so AAD is not used for these algorithms anymore. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-06cryptodev: move IV parameters to sessionPablo de Lara
Since IV parameters (offset and length) should not change for operations in the same session, these parameters are moved to the crypto transform structure, so they will be stored in the sessions. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-06cryptodev: pass IV as offsetPablo de Lara
Since IV now is copied after the crypto operation, in its private size, IV can be passed only with offset and length. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-06test/crypto-perf: move IV to crypto op private dataPablo de Lara
Usually, IV will change for each crypto operation. Therefore, instead of pointing at the same location, IV is copied after each crypto operation. This will let the IV to be passed as an offset from the beginning of the crypto operation, instead of a pointer. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-06test/crypto: move IV to crypto op private dataPablo de Lara
Usually, IV will change for each crypto operation. Therefore, instead of pointing at the same location, IV is copied after each crypto operation. This will let the IV to be passed as an offset from the beginning of the crypto operation, instead of a pointer. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-06cryptodev: move session type to generic crypto opPablo de Lara
Session type (operation with or without session) is not something specific to symmetric operations. Therefore, the variable is moved to the generic crypto operation structure. Since this is an ABI change, the cryptodev library version gets bumped. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-06test/bonding: fix mode 4 namesDaniel Mrzyglod
ring network driver is limited to 32 characters the name of device was extended to net_ring_unit_test_mode4_slave_0 which is 33 characters long. Fixes: 5e41ab250dfa ("app/test: unit tests for bonding mode 4") Cc: stable@dpdk.org Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-07-04net: implement CRC for ARM64 NEONAshwin Sekhar T K
Added CRC compute APIs for arm64 utilizing the pmull capability. Added new file net_crc_neon.h to hold the arm64 pmull CRC implementation. Added wrappers in rte_vect.h for those neon intrinsics which are not supported in GCC version < 7. Verified the changes with crc_autotest unit test case Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com> Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
2017-07-03eal: switch to architecture specific pause functionJerin Jacob
Remove rte_pause() definition from rte_common.h and switchover to architecture specific rte_pause.h Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-07-01ethdev: add return values to callback process APIBernard Iremonger
Change the rte_eth_dev_callback_process function to return int, and add a void *ret_param parameter. The new parameter is used by ixgbe and i40e instead of abusing the user data of the callback. Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
2017-06-28test/crypto: fix overflowPablo de Lara
In one of the SNOW3G unit tests, insufficient memory was allocated, leading to a buffer overflow. Fixes: 2b52e1e95aab ("app/test: add SNOW 3G UEA2 with offset") Cc: stable@dpdk.org Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>