aboutsummaryrefslogtreecommitdiff
path: root/helper
AgeCommit message (Collapse)Author
2015-07-23api: helper: deleted odph_linux_cpumask_defaultPetri Savolainen
The linux specific helper was replaced by default cpumask calls (odp_cpumask_def_worker()) in the cpumask API. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Christophe Milard <christophe.milard@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: helper/linux.c
2015-07-23api: init: added thread type to local initPetri Savolainen
User needs to select the thread type (worker or control) of the initialized thread. Implementation may reserve HW direct access only to worker threads, while control threads share HW access, etc. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: helper/linux.c
2015-07-21api: pool: remove shm paramter from odp_pool_create()Bill Fischofer
This patch removes the 2nd parameter to odp_pool_create() because it has two major issues: 1. Applications have no way to know how big a shm area is required for a given pool since that information is implementation specific. So there's no portable means of using this parameter. 2. Some implementations (e.g., odp-dpdk) cannot accept an external memory area for pool creation since they need to control the memory themselves. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: test/validation/pktio/pktio.c test/validation/pool/pool.c helper/test/odp_chksum.c
2015-07-16helper: test: add test for odph_pauseMike Holmes
Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-07-10test: factor TESTS_ENVIRONMENT flags in Makefile.incNicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Christophe Milard <christophe.milard@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-07-09helper: convert to a libraryMike Holmes
Remove the need to build helper source files into the linux-generic library by converting helpers to be their own library. This removes the need for all other platforms to also build in the helpers which are optional just to run the tests. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Christophe Milard <christophe.milard@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-07-02remove helper dependence on ODP internalsMike Holmes
Remove the helpers dependence on internal implementation details, implementations should only have to implement the public API. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-07-02helper: linux: check pthread_join return codeNicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-06-29configurable binaries extensionNicolas Morey-Chaisemartin
Add $(EXEEXT) to all binary generated so platform can easily configure the binaries extension and use the LOG_COMPILER features of automake. This should have no visible effect unless EXEEXT is set by the configure Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Acked-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-06-29helper: add odp_chksum to .gitignoreStuart Haslam
Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-06-17helper/test/Makefile: fix, should be dist_odp_chksum_SOURCESAnders Roxell
change dist_odp_process_SOURCES -> dist_odp_chksum_SOURCES Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-06-16test checksumMike Holmes
Create a valid packet and then get its checksum. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-06-16helpers: fix udp checksum computationAlexandru Badicioiu
Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-06-05codespell: fix spellingMike Holmes
Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-05-27test: helper: add process and thread testsMike Holmes
The helpers need to be tested independently from the ODP API, create a folder to contain helper tests, adding tests for process and thread creation. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Christophe Milard <christophe.milard@linaro.org>
2015-05-18helper: ring: remove unused includeNicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-05-08linux-generic: support running with restricted cpu setStuart Haslam
odp_cpu_count() returns the number of online CPUs, but when running in a control group access may be restricted to only a subset of these. This combined with a lack of error handling in odph_linux_pthread_create() means a number of the applications create more threads than there are cores available to them, leading to deadlocks in odp_barrier_wait(). Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-04-17linux-generic: odp_linux: migrate helpers to helper dirMike Holmes
The odph helper src files do not belong in linux-generic, move them out to the helper directory. From the helper directory they may be more cleanly extended to support other execution environments beyond Linux. Clean up checkpatch whitespace warning in the migrated code. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-04-17helper: doxygen: group packet headers logicallyMike Holmes
The headers are all closely related but do not appear that way in the documentation, gather them together Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-04-17helper: doxygen: eth fix break in rendered docMike Holmes
The period signals to doxygen to add a line break, remove it Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-04-17helper: doxygen: icmp convert to c commentsMike Holmes
The code level comments describing the groupings were polluting the real defintions seen in the final output Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-01-29helper: move headers into namespace the odp/helperAnders Roxell
Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-01-29api: move ODP headers to a directoryTaras Kondratiuk
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-01-16helper: linux: use cpumask in linux thread/procRobbie King
Move away from specifying a core count and allow the user to specify a mask. Signed-off-by: Robbie King <robking@cisco.com> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-01-16helper: linux: add odph_linux_cpumask_defaultRobbie King
A default cpumask based on number of requested CPUs and bounded by number of CPUs in the system. Signed-off-by: Robbie King <robking@cisco.com> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-01-12linux-generic: odp_linux: fix memory leakMike Holmes
Store the start_args so that they can be freed on join Fixes numerous leaks reported by valgrind Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-01-07api: odp_system_info.h: change core to cpu everywhereOla Liljedahl
Rename odp_core_count() to odp_cpu_count(). Change "core" to "cpu"/"CPU" in messages and comments. Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
2014-12-16api: packet: add segmentation and copy APIBill Fischofer
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-12-16linux-generic: packet: improve packet parsingBill Fischofer
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-12-16api: packet: change layer offset/pointer APIBill Fischofer
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-12-16api: packet: move helper functions to public APIBill Fischofer
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-12-16api: rename ODP_STATIC_ASSERT to _ODP_STATIC_ASSERTMike Holmes
This assert is used in the public API but is not intended for use in applications and so it is marked with an underscore. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-12-10linux-generic: classification initial implementationBalasubramanian Manoharan
The following features are implemented in this classification implementation: * Attaches PMR, PMR_SET to a Pktio entry * Adds classifier object to pktio entry * Attaches CoS values for L2 and L3 QoS to a Pktio entry * Selects ClassOfService for a packet based on PMR, L2 QoS and L3 QoS values * Selects a default CoS if packet does not match any of the assigned rules * Selects an Error CoS for an Error packet * Enqueues the packet to the queue associated with the selected CoS Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-12-10helper: odph_tcp header descriptionBalasubramanian Manoharan
Adds TCP header description struct odph_tcphdr_t in helper directory. This structure is used for accessing TCP header information from the packet Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Victor Kamensky <victor.kamensky@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-11-26.gitignore: distribute the ignore file to sub dirsMike Holmes
Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-10-23Rename buffer_from_packet functionPetri Savolainen
Rename odp_buffer_from_packet() to odp_packet_to_buffer(). It's a function of packet API vs buffer API. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Tested-by: Anders Roxel <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-10-22Rename ODPH_PACKED macroJerin Jacob
Definition of ODPH_PACKED is in include/api/odp_align.h so changing to ODP_PACKED Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Reviewed-and-Tested-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-10-03Added process mode to example appPetri Savolainen
- Added an option to run odp_example as Linux processes (vs. pthreads) - Removed thread dependency from odp_local_init - Added Linux helpers for forking processes - modified odp_thread.c to allocate global variables from shared memory Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-09-10Add helper include file with IPSec headersRobbie King
Signed-off-by: Robbie King <robking@cisco.com> Tested-by: Alexandru Badicioiu <alexandru.badicioiu@linaro.org> Reviewed-and Tested-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-by: Bala Manoharan <bala.manoharan@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-09-02move helper functions and rename to prefix to odph_Anders Roxell
Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Acked-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Stuart Haslam <stuart.haslam@arm.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>