aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-21linux-gen: fix return with expression build errorsMatias Elo
Fix "ISO C forbids 'return' with expression, in function returning void" errors when building with 'pedantic' option. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-10-21linux-gen: pktio: fix empty translation unit build errorsMatias Elo
Fix "ISO C forbids an empty translation unit" errors when building with 'pedantic' option. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-10-21linux-gen: pktio: fix conversion overflow build errorsMatias Elo
Fix "overflow in conversion from 'int' to 'char' changes value" errors when building with 'pedantic' option. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-10-20validation: ipsec: add aes-xcbc testsAnoob Joseph
Add known vectors for NULL-AES-XCBC. Signed-off-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-10-19linux-gen: stash: make maximum number of stashes configurableMatias Elo
Add CONFIG_MAX_STASHES define for configuring the maximum number of stashes an application is able to create. The default value has been increased from 32 to 128. The SHM blocks required by stashes are now taken into account when calculating the number of required implementation internal SHM blocks. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Carl Wallen <carl.wallen@nokia.com>
2021-10-12configure.ac: move project to C standard revision 11Matias Elo
Some C11 features (e.g. anonymous structures and unions) have been already used by the project. Move from C99 to C11 to be standard compliant and enable usage of new features. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-10-12configure.ac: break long linesLifang Zhang
Break long lines into multiple ones to improve readability. Signed-off-by: Lifang Zhang <lifang.zhang@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-10-12linux-gen: shm: use correct path in _odp_ishm_cleanup_files()Matias Elo
_odp_ishm_cleanup_files() failed to unlink old SHM files due to an invalid file path. Fix this by using the correct path, which includes the instance UID. Signed-off-by: Matias Elo <matias.elo@nokia.com> Suggested-by: Christian Hong <guochun.hgc@alibaba-inc.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-12validation: packet: add more packet sanity checking in test casesJanne Peltonen
Add a sanity check that checks that the sum of the segment data lengths equals the total data length and that no segment has zero data length. Do the sanity check in various tests that may modify packet segmentation. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-12linux-gen: atomic: explicitly use staddl for 64-bit add/sub release opsMatias Elo
GCC generates LDADDL instructions when using __atomic_fetch_add() on aarch64. Explicitly use STADDL to implement odp_atomic_add_rel_u64() and odp_atomic_sub_rel_u64() functions for better performance. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Govindarajan Mohandoss <govindarajan.mohandoss@arm.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-10-12linux-gen: atomic: explicitly use staddl for 32-bit add/sub release opsMatias Elo
GCC generates LDADDL instructions when using __atomic_fetch_add() on aarch64. Explicitly use STADDL to implement odp_atomic_add_rel_u32() and odp_atomic_sub_rel_u32() functions for better performance. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Govindarajan Mohandoss <govindarajan.mohandoss@arm.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-10-11Merge ODP v1.32.0.0v1.32.0.0_DPDK_19.11Matias Elo
Merge ODP linux-generic v1.32.0.0 into ODP-DPDK.
2021-10-11Port a369bcd19 "linux-gen: cpu: refactor inlining code"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-11Port 6b93469a7 "linux-gen: packet: fix parsing of segmented packets in ↵Matias Elo
odp_packet_parse()" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-11Port b70771a1d “linux-gen: packet: fix SCTP checksum check with ↵Matias Elo
multi-segment packets" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-11Port adae181a7 "linux-gen: packet: fix packet length checking in IP parsing"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-11Port 50fe59300 "linux-gen: packet: fix Ethernet frame length checking in ↵Matias Elo
parsing" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-11Port ad9638fd9 "linux-gen: packet: fix odp_packet_parse() with non-zero offset"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-11Port 2bc648570 "linux-gen: stash: add support for disabling stash feature"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-11Port c6339d406 "linux-gen: shm: allocate enough resources for internal ↵Matias Elo
allocations" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-11Port f36c9ec60 "linux-gen: shm: rename implementation internal shm blocks"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-11Port bf4f2390d "linux-gen: packet: implement minimal odp_packet_reass_info()"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-11Port 3c40dfc7a "linux-gen: queue: improve queue debug print"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-11Port c6f4b3a46 "linux-gen: sched: add scheduler identifier"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-11Port cb8d8942b "linux-gen: sched: limit interface header visibility"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-11linux-dpdk: packet: fix trunc_tail leaving last segment emptyJanne Peltonen
odp_packet_trunc_tail() uses rte_pktmbuf_trim() if possible, but that will succeed also if the trimmed length equals the last segment length, leaving the last segment empty of data. ODP API does not appear to allow such zero length packet segments even though it is not explicitly said. Fix the problem by calling rte_pktmbuf_trim() only after checking that the truncation length is strictly smaller than the last segment length. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-10-11linux-dpdk: packet: fix segment length setting in extend_headJanne Peltonen
When odp_packet_extend_head() prepends new segments in a packet, it will set the data length of the old head segment to the full buffer length, which is incorrect if the data does not extend to the end of the segment. Fix the problem by incrementing the data length of the old head segment by the old headroom, which is the actual amount of data added in the segment. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-10-11linux-dpdk: crypto: try to handle segmented packets betterJanne Peltonen
Try to linearize segmented packets by shifting packet data in the first segment if it fits there with some headroom. This is done if the crypto device does not support chained mbufs. This will not help with large packets but is sufficient for the short segmented packets that are used in the current API validation tests. If linearization cannot be done, the crypto operation will fail. This change assumes that odp_crypto_operation() does not promise not to shift packet data within the packet when performing in-place crypto. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-10-11linux-gen: dpdk: packet parsing fixesMatias Elo
Merge fixes done to the generic packet parsing code (ad9638fd9, 50fe59300, adae181a7) into the DPDK specific packet parsing implementation. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-11validation: ipsec: update orig IP len to cover reassembly casesAnoob Joseph
In case of successful reassembly tests, the original IP length would be the aggregate of IP lengths of all individual fragments. Update the test framework to have a field 'orig_ip_len' to be able to cover cases when expected len differs from that of the input test packet available with 'ipsec_test_part'. Signed-off-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-10-06validation: ipsec: allow orig_ip_len to be unavailableJanne Peltonen
The API specifies that zero odp_ipsec_packet_result_t::orig_ip_len means that the length is not available. Check orig_ip_len against the original packet length only when it is available. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2021-10-05Merge tag 'v1.32.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2021-10-04github_ci: add test for alternate timer implementationMatias Elo
Add new test for the alternate DPDK timer implementation. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-04linux-dpdk: timer: add new implementation using alt dpdk timerMatias Elo
Add new timer implementation using DPDK alternate timer API. The main difference compared to the standard implementation is that threads can also process timers set by any other thread. The alternate timer implementation can be enabled with 'timer.alternate' configuration file option. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-04linux-dpdk: thread: add counter for tracking thread mask changesMatias Elo
Add epoch counter for tracking changes to the global thread mask. An internal helper function _odp_thread_thrmask_epoch() is added for reading the epoch value. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-04linux-dpdk: thread: add internal helper function for reading active cpu idsMatias Elo
_odp_thread_cpu_ids() writes the CPU IDs of active ODP threads to the output array. This information is required by the alternate DPDK timer implementation. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-04linux-dpdk: remove unused symbolic linksMatias Elo
Remove symbolic links to nonexistent files. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-04github_ci: add tests for Armv8-a and Armv8.2-a ISAMalvika Gupta
Add cross-compilation and native job for ARMv8-a with LSE extensions to enable atomic_fetch_add performance optimizations. In addition, jobs have been added for Armv8.2-a ISA to execute lockless 128-bit atomic APIs. Signed-off-by: Malvika Gupta <Malvika.Gupta@arm.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-10-04linux-gen: atomic: use STADD explicitly for aarch64 atomic add operationsMalvika Gupta
By default, GCC generates the LDADD/LDADDL instruction for atomic add/sub/inc/dec functions. These functions could also be implemented on ARMv8.1 ISA (and above) with the store version, STADD/STADDL instruction which result in better performance for fastpath applications. Signed-off-by: Malvika Gupta <Malvika.Gupta@arm.com> Reviewed-by: Govindarajan Mohandoss <govindarajan.mohandoss@arm.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-10-01api: increment ODP API version to 1.32.0.0Matias Elo
Increment API version number to reflect the following changes: Backward incompatible: * ipsec: added destination queue capabilities odp_ipsec_capability_t.queue_type_sched and odp_ipsec_capability_t.queue_type_plain * ipsec: modified specification to not promise the original packet back after all error cases Backward compatible: - ipsec: added original ESP/AH packet length into IPsec packet result (odp_ipsec_packet_result_t.orig_ip_len) - packet: added odp_packet_reass_info() function for reading completed reassembly details - std: moved all contents of support and feature modules into ODP Std module Helper library (1.2.0): Backward incompatible: - cli: replaced odph_cli_start() function with odph_cli_run(), which doesn't automatically create a separate thread for running the CLI server. - linux: deprecated odph_odpthread_t and odph_odpthread_params_t types - linux: added odph_thread_param_init() function for initializing thread parameters - linux: added odph_thread_common_param_init() function for initializing thread common parameters Backward compatible: - cli: added odph_cli_param_t.hostname parameter for providing a custom CLI prompt hostname - cli: added odph_cli_log_va() function for user defined CLI commands - linux: added odph_thread_param_t.stack_size parameter for configuring minimum thread stack size - linux: added odph_thread_common_param_t.sync_timeout parameter for configuring synchronized thread creation timeout Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-09-30linux-gen: cpu: refactor inlining codeMatias Elo
Refactor CPU ABI and implementation files to follow common project inlining style. odp_cpu_pause() function is now defined only once per architecture. After this clean-up it's simpler for an implementation to add inlined versions of CPU module functions. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-09-30helper: cli: allow user to provide own hostnameLifang Zhang
Hostname will be displayed as the first part of the prompt. Signed-off-by: Lifang Zhang <lifang.zhang@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-09-30helper: cli: delete max_user_commands from struct cli_shm_tLifang Zhang
After adding odph_cli_param_t to struct cli_shm_t in the previous commit, max_user_commands is redundant since it is also included in struct odph_cli_param_t. Signed-off-by: Lifang Zhang <lifang.zhang@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-09-30helper: cli: add odph_cli_param_t to cli_shm_tLifang Zhang
This allows other functions to access cli parameters without modifying their function parameters. Signed-off-by: Lifang Zhang <lifang.zhang@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-09-30helper: cli: add new API function odph_cli_log_va()Lifang Zhang
This new function is similar to odph_cli_log() except that it takes its arguments as a va_list. Signed-off-by: Lifang Zhang <lifang.zhang@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-09-30helper: cli: don't create the server threadJere Leppänen
Add odph_cli_run() and remove odph_cli_start(). Don't create a thread in the CLI helper. Instead, the caller may create a thread and call odph_cli_run() to run the CLI. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Cc: Lifang Zhang <lifang.zhang@nokia.com>
2021-09-30helper: threads: deprecate odph_odpthread_t and odph_odpthread_params_tJere Leppänen
Document odph_odpthread_t and odph_odpthread_params_t as deprecated. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-09-30use odph_thread_create() instead of odph_odpthreads_create()Jere Leppänen
Use the newer odph_thread_create() and odph_thread_join() functions in examples and tests instead of the deprecated odph_odpthreads_create() and odph_odpthreads_join(). Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-09-30helper: test: test new thread parametersJere Leppänen
Create threads also with non-default values for the new thread parameters stack_size and sync_timeout. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-09-30helper: test: test odph_thread_create() instead of odph_odpthreads_create()Jere Leppänen
Test the newer odph_thread_create() and odph_thread_join() functions instead of the deprecated odph_odpthreads_create() and odph_odpthreads_join(). Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>