Unit test and perf test for MCS queued lock.
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
This patch makes unsupported tests visible in
the testsuite summary.
Signed-off-by: Damian Nowak <damianx.nowak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
This patch adds test cases for wireless in-place
and out-of-place auth-cipher operations with
scatter-gather lists as input and output mbufs.
Test cases include buffer appended digest
generation with encryption and buffer decryption
with appended digest verification.
It also adds cases where digest is encrypted
only partially.
Signed-off-by: Damian Nowak <damianx.nowak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
This patch adds test cases for kasumi in-place
and out-of-place auth-cipher operations. Test
cases include buffer appended digest generation
with encryption and buffer decryption with
appended digest verification.
Signed-off-by: Damian Nowak <damianx.nowak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
This patch adds test cases for zuc in-place
and out-of-place auth-cipher operations. Test
cases include buffer appended digest generation
with encryption and buffer decryption with
appended digest verification.
Signed-off-by: Damian Nowak <damianx.nowak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
This patch adds test cases for snow3g in-place
and out-of-place auth-cipher operations. Test
cases include buffer appended digest generation
with encryption and buffer decryption with
appended digest verification.
It also adds cases where digest is encrypted
only partially.
Signed-off-by: Damian Nowak <damianx.nowak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Set freed cop pointers to NULL
Set other freed pointers to NULL instead of 0
Fixes: 05fe65eb66 ("test/ipsec: introduce functional test")
Cc: stable@dpdk.org
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Add dump_grp_pkt() function.
Dump invalid mbuf data in case of error in group tests 12 and 13.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Add extra test configuration for BURST_SIZE packets
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Error log messages after the create_sa() function calls
were using the wrong function name.
The function name is replaced with create_sa.
Fixes: 05fe65eb66 ("test/ipsec: introduce functional test")
Cc: stable@dpdk.org
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Added NULL algo tests into loop test mechanism used
by block cipher tests as easier to extend there.
Included chain, cipher-only and auth-only use-cases.
Extended to cover out-of-place use-cases and use-cases
where data length is not an 8-byte multiple.
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Adding a new field, ff_disable, to allow applications to control the
features enabled on the crypto device. This would allow for efficient
usage of HW/SW offloads.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Now that everything that has ever accessed the shared memory
config is doing so through the public API's, we can make it
internal. Since we're removing quite a few headers from
rte_eal_memconfig.h, we need to add them back in places
where this header is used.
This bumps the ABI, so also change all build files and make
update documentation.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
The action for timer_secondary_spawn_wait should be enabled only when
CONFIG_RTE_LIBRTE_TIMER is enabled.
Fixes: 50247fe03f ("test/timer: exercise new APIs in secondary process")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Variables of size 128B can make use of stack instead of dynamically
allocated memory.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Each test case initializes its hash parameters in the test case
function. To be consistent, generate keys function should initialize
hash parameters similarly.
Fixes: c7eb0972e7 ("test/hash: add lock-free r/w concurrency")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reset tbl_rwc_test_param to discard data from previous run
of the test.
Fixes: c7eb0972e7 ("test/hash: add lock-free r/w concurrency")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Add UT check_power_turbo.
Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Tested-by: Marcin Hajkowski <marcinx.hajkowski@intel.com>
This patch removes prefix _acpi from power UT function/test names,
and renames file test_power_acpi_cpufreq.c ->
app/test/test_power_cpufreq.c.
Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Added unit test cases for EAL flags --proc-type=auto and
--create-uio-dev in order to cover the below functions
eal_proc_type_detect()
rte_eal_create_uio_dev()
Signed-off-by: Lavanya Govindarajan <lavanyax.govindarajan@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Added unit test case for eal command line '--in-memory' option
which will cover below functions.
get_seg_memfd()
test_memfd_create()
pagesz_flags()
Added unit test case for eal command line '--single-file-segments' option
which will cover resize_hugefile().
Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
On some systems when dpdk test is executed with make test command
autotest_runner crashes in first_cpu_on_node. This happens when list
of available cpus contains something that is not a cpu as first element.
Fixed by removing all non-cpu values from list of available cpus.
Bugzilla ID: 253
Fixes: 22dcd9a4d9 ("test: parallelize unit tests")
Cc: stable@dpdk.org
Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Allow initializing a driver instance. Include selftest to validate these
functions.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jiayu Hu <jiayu.hu@intel.com>
Tested-by: Harry van Haaren <harry.van.haaren@intel.com>
Add in the "info_get" function to the driver, to allow us to query the
device. This allows us to have the unit test pick up the presence of
supported hardware or not.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jiayu Hu <jiayu.hu@intel.com>
Tested-by: Harry van Haaren <harry.van.haaren@intel.com>
Add stubs for ioat rawdev driver support in DPDK, specifically:
* makefile and meson build hooks
* initial public header file
* rawdev main C file, with probe and release functions
* release note update announcing the driver
* initial documentation for the new section in the rawdev doc
* unit test stubs for device unit tests
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jiayu Hu <jiayu.hu@intel.com>
Tested-by: Harry van Haaren <harry.van.haaren@intel.com>
Add selftest to verify sanity of SSO.
Can be run by passing devargs to SSO PF as follows:
Example:
--dev "0002:0e:00.0,selftest=1"
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
the test_rawdev.c file was missing from the meson.build file, and the test
case from the list of test commands.
Fixes: 55ca1b0f21 ("raw/skeleton: add test cases")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
The function rte_malloc_set_limit was defined but never implemented.
Mark it as deprecated for now, and remove in next release.
There is no point in keeping dead code.
"You Aren't Going to Need It"
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Test case for rte_rcu_qsbr_get_memsize is written specifically
for 128 threads. Do not use RTE_MAX_LCORE as it changes for
different configurations.
Fixes: e6a14121f4 ("test/rcu: remove arbitrary limit on max core count")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
num_cores is of type uint8_t. This results in the following
compilation error.
test_rcu_qsbr_perf.c:649:16: error: comparison is always false
due to limited range of data type [-Werror=type-limits]
if (num_cores >= RTE_MAX_LCORE) {
^~
RTE_MAX_LCORE is set to 256 for armv8 config.
Fixes: e6a14121f4 ("test/rcu: remove arbitrary limit on max core count")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Add a function rte_rand_max() which generates an uniformly distributed
pseudo-random number less than a user-specified upper bound.
The commonly used pattern rte_rand() % SOME_VALUE creates biased
results (as in some values in the range are more frequently occurring
than others) if SOME_VALUE is not a power of 2.
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This commit replaces rte_rand()'s use of lrand48() with a DPDK-native
combined Linear Feedback Shift Register (LFSR) (also known as
Tausworthe) pseudo-random number generator.
This generator is faster and produces better-quality random numbers
than the linear congruential generator (LCG) of lib's lrand48(). The
implementation, as opposed to lrand48(), is multi-thread safe in
regards to concurrent rte_rand() calls from different lcore threads.
A LCG is still used, but only to seed the five per-lcore LFSR
sequences.
In addition, this patch also addresses the issue of the legacy
implementation only producing 62 bits of pseudo randomness, while the
API requires all 64 bits to be random.
This pseudo-random number generator is not cryptographically secure -
just like lrand48().
Bugzilla ID: 114
Bugzilla ID: 276
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Let's mark as skipped the tests when they are missing some requirements
like a number of used cores or specific hardware availability, like
compress, crypto or eventdev devices.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Running the tests in parallel has two drawbacks:
- the tests are racing on the hugepages allocations,
- the tests are sharing the cores to run their checks which results in
undeterministic execution time,
This results in random failures.
For better reproducibility in CI, start them all in a serialised way.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Based on Michael initial idea of separating the file-prefix subtest in
the eal flags test.
Let's split the biggest tests into their subparts.
It is then easier to have them fit in the 10s timeout we have configured
in Travis.
We also get a better idea of which part fails in the previously big tests
we had.
Those new subtests are called from the meson testsuite.
The autotest tool is left untouched.
Note: we still have an issue with test_hash_readwrite_lf.c, any help from
the original authors would be appreciated.
Signed-off-by: David Marchand <david.marchand@redhat.com>
The eal flags unit test assumes that a certain number of cores are
available (4 and 8 cores), however this may not always be the case.
Individual developers may run the unit test on their local desktop
which typically have 2 to 4 cores, in said case the test is bound
to fail for lacking 4 or 8 cores.
Additionally, as we push forward introducing CI into DPDK we are limited
to the hardware specification of CI services (e.g. Travis CI) that only
have 2 cores on their servers, in which case the test would fail.
To fix this we check available cores before running a subtest. This
applies to subtests that are dedicated to test that the -l and --lcore
flags work correctly. If not enough cores are available the subtest is
simply skipped, otherwise the subtest is run.
Signed-off-by: Michael Santana <msantana@redhat.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Setting a coremask was mandatory a long time ago but has been optional
for a while.
The checks on PCI whitelist/blacklist, vdev, memory rank, memory channel,
HPET, memory size and other miscs options have no requirement wrt cores.
Let's remove those coremasks so that we only care about it in the
dedicated checks.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
The -n option is an optimisation configuration option that defaults to 0.
Such a default value makes the mempool library distributes objects as if
there was 4 memory channels, so -n 4 is the same as the default behavior.
This parameter was mandatory a long time ago, but has been optional for
a while. We check that setting this value works fine in its own test.
Remove it everywhere else.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
We can have up to RTE_MAX_LCORE in a dpdk application.
Remove the limit on 128 cores and tests that are now always false.
Fixes: b87089b0bb ("test/rcu: add API and functional tests")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
This patch rectifies slave_id to point to valid core indexes rather than
core ranks in read-write lock-free concurrency test.
It also replaces a 'for' loop with RTE_LCORE_FOREACH API.
Fixes: c7eb0972e7 ("test/hash: add lock-free r/w concurrency")
Cc: stable@dpdk.org
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
This subtest wants to start rwc_core_cnt[n] reader threads, while the
master core is waiting for them to report.
Fixes: c7eb0972e7 ("test/hash: add lock-free r/w concurrency")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
Same treatment than crypto tests, move the eventdev drivers tests in the
driver list.
While at it:
- eventdev_octeontx_autotest has been renamed as
eventdev_selftest_octeontx,
- eventdev_sw_autotest has been renamed as
eventdev_selftest_sw,
Fixes: 50fb749a39 ("event/octeontx: move test to driver")
Fixes: 85fb515b73 ("event/sw: move test to driver")
Fixes: 123d67c73b ("test/event: register selftests")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
For consistency, put all specific crypto driver tests in the dedicated
list (in alphabetic order).
While at it:
- remove dead reference to cryptodev_sw_mrvl_autotest (renamed as
cryptodev_sw_mvsam_autotest),
- call the crypto scheduler test only when built,
Fixes: 9eabcb6824 ("test: update autotest list")
Fixes: 3d20ffe6dd ("test: reorder test cases in meson")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>