dpdk: plugin init should be protect by thread barrier
Witout thread barrier, when dpdk_process_node initiating dpdk lib, workers thread may also be initiating. Main and workers threads may both setting error_main info, that will cause memory ASAN issue. Type: fix Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com> Change-Id: I87b73b310730719035d4985a2cff2e3308120ec2
This commit is contained in:

committed by
Damjan Marion

parent
60a107c8fd
commit
c36f9b567d
@ -1450,6 +1450,7 @@ dpdk_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
|
||||
dpdk_device_t *xd;
|
||||
vlib_thread_main_t *tm = vlib_get_thread_main ();
|
||||
|
||||
vlib_worker_thread_barrier_sync (vm);
|
||||
error = dpdk_lib_init (dm);
|
||||
|
||||
if (error)
|
||||
@ -1466,6 +1467,7 @@ dpdk_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
|
||||
}
|
||||
}
|
||||
|
||||
vlib_worker_thread_barrier_release (vm);
|
||||
tm->worker_thread_release = 1;
|
||||
|
||||
f64 now = vlib_time_now (vm);
|
||||
|
Reference in New Issue
Block a user