aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXiaoming Jiang <jiangxiaoming@outlook.com>2023-05-23 09:16:58 +0000
committerXiaoming Jiang <jiangxiaoming@outlook.com>2023-05-23 09:18:06 +0000
commiteed42b0efa576a6a0efa93df7c3e96ce3296f7af (patch)
tree78c52edfb277742fa1b76b0bd32d0677089828b9 /src
parent51541247cb97d377d7df6f0d1965a0868bafd1ae (diff)
bufmon: ptd should be alloced in main thread
Type: fix Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com> Change-Id: I7f8c975fae5d71ce1226a8e19761fc75134e61e2
Diffstat (limited to 'src')
-rw-r--r--src/plugins/bufmon/bufmon.c3
1 files changed, 2 insertions, 1 deletions
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: