numam-dpdk/examples
Chengchang Tang 80aa15c4df examples/timer: fix time interval
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.

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

In addition, the rte_rdtsc() is replaced with the more recommended
rte_get_timer_cycles function in this patch.

Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2021-05-12 16:52:20 +02:00
..
bbdev_app examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
bond examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
bpf examples: remove old build system references 2020-09-07 23:51:57 +02:00
cmdline examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
distributor examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
ethtool examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
eventdev_pipeline examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
fips_validation examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
flow_classify examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
flow_filtering examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
helloworld examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
ioat examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
ip_fragmentation examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
ip_pipeline examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
ip_reassembly examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
ipsec-secgw examples/ipsec-secgw: fix handling IPv6 extension headers 2021-05-05 16:50:21 +02:00
ipv4_multicast examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
kni examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
l2fwd examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
l2fwd-cat examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
l2fwd-crypto examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
l2fwd-event examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
l2fwd-jobstats examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
l2fwd-keepalive examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
l3fwd examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
l3fwd-acl examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
l3fwd-graph examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
l3fwd-power examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
link_status_interrupt examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
multi_process examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
ntb examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
packet_ordering examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
performance-thread examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
pipeline examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
ptpclient examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
qos_meter examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
qos_sched examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
rxtx_callbacks examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
server_node_efd examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
service_cores examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
skeleton examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
timer examples/timer: fix time interval 2021-05-12 16:52:20 +02:00
vdpa examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
vhost examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
vhost_blk examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
vhost_crypto examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
vm_power_manager examples/vm_power: remove VM channel number check 2021-05-05 23:43:22 +02:00
vmdq examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
vmdq_dcb examples: fix pkg-config override 2021-05-05 22:20:24 +02:00
meson.build examples: reduce indentation in build files 2021-04-21 14:04:09 +02:00