aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-08-17Merge ODP v1.42.0.0v1.42.0.0_DPDK_22.11Matias Elo
Merge ODP linux-generic v1.42.0.0 into linux-dpdk.
2023-08-17linux-dpdk: time: refactor implementationMatias Elo
Simplify and optimize performance of time implementation by supporting only DPDK time API. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-17linux-dpdk: crypto: fail bit mode session creation when not supportedJanne Peltonen
ODP-DPDK does not support bit mode with any crypto algorithm. Fail session creation when a bit mode session is requested. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-17Port 3a8f63d29 "linux-gen: implement pool user area initialization"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-17Port f42d23801 "linux-gen: sync: implement new memory barriers"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-17Port 2fdf01b70 "linux-gen: debug: utilize new _ODP_WARN() macro"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-17Port 009ee2e68 "linux-gen: timer: implement odp_timeout_from_event_multi() ↵Matias Elo
function" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-17Port aa53b4173 "linux-gen: cpu: detect constant_tsc from cpuinfo"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-17Port d158bbd99 "linux-gen: dma: inline completion event conversion functions"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-09Merge ODP v1.42.0.0Matias Elo
Merge ODP linux-generic v1.42.0.0 into linux-dpdk. Signed-off-by: Matias Elo <matias.elo@nokia.com>
2023-08-08Merge ODP v1.41.1.0v1.41.1.0_DPDK_22.11Matias Elo
Merge ODP linux-generic v1.41.1.0 into linux-dpdk.
2023-08-08linux-dpdk: pktio: optimize packet receive codeMatias Elo
Remove if branch from packet_init() as all data touched by the function is now located on the same cache line. Packet data prefetch has been removed from input_pkts_minimal() to avoid excessive prefetching. Packet header prefetch utilizes now odp_prefetch_store() as the header fields are being initialized. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08linux-dpdk: packet: move event subtype to _odp_event_hdr_int_tMatias Elo
After the previous event header reorganization (d6461dfb2) there is now a one byte gap in the _odp_event_hdr_int_t struct. Move odp_packet_hdr_t.subtype to this gap, after which all data required by packet_init() is located on the same cache line. This can improve performance for example with odp_l2fwd application. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port c23a39c69 "linux-gen: dma: implement completion event user area"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port 5cfbf7b26 "linux-gen: init: implement odp_term_abnormal()"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port 1780ca316 "linux-gen: packet: implement free control functions"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port 5db00aaa7 "linux-gen: packet: dummy implementation of TX completion poll"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port c972ee43d "linux-gen: pktio: use new definitions"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port 7ac1fd5e6 "linux-gen: pool: implement new odp_pool_stats_selected() ↵Matias Elo
function" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port 3ea19c8cb "linux-gen: timer: implement odp_timer_sample_ticks()"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port 875d5bb72 "api: time: split header files"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port b7128b352 "linux-gen: timer: use new timer cancel return values"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port 45ac01d90 "linux-gen: timer: check capability limits in ↵Matias Elo
odp_timer_res_capability()" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port 04a3262ea "linux-gen: pool: correctly print DMA completion pool"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port 2118ba7c9 "linux-gen: timer: fix periodic timer drift"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port 13918e69c "linux-gen: timer: fix odp_timeout_fresh() crash"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port 7fb172232 "linux-gen: dpdk: simplify mbuf to packet conversion function"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port 451455aa1 "linux-gen: dpdk: add simplified pkt to mbuf conversion ↵Matias Elo
function variant" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port d989083e7 "linux-gen: pktio: enqueue packets to destination queues from ↵Matias Elo
pktio devices" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port c93b36003 "github_ci: add gcc-13 build tests"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-07-12api: increment ODP API version to 1.42.0Matias Elo
Increment API version number to reflect the following changes: Backward incompatible: - crypto: change 'bit_mode' cipher/auth capability flag to indicate whether bit mode is supported in addition to byte mode that is always supported - crypto: add 'cipher_range_in_bits' and 'auth_range_in_bits' session parameters Backward compatible: - barrier: add memory barriers odp_mb_sync(), odp_mb_sync_load(), and odp_mb_sync_store() - crypto: allow non-zero-length cipher and auth ranges for the null cipher and auth algorithms in the OOP operation type - dma: add 'uarea_persistence' pool capability - dma: add 'uarea_init' pool parameters 'init_fn' and 'args' - dma: move odp_dma_seg_t structure fields - event: add odp_event_types_multi() function - event: add odp_event_user_area_and_flag() function - init: add ODP_LOG_WARN log level to odp_log_level_t - packet: change odp_packet_user_flag() and odp_packet_vector_user_flag() documentations to specify that the return values are positive - pool: add 'uarea_persistence' pool capability - pool: add 'uarea_init' pool parameters 'init_fn' and 'args' - timer: add odp_timeout_from_event_multi() function - timer: clarify odp_timer_alloc() and odp_timer_restart() documentation Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-07-12validation: barrier: use new memory barriersPetri Savolainen
Call the new memory barrier functions to verify their implementation. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2023-07-12linux-gen: sync: implement new memory barriersPetri Savolainen
Implement the new load and store synchronization barriers with x86 and aarch64 instructions. The default implementation falls back to the strongest GCC built-in (__sync_synchronize()), which would be the strong enough on x86 (mfence), but too weak on aarch64 (dmb). Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2023-07-12api: sync: add load and store synchronization barriersPetri Savolainen
Added memory barriers which ensure that load/store instructions started before the barrier are complete, before load/store instructions after the barrier are started. These are stronger barriers than the current acquire, release and full barriers. Those ensure visibility order of memory accesses, but do not wait access completion. The new barriers are useful e.g. when serializing access to memory mapped registers of a device. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
2023-07-12api: dma: pack DMA segment data structurePetri Savolainen
Move odp_dma_seg_t structure fields so that addr/packet field is directly followed by length and offset fields. After this change all commonly used fields are located in the first 16 bytes of the structure, which may improve performance. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2023-07-11validation: add tests for pool user area initializationTuomas Taipale
Add pool, external pool and dma specific tests for user area initialization. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-07-11linux-gen: implement pool user area initializationTuomas Taipale
Add pool, external pool and dma specific implementations for user area initialization. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-07-11api: pool: add user area initialization parametersTuomas Taipale
New `uarea_init` pool parameters `init_fn` and `args` can be used to initialize event user areas of a pool at pool creation time. This enables straightforward user area initialization in case implementation supports the new `uarea_persistence` pool capability. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Acked-by: Ashwin Sekhar T K <asekhar@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-07-11api: pool: add user area content persistence capabilityTuomas Taipale
New `uarea_persistence` pool capability signals if implementation is able to maintain the content of pool user areas across frees and allocations. In case the content can be maintained, applications could initialize all user areas only once after pool creation and trust that the content remains valid after freeing an event. Otherwise, user areas need re-initialization after every allocation. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Acked-by: Ashwin Sekhar T K <asekhar@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2023-07-11api: timer: improve documentationPetri Savolainen
Improved timer alloc and restart documentation. Functionality is not changed. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2023-07-10validation: crypto: allow OOP failure with non-zero null alg rangesJanne Peltonen
Allow out-of-place crypto operations to fail if the null cipher or auth algorithm has non-zero-length range. Allow failure indication only via odp_crypto_op_result(). Allowing odp_crypto_op()/odp_crypto_op_enq() returning a failure can be done later if actually needed by some implementation. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-07-10validation: crypto: test null alg packet data copying with OOPJanne Peltonen
Add null algorithms in the cipher+auth combination tests and do not zero their range before crypto operation to check that the data copying done by the OOP operation is done like with other algorithms. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-07-10linux-gen: crypto: copy the ranges of null algorithms in OOP op typeJanne Peltonen
Do not treat the null cipher and auth algorithms as special cases for the purpose of copying packet data in the OOP operation type but copy their respective cipher and auth ranges as with any non-null algorithms. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-07-10api: crypto: copy the ranges of null algorithms in OOP op typeJanne Peltonen
Allow non-zero-length cipher and auth ranges for the null cipher and auth algorithms in the OOP operation type. Copy the ranges to the output packet as with non-null algorithms. Allow implementations to not fully support non-zero-length ranges by explicitly mentioning that a crypto operation with such a range may fail if not supported. This change makes null algorithms behave as non-null algorithms with respect to packet data copying in the OOP operation type. When both the cipher and the auth algorithms are null, a crypto operation reduces to a packet data copying operation (if supported by the underlying ODP implementation). Such copying may be useful for applications that wish to process crypto and non-crypto packets in the same way using the OOP crypto operation type. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-07-10linux-gen: crypto: re-enable bit mode and EEA2Janne Peltonen
Now with the API, validation tests and implementation updated, expose again the bit mode capabilities and the EEA2 algorithm that were temporarily disabled. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-07-10validation: crypto: test the configurable bit modeJanne Peltonen
Test bit mode that is now configurable at session creation time. Test algorithms that support bit mode in both bit and byte mode and other algorithms in byte mode only. Test the test vectors that have lengths not divisible by byte in bit mode only. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-07-10linux-gen: crypto: implement configurable bit modeJanne Peltonen
Add session creation time bit mode configuration for the algorithm implementations that have supported bit mode, i.e. the null algorithms and EEA2. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-07-10api: crypto: add bit mode session parameters for cipher and authJanne Peltonen
Add cipher_range_in_bits and auth_range_in_bits session parameters that control whether cipher/auth range is given in bits or bytes. By default the range is in bytes. Change bit_mode cipher/auth capability flag to indicate whether bit mode is supported in addition to byte mode that is always supported. Previously bit_mode capability told whether the cipher/auth had to be used in bit or byte mode. This simplifies crypto API usage as ODP applications that do not require bit mode can simply request byte mode sessions and do not have to check in which mode a particular algorithm in a particular ODP implementation has to be used and then convert range units accordingly. After this change it is possible for an ODP implementation to start supporting bit mode for an algorithm without affecting applications that use byte mode and do not fully do the capability checking and unit conversion dance. This also removes the ambiguity regarding the range units of the null algorithms. Currently some ODP implementations advertise null algorithm capabilities both with and without bit_mode, which is inconsistent and will break as soon as the ranges of the null algorithms are not ignored (as then the ODP implementation could not tell if the range given to it was in bits or bytes). Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-07-10linux-gen: crypto: temporarily disable bit mode and EEA2 supportJanne Peltonen
To make it possible to change the API, implementation and validation tests in separate commits without breaking the tests at any point, temporarily disable bit mode and EEA2 support. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-07-10test: performance: crypto: use byte mode with all algorithmsJanne Peltonen
With new enough ODP API version use byte mode even with algorithms that support bit mode. With older API version do the range unit conversion as before. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>