Age | Commit message (Collapse) | Author |
|
Previously the profile array's (e.g. shaper_profiles, sched_profiles, etc)
were not properly keeping track of all of the profiles created by the
TM validation test - but instead just the profiles created for the
tests called "traffic_mngr_test_*_profile()". This then prevented the
profile destroy functions from destroying all the profiles created.
Added missing free(queue_desc) call to destroy_tm_queues().
Added missing free(node_desc) and free(node_desc->node_name) calls
to destroy_tm_subtree().
Signed-off-by: Barry Spinney <spinney@mellanox.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Refer consistently to odp-linux as the implementation name.
Linux-generic is implementation internal directory name.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
If MAX_CPUS defined to less then current cpus, then
odp call calculates current available cpus and references
to array on thread creation. Do change to allocate array
dynamically.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
|
|
Provide helper APIs to set and get cpu affinity in ODP threads,
and set cpu affinity to the 1st available control cpu for all odp
test/validation programs in odp_cunit_common library.
Signed-off-by: Yi He <yi.he@linaro.org>
Reviewed-by: Christophe Milard <christophe.milard@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Add proper sequencing of checks for pktio open / configure failures.
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Resolve bug https://bugs.linaro.org/show_bug.cgi?id=2220 by removing
unused values.
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Change the way the rcv_gap statistics are computed to better deal with
the case of running on general purpose Linux cpu cores (versus zero HZ
cpus) where Linux will occasionally run background processes on the same
cpu as say the TM thread, causing traffic mngr shaper delays to be
man milliseconds longer than they should be. Also added code (from
Bill Fischofer) to conditionalize some tests when running on a
uniprocessor.
Signed-off-by: Barry Spinney <spinney@mellanox.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
odp_crypto now calls the helper command line parsing so that helper
can collect its options. Hence enabling process mode run.
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Brian Brooks <brian.brooks@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
odp_crypto is changed to use the implementation agnostic ODP thread
create and join functions, from helpers.
odp_crypto is hence no longer aware on how the odpthread is implemented.
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Brian Brooks <brian.brooks@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
odp_l2fwd now calls the helper command line parsing so that helper
can collect its options. Hence enabling process mode run.
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Brian Brooks <brian.brooks@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
odp_l2fwd is changed to use the implementation agnostic ODP thread
create and join functions, from helpers.
odp_l2fwd is hence no longer aware on how the odpthread is implemented.
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Brian Brooks <brian.brooks@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
odp_pktio_perf now calls the helper command line parsing so that helper
can collect its options. Hence enabling process mode run.
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Brian Brooks <brian.brooks@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
odp_pktio_perf is changed to use the implementation agnostic ODP thread
create and join functions, from helpers.
odp_pktio_perf is no longer aware on how the odpthread is implemented any
longer.
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Brian Brooks <brian.brooks@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Remove the --proc option from odp_scheduling.c and use the helper
functions (odph_odpthreads_create, odph_odpthreads_join)
to handle odp threads. Let helper parse its command line args, hence
recognising the --odph_proc option doing what --proc did.
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Brian Brooks <brian.brooks@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
As the test itself does not have specific args, it just calls
the cunit_common parsing function to pick up cunit_common and helpers
arguments.
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Brian Brooks <brian.brooks@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
As the tests themselves do not have specific args, they just call
the cunit_common parsing function to pick up cunit_common and helpers
arguments.
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Brian Brooks <brian.brooks@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
As the tests themselves do not have specific args, they just call
the cunit_common parsing function to pick up cunit_common and helpers
arguments.
This was originally many patches, now squashed on maintener's request.
init and pktio tests are still separated as they have specificities
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Brian Brooks <brian.brooks@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
cunit_common is changed to use the implementation agnostic ODP thread
create and join functions, from helpers. Tests are no longer aware if
an odp thread is a linux process or linux thread under the hood.
The helper decides.
The function pointer which is passed when creating the odp threads now
points to a function returning an int instead of a ptr.
This is changed so that when odp threads are processes, the int returned
become the process exit code.
The return code is nevertheless just used to detect erros (as before).
Note that it is now important that the ODP threads return a correct
status, as for processes, odp threads runs on a copy of the memory, so
that c_unit assertions will not be reflected on the main process summary.
Failing to return a proper status means that error will be lost when
running the test in process mode.
odp threads returning an error status code will be detected as an error
on the main process at join time...
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Brian Brooks <brian.brooks@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
As the test itself does not have specific args, it just calls
the cunit_common parsing function to pick up cunit_common and helpers
arguments.
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Brian Brooks <brian.brooks@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
A function to parse the command line args is added. This function is meant
to parse only arguments altering the behaviour of cunit_common (this
includes the helpers args as cunit_common uses the helpers)
As at this stage only helper args fall into that category, this function
simply calls the helper parsing function.
(parsing pure cunit_commons args might be added later here if needed)
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Brian Brooks <brian.brooks@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
valgrind should not check bash wrappers. Accoding to doc:
https://www.gnu.org/software/gnulib/manual/html_node/Running-self_002dtests-under-valgrind.html
TEST_EXTENSIONS has to be set.
https://bugs.linaro.org/show_bug.cgi?id=2230
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org>
|
|
Initialize to zero pkt_seq array first used
in recv_packets_tmo().
https://bugs.linaro.org/show_bug.cgi?id=2222
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com>
|
|
Fix memory leaked caused by uninitialized pmr param struct
Fixes: https://bugs.linaro.org/show_bug.cgi?id=2227
Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Resolve bug https://bugs.linaro.org/show_bug.cgi?id=2031 by
adding a check to ensure that at least one timer is allocated before
potentially dividing by zero.
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Added fairness check option. When enabled, event count per
queue is calculated and printed after test.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Recorded queue and pool handles into shared data, so that
multiple lookups (and related name generation code) can be
avoided. Use single function (enqueue_events()) to enqueue
events into queues on all test cases.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Use strong typing for odp_timer_t and odp_timeout_t. Fix
couple exposed usage errors.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Add missing odp_timer_pool_to_u64(), odp_timer_to_u64(), and
odp_timeout_to_u64() functions. Use the functions in timer
validation tests.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Fix wrong return code check due to assignment to unsigned variable.
https://bugs.linaro.org/show_bug.cgi?id=2224
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
|
|
Having system call inside loop couse unpredictable delay
as the result wrong time diff calculation. Just removing
print make hole test execution shorter on 0.1 seconds
according to cunit stats. Also make verbose errors in
places where we out of limit in cunit. This should be
very helpful to understand DELAY_TOLERANCE value suitable
for all platforms.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
|
|
Current validation test can produce bug:
timer.c:250:handle_tmo():Wrong tick: expected 18446744073709551615 actual 149
FAILED
1. timer.c:246 - CU_FAIL("Wrong status (stale) for fresh timeout")
2. timer.c:251 - CU_FAIL("odp_timeout_tick() wrong tick")
Which caused with wrong destroy sequence:
timer_free() calls timer_cancel(tp, idx, TMO_UNUSED).
which is: ((uint64_t)0xFFFFFFFFFFFFFFFF) or 18446744073709551615
and test calls handle_tmo() for event with TMO_UNUSED.
To fix reoder destroy sequence odp_timer_cancel()->sleep()->handle_tmo()->
->odp_timer_free().
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
|
|
fixing: https://bugs.linaro.org/show_bug.cgi?id=2108
The no_lock_functional_test does not really tests the ODP functionality:
Instead, it actually checks that race conditions can be created between
concurrent running threads (by making these threads writing shared
variables without lock, and later noting the value written was changed by
some of the concurrent threads).
This test therefore validates other tests: if this test passes -i.e. if
we do have race condition- then if the following tests suppress these
race conditions by using some synchronization mechanism, these
synchronization mechanisms can be said to be efficient.
If, on the other hand, the no_lock_functional_test "fails", it says
that the following tests are really inconclusive as the effect of the
tested synchronization mechanism is not proven.
When running with valgrind, no_lock_functional_test failed, probably
because the extra execution time introduced by valgrind itself made
the chance to run the critical section of the different threads "at
the same time" much less probable.
The simple solution is to increase the critical section running time
(by largely increasing the number of iterations performed).
The solution taken here is actually to tune the critical section running
time (currentely to ITER_MPLY_FACTOR=3 times the time needed to note
the first race condition).
This means that the test will take longer to run with valgrind,
but will remain short without valgrind.
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
|
|
Resolving https://bugs.linaro.org/show_bug.cgi?id=2135 by return
over packet allocation failure.
Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org>
Reviewed-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
|
|
Moved create and destroy code out of the _init and _term functions to
become full fledged tests. Add new capabilities and fanin_info tests.
Add a fairly complete set of marking tests. This later change
necessitated a major overhaul in the pkt generation and reception code
so as to allow any combination of vlan header, IPv4 or IPv6, and
UDP or TCP headers.
Signed-off-by: Barry Spinney <spinney@mellanox.com>
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
This patch fixes a bug in parse_ipv6 caused because the IPv6 payload
length does not include the IPv6 header and a bug in parse_udp where
l4_offset was subtracted from l3_offset instead of the other way around.
Also fixed some bugs related to incorrect vlan_hdr_t. The corrected
vlan header then required some fixes to odp_classification.c and the
classifier validation test code. Also added ODPH_IPV6ADDR_LEN.
Finally made a number of cosmetic changes to satisfy checkpatch.
Signed-off-by: Barry Spinney <spinney@mellanox.com>
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Add touch tests for the following APIs:
odp_packet_has_l2_error()
odp_packet_has_l3_error()
odp_packet_has_l4_error()
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Add an additional cast to avoid compile errors in 32-bit mode
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
test update to verify the crypto capability functionality
Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Added queue capability structure and replaced the config API
definitions with it.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Removed pool configuration API from config.h and moved to
use pool capability API instead.
Removed entire all config validation tests, since all config APIs
will move to various capability APIs.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Add CUnit validation tests for the following new packet APIs:
odp_packet_copy_part()
odp_packet_copy_data()
odp_packet_move_data()
odp_packet_copy_from_pkt()
odp_packet_concat()
odp_packet_split()
odp_packet_align()
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Bala Manoharan <bala.manoharan@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Bala Manoharan <bala.manoharan@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Adds classification capability structure and PMR range functionality.
odp_cls_capability_t structure defines system level classification
capability.
Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
odp_pktin_recv_mq_tmo()
Add validation tests for odp_pktin_recv_tmo() and
odp_pktin_recv_mq_tmo() function. Adds also a new helper
function recv_packets_tmo() for testing both functions.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Added packet copy functions:
* partial packet copy
* data copy data from another packet
* data copy within packet
* data move within packet (allow overlap)
Renamed copydata_in and _out functions, so that "to/from memory"
functions are clearly distinctive from the new packet copy
functions.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Normally we would split this into four separate parts, but because they
are interdependent, they need to be in the same patch for bisectability.
API changes:
1) Add VLAN and IP TOS marking functions.
2) Added the requirements and capabilities architecture.
Added separate record types for describing ODP application
requirements vs TM implementation capabilities. This also involved
adding per level requirements and capabilities.
3) Egress parameters are now separate from the requirements
4) Doxygen formatting cleanup.
5) Added _destroy functions for all of the profiles.
6) Added odp_tm_node_disconnect and odp_tm_queue_disconnect fcns.
7) Added odp_tm_node_info, odp_tm_queue_info and odp_tm_node_fanin_info
functions and associated record types.
8) Removed the odp_tm_periodic_update fcn.
linux-generic implementation changes:
Only changes were implementing the new and revised API changes.
validation test changes:
1) Replaced the printf with test_debug.h LOG_ERR.
2) Added a lot more LOG_ERR calls for debugging - especially for
errors in test termination code.
3) Changed create_tm_system to use the new capabilities and
requirements API architecture.
4) Added lots of code to destroy tm_queues, tm_nodes and profiles.
example changes:
1) Changed create_tm_system to use the new capabilities and
requirements API architecture.
2) Renamed Kbps and Mbps to KBPS MBPS.
Signed-off-by: Barry Spinney <spinney@mellanox.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|