Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH v6] helper: clarify that ODP must be initialized before calling helper functions #2143

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/helper-guide/odp.dox
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
*
* @image html overview.svg
*
* ODP must be initialized before calling helper functions, unless stated
* otherwise. Pre-processor macros may be invoked independently of ODP
* initialization.
MatiasElo marked this conversation as resolved.
Show resolved Hide resolved
*
* @section contact Contact Details
* - The main web site is http://www.opendataplane.org/
* - The git repo is https://github.com/OpenDataPlane/odp.git
Expand Down
2 changes: 2 additions & 0 deletions helper/include/odp/helper/eth.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ ODP_STATIC_ASSERT(sizeof(odph_vlanhdr_t) == ODPH_VLANHDR_LEN,
* and may have leading zeros. String does not have to be NULL terminated.
* The address is written only when successful.
*
* This function may be called before ODP initialization.
*
* @param[out] mac Pointer to Ethernet address for output
* @param str MAC address string to be parsed
*
Expand Down
2 changes: 2 additions & 0 deletions helper/include/odp/helper/ip.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ typedef struct ODP_PACKED {
* NULL terminated. The address is written only when successful. The address
* byte order is CPU native.
*
* This function may be called before ODP initialization.
*
* @param[out] ip_addr Pointer to IPv4 address for output (in native endian)
* @param str IPv4 address string to be parsed
*
Expand Down
3 changes: 3 additions & 0 deletions helper/include/odp/helper/odph_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
*
* The OpenDataPlane helper API
*
* ODP must be initialized before calling helper functions, unless stated
* otherwise. Pre-processor macros may be invoked independently of ODP
* initialization.
*/

#ifndef ODP_HELPER_H_
Expand Down
2 changes: 2 additions & 0 deletions helper/include/odp/helper/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ extern "C" {
* terminated, unless sz is zero in which case returns dst without doing
* anything else.
*
* This function may be called before ODP initialization.
*
* @param[out] dst Pointer to destination string.
* @param src Pointer to source string.
* @param sz Destination size.
Expand Down
4 changes: 4 additions & 0 deletions helper/include/odp/helper/threads.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ int odph_odpthread_getaffinity(void);
* pthreads are used instead.
* </table>
*
* This function may be called before ODP initialization.
*
* @param argc Argument count
* @param argv Argument vector
*
Expand All @@ -361,6 +363,8 @@ int odph_parse_options(int argc, char *argv[]);
* Return used ODP helper options. odph_parse_options() must be called before
* using this function.
*
* This function may be called before ODP initialization.
*
* @param[out] options ODP helper options
*
* @return 0 on success, -1 on failure
Expand Down
2 changes: 2 additions & 0 deletions helper/include/odp/helper/version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ extern "C" {
*
* The string is null terminated.
*
* This function may be called before ODP initialization.
*
* @return Pointer to helper library version string
*/
const char *odph_version_str(void);
Expand Down