aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/odp_event.c
AgeCommit message (Collapse)Author
2023-04-12linux-gen: crypto: remove deprecated odp_crypto_operation()Janne Peltonen
Remove the implementation of the deprecated odp_crypto_operation(). Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-01-18linux-gen: event: add event validation supportMatias Elo
Add support for runtime event validation (initially buffer endmark checking). Event validation can be enabled during configure with '--enable-event-validation' [warn/abort] or with --enabled-debug=full. When event validation is enabled, endmarks are checked in: - odp_buffer_free() / odp_buffer_free_multi() - odp_buffer_is_valid() - odp_event_free() / odp_event_free_multi() / odp_event_free_sp() - odp_event_is_valid() - odp_packet_free() / odp_packet_free_multi() / odp_packet_free_sp() - odp_packet_is_valid() Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-10-07linux-gen: debug: prefix implementation internal debug macrosMatias Elo
Prefix implementation internal debug macro names with underscore. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-06-23linux-gen: event: use pool handle in event headerMatias Elo
Use a pool handle (odp_pool_t) instead of a void pointer in event header for improved type safety. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-06-23linux-gen: buffer: inline odp_buffer_pool()Matias Elo
Inline odp_buffer_pool() function implementation. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-05-24linux-gen: event: inline odp_event_flow_id_set()Matias Elo
Inline odp_event_flow_id_set() function implementation. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-05-24linux-gen: event: inline odp_event_types()Matias Elo
Inline odp_event_types() function implementation. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-05-24linux-gen: event: inline odp_event_subtype()Matias Elo
Inline odp_event_subtype() function implementation. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-05-24linux-gen: event: inline odp_event_flow_id()Matias Elo
Inline odp_event_flow_id() function implementation. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-05-24linux-gen: event: move event header inline accessor offsetsMatias Elo
Common event metadata (for all event types) has been moved from odp_buffer_hdr_t to _odp_event_hdr_t. Move inline accessor offsets to match this change. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-04-13api: crypto: deprecate odp_crypto_operation()Janne Peltonen
Depracate odp_crypto_operation() and the associated data structures and the completion event. The odp_crypto_operation() function is a bit problematic since it can be synchronous or asynchronous on per-packet basis without application having control on it. Uncontrolled sync versus async behaviour can have adverse effects on packet ordering and application design in general. The function is also somewhat redundant with the newer odp_crypto_op() and odp_crypto_op_enq() functions that provide explicit control on the crypto operation completion behavior. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2022-03-25linux-gen: timer: inline small timer functionsMatias Elo
Inline implementations of small fast path timer functions. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-02-21linux-gen: pktio: implement tx completion eventTuomas Taipale
Add support for event completion for transmitted and dropped packets to packet io. For successfully sent packets, completion event sending is handled commonly inside `odp_pktout_send()`. For to-be-dropped packets, control typically returns to application to decide what to do with the unsent packets, with the exception of `packet_vector_send()` where event sending is handled internally. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-02-08linux-gen: remove odp_api.h includes from implementationMatias Elo
Don't include odp_api.h header inside the implementation files as it unnecessarily includes all API headers. The remaining includes have been cleaned up and grouped. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-12-09linux-gen: dma: implement the new DMA APIPetri Savolainen
Implement the new DMA API. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-11-23linux-gen: buffer: use common event headerMatias Elo
Use common _odp_event_hdr_t in odp_buffer_hdr_t. Cache line alignment constraint has been moved to odp_buffer_hdr_t. The implementation internal scheduler and queue interfaces have been modified to use event headers instead of buffer headers. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2020-11-20linux-gen: event: implement odp_event_is_valid()Petri Savolainen
Implement the new event validity check function. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2020-11-19linux-gen: event: support freeing packet vectors using odp_event_free()Matias Elo
Add support for freeing packet vectors and contained packets using odp_event_free(). Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2019-11-06linux-gen: event: inline odp_event_type_multi()Petri Savolainen
Inline event_type_multi function. Event type functions are performance critical as those are typically used after every schedule call. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2019-09-27linux-gen: include config.h header in install directoryMatias Elo
Previously, config.h header was not included in install dir. This caused a compilation failure when an application tried to include ODP helper headers. config.h has been moved to include/odp subdirectory to avoid naming conflicts and unnecessary includes have been removed. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reported-by: Mikko Parpala <mikko.parpala@nokia.com>
2018-12-26linux-gen: sched: dummy flow aware implementationPetri Savolainen
Implement flow aware scheduling API with least possible changes. Scheduler does not care about flow IDs, but synchronizes still on queue level. This is functionally correct, but does provide parallelism between different flows of a queue. So, application does not benefit from using flows, but functions correctly. Maximum number of flows per queue is limited to 256 just to minimize number of bytes used in buffer header. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-12-26linux-gen: event: support flow-awareness APIDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-11-28linux-gen: packet: implementation subtype apiPetri Savolainen
Add inlined implementation of the new subtype API call and use that internally. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-05-10linux-gen: event: inline event_type functionPetri Savolainen
Inline odp_event_type() as an example how current inline mechanism can be simplified. Only one file is needed for inline function definitions (xxx_inlines.h) and _ODP_NO_INLINE macro selects when non-inlined implementation is needed (only by xxx_api.c files). Implementation uses internally always inlined functions. Inlined function name is changed with macro from odp_foo() to __odp_foo(). Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-05-10linux-gen: buffer: remove buffer_inlines header filePetri Savolainen
Moved odp_buffer_inlines.h content to odp_buffer_internal.h and removed the file. Other xxx_inlines.h headers do not contain internal functions but only code for API function inlining. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-02-26update Linaro Copyrights to 2018 yearMaxim Uvarov
Using simple commands: find . -not -path .git -type f -exec \ sed -i -E 's/ (201[0-9]), Linaro/ \1-2018, Linaro/g' {} + find . -not -path .git -type f -exec \ sed -i -E 's/ (201[0-9])(-201[0-9]), Linaro/ \1-2018, Linaro/g' {} + Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
2017-12-27linux-gen: event: implement type multiPetri Savolainen
Simple implementation of the new event type multi function. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-12-27linux-gen: event: free multiple functionsPetri Savolainen
Simple implementation of the new functions. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-12-27linux-gen: event: move event subtype to packet headerMatias Elo
Event subtype is only used by packets, so move subtype to packet header to optimize cache usage. This change fixes the ~30% performance penalty in l2fwd (zero-copy dpdk pktio) caused by the initialization of event subtype. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-12-27linux-generic: ipsec: implement events handlingDmitry Eremin-Solenikov
Add functions implementing IPsec events support. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-12-27api: crypto: revert deprecation of crypto completion APIDmitry Eremin-Solenikov
It was decided that it would be benefitable to live with both API types at this point, as odp_crypto_compl_t was available for some time. So undeprecate odp_crypto_compl_t and related functionality. Validation tests also provide necessary tests for pref_mode and for completion event. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-12-27api: crypto: deprecate ASYNC mode and odp_crypto_compl_tDmitry Eremin-Solenikov
Setting pref_mode to ASYNC now results in SYNC behaviour, so let's deprecate all ASYNC-related crypto items: pref_mode, odp_crypto_compl_t and related functions. Passing context through param/result is also deprecated, as odp_crypto_operation now works only in sync mode, thus there is no need to pass additional data around it. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-12-27linux-generic: events subtype implementationDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-08-25linux-gen: use config.h headerDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-02-03abi: event: added the first ABI spec filePetri Savolainen
Used event API as the first example of an ABI spec file. Used the same default architecture file initially for all architectures. Default ABI files avoid multiple copies of the same definition. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-03-04api and linux-generic: make room for new apiChristophe Milard
This is about making the current structure clearer so that other interfaces can be added to ODP: The ODP API specification (platform agnostic) is moved from include/odp/api to include/odp/api/spec. The ODP API platform definition (for linux generic) is moved from platform/linux-generic/include/odp to platform/linux-generic/include/odp/api Include statements are adjusted accordinaly. This patch has been done by a script which is given with the cover-letter of this patch series. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-07-07api: event: change to odp_event_type_tBill Fischofer
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-07-06event: implement odp_event_free()Zoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-06-16linux-generic: crypto: eliminate buffer type hack for completionsBill Fischofer
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reported-by: Christophe Milard <christophe.milard@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-01-29api: move ODP headers to a directoryTaras Kondratiuk
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-01-27api: pool: Rename pool params and remove buffer typesPetri Savolainen
* Renamed odp_buffer_pool_param_t to odp_pool_param_t * Moved buffer pool parameters into "buf" struct * Left other structs for other types (pkt and tmo) to be added and implemented * Pool type field is common to all pool types * Removed buffer types and use ODP_EVENT_XXX for event type and ODP_POOL_XXX for pool type instead. So event types may not be assosiated to a pool (and may not have a corresponding pool type). Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-01-27api: buffer_pool: Rename odp_buffer_pool.h to odp_pool.hPetri Savolainen
Renamed pool API header file. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-01-27api: buffer: Removed odp_buffer_typePetri Savolainen
Removed odp_buffer_type() from API and made it internal. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-01-27api: event: Add odp_event_tPetri Savolainen
* Added odp_event.h and odp_event.c * Added odp_event_t type and type conversion functions Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>