On 01/18/2016 19:10, Ivan Khoronzhuk wrote:
+int ipc_odp_packet_sendall(odp_pktio_t pktio,
+ odp_packet_t pkt_tbl[], int num)
+{
+ int ret;
+ int sent = 0;
+ uint64_t start_cycle;
+ uint64_t diff;
+ uint64_t wait;
+
+ wait = odp_time_local_from_ns(1 * ODP_TIME_SEC_IN_NS);
+ start_cycle = odp_time_local();
1. cycle word should be avoided here.
2. 1 * can be removed
3. here better to use the following approach:
start = odp_time_local();
wait = odp_time_local_from_ns(ODP_TIME_SEC_IN_NS);
end_time = odp_time_sum(start, wait);
while (sent != num) {
...
if (odp_time_cmp(end, odp_time_local()) < 0)
return -1;
}
Ok, thanks.
Maxim.
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp