aboutsummaryrefslogtreecommitdiff
path: root/example
AgeCommit message (Collapse)Author
2024-01-03example: improve example application documentationsMatias Elo
Include short description in Doxygen output for each example application. The documentations are moved to application source files for ease of maintenance. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2024-01-02test: timer: add timer free return value checksPetri Savolainen
Add missing timer free return value checks into various timer test applications. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-12-21quell false positive GCC 13.1 warningsJere Leppänen
Quell false positive GCC 13.1 -Warray-bounds and -Wstringop-overflow warnings. The warnings still appear during LTO linking, because GCC does not carry diagnostic pragmas to the linking stage. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2023-12-20api: cls: remove capability fieldTuomas Taipale
Remove `available_pmr_terms` as obsolete and unused. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Kiran Kumar Kokkilagadda <kirankumark@marvell.com>
2023-12-20api: cls: rename capability fieldTuomas Taipale
Rename `max_pmr_terms` to `max_terms_per_pmr` to better match its intended purpose. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Kiran Kumar Kokkilagadda <kirankumark@marvell.com>
2023-12-20linux-gen: cls: fill new packet matching rule capabilitiesTuomas Taipale
Fill new `max_pmr` and `max_pmr_per_cos` packet matching rule capabilities. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-12-20api: timer: deprecate odp_timeout_fresh()Petri Savolainen
Remove the function to check if a timeout is from a timer that was tried to be restarted or cancelled (the try failed), or from a timer that was freed. The feature is not very useful to applications, since freshness result depends on timing of those API calls vs the freshness check point. Also, an application should be able to maintain the same status information itself if needed. 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> Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2023-12-20example: start using new odp_timer_pool_start_multi() callMatias Elo
Update example applications to utilize new odp_timer_pool_start_multi() API. 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-12-19api: timer: only inactive timers can be freedPetri Savolainen
Remove possibility to free a timer that is running. When timer free call returns, the timer handle cannot be referenced any more. Expiration and event delivery of an already destroyed timer is an error prone corner case. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2023-12-14example: debug: call odp_pktio_extra_stats_print()Petri Savolainen
In pktio case, call extra statistics print in addition to pktio print. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-11-29example: timer_accuracy: fix CPU count default valuePetri Savolainen
According to help, test runs on single CPU by default. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2023-10-26test: harmonize main function signaturesKameswar Rao Vaddina
Use ODP_UNUSED for intentionally unused variables of functions. Thereby, harmonizing the main function signatures across multiple files. Signed-off-by: Kameswar Rao Vaddina <kameswar.vaddina@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-10-23example: timer_accuracy: use new ODPH_ABS macroMatias Elo
Utilize new ODPH_ABS() macro in timer accuracy example application. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-10-23example: use new ODPH_MIN and ODPH_MAX macrosMatias Elo
Utilize new ODPH_MIN() and ODPH_MAX() macros in example applications. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-10-23helper: icmp: remove and rename definesMatias Elo
Remove unused ICMP defines and add missing ODPH_ prefix to the remaining ones. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-10-20example: sysinfo: detect new ARMv8 and v9 ISAsMatias Elo
Add support for ARM ISA versions ARMv8.8-A, ARMv8.9-A, and ARMv9.3-A. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-10-20example: ping: use new ODP_PKTIO_MAX_INDEX defineMatias Elo
Replace MAX_PKTIO_INDEXES with ODP_PKTIO_MAX_INDEX API define, which value is quaranteed to be >= odp_pktio_max_index() and odp_pktio_index(). Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-10-18example: timer_accuracy: fix schedule wait timeJere Leppänen
Schedule wait time is not in nanoseconds. Convert by calling odp_schedule_wait_time(). Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-10-10example: timer_accuracy: add schedule groups optionJere Leppänen
Add an option (-G, --sched_groups) to use a dedicated schedule group for each queue. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-10-10example: timer_accuracy: add number of queues optionJere Leppänen
Add an option (-q, --num_queue) to set the number of queues. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-10-10example: timer_accuracy: add queue sync type optionJere Leppänen
Add an option (-t, --queue_type) to set the queue sync type. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-10-10example: timer_accuracy: add cpu count optionJere Leppänen
Add an option (-c, --count) to set the cpu count. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-10-10example: timer_accuracy: use shm for global dataJere Leppänen
To prepare for supporting multiple workers, use shm for test_global_t, timer context table and test log. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-10-10example: timer_accuracy: fix warmup with one-shot timersJere Leppänen
The test doesn't complete with one-shot timers and nonzero warmup periods (-w option), because we don't create timers for warmup in mode 0, and we stop re-starting timers too soon in modes 1 and 2. Fix it. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-10-10example: timer_accuracy: make first timeout diff and final timeout error ↵Jere Leppänen
timer specific Make first timeout diff and final timeout error timer specific by storing them in the timer context. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-09-19example: sysinfo: add timer pool start callMatias Elo
Call odp_timer_pool_start() before querying timer pool info. Depending on the implementation, some information may only be available after the timer pool has been started. Also, print clock source in case of timer API call failures. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-09-12example: sysinfo: print timer pool tick informationMatias Elo
Print timer pool tick info from odp_timer_pool_info(). Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-09-06example: sysinfo: print missing capabilitiesMatias Elo
Print missing capabilities and units in sysinfo example. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-09-06example: sysinfo: make exit codes uniformMatias Elo
Use EXIT_SUCCESS/EXIT_FAILURE always when exiting the application. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-09-06example: sysinfo: use ODPH_ERR() for error printsMatias Elo
Use ODPH_ERR() helper macro for all error prints. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-09-06example: sysinfo: improve timer capability printsMatias Elo
Print timer capabilities, including periodic, for all supported clock sources in sysinfo example. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-09-06example: sysinfo: print proto stats capabilitiesMatias Elo
Print odp_proto_stats_capability() output in sysinfo example. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-09-06example: sysinfo: print pktio capabilitiesMatias Elo
Print odp_pktio_capability() output in sysinfo example. Also, help print has been added for the application. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-09-06example: sysinfo: print external packet pool capabilitiesMatias Elo
Print odp_pool_ext_capability() output in sysinfo example. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-08-14example: fix typosTianyu Li
Fix spelling errors found by crate-ci/typos. Signed-off-by: Tianyu Li <tianyu.li@arm.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-06-08test: timer: use timer_retval_t instead of timer_set_tPetri Savolainen
Update test applications to use odp_timer_retval_t instead of odp_timer_set_t, which will be deprecated later. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2023-06-08example: timer_accuracy: allow leeway for first periodic timeout when ↵Jere Leppänen
first_tick is zero When periodic first_tick is zero, the API allows the implementation to place the timer where it can. Account for that by taking the first timeout tick as a baseline, or if that's not available, then just use the current time when the timer first expires. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Shijith Thotton <sthotton@marvell.com>
2023-04-13example: classifier: remove usage of odp_errnoMatias Elo
Setting odp_errno has been removed from odp_pktio_open() API. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-04-12example: ipsec_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-12example: ipsec_crypto: simplify crypto operation result checkingJanne Peltonen
Check only odp_crypto_packet_result_t::ok to see if a crypto operation succeeded. There is no need to check the status fields to second-guess the validity of the ok field. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-04-05example: timer_accuracy: use requested timer frequencyPetri Savolainen
Compare measured timer period to the requested timer frequency in parameters, instead of timer frequency passed in the command line options. Depending on timer capability, the frequency from options may be changed to the frequency returned by periodic timer capability call. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-04-05example: timer_accuracy: utilize periodic timer resolution capabilityPetri Savolainen
With periodic timer, requested timer frequency (and max multiplier) may affect maximum timer resolution. Added option (-r -1) to use resolution returned by periodic timer capability call. Also, leave min/max timeout parameters to defaults, as periodic timer pool create ignores those. Separeted single shot and period timer pool parameter setup, so that it is easier to follow how parameter values are formed. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-03-07example: timer_accuracy: add warmup periods optionJere Leppänen
Add option -w, which specifies the number of warmup periods. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-03-07example: timer_accuracy: print final timeout errorJere Leppänen
Print the timing error for the final timeout. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-03-07example: timer_accuracy: print min and max error event indicesJere Leppänen
Print the indices of events that produced the minimum and maximum timing errors. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-03-07example: timer_accuracy: add periodic timer modeJere Leppänen
Add a new mode (-m 3), which uses the periodic timer API. Add -P and -M options, which allow specifying periodic timer pool parameters and periodic timer multiplier. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-03-07example: ipsec_crypto: switch to basic crypto operation typeJanne Peltonen
Simplify the example by switching to ODP_CRYPTO_OP_TYPE_BASIC from ODP_CRYPTO_OP_TYPE_LEGACY. Remove the selection between in-place and new-buffer API modes as the basic operation type always consumes the input packets and produces a new output packet. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-12-29example: debug: remove deprecated odp_timer_set_rel() functionMatias Elo
Stop using deprecated odp_timer_set_rel() function. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-12-29example: timer_test: remove deprecated odp_timer_set_abs() functionMatias Elo
Stop using deprecated odp_timer_set_abs() function. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-12-29example: timer_simple: remove deprecated odp_timer_set_abs() functionMatias Elo
Stop using deprecated odp_timer_set_abs() function. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>