Re: [lng-odp] [PATCH v2 4/5] performance: odp_pktio_perf: fix potential overflow for send_duration

2015-09-15 Thread Stuart Haslam
On Fri, Sep 11, 2015 at 01:04:48PM +0300, Ivan Khoronzhuk wrote: > 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. > >

Re: [lng-odp] [PATCH v2 4/5] performance: odp_pktio_perf: fix potential overflow for send_duration

2015-09-15 Thread Ivan Khoronzhuk
Stuart, Could you please review this patch. It uses start_cycles as it was proposed. On 11.09.15 13:04, Ivan Khoronzhuk wrote: 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

[lng-odp] [PATCH v2 4/5] performance: odp_pktio_perf: fix potential overflow for send_duration

2015-09-11 Thread Ivan 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 ---