On 2020-05-07 16:05 GMT+0300 Fady Bader wrote:
> Implemented the needed Windows eal timer functions.
[snip]
> +void
> +rte_delay_us_sleep(unsigned int us)
> +{
> +     LARGE_INTEGER start, end;
> +     LARGE_INTEGER freq;
> +
> +     QueryPerformanceCounter(&start);
> +     QueryPerformanceFrequency(&freq);
> +
> +     LARGE_INTEGER ticks;
> +     ticks.QuadPart = freq.QuadPart * us / US_PER_SEC;
> +
> +     QueryPerformanceCounter(&end);
> +     while ((end.QuadPart - start.QuadPart) < ticks.QuadPart) {
> +             rte_pause();
> +             QueryPerformanceCounter(&end);
> +     }
> +}

Your previous implementation was correct, this one is not. Per documentation,
rte_delay_us_sleep() should *sleep* in an OS-dependent way, like you did with
waitable timers previously, while rte_delay_us() does a busy loop like this.
Please restore this function from v4, the rest LGTM.

P.S. Fixed my email in Cc.

-- 
Dmitry Kozlyuk

Reply via email to