vppinfra: deal with 0 return from os_cpu_clock_frequency() 01/24801/2
authorDave Barach <dave@barachs.net>
Tue, 4 Feb 2020 21:10:17 +0000 (16:10 -0500)
committerDamjan Marion <dmarion@me.com>
Wed, 5 Feb 2020 09:20:48 +0000 (09:20 +0000)
Sporadic reports of os_cpu_clock_frequency() returning 0.0 in highly
parallel container environments.

To avoid immediate division by zero:
  Step 1: try estimate_clock_frequency(1e-3).
  Step 2: give up. Pretend we have a 2gHz clock.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I19d0fe5259b757ab778599c7026ce485153b43fa


No differences found