summaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2017-09-19 21:45:10 -0400
committerDave Barach <openvpp@barachs.net>2017-09-20 11:50:49 +0000
commit609707ea530de6a0f9fa989b8269b973dd89174e (patch)
tree5d912ea898dc8d6c7383a62ef2a21e5669e7955c /src/vlib
parent1bfd37295f5cd332b7326923f1fbd5e0415829cd (diff)
Fix DHCP client so it works for worker threads
Fix dhcp_client_for_us() function to utilize rpc_call_main_thread to call vlib_process_signal_event() to ensure proper handling irrespective of it being called in main thread or worker thread. Added ASSERT to vlib_process_sinal.. path to make sure it is called in main thread. Change-Id: I4109cc049d8e4225d896ce492ce201011dc9c911 Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/node_funcs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vlib/node_funcs.h b/src/vlib/node_funcs.h
index 0059b9bec9e..3ae4e541a68 100644
--- a/src/vlib/node_funcs.h
+++ b/src/vlib/node_funcs.h
@@ -851,6 +851,9 @@ vlib_process_signal_event_data (vlib_main_t * vm,
vlib_process_t *p = vec_elt (nm->processes, n->runtime_index);
uword *h, t;
+ /* Must be in main thread */
+ ASSERT (vlib_get_thread_index () == 0);
+
h = hash_get (p->event_type_index_by_type_opaque, type_opaque);
if (!h)
{