summaryrefslogtreecommitdiffstats
path: root/src/vnet/feature/feature.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-03-16 15:49:09 -0400
committerDamjan Marion <dmarion.lists@gmail.com>2017-03-17 19:41:56 +0000
commit180279b912827c30494ec1b90ee4325a15cb337c (patch)
tree996598cfabfd253efd0ab8a3f52562cd7e1e8366 /src/vnet/feature/feature.c
parent696e88da9799056036f329676213f3c0c0a1db9c (diff)
Fix IP feature ordering.
Drop comes before lookup when enabled. is_first_or_last is not required when setting a feature, the anchor is added in find_config_with_features(). Don't make the PG interfaces automatically L3 enabled, this way we can have tests that check the L3 protocol disbaled behaviour. Change-Id: Icef22a920b27ff9cec6ab2da6b05f05c532cb60f Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/feature/feature.c')
-rw-r--r--src/vnet/feature/feature.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/vnet/feature/feature.c b/src/vnet/feature/feature.c
index 5a4be029dc4..f0e9004c64d 100644
--- a/src/vnet/feature/feature.c
+++ b/src/vnet/feature/feature.c
@@ -109,9 +109,6 @@ vnet_feature_init (vlib_main_t * vm)
freg = freg->next;
}
- cm->end_feature_index =
- vnet_get_feature_index (arc_index, areg->end_node);
-
/* next */
areg = areg->next;
arc_index++;
@@ -185,7 +182,6 @@ vnet_feature_enable_disable_with_index (u8 arc_index, u32 feature_index,
vnet_feature_main_t *fm = &feature_main;
vnet_feature_config_main_t *cm;
i16 feature_count;
- int is_first_or_last;
u32 ci;
if (arc_index == (u8) ~ 0)
@@ -214,19 +210,8 @@ vnet_feature_enable_disable_with_index (u8 arc_index, u32 feature_index,
/* update feature count */
enable_disable = (enable_disable > 0);
feature_count += enable_disable ? 1 : -1;
- is_first_or_last = (feature_count == enable_disable);
ASSERT (feature_count >= 0);
- if (is_first_or_last && cm->end_feature_index != ~0)
- {
- /*register end node */
- ci = (enable_disable
- ? vnet_config_add_feature
- : vnet_config_del_feature)
- (vlib_get_main (), &cm->config_main, ci, cm->end_feature_index, 0, 0);
- cm->config_index_by_sw_if_index[sw_if_index] = ci;
- }
-
fm->sw_if_index_has_features[arc_index] =
clib_bitmap_set (fm->sw_if_index_has_features[arc_index], sw_if_index,
(feature_count > 0));