From a25def7807fb46bd48462be3ec5c598fc79e2a13 Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Mon, 26 Nov 2018 11:04:45 -0500 Subject: Add a feature arc consistency check Verify that last node in the computed feature order matches reality. This check doesn't make sense in all cases, so we skip it if the newly-added vnet_feature_arc_registration_t ".last_in_arc" datum is a NULL pointer. Change-Id: Ia99c3e2b2da2e4780a7d5bc71670c5742a66fef2 Signed-off-by: Dave Barach --- src/vnet/ip/ip4_forward.c | 4 ++++ src/vnet/ip/ip6_forward.c | 3 +++ 2 files changed, 7 insertions(+) (limited to 'src/vnet/ip') diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c index e011e5134d8..9963f6b1e26 100644 --- a/src/vnet/ip/ip4_forward.c +++ b/src/vnet/ip/ip4_forward.c @@ -711,6 +711,7 @@ VNET_FEATURE_ARC_INIT (ip4_unicast, static) = { .arc_name = "ip4-unicast", .start_nodes = VNET_FEATURES ("ip4-input", "ip4-input-no-checksum"), + .last_in_arc = "ip4-lookup", .arc_index_ptr = &ip4_main.lookup_main.ucast_feature_arc_index, }; @@ -796,6 +797,7 @@ VNET_FEATURE_ARC_INIT (ip4_multicast, static) = { .arc_name = "ip4-multicast", .start_nodes = VNET_FEATURES ("ip4-input", "ip4-input-no-checksum"), + .last_in_arc = "ip4-mfib-forward-lookup", .arc_index_ptr = &ip4_main.lookup_main.mcast_feature_arc_index, }; @@ -825,6 +827,7 @@ VNET_FEATURE_ARC_INIT (ip4_output, static) = { .arc_name = "ip4-output", .start_nodes = VNET_FEATURES ("ip4-rewrite", "ip4-midchain", "ip4-dvr-dpo"), + .last_in_arc = "interface-output", .arc_index_ptr = &ip4_main.lookup_main.output_feature_arc_index, }; @@ -1212,6 +1215,7 @@ VNET_FEATURE_ARC_INIT (ip4_local) = { .arc_name = "ip4-local", .start_nodes = VNET_FEATURES ("ip4-local"), + .last_in_arc = "ip4-local-end-of-arc", }; /* *INDENT-ON* */ diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c index 5a176435510..3c0dcbf031c 100644 --- a/src/vnet/ip/ip6_forward.c +++ b/src/vnet/ip/ip6_forward.c @@ -371,6 +371,7 @@ VNET_FEATURE_ARC_INIT (ip6_unicast, static) = { .arc_name = "ip6-unicast", .start_nodes = VNET_FEATURES ("ip6-input"), + .last_in_arc = "ip6-lookup", .arc_index_ptr = &ip6_main.lookup_main.ucast_feature_arc_index, }; @@ -442,6 +443,7 @@ VNET_FEATURE_ARC_INIT (ip6_multicast, static) = { .arc_name = "ip6-multicast", .start_nodes = VNET_FEATURES ("ip6-input"), + .last_in_arc = "ip6-mfib-forward-lookup", .arc_index_ptr = &ip6_main.lookup_main.mcast_feature_arc_index, }; @@ -468,6 +470,7 @@ VNET_FEATURE_ARC_INIT (ip6_output, static) = { .arc_name = "ip6-output", .start_nodes = VNET_FEATURES ("ip6-rewrite", "ip6-midchain", "ip6-dvr-dpo"), + .last_in_arc = "interface-output", .arc_index_ptr = &ip6_main.lookup_main.output_feature_arc_index, }; -- cgit 1.2.3-korg