Skip to content

[PATCH v3] api: event: add event type metadata to event vectors #2217

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

JannePeltonen
Copy link
Collaborator

Change odp_event_vector_type() to not return the type of events actually stored in the event vector but the event type stored in event vector metadata and add odp_event_vector_type_set() to set the event type. Specify that event aggregators set the event type according to the event types they put in the event vector and require that applications use odp_event_vector_type_set() to update the event type of a vector after vector table modifications.

This way odp_event_vector_type() can be used largely as before, but an ODP implementation is not forced to loop through the vector every time odp_event_vector_type() is called.

@odpbuild odpbuild changed the title api: event: add event type metadata to event vectors [PATCH v1] api: event: add event type metadata to event vectors May 12, 2025
@odpbuild odpbuild changed the title [PATCH v1] api: event: add event type metadata to event vectors [PATCH v2] api: event: add event type metadata to event vectors May 13, 2025
@JannePeltonen
Copy link
Collaborator Author

v2: fixed misspelling of ODP_EVENT_ANY.

Change odp_event_vector_type() to not return the type of events actually
stored in the event vector but the event type stored in event vector
metadata and add odp_event_vector_type_set() to set the event type.
Specify that event aggregators try to set the event type according to
the event types they put in the event vector and require that applications
use odp_event_vector_type_set() to update the event type of a vector
after vector table modifications.

This way odp_event_vector_type() can be used largely as before, but
an ODP implementation is not forced to loop through the vector every
time odp_event_vector_type() is called.

Signed-off-by: Janne Peltonen <[email protected]>
Implement event type metadata in event vectors.

Signed-off-by: Janne Peltonen <[email protected]>
Modify the tests to use odp_event_vector_type_set() and to take
the new semantics of odp_event_vector_type() into account.

Signed-off-by: Janne Peltonen <[email protected]>
@odpbuild odpbuild changed the title [PATCH v2] api: event: add event type metadata to event vectors [PATCH v3] api: event: add event type metadata to event vectors May 26, 2025
@JannePeltonen
Copy link
Collaborator Author

v3:

  • Changed the API text a little: do not require valid event vector type for API functiont that take event vectors as they do not really need it to be correct. Continue requiring valid event vector type for other API functions (i.e. the ones that take an event parameter).
  • Added implementation and test changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant