aboutsummaryrefslogtreecommitdiffstats
path: root/vlib
diff options
context:
space:
mode:
authorNikhil P Rao <nikhil.rao@intel.com>2016-03-03 22:26:19 +0530
committerGerrit Code Review <gerrit@fd.io>2016-03-03 19:12:06 +0000
commit8a33f31baa37aae175dd5f0a43283ef513c7716f (patch)
treeb0e3b8cfcb6701c6b88cc457ffcb630cee9ff264 /vlib
parent7e437bce90ba9bff3df570f337304df1ce1a4fbd (diff)
Copy flags when cloning next_frames
The VLIB_FRAME_NO_FREE_AFTER_DISPATCH flag is not preserved when cloning next_frames, as a result VLIB_FRAME_FREE_AFTER_DISPATCH can erroneously be set for a frame (see vlib_get_next_frame_internal()) Change-Id: Ice1d7ddcb807e1168aa0c157d9474be492d102c2 Signed-off-by: Nikhil P Rao <nikhil.rao@intel.com>
Diffstat (limited to 'vlib')
-rw-r--r--vlib/vlib/threads.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/vlib/vlib/threads.c b/vlib/vlib/threads.c
index 15eb9599..2fa5b4f6 100644
--- a/vlib/vlib/threads.c
+++ b/vlib/vlib/threads.c
@@ -631,10 +631,13 @@ static clib_error_t * start_workers (vlib_main_t * vm)
{
vlib_next_frame_t *nf = &nm_clone->next_frames[j];
u32 save_node_runtime_index;
+ u32 save_flags;
save_node_runtime_index = nf->node_runtime_index;
+ save_flags = nf->flags;
vlib_next_frame_init (nf);
nf->node_runtime_index = save_node_runtime_index;
+ nf->flags = save_flags;
}
/* fork the frame dispatch queue */
@@ -843,10 +846,13 @@ void vlib_worker_thread_node_runtime_update(void)
{
vlib_next_frame_t *nf = &nm_clone->next_frames[j];
u32 save_node_runtime_index;
+ u32 save_flags;
save_node_runtime_index = nf->node_runtime_index;
+ save_flags = nf->flags;
vlib_next_frame_init (nf);
nf->node_runtime_index = save_node_runtime_index;
+ nf->flags = save_flags;
}
old_nodes_clone = nm_clone->nodes;