aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/dpo
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-06-29 00:19:08 -0700
committerNeale Ranns <nranns@cisco.com>2017-06-30 13:55:23 +0000
commitbb620d74b247f419eb485886c55148099b0213bb (patch)
tree9f1705287a3ac5445059bec8028a6e50f1440165 /src/vnet/dpo
parent3e01588bf39f817921e92dd641a1a65d66e40737 (diff)
VPP debug image with worker threads hit assert on adding IP route with traffic (VPP-892)
When stacking DPOs the VLIB graph is also updated to add the edge between the nodes, if this edge does not yet exist. This addition should be done with the workers stopped. Change-Id: I327e4d7d26f0b23eb280f17e4619ff2093ff7940 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit c02bd03ddf5eec9e9c79811360685f13e4ba8ee1)
Diffstat (limited to 'src/vnet/dpo')
-rw-r--r--src/vnet/dpo/dpo.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/vnet/dpo/dpo.c b/src/vnet/dpo/dpo.c
index 28aa0c23351..389f995bb96 100644
--- a/src/vnet/dpo/dpo.c
+++ b/src/vnet/dpo/dpo.c
@@ -327,6 +327,8 @@ dpo_get_next_node (dpo_type_t child_type,
vm = vlib_get_main();
+ vlib_worker_thread_barrier_sync(vm);
+
ASSERT(NULL != dpo_nodes[child_type]);
ASSERT(NULL != dpo_nodes[child_type][child_proto]);
ASSERT(NULL != dpo_nodes[parent_type]);
@@ -368,6 +370,8 @@ dpo_get_next_node (dpo_type_t child_type,
}
cc++;
}
+
+ vlib_worker_thread_barrier_release(vm);
}
return (dpo_edges[child_type][child_proto][parent_type][parent_proto]);
@@ -445,10 +449,21 @@ dpo_stack_from_node (u32 child_node_index,
parent_node =
vlib_get_node_by_name(vm, (u8*) dpo_nodes[parent_type][parent_proto][0]);
- edge = vlib_node_add_next(vm,
+ edge = vlib_node_get_next(vm,
child_node_index,
parent_node->index);
+ if (~0 == edge)
+ {
+ vlib_worker_thread_barrier_sync(vm);
+
+ edge = vlib_node_add_next(vm,
+ child_node_index,
+ parent_node->index);
+
+ vlib_worker_thread_barrier_release(vm);
+ }
+
dpo_stack_i(edge, dpo, parent);
}