vcl: initialize worker thread index and heap map slot 38/21038/2
authorFlorin Coras <fcoras@cisco.com>
Fri, 2 Aug 2019 17:53:01 +0000 (10:53 -0700)
committerFlorin Coras <fcoras@cisco.com>
Fri, 2 Aug 2019 18:35:07 +0000 (11:35 -0700)
Type: fix

Change-Id: I7e762b43a2a074dc81cb7b0f6446e315e63ecae5
Signed-off-by: Florin Coras <fcoras@cisco.com>
src/vcl/vcl_private.c

index 3e82bec..13794ea 100644 (file)
@@ -191,6 +191,9 @@ vcl_worker_alloc_and_init ()
   if (vcl_get_worker_index () != ~0)
     return 0;
 
+  /* Use separate heap map entry for worker */
+  clib_mem_set_thread_index ();
+
   if (pool_elts (vcm->workers) == vcm->cfg.max_workers)
     {
       VDBG (0, "max-workers %u limit reached", vcm->cfg.max_workers);