aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-04-28 18:00:21 -0400
committerFlorin Coras <florin.coras@gmail.com>2020-04-28 23:04:23 +0000
commit77d98382824ca211fb55fcf842931930ccfb3baa (patch)
treec0ec1d4b678577849194676bb53409f6d49e696a /src/vnet/session/session.c
parent635f5068f0802ec1fe34c998b72fb2f626259050 (diff)
vlib: add ASSERT to vlib_time_now(...)
Calling vlib_time_now (&vlib_global_main) from a worker thread is a bad mistake. ASSERT (vm->thread_index == __os_thread_index) will catch it. Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I55af6de84e06143f8f43adc62103b77267a7a441
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r--src/vnet/session/session.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 027070436fd..0956b2f9d73 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -1676,7 +1676,7 @@ session_manager_main_enable (vlib_main_t * vm)
wrk->new_head = clib_llist_make_head (wrk->event_elts, evt_list);
wrk->old_head = clib_llist_make_head (wrk->event_elts, evt_list);
wrk->vm = vlib_mains[i];
- wrk->last_vlib_time = vlib_time_now (vlib_mains[i]);
+ wrk->last_vlib_time = vlib_time_now (vm);
wrk->last_vlib_us_time = wrk->last_vlib_time * CLIB_US_TIME_FREQ;
vec_validate (wrk->session_to_enqueue, smm->last_transport_proto_type);