summaryrefslogtreecommitdiffstats
path: root/src/vnet/pg/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/pg/init.c')
-rw-r--r--src/vnet/pg/init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vnet/pg/init.c b/src/vnet/pg/init.c
index 631be25ea3c..5db9c00ffc4 100644
--- a/src/vnet/pg/init.c
+++ b/src/vnet/pg/init.c
@@ -48,6 +48,8 @@ pg_init (vlib_main_t * vm)
{
clib_error_t *error;
pg_main_t *pg = &pg_main;
+ vlib_thread_main_t *vtm = vlib_get_thread_main ();
+ u32 num_threads = 1 /* main thread */ + vtm->n_threads;
pg->if_index_by_if_id = hash_create (0, sizeof (uword));
@@ -57,6 +59,8 @@ pg_init (vlib_main_t * vm)
if ((error = vlib_call_init_function (vm, pg_cli_init)))
goto done;
+ vec_validate (pg->replay_buffers_by_thread, num_threads);
+
done:
return error;
}