aboutsummaryrefslogtreecommitdiff
path: root/helper/include
AgeCommit message (Collapse)Author
2021-11-12helper: threads: deprecate old functions and parametersJere Leppänen
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>
2021-11-12helper: implement deprecationJere Leppänen
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>
2021-11-12helper: cli: remove unused instance parameter from odph_cli_init()Jere Leppänen
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>
2021-10-21helper: fix zero-size array build errorsMatias Elo
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>
2021-10-21helper: debug: fix variadic macro build errorsMatias Elo
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>
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: 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-30helper: threads: add thread stack size parameterJere Leppänen
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>
2021-09-30helper: threads: add synchronized thread creation timeout parameterJere Leppänen
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>
2021-09-30helper: threads: add odph_thread_param_init()Jere Leppänen
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>
2021-09-30helper: threads: add odph_thread_common_param_init()Jere Leppänen
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>
2021-07-08helper: ipsec: check ICV length when checking auth capabilityJanne Peltonen
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>
2021-06-01helper: cli: add user command functionsJere Leppänen
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>
2021-02-23helper: add CLI helper API and implementationJere Leppänen
CLI helper API allows starting and stopping ODP CLI server, which may be connected to using a telnet client. CLI commands may be used to get information from an ODP instance, for debugging purposes. This implementation depends on libcli. If libcli is not available, CLI helper is automatically excluded. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-02-23helper: create autoheaderJere Leppänen
Create autoheader_external for helper and move there the ODPH_* defines from odp autoheader_external. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-02-05helper: ipsec: add algorithm check functionAakash Sasidharan
Add IPSEC check function to see whether a requested algorithm configuration is supported by the platform. Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2020-12-21helper: add odph_igmp header descriptionKiran Kumar K
Adds IGMP header description struct odph_igmphdr_t in helper directory. This structure is used for accessing IGMP header information from the packet. Signed-off-by: Kiran Kumar K <kirankumark@marvell.com> Signed-off-by: Satheesh Paul <psatheesh@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2020-12-21helper: add odph_gtp header descriptionKiran Kumar K
Adds GTP header description struct odph_gtphdr_t in helper directory. This structure is used for accessing GTPU header information from the packet. Signed-off-by: Kiran Kumar K <kirankumark@marvell.com> Signed-off-by: Satheesh Paul <psatheesh@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2020-09-03helper: fixup internal doxygen docsStanislaw Kardach
@internal is improperly used to hide the internal documentation of the helper. Newer doxygen (1.8.17) reports syntax errors on most of the doxytags in the file in this commit. Analysing the commit history it seems that most of the tags were added to remove doxygen warnings. Therefore switch to a method which is widely used in other places in ODP. Signed-off-by: Stanislaw Kardach <skardach@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com> Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-10-07linux-gen: include only ODP defines in autogenerated header filesMatias Elo
The config.h file has been split into three parts: autoheader_build.h: should NOT be included by ANY source file autoheader_external.h: can be included by any source file, including public headers autoheader_internal.h: can be included by any internal source file, but NOT by public headers autoheader_external.h and autoheader_internal.h are generated based on matching template files (*.in) and include only ODP defines. autoheader_build.h includes all build defines and should not be included by any source file. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2019-09-27linux-gen: include config.h header in install directoryMatias Elo
Previously, config.h header was not included in install dir. This caused a compilation failure when an application tried to include ODP helper headers. config.h has been moved to include/odp subdirectory to avoid naming conflicts and unnecessary includes have been removed. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reported-by: Mikko Parpala <mikko.parpala@nokia.com>
2019-09-19helper: debug: remove duplicate ODPH_UNUSED macroMatias Elo
ODP API already has ODP_UNUSED macro. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2019-09-19helper: debug: add missing config header includeMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2019-08-20helper: debug: move odph_debug.h into helper APIPetri Savolainen
Moved the debug header to be part of the helper API. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2019-08-20helper: debug: add ODPH_ASSERT macroPetri Savolainen
Added assert macro to be used by test applications. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2019-05-09helper: thread: implement new thread create and joinPetri Savolainen
Implemented new thread create and join functions. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Stanislaw Kardach <skardach@marvell.com>
2019-05-09helper: thread: new thread create and join callsPetri Savolainen
Defined new versions of thread create and join calls. New calls explicitly support thread create and join in multiple steps. Also per thread and common parameters are improved. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Stanislaw Kardach <skardach@marvell.com>
2019-05-09helper: add helper version definesPetri Savolainen
Added helper library version defines, so that application can track helper version independent of ODP API version. Added also function for easy print out of the versions number. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Stanislaw Kardach <skardach@marvell.com>
2018-11-28helper: threads: add odph_options() getter functionMatias Elo
Add function for reading parsed linux helper options. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-11-28helper: threads: replace odph_linux_thread_type_t with odp_mem_model_tMatias Elo
Replace enum odph_odpthread_linuxtype_t with odp_mem_model_t. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-08-22helper: add SCTP handling functionsDmitry Eremin-Solenikov
Add functions to set and verify SCTP packet checksum. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-08-22helper: add SCTP protocol headerDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-05-14helper: thread: don't use getopt libraryPetri Savolainen
Don't use getopt library calls for helper options. Getopt library reset is not portable in practice. Library interface includes global variables and different internal state variables depending on POSIX version. There's no need for helper to use getopt calls or set getopt global variables at all. It's much more simple (and portable) to remove helper options from argv[] and return new value for argc. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-02-26update Linaro Copyrights to 2018 yearMaxim Uvarov
Using simple commands: find . -not -path .git -type f -exec \ sed -i -E 's/ (201[0-9]), Linaro/ \1-2018, Linaro/g' {} + find . -not -path .git -type f -exec \ sed -i -E 's/ (201[0-9])(-201[0-9]), Linaro/ \1-2018, Linaro/g' {} + Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
2018-02-12helper: adjust strong types to remove high bit truncationDmitry Eremin-Solenikov
Strong types interface was truncating 32 MSB on 64-bit platforms, which is plain wrong. Prevent it from doing that by using uintptr_t internally. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-01-14helper: remove camelcase from icmp protocolBill Fischofer
Change ODPH_IPPROTO_ICMPv4 and ODPH_IPPROTO_ICMPv6 to ODPH_IPPROTO_ICMPV4 and ODPH_PROTO_ICMPV6 to eliminate camelcase issues in ODP examples. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Bogdan Pricope <bogdan.pricope@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-12-27helper: use new odp checksum APIDmitry Eremin-Solenikov
Use odp_chksum_ones_comp16 which may be platform-optimized. This removes now unnecessary odph_cksum() function. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-09-15doc: helper: add missing doxygen to avoid warningsBill Fischofer
The latest version of Doxygen requires every struct and field to be documented, so add missing documentation to helper files to avoid superfluous warnings. This resolves Bug https://bugs.linaro.org/show_bug.cgi?id=3238 Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-09-04helper: chksum: add few guarding conditionsDmitry Eremin-Solenikov
Add few guarding conditions, otherwise bad packet can hang up ODP code. Noted by one of the corner case tests for IPsec. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-08-29helper: ip: correct ipv4 header checksum calculationDmitry Eremin-Solenikov
Current code for IPv4 header checksum calculation assumes that packet data is aligned on 2-byte boundary, that there are no optional headers, etc. Rewrite checksumming code to properly copy & process headers. https://bugs.linaro.org/show_bug.cgi?id=2976 Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-08-29helper: chksum: odph_chksum returns value in network byte orderDmitry Eremin-Solenikov
All examples and usecases assumed network byte order for odph_chksum() return value. Instead of changing this convention, rather document that odph_chksum returns value in network byte order. https://bugs.linaro.org/show_bug.cgi?id=2976 Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-08-28helper: move include files to helper/includeDmitry Eremin-Solenikov
Repair build with --enable-helper-linux option. https://bugs.linaro.org/show_bug.cgi?id=3216 Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-06-16helper: add additional doxygen documentationBill Fischofer
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2952 by adding additional field documentation to avoid problems with doxygen 1.8.13 and higher. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-06-16linux-gen: packet: recognize ICMPv6 packetsMatias Elo
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>
2017-03-02helper: linux: add common linux helper filePetri Savolainen
Added common helper file for backwards compatibility. This file includes all headers under helper/linux directory. It's installed only with --enable-helper-linux configuration option. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-02-16helper: linux: renamed threads_extn to linux helpersPetri Savolainen
There's no platform specific helpers. Helpers may depend on Linux and make it easier to do common series of Linux system calls. These kind of helpers are grouped into helper/linux directory. Use --enable-helper-linux configuration option to enable support for Linux helpers. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-02-09doc: helper: add missing doxygen for helper table functionsBill Fischofer
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2865 by adding missing doxygen documentation for helper table functions Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-01-25helper: use odph_api.h for test include for unexported filesMike Holmes
Adding the previously missing table functions to the public helper api allows the tests to use just odph_api.h Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Christophe Milard <christophe.milard@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>