vppinfra: improve clocks_per_second convergence 67/24567/12
authorDave Barach <dave@barachs.net>
Wed, 29 Jan 2020 23:05:24 +0000 (18:05 -0500)
committerFlorin Coras <florin.coras@gmail.com>
Thu, 30 Jan 2020 20:45:18 +0000 (20:45 +0000)
commitc25048bd05a319511aa7386f75e1fae2b2a623c4
tree4254d34aba20058eb04213ffe4ab738f0dc250fd
parent91592c0c9cdd1bc61a2796e41a8becc30aaf8082
vppinfra: improve clocks_per_second convergence

Apply exponential smoothing to the clock rate update calculation in
clib_time_verify_frequency(), with a half-life of 1 minute and a
sampling frequency of 16 seconds. Within 5 minutes or so, the
calculation converges

With each rate recalculation: reset total_cpu_time based on the kernel
timebase delta since vpp started, and the new clock rate

Improve the "show clock [verbose]" debug CLI command.

BFD echo + echo fail tests marked off until the BFD code can be
reworked a bit.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I24e88a78819b12867736c875067b386ef6115c5c
src/vlib/threads.c
src/vnet/bfd/bfd_main.c
src/vppinfra/time.c
src/vppinfra/time.h
test/test_bfd.py