aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2014-08-06test_api:timer: allow send thd to spwan firstSantosh Shukla
currently rx_thread spawn first and at times leads to tmo search failure for first ping request thats because send thread not yet pushed tmo entry into ticklist. Making send_tx thread spawn first avoid rx_ping tmo failure for initial ping request. also includes one misc fix, this returning from rx ping thread even if current tmo search failed, allow other ping request to process. Signed-off-by: Santosh Shukla <santosh.shukla@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-29api_test/Makefile.am: name exe after src fileMike Holmes
Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org>
2014-07-28timer : miscellanous fixes in odp_timer test applicationSantosh Shukla
odp timer test app stucks for tx_ack time out case, for example bad ping ipadress. this patch does graceful exit for such case. also done some cleaning - removed unnecessary debug messages - replaced return with err label - Replaced no. of core ping thread to 2 threads(tx, rx) - used poll mode for ping timeout then exit. Signed-off-by: santosh shukla <santosh.shukla@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>
2014-07-18Introduce sum type to solve sparse warningsMike Holmes
ODP follows the linux kernel with the use of sparse and BE data type checking. This patch introduces the sum type which is used by Linux but was not part of ODP see: http://lxr.free-electrons.com/source/include/uapi/linux/icmp.h#L71 This patch allows SPARSE to pass cleanly and the odp_generator test case also passes. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-and-Tested-by: Anders Roxell <anders.roxell@linaro.org>
2014-07-10test/Makefile.inc: add required srcdirAnders Roxell
Fixes builds when the builddir != srcdir Reported-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Tested-by: Mike Holmes <mike.holmes@linaro.org>
2014-07-09Remove duplicate $top_srcdir/includeAnders Roxell
Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-and-Tested-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
2014-07-03test: add prefix odp_ and remove example from filesAnders Roxell
Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Steve McIntyre <steve.mcintyre@linaro.org>
2014-07-03Autotoolise build systemAnders Roxell
Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Steve McIntyre <steve.mcintyre@linaro.org>
2014-07-01Add static to global variablesMike Holmes
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
2014-06-26Fix sparse static warningsMike Holmes
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
2014-06-26test/: Fix sparse constant is too longMike Holmes
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
2014-06-26Fix uint16be_t sparse checksum errorsMike Holmes
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
2014-06-26Timer test uses timeout bufferPetri Savolainen
Timer test modified to use the timeout buffer type. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
2014-06-26Fix globaly shadowed variable 'args'Mike Holmes
Removes sparse -Wshadow warning by prefixing the global instace of args with gbl_. This makes it more aparrent to the reader that the global instance of args is being referenced rather than the local one in burst_mode_init_params(). Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org>
2014-06-24Fix buffer pool type in l2fwd appVenkatesh Vivekanandan
Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
2014-06-17Add support for controlling the build verbosity of test applicationsJerin Jacob
Use make VERBOSE=yes to enable the verbosity. Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2014-06-10tests: api: timer: Fix operator precedenceTaras Kondratiuk
'==' has higher priority than '=', so 'buf' gets a result of comparison instead of a buffer. Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
2014-06-10Fix drop_err_pkts to correctly discard bad packetsStuart Haslam
The drop_err_pkts function is intended to discard packets that input parsing has marked as containing errors (e.g. short frame). It correctly identifies and frees bad packets but an error in the way pkt_tbl is updated means bad packet handles aren't actually removed, later use of the stale packet handle results in a SEGV. The pkt_cnt is decremented though, so for each bad packet a good packet (within the same burst) is dropped and leaked. Signed-off-by: Stuart Haslam <stuart.haslam@arm.com>
2014-06-09add odp prefix to l2fwdMaxim Uvarov
All odp applications have odp_ prefix. Adding the same prefix to l2fwd. Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-05-21simple compile all tests in ./test dirMaxim Uvarov
Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-05-15L2 Forwarding AppVenkatesh Vivekanandan
Initial L2 forwarding application based on example pktio that resembles DPDK's in functionality. It is based on raw sockets and not tested on any network HW accelerator. Create pktio and queue for all threads before starting pthread. It has two modes supported, 1. burst mode(without ODP queues) 2. queue mode (with ODP queues and scheduler) and three types, 1. raw sockets 2. multiple messages on sockets 3. mmap on sockets Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
2014-05-12tests: Do not use platform directoryTaras Kondratiuk
Test applications should not differ from any other ODP application in a way they use ODP library and headers. They shall use them from DESTDIR. The fact that they are placed in ODP repo do not allow them to abuse it. By using directly library and includes from platform directly we break modularity. Tests' Makefile must have information about platform's include directory structure. So tests' Makefile should be updated every time structure changes. Things get even worse if platform include directory structure differs between implementations (which is a valid case). Removing direct access to platform directory also makes hard to build and install library from tests' Makefile. Only unconditional install is possible, but this adds unnecessary overhead on each test build. So this patch removes this ability. Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
2014-05-08Add a test program: odp_generatorWeilong Chen
odp_generator can send/receive udp packets, or works like ping. Work mode: 1.send udp packets odp_generator -I eth0 --srcmac fe:0f:97:c9:e0:44 --dstmac 32:cb:9b:27:2f:1a --srcip 192.168.0.1 --dstip 192.168.0.2 -m u 2.receive udp packets odp_generator -I eth0 -m r 3.work likes ping odp_generator -I eth0 --srcmac fe:0f:97:c9:e0:44 --dstmac 32:cb:9b:27:2f:1a --srcip 192.168.0.1 --dstip 192.168.0.2 -m p Mandatory OPTIONS: -I, --interface Eth interfaces (comma-separated, no spaces) -a, --srcmac src mac address -b, --dstmac dst mac address -c, --srcip src ip address -d, --dstip dst ip address -s, --packetsize payload length of the packets -m, --mode work mode: send udp(u), receive(r), send icmp(p) -n, --count the number of packets to be send -t, --timeout only for ping mode, wait ICMP reply timeout seconds -i, --interval wait interval ms between sending each packet default is 1000ms. 0 for flood mode Signed-off-by: Weilong Chen <weilong.chen@linaro.org>
2014-04-28test: make include files consistentAnders Roxell
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
2014-04-28doxygen clean up odp_common.[ch]Maxim Uvarov
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-04-18Scheduler development and timer testPetri Savolainen
Added timer test and modified scheduler API for cleaner wait and pause functionality. - Added test/timer, removed timer test code from test/example - Added scheduler wait parameter: cleaner control of wait/no wait/how long to wait - Added scheduler pause/resume which provides application a clean way to break out from the schedule loop (when scheduler has potentially optimized throughput with thread local stash of buffer) - odp_schedule_one which can be used to optimize application RT/QoS vs throughput - queue and time helpers used by scheduler and timer test Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
2014-04-18Makefile cleanupPetri Savolainen
GCC option-fPIC decreases performance with static libraries and should be enable only when really needed. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
2014-04-18Revert "test: add libpcap example"Maxim Uvarov
This reverts commit 1aa4620f789d572a08441ce85ad4e39420d76fff. ODP libpcap support will be in separate git tree: git://git.linaro.org/lng/odp-apps.git as well as others 3-rh party applications. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: .gitignore
2014-04-18Revert "test: update libpcap example for new odp"Maxim Uvarov
This reverts commit 6007d8833a6880abedf98f792586c0cfb9f10de0. ODP libpcap support will be in separate git tree: git://git.linaro.org/lng/odp-apps.git as well as others 3-rh party applications. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-04-16test/api_test/odp_atomic: enable testcase 7Anders Roxell
wasn't able to run testcase 7, said: "Invalid test case [7]" Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
2014-04-10netmap cleanup and update to changes in socket exampleCiprian Barbu
Reworked the netmap pktio example to support any number of threads of execution and multiple interfaces to work on. The threads are no longer associated with pktios because of using odp_schedule that gets packets from any pktio. General cleanup changes were made, setting hardcoded values to defines, renaming some variables, modifying some comments. Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
2014-04-10Adding odp_packet_copyCiprian Barbu
This function will not some more work when the scatter/gather support is added, for now the odp_buffer_copy_scatter is just a stub. Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
2014-04-09example_pktio: no need to provide pool to threadsMaxim Uvarov
Packet pool can be found with odp_buffer_pool_lookup(), no need to provide it to threads. Emphasize that in example. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-04-09Timer: build fix for armSantosh Shukla
source/odp_timer.c: In function ‘odp_timer_cancel_tmo’:wq! source/odp_timer.c:136:3: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 8 has type ‘uint64_t’ [-Werror=format=] ODP_ERR("cancel failed for tim id %d tmo id :%d tick idx %lu\n", id, tmo, tick_idx); odp_timer_ping.c: In function ‘ping_init’: odp_timer_ping.c:257:31: error: cast increases required alignment of target type [-Werror=cast-align] dst_addr.sin_addr.s_addr = *(long *)hname->h_addr; - Move ODP_ERR outside spinlock - Replace ODP_ERR with ODP_DBG, as search_and_delete_tmo() func may fail for valid case like entry in list already deleted by timeout handler which is a valid case but then odp_err messaging is wrong..(pointed out by Ola). The invalid case still fall into same loop and may confuse for now, thus need to identify possible erronoing so to decode error message. I am leaving this open for now (possible errorno in timer implementation) ..will evolve in phases (TODO) Signed-off-by: santosh shukla <santosh.shukla@linaro.org>
2014-04-07timer:ping test applicationsantosh shukla
Application open PF_INET socket, spawns two thread, one is sender_ping_thr another one listen_thr. Each send request arms timer for absolute timeout duration Whenever listner thread recieves ack, it cancels the timer_out and free the timeout buffer i.e. tmo_buf allocate while arming.. Otherwise timeout-event-notfier will enqueue time out even to queue for that pckt_cnt. Signed-off-by: santosh shukla <santosh.shukla@linaro.org>
2014-04-04test: update libpcap example for new odpodp-0.2Vincent Hsu
Signed-off-by: Vincent Hsu <vincent.hsu@linaro.org>
2014-04-02rework packet io selectionMaxim Uvarov
Dynamically select type of packet I/O sock_params->type = ODP_PKTIO_TYPE_SOCKET_BASIC ODP_PKTIO_TYPE_SOCKET_MMSG ODP_PKTIO_TYPE_SOCKET_MMAP ODP_PKTIO_TYPE_NETMAP sock_params->fanout = 1; pktio = odp_pktio_open(thr_args->pktio_dev, thr_args->pool, &params); Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-03-27Clean Doxygen warningsPetri Savolainen
Cleaned warnings on include, include/helper and test/example. Used @internal and @private to mark documentation that should not go into ODP API docs. Doxyfile.in needs INTERNAL_DOCS = YES to suppress warnings (of @internal), but it should be set "NO" for "official" documentation generation. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
2014-03-21test: add libpcap exampleVincent Hsu
Signed-off-by: Vincent Hsu <vincent.hsu@linaro.org>
2014-03-13Add STD_LIBS into test app makefilesPetri Savolainen
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: santosh shukla <santosh.shukla@linaro.org>
2014-03-13Timer implementation first draftPetri Savolainen
Very simple implementation. Does not implement cancel_tmo. Test included into example app. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
2014-03-13Packet IO test core count optionPetri Savolainen
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
2014-02-26Cycle count accuracy testPetri Savolainen
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
2014-02-26Makefile cleanup continuedPetri Savolainen
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
2014-02-25Makefile cleanupPetri Savolainen
- Enabled test level make / make clean without install - Main level Makefile installs files still by default - Moved common stuff into odp/Makefile.inc and odp/test/Makefile.inc Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
2014-02-24add static where possibleMike Holmes
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
2014-02-24Test: remove unreachable codeMike Holmes
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>