From b85e43965ec9e23c4ae14b62f4bbfe839f75c427 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Thu, 16 Mar 2017 16:12:57 -0400 Subject: Use the feature anchor in the MPLS input arc - it performs much better Change-Id: I3d64ddb248478accd4d9b3124f018c9aab63a60f Signed-off-by: Neale Ranns --- src/vnet/mpls/interface.c | 4 ++-- src/vnet/mpls/mpls_features.c | 11 ++++++----- src/vnet/mpls/node.c | 1 + 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/vnet/mpls/interface.c b/src/vnet/mpls/interface.c index 692a2d1eb62..f631dc7652c 100644 --- a/src/vnet/mpls/interface.c +++ b/src/vnet/mpls/interface.c @@ -66,8 +66,8 @@ mpls_sw_interface_enable_disable (mpls_main_t * mm, FIB_PROTOCOL_MPLS); } - vnet_feature_enable_disable ("mpls-input", "mpls-lookup", sw_if_index, - is_enable, 0, 0); + vnet_feature_enable_disable ("mpls-input", "mpls-not-enabled", + sw_if_index, !is_enable, 0, 0); } diff --git a/src/vnet/mpls/mpls_features.c b/src/vnet/mpls/mpls_features.c index a7593c55b09..24147955153 100644 --- a/src/vnet/mpls/mpls_features.c +++ b/src/vnet/mpls/mpls_features.c @@ -104,18 +104,19 @@ VNET_FEATURE_ARC_INIT (mpls_input, static) = { .arc_name = "mpls-input", .start_nodes = VNET_FEATURES ("mpls-input"), + .end_node = "mpls-lookup", .arc_index_ptr = &mpls_main.input_feature_arc_index, }; -VNET_FEATURE_INIT (mpls_lookup, static) = { +VNET_FEATURE_INIT (mpls_not_enabled, static) = { .arc_name = "mpls-input", - .node_name = "mpls-lookup", - .runs_before = VNET_FEATURES ("mpls-not-enabled"), + .node_name = "mpls-not-enabled", + .runs_before = VNET_FEATURES ("mpls-lookup"), }; -VNET_FEATURE_INIT (mpls_not_enabled, static) = { +VNET_FEATURE_INIT (mpls_lookup, static) = { .arc_name = "mpls-input", - .node_name = "mpls-not-enabled", + .node_name = "mpls-lookup", .runs_before = VNET_FEATURES (0), /* not before any other features */ }; diff --git a/src/vnet/mpls/node.c b/src/vnet/mpls/node.c index 03bfaf56ce9..5b407fae2a2 100644 --- a/src/vnet/mpls/node.c +++ b/src/vnet/mpls/node.c @@ -206,6 +206,7 @@ mpls_input_inline (vlib_main_t * vm, } else { + next0 = MPLS_INPUT_NEXT_LOOKUP; vnet_feature_arc_start(mm->input_feature_arc_index, sw_if_index0, &next0, b0); vlib_increment_simple_counter (cm, cpu_index, sw_if_index0, 1); } -- cgit 1.2.3-korg