It was missed while unbinding cycles from time API names.
Correct is as it prevents for adding structure under odp_time_t.

Reviewed-by: Petri Savolainen <petri.savolai...@nokia.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronz...@linaro.org>
---
 test/performance/odp_pktio_perf.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/test/performance/odp_pktio_perf.c 
b/test/performance/odp_pktio_perf.c
index ffe9844..ec67d55 100644
--- a/test/performance/odp_pktio_perf.c
+++ b/test/performance/odp_pktio_perf.c
@@ -338,10 +338,13 @@ static void *run_thread_tx(void *arg)
        cur_time     = odp_time_local();
        start_time   = cur_time;
        burst_start_time = odp_time_diff(cur_time, burst_gap);
-       while (odp_time_diff(cur_time, start_time) < send_duration) {
+       while (odp_time_cmp(send_duration,
+                           odp_time_diff(cur_time, start_time)) > 0) {
                unsigned alloc_cnt = 0, tx_cnt;
 
-               if (odp_time_diff(cur_time, burst_start_time) < burst_gap) {
+               if (odp_time_cmp(burst_gap,
+                                odp_time_diff(cur_time, burst_start_time))
+                                > 0) {
                        cur_time = odp_time_local();
                        if (!odp_time_cmp(idle_start, ODP_TIME_NULL))
                                idle_start = cur_time;
@@ -357,7 +360,7 @@ static void *run_thread_tx(void *arg)
                        idle_start = ODP_TIME_NULL;
                }
 
-               burst_start_time += burst_gap;
+               burst_start_time = odp_time_sum(burst_start_time, burst_gap);
 
                alloc_cnt = alloc_packets(tx_event, batch_len - unsent_pkts);
                if (alloc_cnt != batch_len)
-- 
1.9.1

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to