@@ -338,10 +338,12 @@ 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(odp_time_diff(cur_time, start_time),
+ send_duration) > 1) {
unsigned alloc_cnt = 0, tx_cnt;
- if (odp_time_diff(cur_time, burst_start_time) < burst_gap) {
+ if (odp_time_cmp(odp_time_diff(cur_time, burst_start_time),
+ burst_gap) > 1) {
cur_time = odp_time_local();
if (!odp_time_cmp(idle_start, ODP_TIME_NULL))
idle_start = cur_time;
@@ -357,7 +359,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)
It was missed while unbinding cycles from time API names. Correct is as it prevents for adding structure under odp_time_t. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> --- test/performance/odp_pktio_perf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)