aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2022-11-29test: cunit: provide option to run tests on control threadNithin Dabilpuram
By default run all the tests on worker thread and provide option to run tests on control thread. Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-11-29test: performance: fix odp_cpu_bench for 256 worker supportNithin Dabilpuram
Fix cpu bench app to work when ODP platform supports more worker threads than MAX_GROUPS * QUEUES_PER_GROUP. Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-11-28test: pool_perf: add option to enable statisticsPetri Savolainen
Added -S option to enable pool performance testing while statistics are enabled. Test also measures statistics function call latency. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-11-28test: sched_latency: improve option documentationPetri Savolainen
Make number of events documentation more clear. Sample events are added on top of -m and -n values. Print number of sample events used in the results. Document default values for number of events and queues options. Remove unnecessary defines for option default values. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-11-28test: sched_latency: record index of max latency eventPetri Savolainen
Added index of the highest latency sample event into statistics. It may help in finding the reason for high latency events (high latency only during start up vs randomly). Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-11-28test: sched_latency: read time on every schedule callPetri Savolainen
Moved time stamp read right after schedule call returns. When low priority queues are used, most events are not sample events and time stamp read is wasted effort. However, this improves latency measurement accuracy on sample events. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-11-28test: sched_latency: reorganize schedule loopPetri Savolainen
Moved barrier closer to worker main loop start. So, that all workers are ready to process events simultaneously. Remove unused source queue handle update from schedule call. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-11-28test: sched_latency: use strict time stampsPetri Savolainen
Use odp_time_global_strict() instead of the basic version for better time stamp accuracy. Remove latency of time conversion from the measurement by saving raw time stamp data to the event. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-11-28test: validation: remove unnecessary cunit includesPetri Savolainen
Test applications use CUnit API through odp_cunit_common.h, which re-defines CU_ASSERT() and other macros. Remove direct CUnit includes to ensure that all applications use the same CU macros. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-11-25test: dma_perf: add maximum retries for operationsTuomas Taipale
Add maximum retries for synchronous and asynchronous transfers and transfer starts as well as asynchronous polling to make program eventually exit in case of it cannot be directly interrupted. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-11-25test: dma_perf: retry DMA transfers if resources temporarily unavailableTuomas Taipale
DMA transfers can occasionally not start in both synchronous and asynchronous cases due to resources being temporarily unavailable. Take this into account in tester logic and retry as long as this is the case. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-11-25test: dma_perf: make completion event wait period configurableTuomas Taipale
In certain situations it can be useful to configure the completion event waiting period instead of using the default hard-coded value, thus it is now configurable with nanosecond precision with the new `-w` option. Additionally, current default is changed to one (1) second, as this should make the tester a bit more responsive in case of a timeout. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-11-24test: stress: add new ODP stress testPetri Savolainen
Add test application that can be used to stress CPU, memory and HW accelerators. Stress level can be modified with -m option. Minimal stress level (-m 0) can be used e.g. to measure idle power, and compare that to higher levels. The next level (-m 1) does simply a memcpy() from the first half of worker memory to the second half. More advanced levels can be added later. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-11-21validation: ipsec: add SA expiry testAakash Sasidharan
Add IPsec SA expiry tests in out suite. Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2022-11-21validation: ipsec: get event only from the specified queueAakash Sasidharan
When expecting an event from a certain queue, get an event only from that queue even when the queue is a scheduled queue. Add a queue parameter to sched_queue_deq() and return an event only when it came from the specified queue. If the scheduler returns an event from another queue, buffer it locally for possible later dequeue from that queue. Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2022-11-21test: ipsecfwd: use hashed TX only with scheduled ordered queuesTuomas Taipale
Output packet ordering can be maintained properly only when scheduled oredered queues are configured. Thus, when those are not configured use thread specific output queues. This increases tester throughput slightly as per-packet hashing can be omitted. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2022-11-21test: ipsecfwd: add burst support to packet forwardingTuomas Taipale
Add burst support to packet forwarding. Instead of sending single packets after lookup, collect them in packet I/O specific output vectors and send them in bursts. This can increase tester throughput notably depending on how packets end up being routed. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2022-11-21test: ipsecfwd: add option for direct receptionTuomas Taipale
Add option for direct reception. Scheduler is not used, workers will poll packet I/Os directly and IPsec processing is done synchronously. Additionally, input queue count and mode options are ignored, input queue count will match worker count and input and output modes will be direct. Current asynchronous processing functions are renamed to have `_enq` suffix and a set of new functions are added for synchronous processing. Which set of functions to use is configured based on the new option. Not using scheduler will increase tester throughput by some amount as overhead from scheduling disappears. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2022-11-21test: ipsecfwd: move function definitionsTuomas Taipale
In preparation for direct mode addition, move current IPsec processing functions to be defined earlier so that they can be referred when setting up program configuration. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2022-11-21test: ipsecfwd: fix pktout operation mode settingTuomas Taipale
With hashed output, different packet I/O instances might end up sending packets to the same output queue, thus pktout operation mode setting cannot be inferred based on queue vs. thread count. Remove the logic and keep output operation mode always as multi-thread safe. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2022-11-11test: crypto: fix GCC 9.2 warningTuomas Taipale
GCC 9.2 complains that crypto capability structure might be uninitialized when used even though it should always be properly initialized by a successful `odp_crypto_capability()` call. Fix this by simply always initializing the structure to zero. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2022-11-08test: dma_perf: fix potential undefined behaviorTuomas Taipale
While parsing completion modes, option string is duplicated and then later tokenized. Duplication with `strdup()` might however fail and return a `NULL` which leads to undefined behavior when tokenizing. Fix this with a suitable `NULL` check. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-11-04test: packet_gen: add direct pktin mode optionPetri Savolainen
Added -D option to select between scheduled and direct packet input modes. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com>
2022-11-01test: performance: crypto: add zuc-eea3 and zuc-eia3 testsJanne Peltonen
Add ZUC-EEA3 and ZUC-EIA3 algorithms in the crypto perf test tool. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-11-01test: performance: ipsec: authenticate cipher text instead of vice versaJanne Peltonen
Authenticate the cipher text instead of the plain text since that order may be more common (it is used e.g. in IPsec) and perhaps more often supported by ODP implementations. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-11-01test: performance: crypto: fix out-of-bounds hash result offsetJanne Peltonen
Hash result offset is currently set to an offset immediately after the payload to be encrypted or authenticated but the test packets do not extend beyond the end of the payload. Thus hash result offset points to memory that is not part of the packet data, which is incorrect and can corrupt the packet pool. Fix the problem by making the test packets large enough to be able to contain maximum sized authentication hash after the payload. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-11-01test: performance: crypto: improve printouts when session creation failsJanne Peltonen
ODP implementations are not required to support any combination of supported algorithms in any order. If session creation fails because the requested session type is not supported, do not log an error but print a message that the algorithm is skipped and the reason for it. This way things look the same whether the lack of support was noticed already through capability query or only at session creation time. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-10-28test: packet_gen: print new options in configuration summaryTuomas Taipale
Print new packet reference, latency measurement, UDP checksum and payload filling options as part of the startup configuration summary dump. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-10-28test: packet_gen: use helper error loggerTuomas Taipale
Use `ODPH_ERR()` for error and warning logs instead of `printf()`. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-10-28test: packet_gen: add option for disabling payload fillingTuomas Taipale
Add option for disabling payload filling. By default, payload is filled with a pattern until the end of first packet segment. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-10-28test: packet_gen: add option for disabling UDP checksum calculationTuomas Taipale
Add option for disabling UDP checksum calculation. In this case, checksum is set to zero in every packet. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-10-28test: packet_gen: add option for latency measurementsTuomas Taipale
Add option for enabling latency measurements. Transmit time is calculated and added to the payload of packets that are sent. In receive side, the transmit time is extracted and latency is calculated based on reception time. Latency calculations are supported only if packet references have been disabled. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-10-28test: packet_gen: add option for disabling packet reference usageTuomas Taipale
Add option for disabling packet reference usage. By default, sent packets have been references to a set of pre-allocated packets. The new option can be used to force allocation of fresh packets per each burst round. This enables easier packet modification before they are sent. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-10-26test: misc: fix installcheck build testJere Leppänen
Since pkg-config files had to be reverted in commits 4fe73be64 Revert "linux-gen: provide options to explicitly link static libodp-linux via pkg-config --static" 3ed57ffc5 Revert "helper: provide options to explicitly link static libodphelper via pkg-config --static" we have to explicitly link libodp and libodphelper statically when linking odp_api_headers_static. String replace the -l options with -l:*.a options in the pkg-config outputs. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Carl Wallen <carl.wallen@nokia.com>
2022-10-26Revert "test: misc: in installcheck, work around bug in legacy pkgconfig"Jere Leppänen
This reverts commit e924ab56a026b584aab1c10f7e7210a77d51bb9f. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Carl Wallen <carl.wallen@nokia.com>
2022-10-25test: perf: add new buffer_bench applicationMatias Elo
Add new odp_bench_buffer microbenchmark application for testing buffer and event fast path functions. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-10-25test: bench_packet: add option for configuring pool cache sizeMatias Elo
Add new command line option '-c' for configuring pool local cache size. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-10-25test: bench_packet: print actual function namesMatias Elo
Print actual API function names in output. Removed empty dummy test. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-10-25test: bench_packet: reserve enough space for burst testsMatias Elo
Event burst tests use TEST_REPEAT_COUNT * TEST_MAX_BURST events. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-10-21test: perf: l2fwd: augment fix to dependency to odp_generatorJere Leppänen
The previous fix to this does not work when ODP is configured with --without-examples and built out-of-tree (i.e. configure is run in some other directory than ODP base directory). Fix by adding a recipe to explicitly go to the generator directory to build it. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-10-19validation: timer: fix naming conflictMatias Elo
DPDK rte_lcore_state_t.WAIT enum conflicts with WAIT enum, so rename it to TIMEOUT. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-10-19installcheck: don't run test suitesJere Leppänen
Don't (re)run test suites in make installcheck. Test suites are run in make check. As a result, there's no need to install tests in distcheck, so remove --with-testdir from AM_DISTCHECK_CONFIGURE_FLAGS. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-10-19test: misc: in installcheck, work around bug in legacy pkgconfigJere Leppänen
pkgconfig-0.27 returns linker option in the wrong order. Detect pkgconfig version and add the static libraries explicitly to the compiler command. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-10-19test: misc: build and run a test application during installcheckJere Leppänen
During installcheck, build and run a test application (odp_api_headers), to verify the install. When cross compiling, the application is built, but not run. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-10-19test: perf: l2fwd: fix dependency to odp_generatorJere Leppänen
Fix dependency to odp_generator, so that l2fwd is rebuilt only if odp_generator has changed, instead of every time. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-10-11test: performance: scheduling: fix array-bounds build errorMatias Elo
Fix invalid 'array-bounds' error in GCC-9 -O3 build. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-10-11validation: packet: test packet parsing more with nonzero offsetJanne Peltonen
Improve packet parsing test coverage by using several nonzero parsing offsets instead of always the same (usually zero) offset in each test case. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-10-07validation: tm: call odp_tm_stats_print()Matias Elo
Call odp_tm_stats_print() in validation tests. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-10-07validation: cls: improve most inner VLAN test casesPetri Savolainen
Test ODP_PMR_ETHTYPE_X and ODP_PMR_VLAN_ID_X also with packets that have only single VLAN. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-09-30validation: pktio: add user flag checksPetri Savolainen
Check that packet and packet vector user flags are zero after packet input. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>