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>
This commit is contained in:
Nikhil P Rao
2016-03-03 22:26:19 +05:30
committed by Gerrit Code Review
parent 7e437bce90
commit 8a33f31baa

View File

@ -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;