diff --git a/doc/helper-guide/odp.dox b/doc/helper-guide/odp.dox index ae341918e7..9442860026 100644 --- a/doc/helper-guide/odp.dox +++ b/doc/helper-guide/odp.dox @@ -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. + * * @section contact Contact Details * - The main web site is http://www.opendataplane.org/ * - The git repo is https://github.com/OpenDataPlane/odp.git diff --git a/helper/include/odp/helper/eth.h b/helper/include/odp/helper/eth.h index 2a1f3f159b..3ae16edb85 100644 --- a/helper/include/odp/helper/eth.h +++ b/helper/include/odp/helper/eth.h @@ -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 * diff --git a/helper/include/odp/helper/ip.h b/helper/include/odp/helper/ip.h index bbae401b24..be8e37d982 100644 --- a/helper/include/odp/helper/ip.h +++ b/helper/include/odp/helper/ip.h @@ -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 * diff --git a/helper/include/odp/helper/odph_api.h b/helper/include/odp/helper/odph_api.h index 2541efa89a..ebc737344d 100644 --- a/helper/include/odp/helper/odph_api.h +++ b/helper/include/odp/helper/odph_api.h @@ -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_ diff --git a/helper/include/odp/helper/string.h b/helper/include/odp/helper/string.h index 25096f0fdb..c3dc8b6a15 100644 --- a/helper/include/odp/helper/string.h +++ b/helper/include/odp/helper/string.h @@ -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. diff --git a/helper/include/odp/helper/threads.h b/helper/include/odp/helper/threads.h index ca420e80a3..04eab27cf7 100644 --- a/helper/include/odp/helper/threads.h +++ b/helper/include/odp/helper/threads.h @@ -347,6 +347,8 @@ int odph_odpthread_getaffinity(void); * pthreads are used instead. * * + * This function may be called before ODP initialization. + * * @param argc Argument count * @param argv Argument vector * @@ -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 diff --git a/helper/include/odp/helper/version.h.in b/helper/include/odp/helper/version.h.in index e576de561e..19bc64203b 100644 --- a/helper/include/odp/helper/version.h.in +++ b/helper/include/odp/helper/version.h.in @@ -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);