aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include
AgeCommit message (Collapse)Author
2021-06-23linux-gen: pktio: add internal wrapper functions for extra statisticsMatias Elo
Add internal wrapper functions for socket based pktio devices for reading extra pktio statistics. The wrapper functions call either ethtool or sysfs implementations. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: pktio: read extra statistics using linux sysfsMatias Elo
Add internal functions for reading extra pktio statistics using Linux sysfs. These functions can be used by multiple pktio devices. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: pktio: read extra statistics using ethtoolMatias Elo
Add internal functions for reading extra pktio statistics using ethtool. These functions can be used by multiple pktio devices. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: pktio: implement extra statistics counters functionsMatias Elo
Add implementation level support for the new extra packet statistics APIs. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: pktio: add support input/output queue statistics countersMatias Elo
Implement the new odp_pktin_queue_stats()/odp_pktin_event_queue_stats() and odp_pktout_queue_stats()/odp_pktout_event_queue_stats() functions. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: pktio: implement statistics counters capabilitiesMatias Elo
Fill new odp_pktio_stats_capability_t capability for all pktio devices supporting statistics counters. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-22linux-gen: sched: implement debug printPetri Savolainen
Implemented the new debug print function for all three schedulers. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-06-04linux-gen: ipsec: add support for larger anti-replay windowsMahipal Challa
Add support for anti-replay windows of up to 4096 packets. Minimum window size remains at 32 and uses the existing implementation. New code is used for larger windows. Signed-off-by: Mahipal Challa <mchalla@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-31linux-gen: time: implement strict time stamp read functionsPetri Savolainen
Implemented strict versions of local and global time stamp read functions. Moved time register read code into inline functions on ARMv8. 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>
2021-05-31linux-gen: ipsec: enable success bytes in statsAakash Sasidharan
Enable success bytes reporting in IPsec stats. Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-25linux-gen: debug: check print formats and parametersJere Leppänen
Format strings and parameters in ODP_LOG(), ODP_PRINT(), etc. calls have not been cross-checked during compilation for some time due to commit b776ca47c0d8 ("linux-generic: debug: use global fn ptr for logging fn"). Enable this checking. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-25linux-gen: fix print formatsJere Leppänen
Fix mismatches between print formats and parameters in ODP_PRINT(), ODP_DBG(), etc. calls. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-25linux-gen: pktio: configure pktout in TM mode internallyNithin Dabilpuram
As per TM spec, when pktout mode is TM, pktout queue setup is not called by user. Current TM implementation expects pktout queue to be setup when egress is PKTIO. So add internal routine to trigger pktout queue setup when odp_tm_create() is done with egress as PKTIO. Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-11linux-gen: ipsec: ignore dest_queue SA parameter in sync modeJanne Peltonen
In sync mode the dest_queue SA parameter should be ignored but the current code looks at it to determine whether running in sync or async mode. This can result in incorrect behavior or crash if an application touches the dest_queue of a sync SA after odp_ipsec_sa_param_init(). Fix the problem by clearing the internal dest_queue SA field in sync mode. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-05-11linux-gen: ipsec: make mtu atomic and remove unneeded synchronizationJanne Peltonen
Change the mtu field of an SA to an atomic variable since it may get modified and accessed simultaneously by different threads. Use relaxed atomic operations as having a delay in the visibility of the updated MTU is probably not a big problem. Also, get rid of the unneeded SA use count increment and decrement around the mtu field update. An ODP application may not call the function if it is trying to destroy the SA at the same time. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-05-11linux-gen: ipsec: speed up SA creation by using SA freelistJanne Peltonen
Put free SAs in a freelist to get rid of linear search in SA creation. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-05-05linux-gen: implement odp_thread_set_log_fn()Jere Leppänen
Implement the odp_thread_set_log_fn() API function. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-04-23linux-gen: sched: use odp_global_rw for storing scheduler config statusMatias Elo
In process mode the value of_odp_schedule_configured was not synchronized to forked processes. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-04-08linux-gen: pktio: update LSO capabilitiesPetri Savolainen
Increase max_segments capability to 64 segments. LSO implementation does not have a limit, but is limited by number free packets in the pool. Picked a large enough number that LSO capability does not limit segmentation of a maximum size IP packet. Increase max_payload_len capability to be closer to MTU. Subtract min header size (only Ethernet header) from MTU, instead of the maximum supported header size. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-03-29linux-gen: bitset: move aarch64 specific code to arch filesMalvika Gupta
On arm64 systems, the build fails with the --disable-host-optimization compiler flag as it is unable to locate definitions of lockless APIs used in atomic bit operations since these declarations are present in arch/aarch64/odp_atomic.h files Consequently, the aarch64 specific code has been moved to the arch-specific file while the reminder code has been moved under the default linux-generic implementation. Signed-off-by: Malvika Gupta <Malvika.Gupta@arm.com> Reviewed-by: Govindarajan Mohandoss <govindarajan.mohandoss@arm.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-03-19linux-gen: atomic: reorganize architecture specific implementationsMatias Elo
Move architecture specific atomic function implementations to separate header files. Enables 128-bit atomic function inlining. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-03-11linux-gen: random: remove _odp_random_openssl_test_data()Jere Leppänen
Not all bits returned by _odp_random_openssl_test_data() are random, depending on RAND_MAX. And OpenSSL doesn't seem to provide repeatable random bits. Remove _odp_random_openssl_test_data() and use _odp_random_std_test_data() instead. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-03-11linux-gen: ipsec: increase the maximum number of SAsJanne Peltonen
Make the maximum number of IPsec SAs 4000 or the maximum number of crypto sessions, whichever is lower. Move the definition of the compile time upper limit to odp_config_internal.h. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-02-26linux-gen: rename remaining global symbols in the static libraryJere Leppänen
Rename the rest of the global symbols in the static library that do not have the "_odp_" prefix. Fixes: https://github.com/OpenDataPlane/odp/issues/805 Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-02-23linux-gen: queue: implement odp_queue_print_allPetri Savolainen
Implemented the new queue debug print function. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-02-23linux-gen: timer: change user pointer to constPetri Savolainen
Align to API change of user pointer type. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-02-12linux-gen: atomic: remove unused internal functionsPetri Savolainen
Remove unused functions from atomic internal header. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-02-12linux-gen: improve software checksum implementationJere Leppänen
Improve software checksum implementation and put it in a separate header file so that it may be easily called from multiple places. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-02-08linux-gen: socket: implement odp_pktio_maxlen_set()Matias Elo
Implementation of odp_pktio_maxlen_set() for socket pktio. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-02-08linux-gen: pktio: implement odp_pktio_maxlen_set()Matias Elo
Add implementation for the new odp_pktio_maxlen_set() function. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-02-08linux-gen: pktio: rename pktio_if_ops_t mtu_get to maxlen_getMatias Elo
Rename pktio_if_ops_t.mtu_get to maxlen_get to make naming consistent with the API functions. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-02-05linux-gen: pktio: add LSO support for IPv4 fragmentationPetri Savolainen
Add support for IPv4 fragmentation (ODP_LSO_PROTO_IPV4) to LSO implementation. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-02-05linux-gen: pktio: implement LSO APIPetri Savolainen
Implement new LSO functions. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-02-05linux-gen: packet: implement LSO related metadata APIsPetri Savolainen
Implement all packet metadata API for LSO usage except odp_packet_lso_request(), which will be added to odp_packet_io.c since it needs access to LSO profile. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-02-05linux-gen: packet: ensure header size with static assertPetri Savolainen
Ensure that buffer and packet header sizes do not accidentally grow to new cache lines when adding new struct fields. Removed comments about data alignment as those may not be always valid (e.g. 32 bit builds). Added debug prints for checking data alignment on the same offsets. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-01-26linux-gen: hash: prepare for arch specific implementationsMatias Elo
Refactor build system to enable adding architecture specific hash function implementations. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-01-15linux-gen: pool: add maximum packet length config optionMatias Elo
Add configuration file option for the maximum packet data length in bytes. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-01-11linux-gen: packet: fix packet printPetri Savolainen
Packet print function used buffer_snprint, which assumed that event type is buffer and printed an error on packets. Re-implemented buffer and packet print functions to not use buffer_snprint. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2020-12-23linux-gen: rename some global symbols in the static libraryJere Leppänen
Rename some symbols that are global in the static library, in order to avoid clashes with application code. The prefix "_odp_" is added to the existing names. This patch renames most of the global symbols, a few more still remain to be renamed. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2020-12-23linux-gen: pool: implement support for pool statisticsMatias Elo
Implement new odp_pool_stats_reset() and odp_pool_stats() functions. To minimize overhead, support for alloc_ops, free_ops, cache_alloc_ops, and cache_free_ops counters can be disabled by setting CONFIG_POOL_STATISTICS define (platform/linux-generic/include/odp_config_internal.h) to zero. 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>
2020-12-23linux-gen: ring: add internal functions for reading current ring lengthMatias Elo
Add implementation internal functions ring_u32_len()/ring_ptr_len() for reading currect ring lengths. 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>
2020-12-22linux-gen: ipsec: add odp_ipsec_sa_infoSachin Yaligar
Implement odp_ipsec_sa_info() API. Signed-off-by: Sachin Yaligar <syaligar@marvell.com> Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2020-12-22linux-gen: ipsec: add IPsec statsAnoob Joseph
Add support for IPsec stats collection. Signed-off-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2020-12-17linux-gen: pktio: support transmitting packet vectors using odp_queue_enq()Matias Elo
Enable application to transmit packet vectors using odp_queue_enq() and odp_queue_enq_multi() calls. If the whole packet vector is not transmitted successfully, the remaining packets in the vector are freed and the out_discards counter is incremented accordingly Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2020-11-26linux-gen: remove unused bitmap implementationJere Leppänen
Since the removal of the iquery scheduler in 2018, the bitmap implementation has been unused. Remove it. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2020-11-20linux-gen: pool: update odp_buffer_is_valid() implementationPetri Savolainen
Update odp_buffer_is_valid() to conform API spec change. Try to avoid crash with corrupted buffer handles by checking that buffer header pointer is on a valid range before accessing buffer header fields. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2020-11-19linux-gen: ipsec: revert usage of ipsec error flagAakash Sasidharan
In case of IPsec packets, odp_packet_has_error() can be used to check parse errors after IPsec processing. All IPsec errors/warnings need to be checked using odp_ipsec_result(). Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2020-11-19linux-gen: classification: enable packet vector supportMatias Elo
Enable creating packet vectors using classifier. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2020-11-19linux-gen: classification: copy cos index into packet headersMatias Elo
Copy classifier CoS index into packet headers. Required for generating packet vectors. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2020-11-19linux-gen: pktio: implement packet vector generationMatias Elo
Enable creating packet vectors using standard pktio. Using a timeout to wait for incoming packets is not supported. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>