aboutsummaryrefslogtreecommitdiff
path: root/platform
AgeCommit message (Collapse)Author
2016-02-08api: pktio: rename single_user paramPetri Savolainen
Renamed single_user pktio queue parameters to op_mode with enumeration type. This is in line with event queue enq_ and deq_mode parameters which are defined for the same purpose. Also term "single" gives wrong impression since application may use multiple threads but must itself synchronize those. This enables op_mode extensions in the future (e.g. dedicated single thread mode). Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: pktio: renames for compact type and func namesPetri Savolainen
Renamed some multiqueue api type and function name, so that those fit better on 80 char lines. Standardized packet input side to use odp_pktin_ prefix and output side odp_pktout_ prefix. odp_pktio_input_mode_t odp_pktin_mode_t odp_pktio_output_mode_t odp_pktout_mode_t odp_pktio_input_queue_param_t odp_pktin_queue_param_t odp_pktio_output_queue_param_t odp_pktout_queue_param_t odp_pktio_input_queues_config() odp_pktin_queue_config() odp_pktio_output_queues_config() odp_pktout_queue_config() odp_pktio_in_queues() odp_pktin_event_queue() odp_pktio_pktin_queues() odp_pktin_queue() odp_pktio_pktout_queues() odp_pktout_queue() odp_pktio_input_queue_param_init() odp_pktin_queue_param_init() odp_pktio_output_queue_param_init() odp_pktout_queue_param_init() Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: queue: add enq and deq mode paramsPetri Savolainen
Enqueue and dequeue mode parameters are needed to e.g. deny direct dequeue operations on scheduled or packet output queues. Additionally, application may inform implementation about intended usage (e.g. will not enqueue into packet input queue) and synchronization needs (application synchronizes enq/deq calls). There is possibility to add modes later on. For example, a dedicated, single thread mode could be added, which would pin a queue (enq or deq end) to a dedicated thread. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: timer use SIGEV_THREAD_IDMaxim Uvarov
Switch timer to use SIGEV_THREAD_ID instead of SIGEV_THREAD. I.e. do not start timer handle thread on each timer action. Start timer handle manually and wait for signal there. This patch also fixes nasty bug with hanging timer threads, which wants to access to timer pool and free shm on pool destroy action. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
2016-02-08linux-generic: netmap: fix MTU sizeMatias Elo
This is a bug fix for netmat pktio MTU size. Valid packets were being dropped in netmap_send() due to not taking into account the ethernet header length. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: queue: moved queue type into queue parametersPetri Savolainen
Added type into queue parameters structure, since the type specifies other parameters usage (e.g. sched params must be filled for SCHED queue type). It's also provides future proof odp_queue_create(), etc function prototype definition. Defined PLAIN as the default type, since it does not require definition of any other queue params (e.g. sched params). Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: queue: define queue type as enumPetri Savolainen
Fixed odp_queue_type_t to be an enum. Type need to be fixed so that it can be added as part of odp_queue_param_t. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: platform/linux-generic/include/odp/plat/queue_types.h
2016-02-08api: pktio: rename pktio modesPetri Savolainen
Aligned pktin and pktout modes with renamed queue types in the following way: ODP_PKTIN_MODE_RECV to ODP_PKTIN_MODE_DIRECT ODP_PKTIN_MODE_POLL to ODP_PKTIN_MODE_QUEUE ODP_PKTIN_MODE_SCHED was not renamed ODP_PKTOUT_MODE_SEND to ODP_PKTOUT_MODE_DIRECT Direct pktio modes (_RECV/_SEND) are renamed to _DIRECT, which is future proof to support additional direct calls for packet input/output. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: queue: rename QUEUE_TYPE_POLL to _PLAINPetri Savolainen
Term "poll" does not describe queue type accurately. Many resources can be polled. For example, application polls the scheduler to dequeue from "sched" type queues. Term "plain queues" describe better what these queues offer, a plain storage of events which application can directly dequeue (instead of using the scheduler). Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: sched: rename SCHED_SYNC_NONE to _PARALLELPetri Savolainen
In practice, this type of queues are referred as "parallel queues" instead of "none queues". Also "none" type is quite pessimistic term, since scheduler may perform lots of HW offload also in this mode. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: classification: implement verify_pmr_dmacBalasubramanian Manoharan
Implements Ethernet destination mac address verification Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08mergefix: odp_packet_io.c: move odp_pktio_term_global down in fileMaxim Uvarov
No code change. Because we merged branches partially (with cherry-pick) odp_term_global function placed in different offsets in file for master and api-next branch. This patch aligns file in master branch with api-next. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: pktio: use multiqueue recv internallyPetri Savolainen
Use multiqueue recv for poll type input queues. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: atomic: init functions are not atomicPetri Savolainen
Highlight that application must ensure that there's no race while calling init functions. Also lock free call will never set op.init flag, since init call will not need to implement locking or other (lock free) synchronization. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: stdlib: added odp_memcmpPetri Savolainen
Memory compare is a commonly used C library function on data plane applications. This enables using HW offload (e.g. vector unit) for compare operations. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: barrier: use API memory barrierPetri Savolainen
Use full memory barrier from API instead of the internal function. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Ola Liljedahl <ola.liljedahl@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: locks: replace internal atomicsPetri Savolainen
Replace internal non-relaxed atomics with API calls. Timer and spinlock were not converted since those use flags and 128 variables. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Ola Liljedahl <ola.liljedahl@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: atomic: non-relaxed 64bit operationsPetri Savolainen
Implemented 64 bit non-relaxed atomic operations. Additional ordering is not needed in case of using ATOMIC_OP since it includes both acquire and release ordering. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Ola Liljedahl <ola.liljedahl@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: atomic: 32bit cas_rel and cas_acq_relPetri Savolainen
Implemented 32bit cas_rel and cas_acq_rel calls. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Ola Liljedahl <ola.liljedahl@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: atomic: implemented exchangePetri Savolainen
Implemented 32 and 64 bit atomic exchange operations. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Ola Liljedahl <ola.liljedahl@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08validation: removing synchronizers testsChristophe Milard
Now redundant with atomic, barrier and lock tests. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08validation: synchro tests split into 3 groupsChristophe Milard
No functionnal changes: just code reordering to match the ODP modules. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: atomic: rename release orderingPetri Savolainen
Rename release ordering from _rls_ to _rel_ since it matches better with _acq_rel_, which is going to be used for C11 memory_order_acq_rel order. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Ola Liljedahl <ola.liljedahl@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: atomic: added atomic_lock_free_u64Petri Savolainen
Platforms may support some uint64 operations lock-free and others not. For example, inc_64 can be natively supported but cas_64 (or max_64/min_64) not. User may be able to switch to 32 bit variables when a 64 bit operation uses locks. The same atomic operation struture could be used for platform init to guide lock vs. lock-free implementation (e.g. if cas_64 is never called, inc_64 can be lock-free). Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Ola Liljedahl <ola.liljedahl@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: atomic: added 32 bit acquire and releasePetri Savolainen
Added 32 bit acquire load/cas and release store/add/sub calls. These are the minimum set of non-relaxed calls that are needed for building lock-free algorithms. 64 bit versions can be added later. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: atomic: added atomic min and maxPetri Savolainen
Added atomic min and max operations. These can be used e.g. to maintain high and low water marks of an another atomic counter. These use relaxed memory order. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: atomic: added cas operationsPetri Savolainen
Added cas operations for 32 and 64 bit atomic variables. These use relaxed memory order (as all other operations). Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: endian: rename endian types with odp_ prefixChristophe Milard
The following types: uint16le_t, uint16be_t, uint32le_t, uint32be_t, uint64le_t, uint64be_t, uint16sum_t, uint32sum_t defined in the api and in platform/linux-generic/include/odp/plat/byteorder_types.h were not odp_* prefixed and could create name clash with an applications. This patch prefixes those with odp_*, suppressing "int" for shortness. e.g. uint16le_t becomes odp_u16le_t Also modifies files using these types, of course. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: pktio: print out the name of pktio usedZoltan Kiss
For debug purposes, otherwise it's not trivial to figure out which pktio was successful. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: pktio: added poll type input queuePetri Savolainen
Added support for poll type input queues. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: classifier: align enum type namingPetri Savolainen
All ODP API enums are typedef'd and type name has a '_t' post-fix. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: init: align enum type namingPetri Savolainen
All ODP API enums are typedef'd and type name has a '_t' post-fix. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: removed spin_internalPetri Savolainen
Removed odp_spin() and replaced usage with odp_cpu_pause(). Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: platform/linux-generic/Makefile.am
2016-02-08linux-generic: cpu: implemented pausePetri Savolainen
Implemented pause as an inline function in a cpu arch dependent header file. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: platform/linux-generic/Makefile.am
2016-02-08linux-generic: sysinfo: rename variable cpu_hz to cpu_hz_maxHongbo Zhang
The legacy variable cpu_hz holds the max frequency for odp_cpu_hz_max(), so rename it to cpu_hz_max for better meaning. Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: sysinfo: update dummy function to pass validationHongbo Zhang
In the default dummy function systemcpu(), only cpu_hz[0] and model_str[0] are set to dummy values, then in the validation code if iterate each CPU, cores other than core 0 report failure, this patchs pad all the arrays to default values to pass validation. For bug: https://bugs.linaro.org/show_bug.cgi?id=1870 Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org> Reviewed-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: sysinfo: apply per-CPU implementation to PowerPCHongbo Zhang
When per-CPU framework was introduced, it was only implemented on x86, for other platforms, only the model_str[0] and cpu_hz[0] are set to pass compile, this patch set all values for model_str[] and cpu_hz[] on the PowerPC platform. Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: sysinfo: apply per-CPU implementation to MIPSHongbo Zhang
When per-CPU framework was introduced, it was only implemented on x86, for other platforms, only the model_str[0] and cpu_hz[0] are set to pass compile, this patch set all values for model_str[] and cpu_hz[] on the MIPS platform. Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: sysinfo: set values for cpu_arch_strHongbo Zhang
The values of cpu_arch_str were deleted due to codes reorganization, this patch adds values to them again. Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: cpu: make frequency API return 0 on failureHongbo Zhang
All the CPU frequency API return value type is uint64_t, this patch makes them return 0 on failure instead of -1. Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: sysinfo: move PowerPC system info codes to its plarform fileHongbo Zhang
This patch moves the PowerPC system info codes into the newly added PowerPC specific platform file. This patch also creates syslink to arch/linux/odp_cpu_cycles.c for PowerPC. Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: sysinfo: move ARM system info codes to default arch fileHongbo Zhang
This patch moves the ARM system info codes into the general arch file, ARM sysinfo isn't implemented now and there is no need to create specific arch file for it, but this can serve as the default implementaton instead. Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: sysinfo: move MIPS system info codes to its plarform fileHongbo Zhang
This patch moves the MIPS system info codes into the newly added MIPS specific platform file. Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: sysinfo: move x86 system info codes to its plarform fileHongbo Zhang
This patch moves the x86 system info codes into the newly added x86 specific platform file. Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: arch: renamed cpu arch filesPetri Savolainen
These arch depedent files are not limited to cpu_cycle calls implementation only. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: pktio: remove unused ODP_PKTIO_ANYStuart Haslam
ODP_PKTIO_ANY is defined in the API header but there's no description of its intended use and it wouldn't make sense to pass it to the majority of exisitng APIs that take odp_pktio_t handles. It's not currently used anywhere, so remove it. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08linux-generic: pcap: implement pktio statistics countersMaxim Uvarov
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-and-tested-by: Stuart Haslam <stuart.haslam@linaro.org>
2016-02-08linux-generic: pktio loop: implement statistics countersMaxim Uvarov
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-and-tested-by: Stuart Haslam <stuart.haslam@linaro.org>
2016-02-08linux-generic: netmap: implement pktio statisticsMaxim Uvarov
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-and-tested-by: Stuart Haslam <stuart.haslam@linaro.org>
2016-02-08linux-generic: sockets: implement pktio statisticsMaxim Uvarov
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-and-tested-by: Stuart Haslam <stuart.haslam@linaro.org>