Age | Commit message (Collapse) | Author |
|
Instead of passing capability structure to `odph_ipsec_alg_check()` as
value, pass read-only pointer to it.
Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
To improve readability of logs, add a space after the file, line and
function information.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
|
|
Call fprintf() in just one place in ODPH_LOG. As a nice side effect,
print format warnings also appear just once, instead of three times.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
|
|
Commit a0237360e745 ("helper: debug: fix variadic macro build errors")
also disabled print format warnings as a side effect. Remove the
pragma used in that commit, and instead avoid the variadic macro
warnings with '__extension__' keyword.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
|
|
Initialize also tos, frag_offset and ttl. Uninitialized values can
cause the test to fail.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add more debug information to thread startup timeout error message from
odph_thread_create().
Signed-off-by: Juha Kauraniemi <juha.kauraniemi@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
pkg-config --static"
This reverts commit b0aac4a0fcb21a7ddaa7a3540857878df6197ecb.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Carl Wallen <carl.wallen@nokia.com>
|
|
pkg-config --static
On some distros (Fedora), $CC -static doesn't work, because static
system libraries are not available. Provide options to explicitly link
static libodphelper via pkg-config --static, so that application can
link libodphelper statically without the -static linker option.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Add command odp_schedule_print.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add command odp_pool_print_all.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Alphabetize CLI commands. Also, use a macro to make the command
registering code more compact.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Prefix pktio_*_stats_print commands with "odp_".
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Drop the "call" command and put all the commands on top level.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Memory for odph_thread_create() output thread table is given by
application, so there is no guarantee that the memory can be used to
synchronize child process startup. Fix this by using mmap() to create the
necessary memory for thread startup synchronization.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
This reverts commit 65a7f559c173ddbe9738c9c03bf9dbfc52279bc0.
cli.h is optional, so it cannot be included unconditionally.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Use an explicit cast to avoid conversion warnings, when application is
compiled with gcc-7 and -Wconversion option.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Use an explicit cast to avoid conversion warning in odph_ipv4_csum(),
when application is compiled with -Wconversion option.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Allow application to individually include cli.h, instead of only via
odph_api.h. In order to do this, move the conditional to cli.h and
include the autoheader there as well.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Instead of setting CFLAGS (and CXXFLAGS, LDFLAGS) in configure, use
ODP_CFLAGS instead. Then, in main level Makefile.inc, set AM_CFLAGS
based on ODP_CFLAGS. Consequently, program_CFLAGS will work as
intended.
Also, don't do AC_SUBST([LIBS]). LIBS is handled automatically, since
it's a preset variable.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
If vsnprintf() fails, log an error and return error status.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
|
|
Add commands to print packet I/O total, queue, event queue and extra
statistics.
Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Added three missing ODP API header includes and removed one
include that was not needed.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Remove deprecated odp.h header file which has been replaced by odp_api.h.
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>
|
|
Get rid of a warning by GCC 11 about a comparison between an unsigned
variable and a signed literal.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Stop using deprecated SHM flag ODP_SHM_SW_ONLY.
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 odph_thread_param_t::instance, odph_odpthread_t,
odph_odpthread_params_t, 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>
|
|
Implement deprecation in the helper library. Deprecated helper APIs
may be enabled with the --enable-helper-deprecated configure
option. By default, deprecated helper APIs are not enabled.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Now that the CLI helper no longer creates a thread, the ODP instance
is not needed by odph_cli_init().
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Rename thread helper test's global variable 'odp_instance', which clashes
with the new odp_instance() API.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Fix "ISO C forbids zero-size array" 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 C99 requires at least one argument for the "..." in a
variadic macro" and "token pasting of ',' and __VA_ARGS__ is a GNU
extension" errors when building with 'pedantic' option.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@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>
|
|
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>
|
|
Add a parameter in odph_thread_param_t, which allows specifying the
minimum thread stack size. This parameter is used only in
odph_thread_create(), it is ignored in odph_odpthreads_create().
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Add a parameter to odph_thread_common_param_t, which allows specifying
the time to wait for the synchronization signal in synchronized thread
creation.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Use the new odph_thread_param_init() function to initialize
odph_thread_param_t.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Add helper API function to initialize thread parameters.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Use the new odph_thread_common_param_init() function to initialize
odph_thread_common_param_t.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Add helper API function to initialize thread common parameters.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
When checking IPsec algorithm support, check that the default ICV length
is supported. This patch does not add support for non-default ICV lengths
in the helper.
Add a helper function that returns the default ICV length for an algorithm.
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>
|
|
AES-CMAC authentication algorithm is supported in ODP IPsec API
but was not recognized by the IPsec algorithm capability checking
helper function. Add AES-CMAC in the helper.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Allow user to register CLI commands with a name, function, and an
optional help text.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
The only way to stop cli_loop() is to close the socket. But after
closing, cli_loop() still uses or closes the file descriptor, which is
a problem if the file descriptor has already been reused.
Try to avoid this problem by using dup2() to switch to a higher file
descriptor number. Also avoid double closes outside cli_loop() with a
couple of small tweaks.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add a CLI command, which calls the new odp_queue_print_all() API
function.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|