bufmon: ptd should be alloced in main thread
Type: fix Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com> Change-Id: I7f8c975fae5d71ce1226a8e19761fc75134e61e2
This commit is contained in:
@ -108,7 +108,6 @@ bufmon_dispatch_wrapper (vlib_main_t *vm, vlib_node_runtime_t *node,
|
|||||||
int pending_frames;
|
int pending_frames;
|
||||||
uword rv;
|
uword rv;
|
||||||
|
|
||||||
vec_validate_aligned (bm->ptd, vm->thread_index, CLIB_CACHE_LINE_BYTES);
|
|
||||||
ptd = vec_elt_at_index (bm->ptd, vm->thread_index);
|
ptd = vec_elt_at_index (bm->ptd, vm->thread_index);
|
||||||
vec_validate_aligned (ptd->pnd, node->node_index, CLIB_CACHE_LINE_BYTES);
|
vec_validate_aligned (ptd->pnd, node->node_index, CLIB_CACHE_LINE_BYTES);
|
||||||
pnd = vec_elt_at_index (ptd->pnd, node->node_index);
|
pnd = vec_elt_at_index (ptd->pnd, node->node_index);
|
||||||
@ -152,6 +151,8 @@ bufmon_register_callbacks (vlib_main_t *vm)
|
|||||||
bufmon_dispatch_wrapper))
|
bufmon_dispatch_wrapper))
|
||||||
goto err1;
|
goto err1;
|
||||||
|
|
||||||
|
vec_validate_aligned (bufmon_main.ptd, vlib_thread_main.n_vlib_mains - 1,
|
||||||
|
CLIB_CACHE_LINE_BYTES);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err1:
|
err1:
|
||||||
|
Reference in New Issue
Block a user