From eed42b0efa576a6a0efa93df7c3e96ce3296f7af Mon Sep 17 00:00:00 2001 From: Xiaoming Jiang Date: Tue, 23 May 2023 09:16:58 +0000 Subject: bufmon: ptd should be alloced in main thread Type: fix Signed-off-by: Xiaoming Jiang Change-Id: I7f8c975fae5d71ce1226a8e19761fc75134e61e2 --- src/plugins/bufmon/bufmon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/bufmon/bufmon.c b/src/plugins/bufmon/bufmon.c index 2a35acce482..30cf6576e7a 100644 --- a/src/plugins/bufmon/bufmon.c +++ b/src/plugins/bufmon/bufmon.c @@ -108,7 +108,6 @@ bufmon_dispatch_wrapper (vlib_main_t *vm, vlib_node_runtime_t *node, int pending_frames; uword rv; - vec_validate_aligned (bm->ptd, vm->thread_index, CLIB_CACHE_LINE_BYTES); ptd = vec_elt_at_index (bm->ptd, vm->thread_index); vec_validate_aligned (ptd->pnd, node->node_index, CLIB_CACHE_LINE_BYTES); pnd = vec_elt_at_index (ptd->pnd, node->node_index); @@ -152,6 +151,8 @@ bufmon_register_callbacks (vlib_main_t *vm) bufmon_dispatch_wrapper)) goto err1; + vec_validate_aligned (bufmon_main.ptd, vlib_thread_main.n_vlib_mains - 1, + CLIB_CACHE_LINE_BYTES); return 0; err1: -- cgit 1.2.3-korg