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 v2] helper: clarify that ODP must be initialized before calling helper functions #2143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JereLeppanen
Copy link
Collaborator

No description provided.

@odpbuild odpbuild changed the title helper: clarify that ODP must be initialized before calling helper functions [PATCH v1] helper: clarify that ODP must be initialized before calling helper functions Nov 8, 2024
@odpbuild odpbuild changed the title [PATCH v1] helper: clarify that ODP must be initialized before calling helper functions [PATCH v2] helper: clarify that ODP must be initialized before calling helper functions Nov 8, 2024
…nctions

Explicitly state that ODP must be initialized before calling helper
functions. Document exceptions to this rule individually.

This has been the intended interpretation of the helper API all along,
so this is only a clarification, not an API change.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Copy link
Collaborator

@TuomasTaipale TuomasTaipale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess technically we could also allow odph_ipsec_auth_icv_len_default().

@JereLeppanen
Copy link
Collaborator Author

JereLeppanen commented Nov 13, 2024

Yes, and also all functions in stress.h. But I've allowed here only the functions that we are currently calling before initialization. Another option would be to only allow odph_parse_options(), odph_options() and maybe odph_strcpy(), and fix the rest so that they would be called only after initialization.

@TuomasTaipale
Copy link
Collaborator

Only allowing the two option functions, the copy function (and the log macros so logging errors in option error handling would not become cumbersome?) sounds good to me. Have to discuss this with others.

Comment on lines +19 to +21
* ODP must be initialized before calling helper functions, unless stated
* otherwise. Pre-processor macros may be invoked independently of ODP
* initialization.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, this same clause could also be added to some helper API header (for example helper/include/odp/helper/odph_api.h).

@MatiasElo MatiasElo added this to the v1.46.0.0 release milestone Nov 26, 2024
@MatiasElo MatiasElo added the API next API change for next release label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API next API change for next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants