X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ffeature%2Ffeature.c;h=f1afa3746f0dcc74ede1ad68fab09f5bdc8d2357;hb=a25def7807fb46bd48462be3ec5c598fc79e2a13;hp=2cdbcff88c89d96e77584088b431929e673b4b76;hpb=37f44563637d2fa2fe454fd8c100958ec9b7a754;p=vpp.git diff --git a/src/vnet/feature/feature.c b/src/vnet/feature/feature.c index 2cdbcff88c8..f1afa3746f0 100644 --- a/src/vnet/feature/feature.c +++ b/src/vnet/feature/feature.c @@ -115,6 +115,7 @@ vnet_feature_init (vlib_main_t * vm) clib_error_t *error; vnet_feature_config_main_t *cm; vnet_config_main_t *vcm; + char **features_in_order, *last_feature; arc_index = areg->feature_arc_index; cm = &fm->feature_config_mains[arc_index]; @@ -129,6 +130,19 @@ vnet_feature_init (vlib_main_t * vm) os_exit (1); } + features_in_order = fm->feature_nodes[arc_index]; + + /* If specificed, verify that the last node in the arc is actually last */ + if (areg->last_in_arc && vec_len (features_in_order) > 0) + { + last_feature = features_in_order[vec_len (features_in_order) - 1]; + if (strncmp (areg->last_in_arc, last_feature, + strlen (areg->last_in_arc))) + clib_warning + ("WARNING: %s arc: last node is %s, but expected %s!", + areg->arc_name, last_feature, areg->last_in_arc); + } + fm->next_feature_by_name[arc_index] = hash_create_string (0, sizeof (uword)); freg = fm->next_feature_by_arc[arc_index];