[dpdk-dev] [PATCH] examples/timer: fix incorrect time interval

Thomas Monjalon thomas at monjalon.net
Wed Apr 21 20:34:11 CEST 2021


15/04/2021 09:12, Min Hu (Connor):
> From: Chengchang Tang <tangchengchang at huawei.com>
> 
> Timer sample example assumes that the frequency of the timer is about
> 2Ghz to control the period of calling rte_timer_manage(). But this
> assumption is easy to fail. For example. the frequency of tsc on ARM64
> is much less than 2Ghz.

So rte_timer_manage() will be called less often, yes.

> This patch uses the frequency of the current timer to calculate the
> correct time interval to ensure consistent result on all platforms.

I am not sure about making the example more complex.
What is the issue with the previous value?





More information about the dev mailing list