diff options
author | 2016-03-18 09:48:16 -0400 | |
---|---|---|
committer | 2016-03-18 14:53:07 +0000 | |
commit | ba8c540c52fc83237dff2eb87c259037da448e39 (patch) | |
tree | 4a1e52d4343545fce6a0d2a7aa5dab3c6eaadd44 | |
parent | cb656303dfae0497c06ac925a08bda9f2b9d4d91 (diff) |
Fix longstanding next-frame clone bug
Do not propagate flags into cloned vlib_next_frame_t's.
vlib_next_frame_init(...) sets nf->frame_index to ~0. If it turns out
that the original flags include VLIB_FRAME_IS_ALLOCATED, the wheels
fall off. And so on.
Change-Id: I8de18653acfcc8eb20cee36f4eb5b9e82234f21b
Signed-off-by: Dave Barach <dave@barachs.net>
-rw-r--r-- | vlib/vlib/threads.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/vlib/vlib/threads.c b/vlib/vlib/threads.c index 2fa5b4f6..15eb9599 100644 --- a/vlib/vlib/threads.c +++ b/vlib/vlib/threads.c @@ -631,13 +631,10 @@ 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 */ @@ -846,13 +843,10 @@ 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; |