aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2023-06-29validation: tm: remove unused variableMatias Elo
Remove unused variable which broke clang (15.0.7) build on Rocky Linux 8. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-04-14Merge tag 'v1.41.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2023-04-13validation: pktio: remove usage of odp_errnoMatias Elo
Setting odp_errno has been removed from odp_pktio_open() API and is not documented for odp_pool_create(). Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-04-13validation: crypto: do not allow has_error packet flag to changeJanne Peltonen
Check that the has_error packet flag is not affected by crypto processing now that the API makes it more clear that it is not. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-04-13validation: dma: add check for odp_dma_pool_capability_t.max_pools valueMatias Elo
Check that the maximum number of DMA completion event pools returned by odp_dma_capability() matches to the maximum number of any pools returned by odp_pool_capability(). Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-04-12validation: crypto: remove testing of odp_crypto_operation()Janne Peltonen
Remove testing of the deprecated odp_crypto_operation() to prepare for its full removal. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-04-12test: performance: crypto: simplify crypto operation result checkingJanne Peltonen
Check crypto operation success from the return value of odp_crypto_result() instead of the ok field of the result structure. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-04-12validation: crypto: simplify crypto operation result checkingJanne Peltonen
Check crypto operation success from the return value of odp_crypto_result(). Do not check odp_crypto_packet_result_t::ok unless compiled with deprecated API enabled. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-04-12validation: crypto: prepare for odp_crypto_result() changesJanne Peltonen
Allow odp_crypto_result() to report operation failure through the return value in addition to the ok field. This prepares for the coming implementation change for the new API semantics by letting ODP linux-gen implementations of both the old and the new API pass tests. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-04-12validation: fix classifier destroy orderJere Leppänen
Fix the destroy order of classifier objects and related objects, such as PMRs, CoSes, queues and pools. Remove default CoS before destroying the CoS. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-04-12validation: stash: add tests for new per object size capabilitiesMatias Elo
Test new capabilities for maximum number of object handles per stash for each object size. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-04-12validation: stash: test putting objects into a full stashMatias Elo
Test that implementation handles properly a case where application tries to store more handles into a stash than was configured in odp_stash_param_t.num_obj. The test is only ran when 'strict_size' mode is disabled. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-04-12validation: stash: add tests for new strict size parameterMatias Elo
Run stash validation tests also with new odp_stash_param_t.strict_size parameter enabled. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-04-12test: ipsecfwd: add example configuration fileTuomas Taipale
Add a minimal configuration file example for `odp_ipsecfwd`. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2023-04-12test: ipsecfwd: utilize libconfigTuomas Taipale
All configuration is now moved to a single file and the file is passed via new `-C` option. Format is expected to be parsable by `libconfig`. For SAs, most of the configuration passed with `odp_ipsec_sa_param_t` can now be set via the configuration file. The configuration format supports default fallback for SAs, i.e. individual SA configuration blocks may omit some parameters and instead set these once in a `default` block which then is used to fill missing parameters. For example: default: { dir = 1 proto = 0 mode = 0 crypto: { cipher_alg = 4 cipher_key = "jWnZr4t7w!zwC*F-" auth_alg = 2 auth_key = "n2r5u7x!A%D*" icv_len = 12 }; }; sa: ( { spi = 1337 outbound: { tunnel: { src_addr = "192.168.1.10" dst_addr = "192.168.1.16" }; }; } ); would result in sa entry having the default `dir`, `proto`, `mode` and `crypto` parameters set in addition to `spi` and `outbound`. Only required argument for an SA is the `spi` parameter. Individual SA parameter blocks are expected to be in `sa`-named list. For forwarding entries, individual parameter blocks are similarly expected to be in `fwd`-named list. For example: fwd: ( { prefix: "192.168.1.0/24" if: "ens9f1" dst_mac: "00:00:05:00:07:00" } ); where `prefix` is the matched prefix for outgoing traffic, `if` is the interface to be used for the match and `dst_mac` is the MAC that is written to the outgoing frames. With forwarding entries, every parameter is always required. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2023-04-12test: ipsecfwd: build tester conditionallyTuomas Taipale
`odp_ipsecfwd` utilizes `libconfig` so build the tester only if the library is found. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2023-04-06validation: ipsec: allow sa creation failure for unsupported algosJanne Peltonen
Not all implementations support all possible combinations of cipher and auth algorithms. Allow session creation error and skip test in cases where session creation failure might have been caused by an unsupported algorithm combination. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2023-04-06validation: crypto: test all digest lengths in full test onlyJanne Peltonen
By default, test only digest lengths divisible by four to reduce test run time in case an ODP implementation supports any digest length up to a maximum. In most real use cases digest/MAC lengths are divisible by four. Test all digest lengths in full test. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2023-04-06validation: crypto: reduce the number of unsupported combo warningsJanne Peltonen
Print a warning about an unsupported combination of algorithms only once per algorithm combination. Do not, for now, change the code to not attempt the same combination again. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2023-04-06validation: crypto: increase max packet size of packet poolJanne Peltonen
Configure packet pool with packet size and segment size that are large enough for max length text vector + digest + header and trailer + some headroom. This allows some implementations (odp-dpdk) to pass tests by linearizing a multi-segment packet into one single-segment packet of the same pool even with the large aes-xcbc test vector. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2023-04-06validation: crypto: do not require support for digest in cipher rangeJanne Peltonen
Allow crypto operation failure if hash result offset lies within cipher range when testing combined ciphering and authentication. Such hash result location is not supported by all implementations, including odp-dpdk. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2023-04-06validation: crypto: do not combine aes-gmac with any cipherJanne Peltonen
ODP API says that AES-GMAC can be combined only with the null cipher, so do not test AES-GMAC with any non-null cipher. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2023-04-05test: atomic_perf: increase init valuePetri Savolainen
Quick fix to enable more rounds in min tests. The same value is used for 32 and 64 bit tests. Initialize it to half way of 32 bit range, so that both min and max tests support 2 billion modifications before the value saturates. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-03-27test: performance: start pktio devices before creating workersMatias Elo
As a workaround, start pktio devices before creating workers in odp_l2fwd and odp_sched_pktio test applications to enable limited DPDK process mode support. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-03-24test: timer: add periodic timer capability testPetri Savolainen
Added test case to check periodic timer capability functionality with various values of base frequency, max multiplier and resolution. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-03-15validation: crypto: test combined ciphering and authenticationJanne Peltonen
Loop through all pairs of cipher and auth algorithms (and their variations, e.g. different key lengths) and test their combination in one ODP crypto operation. Build test references using two non-combined crypto operations, which have been tested against the predefined test vectors. Test each case with both orders between the algorithms and with different types of overlaps between cipher range, auth range and hash result offset. Test combined operations with segmented packets only with full testing enabled to reduce test run time in the normal case. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-03-15validation: crypto: run all tests only when FULL_TEST env variable is setJanne Peltonen
Run all tests only when FULL_TEST environment variable is set to a nonzero value. Otherwise limit test run time by skipping some parts of the tests. As of now, the only thing skipped is the reinvocation of a crypto operation with the same parameters (which does not add much coverage anyway). In the future, when more tests get added, more skipping will be needed to keep make check and CI run times reasonable. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-03-15validation: crypto: test both cipher/auth orders with single algJanne Peltonen
Currently validation tests are testing one algorithm at a time, i.e. not authentication and ciphering combined in one operation. In that case the auth_cipher_text session parameter should not have any effect on the result but both values of the parameter are still valid. Test sessions created with both possible values of the auth_cipher_text parameter to improve test coverage and to prepare for testing auth+cipher combinations. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-03-15validation: crypto: fix ignoring of leftover bits of bit mode ciphersJanne Peltonen
Fix the calculation of the ignore bitmask for the last byte of the output of bit mode ciphers by interpreting test ref length correctly as bits or bytes instead of always as bits and by not ignoring the last byte when ref length is byte-divisible. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-03-10test: timer: fix expected periodic timer durationPetri Savolainen
When first tick is used, periodic timer starts between current time and one period time. Fix test duration calculation to take this into account. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2023-03-10test: timer: add debug prints to periodic testPetri Savolainen
Print expected and measured duration when debugging period timer test case. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2023-03-09validation: dma: verify maximum completion event poolsTuomas Taipale
Verify that maximum amount of completion event pools can be created. Thoroughness of the new test may vary between implementations as the underlying pool count may or may not be shared among different pool types. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-03-09validation: dma: verify maximum completion event allocationTuomas Taipale
Verify that maximum transfer amount of completion events can be allocated from a DMA completion pool. To properly support the claimed in-flight transfer amount, implementation should also support a matching amount of in-flight completion events (in case of event completion). Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-03-09validation: dma: verify maximum concurrent transfersTuomas Taipale
Add and modify tests to verify that maximum signaled in-flight transfer count is handled correctly. With synchronous transfers, run more than maximum in-flight transfer count back to back to verify proper implementation resource handling. With asynchronous transfers, start maximum in-flight count of transfers and wait for completion (poll/event). Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-03-09validation: dma: take maximum segment length into accountTuomas Taipale
When configuring test transfers, take maximum segment length capability into account. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-03-02test: packet_gen: fix compiler warningPetri Savolainen
Fixed compiler warning "vlan may be used uninitialized" when building with -Os option. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2023-02-20test: performance: crypto: add snow3g-uea2 and snow3g-uia2 testsTianyu Li
Add SNOW3G-UEA2 and SNOW3G-UIA2 algorithms in the crypto perf test tool. Signed-off-by: Tianyu Li <tianyu.li@arm.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2023-02-20validation: pktio: fix IPv4 header initializationJere Leppänen
When creating packets, initialize also frag_offset and tos fields in the IPv4 header. Especially frag_offset can cause problems if left uninitialized. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-16Merge tag 'v1.40.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2023-02-16test: timer_perf: print min/max timeout paramsPetri Savolainen
Print min and max timeout length parameters when creating timer pools. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-02-16test: performance: crypto: fix typosTianyu Li
Fix typos in comments found by code review. Signed-off-by: Tianyu Li <tianyu.li@arm.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-02-13validation: crypto: check output packet better after failed authJanne Peltonen
Always check the parts of packets that are not supposed to be affected by crypto operations. Do the checking now also after failed authentication. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-02-13validation: crypto: add ODP_CRYPTO_OP_TYPE_OOP testingJanne Peltonen
Add testing of the out-of-place crypto operation type. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-02-13validation: crypto: change packet data checking approachJanne Peltonen
Change the method of verifying the data content of crypto result packets to such that expected packet data is constructed and then compared with the actual packet data. This is to keep the verification more readable and better maintainable when more complex tests are added later. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-02-13validation: crypto: refactor alg_test_execute()Janne Peltonen
Move the iteration across normal, repeat and wrong digest tests away from alg_test_execute() so that alg_test_execute() can concentrate on invoking and verifying single crypto operation. Move most of test packet building and result verification from alg_test_execute() to separate functions to make the code cleaner. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-02-13validation: crypto: add ODP_CRYPTO_OP_TYPE_BASIC testingJanne Peltonen
Add support for the operation type parameter and add testing of ODP_CRYPTO_OP_TYPE_BASIC. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-02-07validation: packet: add test for vlan flag functionsMatias Elo
Add new tests for VLAN/VLAN QinQ input flags. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Kiran Kumar K <kirankumark@marvell.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-07validation: packet: remove conflicting packet metadata flagsMatias Elo
Stop setting conflicting packet metadata flags. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Kiran Kumar K <kirankumark@marvell.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-07validation: cls: set packet has vlan flag correctlyMatias Elo
Follow the new packet API specification and set either odp_packet_has_vlan() or odp_packet_has_vlan_qinq() flag, not both. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-07api: timer: deprecate old timer pool clock sourcesMatias Elo
Deprecate old timer pool clock sources ODP_CLOCK_CPU and ODP_CLOCK_EXT, which have been replaced by ODP_CLOCK_DEFAULT and ODP_CLOCK_SRC_1. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>