From b70fd4a545cf8e3bb1c3ddbac3fff6a112a8cbbd Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Fri, 27 Mar 2020 11:14:59 -0400 Subject: vppinfra: manual cherrypick timebase fixes Gerrit Headline ------ -------- 25729 fix corner cases in tw_timer_expire 25763 improve timebase resilience 25837 remove time jump workaround Automatic cherry-picking failed miserably. Type: fix Ticket: VPP-1852 Signed-off-by: Dave Barach Change-Id: I460effb2b5f4f19ae4548ef01ca3726b7412bd7f --- src/vppinfra/time.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/vppinfra/time.h') diff --git a/src/vppinfra/time.h b/src/vppinfra/time.h index b2d749256d3..4d8997f0a9e 100644 --- a/src/vppinfra/time.h +++ b/src/vppinfra/time.h @@ -39,6 +39,7 @@ #define included_time_h #include +#include typedef struct { @@ -56,10 +57,9 @@ typedef struct from clock cycles into seconds. */ f64 seconds_per_clock; - f64 round_to_units; - /* Time stamp of call to clib_time_init call. */ u64 init_cpu_time; + f64 init_reference_time; u64 last_verify_cpu_time; @@ -67,8 +67,14 @@ typedef struct f64 last_verify_reference_time; u32 log2_clocks_per_second, log2_clocks_per_frequency_verify; + + /* Damping constant */ + f64 damping_constant; + } clib_time_t; +format_function_t format_clib_time; + /* Return CPU time stamp as 64bit number. */ #if defined(__x86_64__) || defined(i386) always_inline u64 -- cgit 1.2.3-korg