Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
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>
|
|
Add known vectors for NULL-AES-XCBC.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
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>
|
|
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>
|
|
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>
|
|
_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>
|
|
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>
|
|
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>
|
|
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>
|
|
Merge ODP linux-generic v1.32.0.0 into ODP-DPDK.
|
|
Port original commit from linux-generic.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
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>
|
|
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>
|
|
Port original commit from linux-generic.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
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>
|
|
Port original commit from linux-generic.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Port original commit from linux-generic.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
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>
|
|
Port original commit from linux-generic.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Port original commit from linux-generic.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Port original commit from linux-generic.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Port original commit from linux-generic.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Port original commit from linux-generic.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Matias Elo <matias.elo@nokia.com>
|
|
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>
|
|
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>
|
|
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>
|
|
_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>
|
|
Remove symbolic links to nonexistent files.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|