aboutsummaryrefslogtreecommitdiff
path: root/example
AgeCommit message (Collapse)Author
2014-12-11odp_ipsec: fix odp_crypto_get_operation_compl_status arg orderMike Holmes
This fixes https://bugs.linaro.org/show_bug.cgi?id=714 Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@linaro.org> Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-12-10Rename packet functionsMaxim Uvarov
This patch updates the ODP example programs to reflect the specified odp_packet_flags.h API name changes. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org>
2014-12-05example: test: remove use of internal ODP macrosMike 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>
2014-12-04example: odp_pktio mtu option is not mandatoryStuart Haslam
Signed-off-by: Stuart Haslam <stuart.haslam@arm.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-11-29api: odp_time.h: rename odp_time_get_cycles() to odp_time_cycles()Stuart Haslam
Signed-off-by: Mario Torrecillas Rodriguez <mario.torrecillasrodriguez@arm.com> Signed-off-by: Stuart Haslam <stuart.haslam@arm.com> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-11-27example/ipsec/odp_ipsec.c: Fix initialization of odph_linux_pthread_t instancesShmulik Ladkani
Per-worker '&thread_tbl[i]' instance should be initialized by 'odph_linux_pthread_create()'. However, 'thread_tbl' (the array itself) was accidentally passed to 'odph_linux_pthread_create', re-initializing 'thread_tbl[0]' on each iteration. Furthermore, the iteration is not needed as all threads are initialized identically (with a NULL start_routine), as pointed out by Maxim Uvarov. Fix by calling 'odph_linux_pthread_create' and specifying 'num_workers' as the number of threads to initialize. Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com> 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-11-26examples: remove the use of ODP_UNUSEDMike Holmes
ODP_UNUSED should be used internally to an ODP implementation and not by an application. The declaration should never have specified ODP_UNUSED for find_ipsec_cache_entry_out() Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-11-25api: odp_atomic.h: struct type, relaxed mm, missing funcs, use __atomicOla Liljedahl
Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-11-25linux-generic: odp_generator.c use odp_atomic.hOla Liljedahl
Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-11-21enhance odp_pktio to set/get mtuMaxim Uvarov
Add new option -t or --mtu to set up new mtu value. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org>
2014-11-20API name changes for odp_barrier.h for ODP v1.0Bill Fischofer
2 patches from mailing list: - API name changes for odp_barrier.h for ODP v1.0 - Update examples for odp_barrier.h API changes for ODP v1.0 This patch updates example programs to reflect API name changes in odp_barrier.h for ODP v1.0 Signed-off-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-11-20example: Makefile.inc: fix include pathAnders Roxell
Break when configuring building in a separate build directory 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>
2014-11-19example: Remove use of ODP API loggingMike Holmes
Removing the calls to the ODP API error functions from applications allows the functions to be moved into the ODP APIs internal interface. Applications should consume ODP implementation error messages and not use the library for its own logging needs. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-11-18ipsec: Fix ctx->state update raceJerin Jacob
In existing code, ctx->state of packet which received from ORDERED queue has been updated after sending the packet to ATOMIC queue. This creates a race between "updating ctx->state from core x(ORDERED)" and "reading stale ctx->state from core y(ATOMIC)" In order to avoid the race, core x(ORDERED) should update the ctx->state value before sending to ATOMIC queue. Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Reviewed-by: Robert King <robking@cisco.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-11-08odp_example.c: Fix doxygen warningsMike 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>
2014-11-05odp_example.c: fix dead code pathMike Holmes
tot is = i which cannot leave the for loop without being positive unless it exits entirely and never reaches the test statement. Or QUEUE_ROUNDS is #defined to 0 rather than (512*1024) Thus tot is always true and the else cannot execute Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-10-29example: ipsec: remove redundant options from scriptsTaras Kondratiuk
Since commit "e968af6 Remove pktio type awareness" ipsec application doesn't accept 'f' and 't' options. getopt_long() function is configured to stop processing at first non-option, so 'm' option at the end is not processed. Remove these redundant options. Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-10-24odp_example.c: fix dead code pathMike Holmes
tot is = i which cannot leave the for loop without being positive unless it exits entirely and never reaches the test statement. Or QUEUE_ROUNDS is #defined to 0 rather than (512*1024) Thus tot is always true and the else cannot execute Signed-off-by: Mike Holmes <mike.holmes@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-21Add crypto and rwlock into odp.hPetri Savolainen
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-10-13Add global_init paramsMike Holmes
Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-10-03Rename packet start functionPetri Savolainen
- Unify function naming between packets and segments: xxx_addr(), xxx_data() - Rename odp_packet_start() to odp_packet_data() Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-10-03Rename packet buffer address functionPetri Savolainen
- Unify function naming between packets and segment: xxx_addr(), xxx_data() - Rename odp_packet_buf_addr() to odp_packet_addr() Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-10-03resource leak fixesMaxim Uvarov
Fix Coverity warnings about resource leaks. Coverity CIDs: 56713, 5611, 56707, 56705, 56703. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@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-10-02Remove pktio type awarenessCiprian Barbu
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-10-01git split: delete netmapMaxim Uvarov
netmap will be developed and supported in different git repo: https://git.linaro.org/lng/odp-netmap.git netmap will be separate odp platform. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-09-25odp_pktio_netmap: fixed odp_shm_reserveCiprian Barbu
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-09-25exampe/ipsec: set exec bit on run_*.shAnders Roxell
Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-09-23Shared memory handlePetri Savolainen
- Changed API to return shm handle instead of pointer - Added shm info - Tests updated to use shm handle and new addr function. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-09-16Shared memory flag default valuePetri Savolainen
Flags default value is zero (share memory within ODP, include HW accelerators). Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-09-11Add platform-specific Makefile.inc for applicationsTaras Kondratiuk
Platform-specific Makefile.inc is useful when application need to be built with platform-specific configuration: SDK search path, configurations, etc. Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Taras Kondratiuk <taras@ti.com> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-09-10Add IPsec example app to build environmentRobbie 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-04Timer example error checkPetri Savolainen
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-and-Tested-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-09-04linux-generic: netmap: renamed helper functionsCiprian Barbu
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Reviewed-and-Tested-by: Maxim Uvarov <maxim.uvarov@linaro.com>
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>
2014-08-28Timer example argumentsPetri Savolainen
Use arguments instead of hard coded values. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Stuart Haslam <stuart.haslam@arm.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-08-18Fix comment for odp_generatorWeilong Chen
This patch fix a comment error, and remove the print message of the flood mode. Signed-off-by: Weilong Chen <weilong.chen@linaro.org> Acked-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-08-15odp doxygen: fix doxygen-run generated warningsAws Ismail
According to the CI job for ODP API doxygen generation [1], there are 28 total warnings that needed to be fixed. This patch resolved these warnings by adding the proper doxygen tags that were missing. [1]: https://ci.linaro.org/view/lng-ci/job/odp-api-doxygen-generation/ Signed-off-by: Aws Ismail <aws.ismail@windriver.com> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Reviewed & Tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-08-06linux-generic: Fix incorrect thread_tbl index in appsSantosh Shukla
few of odp example and test application passing incorrect thread_tbl index entry (thread_tbl base addr) to odp_linux_pthread_create(thread_tbl^^, 1, ..) api. This patch a common fix for those odp application. Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org>
2014-08-04build both static and dynamic linked libsAnders Roxell
Move static decisions to Makefiles instead in the configure scripts. This makes it possible to build binaries with shared, static or all-static without reconfiguring and libodp is built both static and dynamic per default. Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
2014-07-25Move ODP examples from under testsMike Holmes
The expectations of example code vs testing code is significantly different. This difference is more easily managed if tests and examples have their own root directory especially as the number of validation tests is increased for the ODP 1.0 release. For example test cases may be significantly more complex than a good example might be expected to be. In addition tests are not expected to have Doxygen documentation and tests will not be expected to be coherent, they will test isolated APIs and to do so may perform illegal combinations of calls making them poor examples. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-and-Tested-by: Ciprian Barbu <ciprian.barbu@linaro.org>