aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2023-04-13api: errno: remove mention about errno values specified in api specMatias Elo
Setting errno has been removed from all ODP APIs outside errno module. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2023-04-13api: pktio: remove reference to errnoMatias Elo
Remove legacy reference to errno from pktio API and fix a typo. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2023-04-13api: timer: remove references to errnoMatias Elo
Remove legacy references to errno from timer API. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2023-04-13api: crypto: clarify that parse flags are not affectedJanne Peltonen
Mention explicitly that crypto operations do not affect parse flags in packet metadata and thus odp_packet_has_error() cannot be used for checking operation result. This is already the intended behaviour and implied by the API text but not currently fully checked by crypto validation tests. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-04-13api: pool: clarify odp_pool_capability_t.max_pools specificationMatias Elo
Clarify that odp_pool_capability_t.max_pools is used for all pool types defined in odp_pool_type_t. Also, added reference to DMA pool capability (odp_dma_pool_capability_t.max_pools) to make this clearer. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-04-12api: crypto: reguire zero crypto range for null algs in OOP op typeJanne Peltonen
Require that cipher range and auth range have zero offset and zero length when used with null cipher and null auth algorithm, respectively, with the out-of-place operation type. This makes handling of ranges in the out-of-place operation type more regular in that what gets copied to the output packet does not need to treat null algorithms as a special case. This makes it also possible to later allow non-null ranges with to-be-defined semantics with the OOP op type in a backward compatible way. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-04-12api: crypto: clarify which session parameters are ignored by null algsJanne Peltonen
Clarify that null cipher and auth algorithms ignore key length, IV length, digest length, etc session parameters. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-04-12api: crypto: remove deprecated odp_crypto_operation()Janne Peltonen
Fully remove the deprecated odp_crypto_operation() function and related functions data types that have been available if compiled with deprecated API enabled. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-04-12api: crypto: simplify operation result reportingJanne Peltonen
Make the return value of odp_crypto_result() indicate crypto operation success/failure too. Deprecate the ok field of odp_crypto_packet_result_t. Specify that the status fields of odp_crypto_packet_result_t are valid only when the operation failed, odp_crypto_result() returned -1. This way an implementation does not need to fill the status fields in the typical case when the operation succeeds. Allow the result pointer to be null, making filling the result structure optional. Deprecate odp_crypto_hw_err_t type and the hw_err field of odp_crypto_op_status_t. It is simpler to have all errors reported through the alg_err field. Deprecate ODP_CRYPTO_ALG_ERR_KEY_SIZE and ODP_CRYPTO_ALG_ERR_IV_INVALID error codes. Key length is a session parameter and an error in key size can be reported at session creation time. IV is now a mandatory operation parameter so a specific error code for null IV pointer is less useful than it was when it was possible to provide IV at session creation. Clarify the description of ODP_CRYPTO_ALG_ERR_DATA_SIZE. Add a new crypto operation error ODP_CRYPTO_ALG_ERR_OTHER to cover cases for which the other errors do not fit. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-04-12api: crypto: deprecate old session creation error namesJanne Peltonen
Deprecate the old session creation error names that have been replaced by shorter error names. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-04-12api: crypto: clarify when cipher and auth ranges are ignoredJanne Peltonen
The null crypto and auth algorithms do not modify the packet and therefore do not need the crypto/auth range parameter. Specify explicitly that the null algorithms ignore range parameters so that the range parameters do not have to have valid (e.g. within packet data area) values. AEAD algorithms, such as AES_GCM, AES_CCM and CHACHA20_POLY1305, authenticate the AAD and the cipher range. Specify that they ignore the auth_range field. It was already mentioned in the deprecated odp_crypto_op_param_t but not in odp_crypto_packet_op_param_t. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-04-12api: crypto: clarify that algorithm order is ignored with null algsJanne Peltonen
When either the cipher or the authentication algorithm is null, the auth_cipher_text session parameter that specifies the processing order of the algorithms does not have any effect but both orders are supposed to work. Clarify the semantics by stating that the parameter is ignored when one of the algorithms is null. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-04-12api: crypto: change IV and AAD pointers to pointers to constantsJanne Peltonen
ODP is not supposed to modify the IV and AAD data pointed to by odp_crypto_packet_op_param_t. Change the pointer fields to pointers to constans to make this clear in the API and to make it easier to use the API when IV and AAD are already referred to by pointers to constants. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-04-12api: timer: clarify periodic first_tick documentationJere Leppänen
Clarify that zero first_tick means that the first expiration time is one period after the current time, not at the current time. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Shijith Thotton <sthotton@marvell.com>
2023-04-12api: cls: clarify when CoS queue may and may not be INVALIDJere Leppänen
Clarify the following: - When a CoS is created with ENQUEUE action, there must be a valid queue or queues. - odp_cos_queue_set() may not be used with a CoS with DROP action. - odp_cos_queue_set() may not be used to set the queue of a CoS to INVALID. - When odp_cos_queue() returns ODP_QUEUE_INVALID. This follows from the other clarifications. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
2023-04-12api: pktio: allow default CoS to be removedJere Leppänen
Allow the default CoS to be removed by passing ODP_COS_INVALID to odp_pktio_default_cos_set(). Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
2023-04-12api: cls: allow CoS pool to be set to ODP_POOL_INVALIDJere Leppänen
As a convenience, allow CoS pool to be set to ODP_POOL_INVALID, in which case the originating pktin pool is used. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
2023-04-12api: cls: clarify that odp_cos_queue() returns ODP_QUEUE_INVALID if the ↵Jere Leppänen
queue is not set Clarify that odp_cos_queue() returns ODP_QUEUE_INVALID if the queue is not set. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
2023-04-12api: queue: mention that queue to be destroyed must not be in use in ↵Jere Leppänen
classifier or timer Add classifier and timer to the list of examples of APIs where the queue to be destroyed must not be in use. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
2023-04-12api: pool: clarify that pool to be destroyed must not be in useJere Leppänen
Clarify that the pool to be destroyed with odp_pool_destroy() must not be in use. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
2023-04-12api: cls: clarify that CoS to be destroyed must not be in useJere Leppänen
Clarify that the CoS to be destroyed with odp_cos_destroy() must not be in use as the default CoS in any pktio, or as the destination CoS in any IPsec SA. Also, PMRs must be destroyed before the CoS they refer to is destroyed. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
2023-04-12README: improve api header README fileMatias Elo
Add ODP API principles chapter and improve formatting of include/README file. The file is also referenced from application-api-guide and platform- api-guide for increased visibility. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2023-04-12api: stash: add per object size max num capabilityMatias Elo
Add new capabilities for maximum number of object handles per stash for each object size. Depending on the implementation, the maximum supported number of objects per object size may vary. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Ashwin Sekhar T K <asekhar@marvell.com>
2023-04-12api: stash: modify odp_stash_capability_t.max_num_obj specificationMatias Elo
Remove special meaning of odp_stash_capability_t.max_num_obj value zero. The validation tests have always tested that the value must be larger than zero, so no implementation should have used this special meaning. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Ashwin Sekhar T K <asekhar@marvell.com>
2023-04-12api: stash: add new strict size parameter to odp_stash_param_tMatias Elo
Add new stash create parameter odp_stash_param_t.strict_size. When this option is enabled, application must never attempt to store more handles into the stash than specified in the odp_stash_param_t.num_obj parameter. Depending on the implementation, this may enable performance optimization. The new option is disabled by default and the total object count limitation is removed from odp_stash_put() function. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Ashwin Sekhar T K <asekhar@marvell.com>
2023-03-17linux-gen: pktio: remove netmap pktioMatias Elo
Remove rarely used Netmap pktio device to ease code maintenance and reduce CI runtime. Netmap pktio can be replaced for example by socket_xdp pktio, which provides better performance with standard Linux APIs. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2023-02-13api: crypto: allow post-processing in odp_crypto_result()Janne Peltonen
Require that odp_crypto_result() is called before packet data of async processed packets can be assumed to be valid. This makes it possible for an ODP implementation to postpone part of crypto processing to odp_crypto_result() after completion event delivery. For backward compatibility, do not change the semantics of the legacy operation mode. I.e. this change applies only to the newly introduced operation modes. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-13api: crypto: add an out-of-place type operation typeJanne Peltonen
Add ODP_CRYPTO_OP_TYPE_OP that writes the output of the crypto operation into a caller provided output packet and does not consume the input packet. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-13api: crypto: introduce a session parameter to control output packet handlingJanne Peltonen
Introduce new "operation type" session parameter that controls how the crypto operations interpret their parameters and handle the output packet. - Legacy type is the default and provides backward compatibility. - Basic type provides a slightly simplified interface Other types can be introduced later. In the basic operation type the pool session parameter must be set to ODP_POOL_INVALID. This is to enable backward compatibility for a possible future API change that would allow caller to optionally specify the pool of the output packet instead of having ODP use the pool of the input packet. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-13api: crypto: clarify that input packet is fully copied to output packetJanne Peltonen
The semantics of the crypto op functions are somewhat ambiguous regarding how an explicitly given output packet is handled. In particular, the API does not state how the provided output packet affects the final output (e.g. whether some data is preserved). Clarify the API based on how the linux gen reference implementation works and on how the older odp_crypto_operation() function behaves: - All packet data and metadata are copied from the input packet to the output packet, even when an output packet is given explicitly (i.e. the old packet data and metadata of an explicitly given output packet are lost. - Memory layout (e.g. data pointers, segmentation) of the output packet may change during crypto operations. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-08api: crypto: fix EIA2 IV length in API textJanne Peltonen
EIA2 uses 64-bit IV, not 128-bit as mentioned in the current API text. Fix the remark about IV length and fix also a couple of small typos. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-02-07api: packet: clarify packer has vlan and vlan q-in-q specificationsMatias Elo
Clarify odp_packet_has_vlan() and odp_packet_has_vlan_qinq() specifications. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Kiran Kumar K <kirankumark@marvell.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-07api: packet: specify which packet flags cannot be set simultaneouslyMatias Elo
Specify which packet metadata flags cannot be set simultaneously using odp_packet_has_XX_set() functions. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Kiran Kumar K <kirankumark@marvell.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-07api: timer: deprecate old timer set return valuesMatias Elo
Deprecate old timer set return values ODP_TIMER_TOOEARLY, ODP_TIMER_TOOLATE, and ODP_TIMER_NOEVENT, which have been replaced by ODP_TIMER_TOO_NEAR, ODP_TIMER_TOO_FAR, and ODP_TIMER_FAIL. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-07api: timer: deprecate old timer pool clock sourcesMatias Elo
Deprecate old timer pool clock sources ODP_CLOCK_CPU and ODP_CLOCK_EXT, which have been replaced by ODP_CLOCK_DEFAULT and ODP_CLOCK_SRC_1. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-07api: timer: use deprecate macro for odp_timer_set_rel()Matias Elo
Use ODP_DEPRECATE() macro for odp_timer_set_rel() function. Previously, the deprecation was only mentioned in the function documentation. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-07api: tm: remove deprecated peak_bps shaper parameterMatias Elo
Remove deprecated 'peak_bps' field from odp_tm_shaper_params_t. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-07api: tm: remove deprecated commit_bps shaper parameterMatias Elo
Remove deprecated 'commit_bps' field from odp_tm_shaper_params_t. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-07api: tm: remove deprecated odp_tm_capabilities() functionMatias Elo
Remove deprecated odp_tm_capabilities() function. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-07api: shm: remove deprecated ODP_SHM_SW_ONLY defineMatias Elo
Remove deprecated ODP_SHM_SW_ONLY define. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-07api: pktio: remove deprecated odp_pktin_ts_from_ns() functionMatias Elo
Remove deprecated odp_pktin_ts_from_ns() function. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-07api: pktio: remove deprecated odp_pktin_ts_res() functionMatias Elo
Remove deprecated odp_pktin_ts_res() function. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-07api: pktio: remove deprecated in_unknown_protos statistics counterMatias Elo
Remove deprecated 'in_unknown_protos' field from odp_pktio_stats_t. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-02-06api: crypto: remove deprecated per-session IVsJanne Peltonen
Remove deprecated per-session IV configuration. Require that IV is passed via crypto operation parameters also when deprecated API is enabled. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-01-25api: buffer: split header filesMatias Elo
Split buffer API into separate header files for functions and types. This fixes circular dependency issues with inline headers. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.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-12-29api: crypto: split header filesMatias Elo
Split crypto API into separate header files for functions and types. This enables inline implementation of API functions. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-12-13linux-gen: crypto: add support for Arm-optimzed IPSec multi-buffer libraryMalvika Gupta
- Enable detection of the Arm-optimized IPSec Multi-buffer library. - Integrate ZUC128-EEA3 and ZUC128-EIA3 algorithms. - Integrate ZUC256-EEA3 and ZUC256-EIA3 algorithms. Signed-off-by: Malvika Gupta <Malvika.Gupta@arm.com> Signed-off-by: Tianyu Li <tianyu.li@arm.com> Reviewed-by: Ruifeng Wang <Ruifeng.Wang@arm.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2022-12-02api: cls: deprecate odp_cos_with_l2_priority()Petri Savolainen
PMR term for matching VLAN PCP field has been added previously. It can be used instead of an odp_cos_with_l2_priority() call to setup a CoS per VLAN priority. Removing the function as it is redundant. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
2022-12-02api: cls: deprecate drop policyPetri Savolainen
Classifier drop policy option is not well defined and does not relate to other API features. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>