-
Notifications
You must be signed in to change notification settings - Fork 135
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
base: master
Are you sure you want to change the base?
[PATCH v1] api: event: add generic event vector API #2149
Conversation
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]>
* ODP_EVENT_PACKET_VECTOR) to a queue with vector aggregation enabled | ||
* (i.e. vectors within vectors). | ||
*/ | ||
odp_event_type_t event_type; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
Overall, the specification looks good to me, with a few minor clarifications.
Either is fine with me, but supporting multiple aggregators per queue gives the application more options.
A max_vector_aggregators_per_queue capability should be good. |
* 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]; |
There was a problem hiding this comment.
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).
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