Add a feature arc consistency check
[vpp.git] / src / vnet / mpls / mpls_features.c
index a7593c5..9ed56df 100644 (file)
@@ -104,18 +104,19 @@ VNET_FEATURE_ARC_INIT (mpls_input, static) =
 {
   .arc_name  = "mpls-input",
   .start_nodes = VNET_FEATURES ("mpls-input"),
+  .last_in_arc = "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 */
 };
 
@@ -123,6 +124,7 @@ VNET_FEATURE_ARC_INIT (mpls_output, static) =
 {
   .arc_name  = "mpls-output",
   .start_nodes = VNET_FEATURES ("mpls-output", "mpls-midchain"),
+  .last_in_arc = "interface-output",
   .arc_index_ptr = &mpls_main.output_feature_arc_index,
 };
 
@@ -145,8 +147,6 @@ mpls_sw_interface_add_del (vnet_main_t * vnm,
 
   vnet_feature_enable_disable ("mpls-input", "mpls-not-enabled", sw_if_index,
                               is_add, 0, 0);
-  vnet_feature_enable_disable ("mpls-output", "interface-output", sw_if_index,
-                              is_add, 0, 0);
 
   return /* no error */ 0;
 }