vlib: update input node counts based on state 53/42053/2
authorMonendra Singh Kushwaha <[email protected]>
Fri, 20 Dec 2024 10:53:56 +0000 (16:23 +0530)
committerDamjan Marion <[email protected]>
Wed, 8 Jan 2025 16:45:26 +0000 (16:45 +0000)
Type: fix

Change-Id: I09497ae8d6a685324f8c7d9e0b3208a3ec465f0e
Signed-off-by: Monendra Singh Kushwaha <[email protected]>
src/vlib/threads.c

index ef2c561..f3fcb40 100644 (file)
@@ -1070,6 +1070,13 @@ vlib_worker_thread_node_refork (void)
                        VLIB_NODE_RUNTIME_DATA_SIZE);
     }
 
+  for (j = vec_len (old_rt);
+       j < vec_len (nm_clone->nodes_by_type[VLIB_NODE_TYPE_INPUT]); j++)
+    {
+      rt = &nm_clone->nodes_by_type[VLIB_NODE_TYPE_INPUT][j];
+      nm_clone->input_node_counts_by_state[rt->state] += 1;
+    }
+
   vec_free (old_rt);
 
   /* re-clone pre-input nodes */