aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic
AgeCommit message (Collapse)Author
2021-07-13Merge tag 'v1.30.1.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2021-07-02Merge tag 'v1.30.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2021-06-23linux-gen: reass: fix the default value of max_num_fragsJanne Peltonen
Fix the setting of default value of odp_reass_config_t::max_num_frags in odp_pktio_config_init() and odp_ipsec_config_init(). The API specifies that the default value is 2. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: dpdk: implement extra statistics counters functionsMatias Elo
Add DPDK pktio 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: netmap: implement extra statistics counters functionsMatias Elo
Add netmap pktio 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: socket: implement extra statistics counters functionsMatias Elo
Add socket pktio 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: socket_mmap: implement extra statistics counters functionsMatias Elo
Add socket_mmap pktio 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 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: add alternative ethtool statistics counter namesMatias Elo
The statistics counter names provided by ethtool are not standardized. Add alternative counter names to compare against to increase the possibility that all required counters are found. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: pktio: save interface names before calling pktio open()Matias Elo
Pktio devices may use pktio_entry_t.name field internally (e.g. _odp_sock_stats_type_fd()), so save the names before calling device open. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: socket: fix typo in sysfs pktio statisticsMatias Elo
Fix typo in RX dropped packet count path. 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-23api: pktio: add implementation specific extra statistics countersMatias Elo
Add new functions for reading ODP implementation specific custom packet IO statistics counters. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-06-23linux-gen: dpdk: add support for per queue statistics countersMatias Elo
Implement per input/output queues statistics counters for DPDK pktio. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: dpdk: set per rx/tx queue statistics mappingsMatias Elo
Set per input/output queue statistics counter mappings for DPDK pktio. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: loop: add support for per queue statistics countersMatias Elo
Implement per input/output queues statistics counters for loop pktio. 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-23linux-gen: pktio: add support for broadcast and multicast statisticsMatias Elo
Add support for multicast and broadcast packet input/output statistics counters for socket based pktio devices. 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-22linux-gen: timer: implement tick_infoPetri Savolainen
Fill in new tick_info fields. One timer tick in API is one nsec. Init clk_cycle field to zero, as there is no clock signal that runs timer tick. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-06-22linux-gen: fract: implement odp_fract_u64_to_dbl()Petri Savolainen
Implemented the new API function which converts fractional to double. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-06-21linux-gen: dpdk: sync dpdk build changes from odp-dpdkMatias Elo
Sync DPDK build improvements from ODP-DPDK implementation. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-21linux-gen: dpdk: enable c language posix extensionsMatias Elo
Enable POSIX and GNU extensions with DPDK parser as DPDK uses strnlen() internally. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-17linux-gen: sched: rename spread indexPetri Savolainen
For better code readability, rename spread index variables to spr or spread. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-06-17linux-gen: sched: maintain queue counts per group/prio/spreadPetri Savolainen
Add group level to queue count and queue mask data structures. This tells exactly if queues have been placed to a particular scheduler ring (priority queue). Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-06-17linux-gen: sched: count number of threads per spreadPetri Savolainen
Add statistics that count the number of threads preferring a spread (of a group). Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-06-17linux-gen: test: skip ipsec_api live and router mode testsAakash Sasidharan
Skip live and router mode tests for ipsec_api in linux-generic platform. Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-06-16linux-gen: dpdk: fix snap ethtype parsingMatias Elo
DPDK pktio SNAP ethtype parsing code was using incorrect pointer. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-11linux-gen: dpdk: don't enable input hashing automaticallyMatias Elo
Don't enable input hashing automatically for DPDK pktio. An application may reasonably expect that all packets will end up in the same input queue when input hashing is not enabled in odp_pktin_queue_param_t. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-06-11linux-gen: dpdk: don't fail on unsupported input hash protocolMatias Elo
Since there is no capability for the supported input hash protocols it's better to just print a debug message instead of fail odp_pktin_queue_config() if an unsupported input hash protocol was selected. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-06-11linux-gen: cls: fix odp_cls_cos_queues() return valueMatias Elo
According to the spec odp_cls_cos_queues() should return the number of queues linked to the CoS, not the number of queue handles written to the output. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-04linux-gen: sched: allow info request on predefined groupsPetri Savolainen
Thread mask and schedule group info may be requested also on prefined schedule groups. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@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-06-01linux-gen: hash: fix conversion warningMatias Elo
Fix conversion warning "uint32_t {aka unsigned int}' from 'long long unsigned int' may alter its value". Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-06-01linux-gen: timer: new timer set return codesPetri Savolainen
Replace timer set return codes with the new ones. 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-05-31linux-gen: timer: use default clock source enumPetri Savolainen
Replace ODP_CLOCK_CPU with ODP_CLOCK_DEFAULT. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-31linux-gen: hash: fix conversion warningMatias Elo
Fix conversion warning "uint32_t {aka unsigned int}' from 'long long unsigned int' may alter its value". Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@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: shm: avoid potential integer overflowJere Leppänen
In _odp_ishmbud_alloc(), avoid integer overflow when calculating the maximum allocation size. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-05-31linux-gen: fdserver: check unix socket path lengthJere Leppänen
Make sure that path length is within the sockaddr_un::sun_path limit when connecting unix sockets. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@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-31linux-gen: tm: add implementation of TM start/stopNithin Dabilpuram
Add implementation of TM start or stop API. Since linux generic platform does not have any setup and cleanup constraints, the TM start/stop are a no-op. Also report support for all dynamic updates. Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-31linux-gen: tm: use commit_rate and peak_rate in shaper paramNithin Dabilpuram
Use commit_rate and peak_rate fields in odp_tm_shaper_params_t instead of commit_bps and peak_bps as *_rate fields denote rate in BPS when byte mode is set and PPS when packet mode is set. Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-27Merge tag 'v1.29.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2021-05-26Merge tag 'v1.28.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2021-05-25linux-gen: test: remove ipsec_crypto_example.shAakash Sasidharan
ipsec_crypto_example.sh script is now unnecessary and can be removed. Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-05-25example: ipsec_crypto: enhance runtime scriptsAakash Sasidharan
The network interfaces and configurations required for the application change based on the application mode in which the test is being run. Introduce env variable IPSEC_APP_MODE which will be set by run script. The supported modes are: 0 - standalone mode, 1 - live mode and 2 - router mode. Though linux-gen supports multiple "loop" devices like loop1 and loop2, other ODP implementations may not support multiple loop interfaces. To allow flexibility for other platforms, introduce following env variables in the runtime scripts for standalone mode: * IF_LIST env variable lists all the interfaces used for standalone mode of test. * For outbound tests, stream entry has source interface as IN_IF and destination interface as OUT_IF. * For inbound tests, stream entry has source interface as OUT_IF and destination interface as IN_IF. * Introduce ROUTE_IF_INB and ROUTE_IF_OUTB for routing the IPSEC processed packets in standalone tests. Introduce platform specific pktio_env script to define these environment variables. Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>