aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-03-20 16:34:15 +0100
committerDamjan Marion <damarion@cisco.com>2017-03-20 16:34:15 +0100
commiteb743fad56b32cb20ad2d2cadc4760f9c25be5e1 (patch)
tree4e5b6cd7b7635ee7269ab33300188de7fd42595d /src/vlib
parent95475a3661b95150c8d1e60a3942b91c2b5d06bc (diff)
vnet: add device-input threadplacement infra
This change adds two new debug CLI command: - "show interface placmenet" to display which thread (main or worker) is responsible for processing interface rx queue vpp# show interface placement Thread 0 (vpp_main): node af-packet-input: host-vpp1 queue 0 Thread 1 (vpp_wk_0): node af-packet-input: host-virbr0 queue 0 Thread 2 (vpp_wk_1): node af-packet-input: host-vpp2 queue 0 host-lxcbr0 queue 0 - "set interface placmenet" to assign thread (main or worker) which process specific interface rx queue vpp# set interface placement host-vpp1 queue 0 main Change-Id: Id4dd00cf2b05e10fae2125ac7cb4411b446c5e9c Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/threads.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/vlib/threads.c b/src/vlib/threads.c
index 40789f59ea5..ef3a24d3857 100644
--- a/src/vlib/threads.c
+++ b/src/vlib/threads.c
@@ -685,9 +685,6 @@ start_workers (vlib_main_t * vm)
clib_memcpy (rt->runtime_data, n->runtime_data,
clib_min (VLIB_NODE_RUNTIME_DATA_SIZE,
n->runtime_data_bytes));
- else if (CLIB_DEBUG > 0)
- memset (rt->runtime_data, 0xfe,
- VLIB_NODE_RUNTIME_DATA_SIZE);
}
nm_clone->nodes_by_type[VLIB_NODE_TYPE_INPUT] =
@@ -701,9 +698,6 @@ start_workers (vlib_main_t * vm)
clib_memcpy (rt->runtime_data, n->runtime_data,
clib_min (VLIB_NODE_RUNTIME_DATA_SIZE,
n->runtime_data_bytes));
- else if (CLIB_DEBUG > 0)
- memset (rt->runtime_data, 0xfe,
- VLIB_NODE_RUNTIME_DATA_SIZE);
}
nm_clone->processes = vec_dup (nm->processes);
@@ -1405,15 +1399,15 @@ vlib_worker_thread_fn (void *arg)
clib_time_init (&vm->clib_time);
clib_mem_set_heap (w->thread_mheap);
+ /* Wait until the dpdk init sequence is complete */
+ while (tm->extern_thread_mgmt && tm->worker_thread_release == 0)
+ vlib_worker_thread_barrier_check ();
+
e = vlib_call_init_exit_functions
(vm, vm->worker_init_function_registrations, 1 /* call_once */ );
if (e)
clib_error_report (e);
- /* Wait until the dpdk init sequence is complete */
- while (tm->extern_thread_mgmt && tm->worker_thread_release == 0)
- vlib_worker_thread_barrier_check ();
-
vlib_worker_loop (vm);
}