summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-06-10 01:43:44 -0700
committerNeale Ranns <nranns@cisco.com>2017-06-13 12:20:55 +0000
commitaba8be617c1c716b55b8b2919ec3d4b61e69dff1 (patch)
tree680f7eabd1909b38e5056ef7dd3dda208c698e53 /src/vnet/fib
parent4b30ceb1b4f9174d528525059d7fd52d585f059d (diff)
FIB walk process - wake-up rate unnecessarily high
Change-Id: I7dedf283c83c7f0e0b7642f095b68bc0b40898cf Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/fib')
-rw-r--r--src/vnet/fib/fib_walk.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/vnet/fib/fib_walk.c b/src/vnet/fib/fib_walk.c
index 701801370b1..94297442ca6 100644
--- a/src/vnet/fib/fib_walk.c
+++ b/src/vnet/fib/fib_walk.c
@@ -399,7 +399,17 @@ typedef enum fib_walk_sleep_type_t_
* @brief Durations for the sleep types
*/
static f64 fib_walk_sleep_duration[] = {
- [FIB_WALK_LONG_SLEEP] = 1e-3,
+ /**
+ * Long sleep when there is no more work, i.e. the queues are empty.
+ * This is a sleep (as opposed to a wait for event) just to be sure we
+ * are not missing events by sleeping forever.
+ */
+ [FIB_WALK_LONG_SLEEP] = 2,
+
+ /**
+ * Short sleep. There is work left in the queues. We are yielding the CPU
+ * momentarily.
+ */
[FIB_WALK_SHORT_SLEEP] = 1e-8,
};