From d65346098daf8967e882d0299679a131769c9be9 Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Tue, 14 Jun 2016 18:38:02 -0400 Subject: Dynamically compute ip feature subgraph order This change-set enables plugins to add themselves to the ip4/ip6 feature subgraphs without having to modify core vpp engine code at all. Add VNET_IP4/IP6_UNICAST/MULTICAST_FEATURE_INIT macros which express the required ordering constraints, and off you go. Along the way, added an implementation of Warshall's algorithm to vppinfra; to compute the positive transitive closure of a relation. In this case, the relation is "feature A runs before feature B." With that in hand, ip_feature_init_cast(...) computes a partial order across the set of configured feature subgraph nodes. In unit-testing, we discovered VPP-145 - ip4/6 inacl wiped out vnet_buffer(b)->ip>current_config_index, which exists in main. So, we fixed that by moving b->trace_index, adding b->current_config_index, and removing the ip opaque union current_config_index. Change-Id: Iff132116f66413dc6b31ac3377198c7a32d51f48 Signed-off-by: Dave Barach --- vnet/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vnet/Makefile.am') diff --git a/vnet/Makefile.am b/vnet/Makefile.am index 61a1998a6eb..d0a06be8e9e 100644 --- a/vnet/Makefile.am +++ b/vnet/Makefile.am @@ -248,6 +248,7 @@ libvnet_la_SOURCES += \ vnet/ip/format.c \ vnet/ip/icmp4.c \ vnet/ip/icmp6.c \ + vnet/ip/ip_feature_registration.c \ vnet/ip/ip46_cli.c \ vnet/ip/ip4_format.c \ vnet/ip/ip4_forward.c \ @@ -280,6 +281,7 @@ nobase_include_HEADERS += \ vnet/ip/icmp6.h \ vnet/ip/igmp_packet.h \ vnet/ip/ip.h \ + vnet/ip/ip_feature_registration.h \ vnet/ip/ip4.h \ vnet/ip/ip4_mtrie.h \ vnet/ip/ip4_error.h \ -- cgit 1.2.3-korg