aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic
AgeCommit message (Collapse)Author
2023-02-16Merge tag 'v1.40.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2023-02-13linux-gen: crypto: implement out-of-place crypto operation typeJanne Peltonen
Add support for ODP_CRYPTO_OP_TYPE_OOP operation type. In openssl crypto, implement out-of-place operations as combinations of packet data copies and in-place operations. This is done for simplicity and to ensure correct semantics for API validation test development. In other crypto modules, do not support out-of-place operations yet, but fail gracefully by returning ODP_CRYPTO_SES_ERR_PARAMS error in session creation if creation of an out-of-place session is attempted. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-02-13linux-gen: crypto: implement basic crypto operation typeJanne Peltonen
Add support for ODP_CRYPTO_OP_TYPE_BASIC operation type. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-02-13linux-gen: crypto: null: use new session creation error namesJanne Peltonen
Stop using the old session creation error names slated for deprecation. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2023-02-07linux-gen: packet: update packet vlan flag set function implementationsMatias Elo
Update packet VLAN/VLAN QinQ flag set functions to match the updated packet API. 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 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-06linux-gen: crypto: arm: remove deprecated per-session IVsJanne Peltonen
Stop supporting deprecated per-session IVs. 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-02-06linux-gen: crypto: ipsecmb: remove deprecated per-session IVsJanne Peltonen
Stop supporting deprecated per-session IVs. 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-02-06linux-gen: crypto: openssl: remove deprecated per-session IVsJanne Peltonen
Stop supporting deprecated per-session IVs. 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-02-03github_ci: add test case for custom stash configMatias Elo
Add new test case for custom stash configuration (overflow safe mode). Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-02-03linux-gen: stash: add mpmc ring based implementationMatias Elo
Use MPMC rings to implement overflow safe stash mode (application can attempt to store more handles into a stash than it specified in the creation parameters). This mode can be enabled by setting stash.strict_size option to zero in the config file. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-02-03linux-gen: stash: add framework for using different ring typesMatias Elo
Add ring function pointer framework to the stash implementation, which enables using different ring types as stash implementation. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-02-03linux-gen: ring: add batch enqueue and dequeue operations to mpmc ringMatias Elo
Add support for batch enqueue/dequeue operations to MPMC ring (read/write 0 or N objects). Unnecessary comments about 'num' parameter being smaller than ring size have been removed. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-02-03linux-gen: ring: add 64-bit variant of mpmc ringMatias Elo
Add new 64-bit variant of implementation internal multi-producer multi- consumer ring. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.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-24linux-gen: stash: add helper functions for stash handle conversionsMatias Elo
Replace stash handle casts with internal helper functions stash_entry() and stash_handle(). Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-01-24linux-gen: stash: reserve all memory from a single shm blockMatias Elo
Use one common SHM block for all stash memory. This enables creating a large number of stashes without hitting the SHM block count limit, for the cost of having to pre-reserve the memory during global init. The amount of required memory can be adjusted with new configuration file options: - stash:max_num: maximum number of stashes - stash:max_num_obj: maximum number of objects in a stash Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-01-18linux-gen: loop: add support for flow hashingTuomas Taipale
Add support for flow hashing. When sending packets, distribute them among configured loopback queues based on active flow hashing configuration. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-01-18linux-gen: loop: refactor statisticsTuomas Taipale
Add new atomic, queue specific statistics and remove usage of packet I/O level common statistics. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-01-18linux-gen: loop: add multi-queue supportTuomas Taipale
Add multi-queue support to loop packet I/O. This enables more realistic packet I/O application testing. RX and TX specific locking is removed as all data shared between transmitting and receiving threads is already multi-thread safe. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2023-01-18linux-gen: README: add documentation for event validationMatias Elo
Document usage of additional event validation checks. 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 support for queue enq operationsMatias Elo
Add event validation support to following queue enqueue functions: - odp_queue_enq() - odp_queue_enq_multi() 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>
2023-01-18linux-gen: queue: header include clean-upMatias Elo
Add missing, remove unnecessary, and group existing includes. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-12-29linux-gen: crypto: inline odp_crypto_result() implementationMatias Elo
Inline odp_crypto_result() function implementation. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-12-29linux-gen: crypto: inline event conversion functionsMatias Elo
Inline odp_crypto_packet_from_event() and odp_crypto_packet_to_event() function implementations. 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-29linux-gen: dpdk: fix zero-copy mode with vfio-pci driverMatias Elo
For DPDK zero-copy pktio to work with VFIO the packet pool memory has to be mapped for DMA access. Fixes: https://github.com/OpenDataPlane/odp/issues/1718 Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-12-22linux-gen: sched: add config option for adjusting ordered queue stash sizeMatias Elo
Add new configuration option 'sched_basic.order_stash_size', which can be used to adjust the size of implementation internal per thread ordered queue reorder stash. If 'order_stash_size' > 0, events may be dropped by the implementation if the target queue is full. To prevent this set 'order_stash_size' to 0. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reported-and-tested-by: Carl Wallen <carl.wallen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-12-22linux-gen: crypto: arm: fix out-of-bounds IV read accessJanne Peltonen
The Arm crypto library may read up to 16 bytes of data when it is reading a 12 byte IV. If the IV provided by the caller ends at a page boundary and the next page is not mapped to readable memory, bad things can happen. Fix the problem by always copying the user provided IV to a bigger temporary buffer that is passed to the crypto library. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-12-22linux-gen: crypto: arm: use macro for the constant AES-GCM IV lengthJanne Peltonen
The only supported IV length for AES-GCM is 12 bytes. Define it as a macro to benefit from constant expressions and to get rid of some magic numbers. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-12-21linux-gen: pktio: fix input queue count with classifierTuomas Taipale
When classifier is in use, only one packet I/O input queue should be configured. Currently, one packet I/O level input queue is configured but driver level input queue count will be whatever is passed via `odp_pktin_queue_param_t::num_queues` in `odp_pktin_queue_config()`. Fix this by always overriding the parameter to correct value when applicable. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@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-09Merge tag 'v1.39.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@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>
2022-12-02linux-gen: pktio: implement flow control capaPetri Savolainen
Minimal implementation of the new flow control capability and config APIs. Flow control configuration is not supported. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-11-30linux-gen: shm: implement odp_shm_segment_info()Petri Savolainen
Added minimal implementation of the new odp_shm_segment_info() function. Only single (virtual address) segment is supported as SHM implementation does not keep record of physical address mapping. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-11-30linux-gen: shm: implement odp_system_meminfo()Petri Savolainen
Implemented the new odp_system_meminfo() call inside SHM module to be able to access details of all memory reservations. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-11-30api: shm: add segment infoPetri Savolainen
Added odp_shm_segment_info() which can be used to retrieve information of each memory segment of an SHM block. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Harman Kalra <hkalra@marvell.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-11-30linux-gen: dpdk: implement new packet input queue size parameterMatias Elo
Implement new packet input queue size API for dpdk pktio. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-11-30linux-gen: loop: implement new packet input queue size parameterMatias Elo
Implement new packet input queue size API for loop pktio. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-11-30linux-gen: pktio: check input queue size in odp_pktin_queue_config()Matias Elo
Check that odp_pktin_queue_param_t.queue_size values are valid during odp_pktin_queue_config() call. All debug messages inside this function are converted into error messages, since this is not a fast path function. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-11-30linux-gen: pktio: use ODP_PKTIN_MAX_QUEUES and ODP_PKTOUT_MAX_QUEUESMatias Elo
Use separate ODP_PKTIN_MAX_QUEUES and ODP_PKTOUT_MAX_QUEUES defines where applicable. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-11-30linux-gen: pcapng: move pcapng data out of common pktio_entry_tMatias Elo
Reduce size of pktio_entry_t by moving pcapng specific data to a separate SHM block, which is allocated only when pcapng is enabled. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>