Commit Graph

176 Commits

Author SHA1 Message Date
Pavan Bhagavatula
c7e4a134e7 test: verify bitmap operations
This patch adds a test for verifying the bitmap operations.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-10-12 22:31:33 +02:00
Tomasz Duszynski
84e0ded38a test/crypto: add mrvl crypto unit tests
Add unit tests for MRVL CRYPTO PMD driver.

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2017-10-12 15:22:39 +01:00
Akhil Goyal
b674d6d038 test/crypto: add dpaa crypto test cases
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
2017-10-12 15:22:39 +01:00
Pablo de Lara
77a217a19b test/crypto: add AES-CCM tests
Added AES-CCM tests for Intel QAT PMD and OpenSSL PMD.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2017-10-12 15:22:39 +01:00
Pablo de Lara
51e202f059 test/crypto: rename GCM test code
Before adding AES-CCM tests, some test code used
for AES-GCM can be renamed, so it can be reused
for AES-CCM, as both need similar parameters.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2017-10-12 15:22:39 +01:00
Pablo de Lara
c1734807fc crypto/openssl: support DES-CBC
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
2017-10-12 15:14:44 +01:00
Pablo de Lara
ade02f0f3e crypto/aesni_mb: support DES
The Multi-buffer library now supports DES-CBC
and DES-DOCSISBPI algorithms, so this commit
extends adds support for them in the PMD.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Radu Nicolau <radu.nicolau@intel.com>
2017-10-12 15:14:06 +01:00
Pablo de Lara
2ac67c3283 test/crypto: remove crypto perf tests
Since the crypto perf application is flexible enough
to cover all the crypto performance tests, these are not needed
anymore, so they will be removed to avoid duplications.
Besides, the crypto perf application gives the user more options
to get performance, for every single supported algorithm,
such as varying the buffer size as the user wants.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2017-10-12 15:13:19 +01:00
Akhil Goyal
1633ead54f test/crypto: fix dpaa2 sec macros and definitions
Fixes: 7a364faef1 ("cryptodev: remove crypto device type enumeration")

Cc: stable@dpdk.org

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
2017-10-12 15:13:19 +01:00
Pablo de Lara
708a976b16 test/crypto: do not allocate extra memory for digest
Now that PMDs do not need extra space in the mbuf
to store temporarily the digest when verifying
an authentication tag, it is not required to allocate
more memory in the mbufs passed to cryptodev.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2017-10-12 15:10:51 +01:00
Matan Azrad
d5b0924ba6 ethdev: add return value to stats get dev op
The stats_get dev op API doesn't include return value, so PMD cannot
return an error in case of failure at stats getting process time.

Since PCI devices can be removed and there is a time between the
physical removal to the RMV interrupt, the user may get invalid stats
without any indication.

This patch changes the stats_get API return value to be int instead of
void.

All the net PMDs stats_get dev ops are adjusted by this patch.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-12 01:52:49 +01:00
Nikhil Rao
fc8030eb8f test/eventdev: add tests for eth Rx adapter APIs
Add unit tests for rte_event_eth_rx_adapter_xxx() APIs

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-10-10 18:34:27 +02:00
Gage Eads
be1bf6077e eventdev: extend port attribute get function
This commit adds the new_event_threshold port attribute, so the entire port
configuration structure passed to rte_event_queue_setup can be queried.

Signed-off-by: Gage Eads <gage.eads@intel.com>
2017-10-10 18:32:24 +02:00
Gage Eads
0a2ecfa00f eventdev: extend queue attribute get function
This commit adds three new queue attributes, so that the entire queue
configuration structure passed to rte_event_queue_setup can be queried.

Signed-off-by: Gage Eads <gage.eads@intel.com>
2017-10-10 18:32:11 +02:00
Harry van Haaren
783bdfef7e eventdev: add queue attribute function
This commit adds a generic queue attribute function. It also removes
the previous rte_event_queue_priority() and priority() functions, and
updates the map files and unit tests to use the new attr functions.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-10-10 18:31:17 +02:00
Harry van Haaren
64103dbcd6 eventdev: add dev attribute get function
This commit adds a device attribute function, allowing flexible
fetching of device attributes, like port count or queue count.
The unit tests and .map file are updated to the new function.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-10-10 18:31:04 +02:00
Harry van Haaren
78ffab9611 eventdev: add port attribute function
This commit reworks the port functions to retrieve information
about the port, like the enq or deq depths. Note that "port count"
is a device attribute, and is added in a later patch for dev attributes.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-10-10 18:30:50 +02:00
Gage Eads
381acec2b1 eventdev: ease single-link queue config requirements
Events sent through single-link queues are naturally in-order and
atomic, without reordering or atomic scheduling. Logically the
nb_atomic_flows and nb_atomic_order_sequences arguments don't apply to a
single link queue, but applications must set these (depending on the queue
config type) to bypass the is_valid_{ordered, atomic}_queue_conf() checks
in the eventdev layer.

This commit updates those is_valid_* functions to ignore queues with the
SINGLE_LINK flag, to simplify their configuration.

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-10-10 18:30:24 +02:00
Xueming Li
3cd4e0e883 mem: fix malloc debug config
This patch replaces broken macro RTE_LIBRTE_MALLOC_DEBUG with
RTE_MALLOC_DEBUG.

Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-10-09 23:15:45 +02:00
Zhiyong Yang
08ef593a70 test: add check for AVX512F
The CPUs which support AVX512 have been released. Add support for
checking AVX512F instruction set.

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2017-10-09 16:26:35 +02:00
Jianfeng Tan
a641f1f9d5 xen: remove dependency in applications
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2017-10-09 01:51:58 +02:00
Jacek Piasecki
154cdbb039 test/cfgfile: add realloc scenario
Load huge realloc_sections.ini file to check malloc/realloc
ability of cfgfile library.

Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2017-10-09 00:52:37 +02:00
Yipeng Wang
0cc67a96e4 test/member: add functional and perf tests
This patch adds functional and performance tests for membership
library.

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-10-09 00:02:45 +02:00
Santosh Shukla
6eac187bff mempool: add flags arg in xmem size and usage
xmem_size and xmem_usage need to know the status of mempool flags,
so add 'flags' arg in _xmem_size/usage() api.

Following patch will make use of that.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-10-06 21:43:33 +02:00
Santosh Shukla
02604520b2 mempool: remove unused flags argument
* Remove redundant 'flags' API description from
  - __mempool_generic_put
  - __mempool_generic_get
  - rte_mempool_generic_put
  - rte_mempool_generic_get

* Remove unused 'flags' argument from
  - rte_mempool_generic_put
  - rte_mempool_generic_get

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-10-06 21:42:33 +02:00
Zhiyong Yang
f8244c6399 ethdev: increase port id range
Extend port_id definition from uint8_t to uint16_t in lib and drivers
data structures, specifically rte_eth_dev_data. Modify the APIs,
drivers and app using port_id at the same time.

Fix some checkpatch issues from the original code and remove some
unnecessary cast operations.

release_17_11 and deprecation docs have been updated in this patch.

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-06 18:23:25 +02:00
Zhiyong Yang
e19e163d27 test: fix assignment operation
This should be an comparison operation rather than an assignment
operation.

Fixes: 5e41ab250d ("app/test: unit tests for bonding mode 4")
Cc: stable@dpdk.org

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-06 02:49:48 +02:00
Olivier Matz
effd92b96a test/ring: do not mask result of enqueue or dequeue
The define RTE_RING_SZ_MASK is the maximum size supported by the
rte_ring. The size is checked at ring creation.

There is no reason today to mask the result of
rte_ring_sp_enqueue_burst() or rte_ring_sc_dequeue_burst() with this
value. The flag RTE_RING_QUOT_EXCEED was previously included in the
returned value but it was removed in
commit 77dd306427 ("ring: remove watermark support").

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
2017-10-05 23:29:29 +02:00
Radoslaw Biernacki
e25da5a0a3 test/log: fix dynamic log levels testing
This patch fixes the dynamic log levels testing in logs_autotest.
Introduction of rte_log_set_level() in patch c1b5fa94a4 was done
with parameter RTE_LOG_EMERG which caused all RTE_LOG() calls an
early return due to all given levels were far below EMERG.
If first two logs supposed to show up on console, the initial log
level must be low (DEBUG). It is than changed above ERR when we test
if TESTAPP2 log type can be filtered by log type log level.

Fixes: c1b5fa94a4 ("eal: support dynamic log types")

Signed-off-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-10-05 23:16:07 +02:00
Guduri Prathyusha
aee62e906f service: fix lcore stop
lcore_states store the state of the lcore. Fixing the invalid
dereference of lcore_states with service number

Unit test case service_lcore_start_stop fails with the above fix.
Service core was stopped without stopping the service.

This commit fixes the test by adding negative and positive cases of
stopping the service lcore before and after stopping the service
respectively

Fixes: 21698354c8 ("service: introduce service cores concept")
Fixes: f038a81e1c ("service: add unit tests")

Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-09-15 15:32:48 +02:00
Harry van Haaren
95fdf37c89 service: add component runstate
This commit adds a new flag that the component (or "backend")
can use to indicate readyness. The service function callback
will not be called until the component sets itself as ready.

The use-case behind adding this feature is eg: a service that
requires configuration before it can start. Any service that
emulates an ethdev will have rte_eth_dev_configure() called,
and only after that the service will know how many queues/etc
to allocate. Once that configuration is complete, the service
marks itself as ready using rte_service_component_runstate_set().

This feature request results from prototyping services, and
requiring a flag in each service to note "internal" readyness.
Instead that logic is now lifted to the service library.

The unit tests have been updated to test the component runstate.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2017-09-15 13:46:47 +02:00
Harry van Haaren
8edc9aaaf2 service: use id in get by name function
This commit reworks the service_get_by_name() function to
accept an integer, and removes the service_get_by_id() function.

All functions now accept an integer argument representing the
service, so it is no longer required to expose the service_spec
pointers to the application.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2017-09-15 13:46:13 +02:00
Harry van Haaren
891f07e54e service: use id in unregister
This commit reworks the unregister API to accept an integer.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2017-09-15 13:45:58 +02:00
Harry van Haaren
5a6f6e0d52 service: use id in service stats functions
This commit reworks the statistics functions to use integer ids
for services instead of pointers. Passing UINT32_MAX to the dump
function prints all info, similar to passing NULL previously.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2017-09-15 13:45:48 +02:00
Harry van Haaren
330b341b88 service: use id in runstate function
This commit reworks the API to move from two separate start
and stop functions, to a "runstate" API which allows setting
the runstate. The is_running API is replaced with an function
to query the runstate. The runstate functions take a id value
for service. Unit tests and the eventdev sw pmd are updated.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2017-09-15 13:45:38 +02:00
Harry van Haaren
a894d4815f service: return integer service id from register
This commit reworks the service register function to accept
an extra parameter. The parameter is a uint32_t *, which when
provided will be set to the integer service_id that the newly
registered service is represented by.

This is useful for services that wish to validate settings at
a later point in time - they need to know their own service id.

This commit updates the eventdev sw pmd, as well as unit tests
to use the new register API.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2017-09-15 13:45:17 +02:00
Harry van Haaren
519d2e3b3d service: use id in lcore to service map functions
This commit updates the APIs exposed to map service cores and
services. The previous APIs required a pointer to a service,
and used two separate functions for enable and disable. The
new API uses an integer ID for the service and has a parameter
for map or unmap. Unit tests are updated and passing, and the
map file is updated to the new function names.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2017-09-15 13:45:04 +02:00
Harry van Haaren
6f62f3cf3a service: use id in probe and get name
This commit adds a macro to easily validate a service ID, and then
lookup the service pointer, or return a user-specified error code.
This macro will be heavily used in the following patches as it will
be ID based instead of pointer-based.

The probe_capability function is reworked to use an integer ID instead
of a pointer. Rework the service_get_name() function is updated to use
IDs. Unit tests are updated to keep things compiling after each commit.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2017-09-15 13:44:47 +02:00
Pablo de Lara
6c9182b071 test/crypto: fix error message
Fixes: 7a364faef1 ("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-08-03 23:49:12 +02:00
Tomasz Kulasek
7377abce10 test/bonding: fix device name
Bonding devices name must start with "net_bonding" prefix.

Fixes: 9bf4901d1a ("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-31 19:58:41 +02:00
Daniel Mrzyglod
347ab0a300 test/bonding: fix namespace of the RSS tests
Drivers are looking by name of the device so change namespace to proper
one.

Fixes: 43b630244e ("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-31 19:58:41 +02:00
Herbert Guan
a048bde9b1 test/bonding: fix parameters of a balance Tx
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: 92073ef961 ("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-31 19:58:41 +02:00
Herbert Guan
8d3708efec test/bonding: fix memory corruptions
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: 92073ef961 ("bond: unit tests")

Signed-off-by: Herbert Guan <herbert.guan@arm.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-07-31 19:58:41 +02:00
Tomasz Kulasek
4460005cf4 test: fix virtual device name not set
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: a1e7c17555 ("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-31 19:58:41 +02:00
Pablo de Lara
27391b53b3 cryptodev: fix session init return value
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: b3bbd9e5f2 ("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-27 17:25:54 +02:00
Pablo de Lara
46a0547f9f cryptodev: rename ADD field
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-19 14:10:41 +03:00
Pablo de Lara
9333cfba3b cryptodev: fix KASUMI F9 expected parameters
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: 681f540da5 ("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-19 14:10:41 +03:00
Pablo de Lara
de938b79b2 doc: remove incorrect limitation on QAT PMD
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: 1703e94ac5 ("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-19 14:10:41 +03:00
Srisivasubramanian S
b52709e7f3 test/crypto-perf: fix ARMv8 session creation
Session was NULL as test_crypto_session not initialised.

Fixes: b3bbd9e5f2 ("cryptodev: support device independent sessions")

Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
2017-07-19 14:10:41 +03:00
Daniel Mrzyglod
9eda7ecfa5 test/bonding: add test case for agg selection in mode4
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-07-19 18:14:52 +03:00