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 v1] api: event: add generic event vector API #2149

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

Conversation

MatiasElo
Copy link
Collaborator

@MatiasElo MatiasElo commented Nov 18, 2024

Add new generic event vector API for generating event vectors from all event types, as opposed to the existing packet vector API, which only supports packets.

Open questions

  • Support multiple aggregators per queue or keep the API simpler and support only single aggregator per queue?
  • Is capability for total number of aggregators required?

Add new generic event vector API for generating event vectors from all
event types, as opposed to the existing packet vector API, which only
supports packets.

Signed-off-by: Matias Elo <[email protected]>
@odpbuild odpbuild changed the title api: event: add generic event vector API [PATCH v1] api: event: add generic event vector API Nov 18, 2024
* ODP_EVENT_PACKET_VECTOR) to a queue with vector aggregation enabled
* (i.e. vectors within vectors).
*/
odp_event_type_t event_type;
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this configuratiuon expect fastpath checks? Or is it just a warning for application?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's undefined behavior if application operates agains the specification, so no checks are required in the fast path. Nevertheless, it may be good to add checks behind debug flags etc. to ease debugging.

Copy link
Contributor

Choose a reason for hiding this comment

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

ack

@@ -52,6 +55,8 @@ extern "C" {
* - Timeout event (odp_timeout_t) from a timer
* - ODP_EVENT_IPSEC_STATUS
* - IPSEC status update event (odp_ipsec_status_t)
* - ODP_EVENT_VECTOR
Copy link
Contributor

Choose a reason for hiding this comment

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

Would the scheduled event always be ODP_EVENT_VECTOR or if odp_event_vector_config_t.event_type == ODP_EVENT_PACKET is it expeceted to be ODP_EVENT_PACKET_VECTOR

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In this case the event type would always be ODP_EVENT_VECTOR. I'd like to keep the event and packet vector APIs separate. Optimally, the whole old packet vector API would be deprecated, but we cannot do that without breaking backwards compatibility.

Copy link
Contributor

Choose a reason for hiding this comment

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

ack

@PavanNikhilesh
Copy link
Contributor

PavanNikhilesh commented Jan 3, 2025

Overall, the specification looks good to me, with a few minor clarifications.

Support multiple aggregators per queue or keep the API simpler and support only single aggregator per queue?

Either is fine with me, but supporting multiple aggregators per queue gives the application more options.

Is capability for total number of aggregators required

A max_vector_aggregators_per_queue capability should be good.

@MatiasElo MatiasElo added this to the API Next milestone Jan 14, 2025
* When vector generation is enabled, events may be delivered both as
* event vector events and normal events. Implementation won't split up
* event vectors successfully enqueued by the application. */
odp_event_vector_config_t vector[ODP_QUEUE_MAX_VECTOR_AGGR];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Other option could be to create vector generator profile, and give handle to that here instead of full set of config params ? That would enable easy reuse of the same set of params for many queues (that have the same aggregation needs).

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.

3 participants