The hash read-write autotest generates a lot of text, which is very dense
on the screen. Even the summary at the end is hard to follow as everything
is very compact. We can improve readability by highlighting the starts of
the various sections, and by indenting the values within subsections.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Convert host machine endianness to networking endianness for
comparison of incoming packets with BPF filter
Suggested-by: Brian Brooks <brian.brooks@arm.com>
Signed-off-by: Malvika Gupta <malvika.gupta@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The function returns the last (most-significant) bit set.
Added unit testcase to verify rte_fls_u32().
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reduced test duration for hash_multiwriter_autotest.
Number of entries and total insertions are reduced
such that the duration is less than 10 seconds.
Signed-off-by: Naga Suresh Somarowthu <naga.sureshx.somarowthu@intel.com>
Acked-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Reduced test duration for func_reentrancy_autotest.
Reduced MAX_LPM_ITER_TIMES, introduced new macro
MAX_ITER_ONCE to reduce the unique key check and
altered the macro MAX_ITER_TIMES to MAX_ITER_MULTI.
Combined for loops thereby reduced snprintf calls
and repeated iterations.
Such that the duration is less than 10 seconds.
Signed-off-by: Naga Suresh Somarowthu <naga.sureshx.somarowthu@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
When running unit tests automatically, either via script, from meson,
or otherwise, the same set of options may be used for each run, for
example to set a standard coremask to be used for all tests.
To facilitate this, this patch adds support for the test binary taking
additional EAL parameters from the environment and appending them to the
argc/argv list passed to eal init. This allows parameter modification
without having to edit test scripts etc.
There are now two environment variables which can be used for running
tests:
* DPDK_TEST - (added previously) passes the test name to be run
automatically rather than running the app interactively.
Used by "meson test" when running tests individually or
as part of a suite.
* DPDK_TEST_PARAMS - new parameter to specify the commandline arguments
to use with the test binary. For example to run a test,
or tests, on only 16 lcores, and to skip pci scan we can
set this to "-l 0-15 --no-pci".
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Luca Boccassi <bluca@debian.org>
Make clear which engine is compressing and which is decompressing
in debug output. Also add newline and print ratio = 0 if test fails.
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Change unit test app to check only for op->status =
RTE_CRYPTO_OP_STATUS_SUCCESS/ERROR instead of calling rsa_verify().
as the cryptodev API is expected to return error incase of data
mismatch.
Signed-off-by: Ayuj Verma <ayuj.verma@caviumnetworks.com>
Signed-off-by: Akash Saxena <akash.saxena@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Unit testcases are added for metrics library
Added metrics unit test to autotest list
Updated meson build file
Updated MAINTAINERSHIP for metrics unit test
Signed-off-by: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
Reviewed-by: Reshma Pattan <reshma.pattan@intel.com>
Reviewed-by: Remy Horton <remy.horton@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Divided main test to smaller logical tests.
Registered with UT framework.
Added cleanup of the resources else ring creation fails
during consecutive test runs.
Freed the allocated mempool, rings and uninitalized the drivers.
Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
Reviewed-by: Reshma Pattan <reshma.pattan@intel.com>
Reduced test duration for timer_racecond unit test.
This wil help to receive quicker test results.
Signed-off-by: Jananee Parthasarathy <jananeex.m.parthasarathy@intel.com>
The test application didn't call rte_eal_cleanup() on exit, which
caused leftover hugepages and memory leaks when running secondary
processes. Fix this by calling rte_eal_cleanup() on exit.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Reshma Pattan <reshma.pattan@intel.com>
Tested-by: Reshma Pattan <reshma.pattan@intel.com>
Disabled the alarm_autotest UT in FreeBSD
Interrupts are not supported in FreeBSD.
Alarm API depends on interrupts, so disabled alarm test on FreeBSD.
Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Add a new rte_delay_us_sleep() function that uses nanosleep().
This function can be used by applications to not implement
their own nanosleep() based callback and by internal DPDK
code if CPU non-blocking delay needed.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
If a value contains a comma, rte_kvargs_tokenize() will split here.
In order to support list syntax [a,b] as value, an extra parsing of
the square brackets is added.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Add read-write concurrency test to meson and autotest
file.
Fixes: 0eb3726ebc ("test/hash: add test for read/write concurrency")
Cc: stable@dpdk.org
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
The hash scaling unit test is not really needed
any more since the multi-writer is supported now
inside the library and it is tested by multi-writer
unit test.
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This commit improves the readwrite test to consider
extendable table feature.
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This commit improves the readwrite unit test to cover
more corner cases and reduces the testing time by
reducing the total key count.
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
With sequential key, the test will cover more corner
cases with jhash instead of crc hash, since jhash
generates more random hash pattern on sequential key.
It is useful for functional verification.
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Check the prerequisites to run the test
1.checked whether the rte_kni module is loaded, if not fail testcase
2.checked whether the rte_kni module is loaded with loop back mode,
if not skip packet forwarding testcase and log
3.Disabled the test in freebsd as test is not supported
Fixes: 5233e5924a ("app/test: update kni")
Cc: stable@dpdk.org
Signed-off-by: Naga Suresh Somarowthu <naga.sureshx.somarowthu@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Add a new API function to KNI, rte_kni_update_link() to allow DPDK
applications to update the link status for KNI network interfaces in
the linux kernel.
Signed-off-by: Dan Gora <dg@adax.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Unit tests to check for hash lookup and bulk-lookup perf
with lock-free enabled and with lock-free disabled.
Unit tests performed with readers running in parallel with writers.
Tests include:
- hash lookup on existing keys with:
- hash add causing NO key-shifts of existing keys in the table
- hash lookup on existing keys likely to be on shift-path with:
- hash add causing key-shifts of existing keys in the table
- hash lookup on existing keys NOT likely to be on shift-path with:
- hash add causing key-shifts of existing keys in the table
- hash lookup on non-existing keys with:
- hash add causing NO key-shifts of existing keys in the table
- hash add causing key-shifts of existing keys in the table
- hash lookup on keys likely to be on shift-path with:
- multiple writers causing key-shifts of existing keys in the table
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
rte_hash_lookup_xxx APIs return the index of slot in
the key store. Application(reader) can use that index to reference
other data structures in its scope. Because of this, the
index should not be freed till the application completes
using the index.
RTE_HASH_EXTRA_FLAGS_NO_FREE_ON_DEL is introduced to support this.
When this flag is enabled rte_hash_del_xxx APIs do not free the
key-store index/internal memory associated with the deleted
entry. The new API rte_hash_free_key_with_position should be called
to free the key-store index/internal memory after calling
rte_hash_del_xxx APIs.
Suggested-by: Yipeng Wang <yipeng1.wang@intel.com>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
RW concurrency is required with single writer and multiple reader
usecase as well. Hence, multi-writer should not be enabled by default when
RW concurrency is enabled.
Fixes: f2e3001b53 ("hash: support read/write concurrency")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This commit changes the current rte_hash unit test to
test the extendable table feature and performance.
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
The test_hash_readwrite.c was not in the meson.build file. This
commit adds the missing test into the file.
Fixes: 0eb3726ebc ("test/hash: add test for read/write concurrency")
Cc: stable@dpdk.org
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
the multi-reader and multi-writer rte_hash unit test does not
work correctly with non-consecutive core ids. This commit
fixes the issue.
Fixes: 0eb3726ebc ("test/hash: add test for read/write concurrency")
Cc: stable@dpdk.org
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Edit the printf information when error happens to be more
accurate and informative.
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
The bucket size was changed from 4 to 8 but the corresponding
perf test was not changed accordingly.
In the test, the bucket size and number of buckets are used
to map to the underneath rte_hash structure. They are used
to test performance of two conditions: keys in primary
buckets only and keys in both primary and secondary buckets.
Although there is no functional issue with bucket size set
to 4, it mismatches the underneath rte_hash structure,
which may affect code readability and future extension.
Fixes: 58017c98ed ("hash: add vectorized comparison")
Cc: stable@dpdk.org
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
There was a compilation error in test_external_mem.c:
CC test_external_mem.o
test_external_mem.c: In function ‘test_external_mem’:
test_external_mem.c:375:2: error: ‘for’ loop initial declarations are
only allowed in C99 mode
for (int i = 0; i < n_pages; i++) {
^
test_external_mem.c:375:2: note: use option -std=c99 or -std=gnu99 to
compile your code
Fixes: b270daa43b ("test: support external memory")
Signed-off-by: Dan Gora <dg@adax.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
We use _GNU_SOURCE all over the place, but often times we miss
defining it, resulting in broken builds on musl. Rather than
fixing every library's and driver's and application's makefile,
fix it by simply defining _GNU_SOURCE by default for all
builds.
Remove all usages of _GNU_SOURCE in source files and makefiles,
and also fixup a couple of instances of using __USE_GNU instead
of _GNU_SOURCE.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
This patch adds the validation test cases for
CAAM JR driver
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Akhil Goyal <akhil.goyal@nxp.com>
This patch updates the current AESNI-MB PMD with added AES-GCM
algorithm support. The patch includes the necessary changes
to the code including the capability update, control and data
patch changes for the AES-GCM algorithm support.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
This patch add AES-CMAC support. CMAC is a keyed hash function
that is based on a symmetric key block cipher. It is One-Key
CBC MAC improvement over XCBC-MAC. RFC 4493. NIST SP 800-38B.
Signed-off-by: Tomasz Cel <tomaszx.cel@intel.com>
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Currently, slab operations use unsigned long data type for 64-bit slab
related operations. On target 'i686-native-linuxapp-gcc', unsigned long
is 32-bit and thus, slab operations breaks on this target. Changing slab
operations to use unsigned long long for correct functioning on
all targets.
Fixes: de3cfa2c98 ("sched: initial import")
Fixes: 693f715da4 ("remove extra parentheses in return statement")
Cc: stable@dpdk.org
Signed-off-by: Vivek Sharma <vivek.sharma@caviumnetworks.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Add simple unit tests to test external memory support.
The tests are pretty basic and mostly consist of checking
if invalid API calls are handled correctly, plus a simple
allocation/deallocation test for malloc and memzone.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
When we allocate and use DPDK memory, we need to be able to
differentiate between DPDK hugepage segments and segments that
were made part of DPDK but are externally allocated. Add such
a property to memseg lists.
This breaks the ABI, so document the change in release notes.
This also breaks a few internal assumptions about memory
contiguousness, so adjust malloc code in a few places.
All current calls for memseg walk functions were adjusted to
ignore external segments where it made sense.
Mempools is a special case, because we may be asked to allocate
a mempool on a specific socket, and we need to ignore all page
sizes on other heaps or other sockets. Previously, this
assumption of knowing all page sizes was not a problem, but it
will be now, so we have to match socket ID with page size when
calculating minimum page size for a mempool.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Long time ago preallocation of memory for KNI was introduced in commit
0c6bc8e. It was done because of lack of ability to free previously
allocated memzones, which led to memzone exhaustion. Currently memzones
can be freed and this patch uses this ability for dynamic KNI memory
allocation.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Skeleton PMD does not support RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ
so make the Rx queue_id = -1 and initialize the event port
configuration to zero.
Fixes: d65856999d ("test/event: add Rx adapter tests for interrupt driven queues")
Cc: stable@dpdk.org
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Skeleton PMD does not support RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ
and implicit_release_disable so make the Rx queue_id = -1 and
initialize the event port configuration to zero.
Fixes: ec36d881f5 ("eventdev: add implicit release disable capability")
Fixes: 2a9c83ae3b ("test/eventdev: add multi-ports test")
Cc: stable@dpdk.org
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Make the ethernet port id passed into
rte_event_eth_rx_adapter_caps_get() 16 bit.
Also, update the event rx adapter test to use 16 bit
ethernet port ids.
Fixes: c2189c907d ("eventdev: make ethdev port identifiers 16-bit")
Cc: stable@dpdk.org
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Remove RSS config as it is not required. The hardcoded RSS
configuration also generates an error on NICs that don't support
it.
Fixes: 8863a1fbfc ("ethdev: add supported hash function check")
Cc: stable@dpdk.org
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Add tests for event eth Rx, crypto and timer adapters to
meson build
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Limit the number of objects passed to rte_mempool_put_bulk()
to the size of the object table. This fix eliminates a compiler
warning (array-bounds) triggered when the march command line
parameter to gcc is set to nehalem.
Fixes: d1f3385d00 ("test: add event timer adapter auto-test")
Cc: stable@dpdk.org
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This patch adds tests for the eth Tx adapter APIs. It also
tests the data path for the rte_service function based
implementation of the APIs.
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Enqueue, dequeue depths are only valid for event devs that have burst
mode capability. Check event dev capability before testing depth
boundary.
Fixes: f8f9d233ea ("test/eventdev: add unit tests")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>