numam-dpdk/lib/librte_eal
Wen-Chi Yang d08d304508 eal/linux: make alarm not affected by system time jump
Due to eal_alarm_callback() and rte_eal_alarm_set() use gettimeofday()
to get the current time, and gettimeofday() is affected by jumps.

For example, set up a rte_alarm which will be triggerd next second (
current time + 1 second) by rte_eal_alarm_set(). And the callback
function of this rte_alarm sets up another rte_alarm which will be
triggered next second (current time + 2 second).
Once we change the system time when the callback function is triggered,
it is possible that rte alarm functionalities work out of expectation.

Replace gettimeofday() with clock_gettime(CLOCK_MONOTONIC_RAW, &now)
could avoid this phenomenon.

Signed-off-by: Wen-Chi Yang <wolkayang@gmail.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2015-10-21 17:01:24 +02:00
..
bsdapp eal: remove deprecated function 2015-09-03 19:22:48 +02:00
common eal: add new i40e device id 2015-10-02 01:35:23 +02:00
linuxapp eal/linux: make alarm not affected by system time jump 2015-10-21 17:01:24 +02:00
Makefile eal: no more bare metal environment 2014-11-27 13:09:51 +01:00