Age | Commit message (Collapse) | Author |
|
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>
|
|
Signed-off-by: Matias Elo <matias.elo@nokia.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
`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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Matias Elo <matias.elo@nokia.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|