Age | Commit message (Collapse) | Author |
|
Fix GCC (with LTO enabled) warning about potential uninitialized use.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Use the new timer set return codes: ODP_TIMER_TOO_NEAR,
ODP_TIMER_TOO_FAR and ODP_TIMER_FAIL.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Replace ODP_CLOCK_CPU with ODP_CLOCK_DEFAULT.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Previously validation test did not refer to ODP_CLOCK_EXT at all.
Test timer capability with all clock source enumeration values.
This ensures that enumeration values are defined and capability
call accepts those.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Added test cases for the new strict time stamp functions. Arranged
time consuming tests to be executed towards the end of the suite.
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>
|
|
Check if stats.succes_bytes is updated for stats success
tests.
Also remove rundundant check for inbound SA stats from
the current code.
Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Add tm start API after creating a TM system and TM stop API before
destroying it. Also stop TM system before shaper/scheduler/threshold
or wred profile updates if dynamic update is not supported by the TM
system.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Use commit_rate and peak_rate in odp_tm_shaper_params_t instead of
commit_bps and peak_bps.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Check that both packet input and application can send events to
scheduled packet input event queues. Test case can be skipped by
setting CI_SKIP environment variable.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
For some AH tests, esp check function is used which does not check the
AH capability. Use the ah check function which checks for AH capability.
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Move the repeating code of fragment reassembly tests to a common function.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
|
|
Use ODP_PKTOUT_MODE_TM for pktio that is used for Tx. This is
as per TM spec. Also change suite init/term to handle cases where
TM is not supported by platform which can only be known when
odp_pktio_open() with out mode as TM fails.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Add a new atomicity validation test, which checks that only a single thread
is able to process events from an atomic queue at the same time.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
In packet test cases for headroom/tailroom, extend head/tail
APIs are always called with extend length greater than
headroom/tailroom. Also trunc head/tail APIs are always
called with truncate length greater than or equal to segment
length.
In these cases, the spec allows the implementation to change
the layout of the packet completely if required. So properties
of the output packet like segment lengths, headroom, tailroom
etc. can be entirely different from those of the input packet
and should not be compared with each other.
Also, comparison of older pointers from input packet with new
pointers from output packet should be done only if the return
value of these APIs is 0 as otherwise the older pointers are to
be considered invalid.
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
The default value for odp_schedule_config_t.max_flow_id should be zero.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Refactored existing statistics counters test code and added tests for the
new odp_pktio_stats_t.in_packets/out_packets fields.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Deprecate odp_pktio_stats_t.in_unknown_protos statistics counter.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Yuri Tolstov <ytolstov@marvell.com>
|
|
According to the spec packet pull head/tail may pull up to segment
length minus 1 bytes. Fix the tests to align to the spec.
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Test that a thread specific log function is called if and only if it
is set.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add test cases to handle reassembly of IPv6 packets.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Subrahmanyam Nilla <snilla@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Add test cases to verify IPsec reassembly. The tests cases would work on
large packets which are fragmented.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Sachin Yaligar <syaligar@marvell.com>
Signed-off-by: Subrahmanyam Nilla <snilla@marvell.com>
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Update ipsec_check_in_one path to handle test parts without
pkts to receive.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Update internal function such that it would handle reassembled packets
as well.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
The header file contains a collection of plain and fragmented
test vectors based on IPv6 and IPv4. These vectors can be used to test
the reassembly functionality
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Sachin Yaligar <syaligar@marvell.com>
Signed-off-by: Subrahmanyam Nilla <snilla@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Clean up the code and improve reusability by moving several code
fragments to their own functions. This commit does not make any
functional changes.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Use odp_packet_from_event() instead of odp_ipsec_packet_from_event() when
converting plain packet events to packets. odp_ipsec_packet_from_event()
may be called only for events of IPsec subtype.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Test odp_hash_crc32() correctness with Ethernet test packets
that include a correct Ethernet FCS at the end of the packet
(last 4 bytes). When CRC32 calculation includes FCS, the
result (0xdebb20e3) is common for all packets.
Verify CRC32 calculation also in odd data alignment.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Split test_packet_parser.h file into protocol specific header
files. It's easier find and maintain test packets when those
are sorted per protocol.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
On some systems the value of ODP_CACHE_LINE_SIZE may be different than what
is returned at runtime by odp_sys_cache_line_size() (in ABI compat mode).
Remove a test that checked that the values are equal and print a warning
instead. Also, check that cache line size is a power of two.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Move test case specific flags from ipsec_test_param to their own
structure so that the generic framework code for input and output
IPsec operations does not have to see them.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
|
|
Remove the UDP encapsulation specific L4 protocol checks. They
are now redundant since the generic code checks the L4 protocol
of processed packets.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
|
|
The L3 and L4 type of an outbound IPsec processed packet is not
checked if the packet cannot be compared with an expected result
packet (there are no expected result packets in combined output+input
tests nor in TFC dummy tests).
Improve testing by checking outbound processed packet against
expected L3 and L4 types when there is no expected result packet.
Set correct expected L3 and L4 types in output test parameters of
various tests that did not have them.
Fix the ethertype of the ethernet header of outbound inline processed
packets so that parsing the packet for the L3 and L4 types works.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
|
|
Some assertions for valid packet handles are made after the packet
handles have already been used. Move the assertions up in the call
chain so that they are done early enough.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
|
|
User pointer of the result packet is null after outbound inline
IPsec operation only if the operation is successful in which case the
result packet goes through the loop interface before getting checked.
In case the operation fails (as it does for some negative tests),
the result packet is the original packet that gets delivered directly
as an event, without the loop interface being involved. In this case
the user pointer has the original non-NULL value. The current code does
not take this into account, although the check is not currently done
in cases where it would incorrectly fail.
Fix the user pointer checking logic and move the checking up in the
chain so that it is done for all packets.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
|
|
Clean up the code by using ipsec_test_part for one IPsec operation
only so that the outbound and inbound phases of combined out+in tests
become separate. One ipsec_test_part will contain single input packet
to an (outbound or inbound) IPsec operation and the expected output.
This makes the code clearer and brings it closer to the original design.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
|
|
Move ipsec_check_out_in_one() from the generic framework file to a
test case file where it better belongs.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
|
|
Make the combined out+in test code reuse the packet checking code
of the regular outbound tests. This improves the verification of outbound
processed packets in the combined tests and cleans up the code a bit.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
|
|
Many test functions pass the original input packet (e.g. ICMP) as the
expected result packet when the expected result is not known in detail
(like in the middle of combined output+input tests). In reality the
result packet is an IPsec-transformed packet (e.g. ESP), but that is
not currently always checked.
Clean up the code by not passing any expected result packet to the test
routines when the expected result packet is not known beforehand.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
|
|
Combine the common part of the two dummy TFC packet tunneling tests.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
|
|
Fix the incorrect assumption that l4 offset is set in the output
packets of odp_ipsec_out() and odp_ipsec_out_enq(). Parse the output
packets to set the l4 offset.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
|
|
Added support for ARMv8.7, ARMv9.0, ARMv9.1 and
ARMv9.2 enumeration.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Add test case for testing pktout tx completion event feature.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Call the new classifier debug print function from validation test.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
|
|
Add test to validation pktout aging timeout feature.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Create completion queue based on the queue type supported.
Add separate suites for plain and schedule type queues.
Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add missing test for odp_pktio_config_t.enable_loop. Loop interface should
always support loopback mode.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
The traffic_mngr_shaper_test intermittenly fails on arm64 systems. For
enabling the CI, this test has been skipped until the issue is resolved
and the shaper test no longer fails on arm64 platforms.
Signed-off-by: Malvika Gupta <Malvika.Gupta@arm.com>
Reviewed-by: Govindarajan Mohandoss <govindarajan.mohandoss@arm.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Explicitly prevent tests from being run in parallel when the -j option
is used with make check.
Using the .NOTPARALLEL special target is the only easy way to ensure
that tests are run one by one. Unfortunately this also prevents
parallel builds for the tests.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
odp_pktio_ts_from_ns() test uses PKTIO_TS_CMP_RES to check the arithmetic
tolerance which is incorrect. The time, in nanoseconds, reported from the
clock resolution API should be used instead. The resolution API accurately
represents the granularity in which packet IO timestamp is able to measure
the time.
Signed-off-by: Malvika Gupta <Malvika.Gupta@arm.com>
Reviewed-by: Govindarajan Mohandoss <govindarajan.mohandoss@arm.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Enable SA lifetimes and antireplay service by default for all tests
to improve test coverage. In real life typical SAs are dynamically
negotiated and use the features.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|