aboutsummaryrefslogtreecommitdiff
path: root/test/performance
AgeCommit message (Collapse)Author
2015-11-25api: cpu: change order of arguments for diff functionIvan Khoronzhuk
It's more convenient to pass parameters in order, like t2 - t1, when t2 is supposed to be more. Also it's needed to keep in sync with time API which uses same order. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: test/performance/odp_scheduling.c
2015-11-25api: time: change order of arguments for diff functionIvan Khoronzhuk
It's more convenient to pass parameters in order, like t2 - t1, when t2 is supposed to be more. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-11-25test/example: avoid "cycle" word usageIvan Khoronzhuk
The word "cycle" is left from old API time names. The "cycle" is ambiguous word, especially when it can be used for other purposes. So better to use "tick" or "time" word or just "t" symbol. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-11-25api: time: unbind CPU cycles from time APIIvan Khoronzhuk
Current time API supposes that frequency of counter is equal to CPU frequency. But that's not always true, for instance, in case if no access to CPU cycle counter, another hi-resolution timer can be used, and it`s rate can be different from CPU rate. There is no big difference in which cycles to measure time, the better hi-resolution timer the better measurements. So, unbind CPU cycle counter from time API by eliminating word "cycle" as it's believed to be used with CPU. Also add new opaque type for time odp_time_t, as it asks user to use API and abstracts time from units. New odp_time_t requires several additional API functions to be added: odp_time_t odp_time_sum(odp_time_t t1, odp_time_t t2); int odp_time_cmp(odp_time_t t1, odp_time_t t2); uint64_t odp_time_to_u64(odp_time_t hdl); Also added new definition that represents 0 ticks for time - ODP_TIME_NULL. It can be used instead of odp_time_from_ns(0) for comparison and initialization. This patch changes only used time API, it doesn't change used var names for simplicity. This time API can be implemented with local timer counter, so shouldn't be used between threads. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: platform/linux-generic/odp_time.c
2015-11-25performance: odp_pktio_perf: fix potential overflow in wait loopIvan Khoronzhuk
There cannot be used direct comparison of timestamps of counter that can overflow, better to compare ranges. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-11-03test: l2fwd: separate rx and tx drop countersPetri Savolainen
Separated receive and transmit drop counters to help debugging the cause of dropped packets. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-11-03test: l2fwd: increase burst sizePetri Savolainen
Increased burst size to 32. This improves packet rate about 15% with netmap, since system call rate is halved. No harm to any implementation, since implementation decides how many packets are returned. This is comparable to DPDK l2fwd burst size. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-11-03test: l2fwd: optimize statistics usagePetri Savolainen
Allocate cacheline aligned shared memory for per thread statistics and simplify stats pointer references. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-11-03test: l2fwd: optimize queue modePetri Savolainen
Queue mode works the same way as direct mode, but uses odp_schedule_multi for packet input. This improves packet rate about 40% (with netmap). Only scheduler overhead is now added which makes it easy to compare direct vs. scheduler inputs options. Output through queues or TM can be added as a third mode later. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-11-03test: l2fwd: start pktios after worker thread createPetri Savolainen
More controlled startup sequence: * Create and configure pktios * Create and start workers * Enable packet rx and tx Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-11-03test: l2fwd: added option to disable error checkPetri Savolainen
Added command line option to disable packet error check. Error check requires full packet parse. Max packet rate measurements should be done with minimal feature set. This change gives +10% packet rate increase in direct recv mode with netmap. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-10-27test: l2fwd: add missing bracesMatias Elo
Fixes: https://bugs.linaro.org/show_bug.cgi?id=1868 Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-10-26test: l2fwd: add option to disable filling eth addressesMatias Elo
By default every packet's source MAC address is filled to match the output port. Add option to disable this to enable testing packet forwarding without touching the packets. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-10-26test: l2fwd: add support for using odd number of portsMatias Elo
Previously only even numbers of ports were supported. Added support for odd numbers of ports (including 1). Src-dst port mappings are saved during initialization to minimize per packet operations. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-10-26test: l2fwd: fix crash when accuracy is set to 0Matias Elo
Application crashes if accuracy option is set to zero (division by zero). Disable statistics printing if accuracy <= 0. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-10-26test: l2fwd: add option to select scheduler queue typeMatias Elo
Previously only atomic scheduler queues where supported. This was a bottleneck when the number of worker threads was increased. Added an option to choose scheduler queue sync mode (none, atomic, ordered). Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-10-26test: l2fwd: add option to change destination eth addressesMatias Elo
If the application is being run on a host connected to a switch, not changing the ethernet destination may cause loops. Added an option to change the destination ethernet address. The destination addresses follow the format 02:00:00:00:00:XX where the final octet is the output port number. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-10-22performance: use odp_pktio_param_init() APIBill Fischofer
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-10-22api: rename odp_cpumask_def to _defaultMaxim Uvarov
Use full default word in api to make function name more clear. https://bugs.linaro.org/show_bug.cgi?id=1745 Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2015-10-22api: config: removed ODP_CONFIG_MAX_THREADSPetri Savolainen
New thread API call odp_thread_count_max() replaces the preprocessor macro in the API. A macro is still used internally. 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>
2015-10-22performance: sched: update scheduling test to use cycle countsPetri Savolainen
Use CPU cycle count API instead of time API to measure CPU cycles. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-10-15test/performance: l2fwd: obey -t in queue modeStuart Haslam
The -t command line argument specifies the length of time the application should run before exiting, but this doesn't always work in queue mode as the odp_schedule() call may not return if no packets are received. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-10-08linux-generic: pktio: add netmap pktio supportMatias Elo
Added new netmap pktio interface type which operates in the same manner as the existing socket io interfaces. The code is based on the odp-netmap branch. Using netmap io requires netmap headers and loaded netmap kernel module. Netmap can be installed from https://github.com/luigirizzo/netmap. ODP netmap support is enabled using --with-netmap-path=<netmap_dir> configuration option. If netmap kernel module is loaded when starting ODP application netmap io will be used by default. If the module is not found standard socket io is used. Netmap io can be disabled with ODP_PKTIO_DISABLE_NETMAP environment variable. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-09-28test: l2fwd: fill correct source ethernet addressMatias Elo
When running l2fwd in a VM using SR-IOV the host may drop packets if the source MAC address is not the same as that of the VF NIC. Modify test application so that the source MAC address is always filled correctly. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-09-22performance: odp_pktio_perf: fix potential overflow for burst_gapIvan Khoronzhuk
The direct comparing of "cur_cycles" and "next_tx_cycles" is not valid, as "next_tx_cycles" can be overflowed and comparison will give wrong result. So use odp_time_diff_cycles() for that, as it takes into account ticks overflow. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-09-22performance: odp_pktio_perf: fix potential overflow for send_durationIvan Khoronzhuk
The direct comparing of "cur_cycles" and "end_cycles" is not valid, as "end_cycles" can be overflowed and comparison will give wrong result. So use odp_time_diff_cycles() for that, as it takes in account cycles overflow. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-08-31test: l2fwd: start pktio in burst modeMaxim Uvarov
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-08-31test: l2fwd: capture test failsMaxim Uvarov
l2fwd expects bunch of packets to be routed, test if number of packets less then 100, and report error to make check and mark test as failed. Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-08-28performance: odp_scheduling: remove redundant var initsIvan Khoronzhuk
Remove several annoying initializations. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-08-27linux-generic: default state for pktio is STOPMaxim Uvarov
After open pktio remains stopped. Inside worker thread (after all configuration done it should be started.) In that patch I just start it everywhere to keep original logic and be easy for review. Putting it inside worker threads will require thread arguments change and understanding logic of current app. It's better to do further changes in separate patches per app. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-08-27Merge branch 'master' into api-nextMaxim Uvarov
2015-08-25test/performance: Makefile: add scripts to EXTRA_DISTAnders Roxell
Makes it possible to run make check from the tar source. Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-08-18Merge branch 'master' into api-nextMaxim Uvarov
2015-08-18linux-generic: pktio: remove basic socket implementationNicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-and-Tested-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-08-12Merge branch 'master' into api-nextMaxim Uvarov
2015-08-11test: kill odp_generatorMaxim Uvarov
Usually odp_generator exists when veth is destroyed, but not always. Because cpu load impacts on other performance tests we have to be sure that odp_generator is not running in background. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
2015-08-11Merge branch 'master' into api-nextMaxim Uvarov
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: example/timer/odp_timer_test.c
2015-08-07performance: odp_pktio_perf: use real MAC addresses while packet creationIvan Khoronzhuk
It's needed as pktio is not set in promisc mode. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-08-06performance: l2fwd: fix race condition between thread init and stat counterNicolas Morey-Chaisemartin
Add a barrier between main and worker threads to be sure worker statistics are initialized Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
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-23merge fix: remove files accidentally added when resolving git mergeMaxim Uvarov
That commit: fd855d7 Merge branch 'master' into api-next Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
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-20Merge branch 'master' into api-nextMaxim Uvarov
2015-07-17test: do not use negative array indexMaxim Uvarov
odp_pktio_send() can return -1 error and that return code can be used as array index in code bellow. On error just increase drop counter and free packets. https://bugs.linaro.org/show_bug.cgi?id=1688 Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofe@linaro.org>
2015-07-16Merge branch 'master' into api-nextMaxim Uvarov
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: include/odp/api/packet_io.h platform/linux-generic/include/odp_packet_io_internal.h platform/linux-generic/odp_packet_io.c
2015-07-16queue: handle return value of odp_queue_enq()Zoltan Kiss
Unsent packet has to be released. If the event type is obvious from the context, use directly the relevant release functions, otherwise odp_event(free). Wider error handling is attempted, but this patch can't fix all the flaws in the many calling functions of odp_queue_enq() Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-07-15performance: use odp_queue_param_init routineBill Fischofer
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-07-13Merge branch 'master' into api-nextMaxim Uvarov
2015-07-13test: handle return value of odp_queue_enq_multi()Zoltan Kiss
Unsent packet has to be released. If the event type is obvious from the context, use directly the relevant release functions, otherwise odp_event_free(). Wider error handling is attempted, but this patch can't fix all the flaws in the many calling functions of odp_queue_enq() Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>