aboutsummaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2016-06-10 13:22:36 +0200
committerDave Barach <openvpp@barachs.net>2016-06-14 17:10:53 +0000
commit964f93e59f72b93191ed938d823af337b7d2c17e (patch)
tree1e41c9174c4a3d931a92068d1be2b5d7893c1c2c /vnet
parent07929f2612585bd28dce8cc56c0297215a20953a (diff)
Fix node siblings
Siblings did not work at all. Fixed by generating sibling relationships earlier in vlib_node_main_init(). Also adding a node dynamically before nodes were initialised failed for sibling nodes. Change-Id: I2fb73eb33a6f5ee216f566074e18ed495e20634d Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/ip/ip4_forward.c6
-rw-r--r--vnet/vnet/ip/ip6_forward.c9
-rw-r--r--vnet/vnet/sr/sr.c15
3 files changed, 4 insertions, 26 deletions
diff --git a/vnet/vnet/ip/ip4_forward.c b/vnet/vnet/ip/ip4_forward.c
index 46b3a97b7c1..c08870919fc 100644
--- a/vnet/vnet/ip/ip4_forward.c
+++ b/vnet/vnet/ip/ip4_forward.c
@@ -2810,11 +2810,7 @@ VLIB_REGISTER_NODE (ip4_rewrite_local_node) = {
.format_trace = format_ip4_rewrite_trace,
- .n_next_nodes = 2,
- .next_nodes = {
- [IP4_REWRITE_NEXT_DROP] = "error-drop",
- [IP4_REWRITE_NEXT_ARP] = "ip4-arp",
- },
+ .n_next_nodes = 0,
};
VLIB_NODE_FUNCTION_MULTIARCH (ip4_rewrite_local_node, ip4_rewrite_local)
diff --git a/vnet/vnet/ip/ip6_forward.c b/vnet/vnet/ip/ip6_forward.c
index 398d0926e83..cedc5cdde88 100644
--- a/vnet/vnet/ip/ip6_forward.c
+++ b/vnet/vnet/ip/ip6_forward.c
@@ -2492,10 +2492,7 @@ VLIB_REGISTER_NODE (ip6_rewrite_local_node) = {
.format_trace = format_ip6_rewrite_trace,
- .n_next_nodes = 1,
- .next_nodes = {
- [IP6_REWRITE_NEXT_DROP] = "error-drop",
- },
+ .n_next_nodes = 0,
};
VLIB_NODE_FUNCTION_MULTIARCH (ip6_rewrite_local_node, ip6_rewrite_local)
@@ -2711,13 +2708,13 @@ ip6_hop_by_hop (vlib_main_t * vm,
VLIB_REGISTER_NODE (ip6_hop_by_hop_node) = {
.function = ip6_hop_by_hop,
.name = "ip6-hop-by-hop",
+ .sibling_of = "ip6-lookup",
.vector_size = sizeof (u32),
.format_trace = format_ip6_hop_by_hop_trace,
.type = VLIB_NODE_TYPE_INTERNAL,
.n_errors = ARRAY_LEN(ip6_hop_by_hop_error_strings),
.error_strings = ip6_hop_by_hop_error_strings,
- .n_next_nodes = IP_LOOKUP_N_NEXT,
- .next_nodes = IP6_LOOKUP_NEXT_NODES,
+ .n_next_nodes = 0,
};
VLIB_NODE_FUNCTION_MULTIARCH (ip6_hop_by_hop_node, ip6_hop_by_hop)
diff --git a/vnet/vnet/sr/sr.c b/vnet/vnet/sr/sr.c
index e7992ad92ae..845bf95c423 100644
--- a/vnet/vnet/sr/sr.c
+++ b/vnet/vnet/sr/sr.c
@@ -1953,8 +1953,6 @@ static clib_error_t * sr_init (vlib_main_t * vm)
ip6_sr_main_t * sm = &sr_main;
clib_error_t * error = 0;
vlib_node_t * ip6_lookup_node, * ip6_rewrite_node;
- vlib_node_t * ip6_rewrite_local_node;
- u32 verify_next_index;
if ((error = vlib_call_init_function (vm, ip_main_init)))
return error;
@@ -1989,10 +1987,6 @@ static clib_error_t * sr_init (vlib_main_t * vm)
ip6_rewrite_node = vlib_get_node_by_name (vm, (u8 *)"ip6-rewrite");
ASSERT(ip6_rewrite_node);
-
- ip6_rewrite_local_node = vlib_get_node_by_name (vm,
- (u8 *)"ip6-rewrite-local");
- ASSERT(ip6_rewrite_local_node);
/* Add a disposition to ip6_lookup for the sr rewrite node */
sm->ip6_lookup_sr_next_index =
@@ -2008,15 +2002,6 @@ static clib_error_t * sr_init (vlib_main_t * vm)
sm->ip6_rewrite_sr_next_index =
vlib_node_add_next (vm, ip6_rewrite_node->index,
sr_fix_dst_addr_node.index);
- /*
- * Fix ip6-rewrite-local, sibling of the above. The sibling bitmap
- * isn't set up at this point, so we have to do it manually
- */
- verify_next_index = vlib_node_add_next
- (vm, ip6_rewrite_local_node->index,
- sr_fix_dst_addr_node.index);
-
- ASSERT(sm->ip6_rewrite_sr_next_index == verify_next_index);
OpenSSL_add_all_digests();