ip: Move the IP6 fib into ip6_[m]fib.c
Type: improvement
reduce the compile time by moving the bihash includes out of ip[46].h
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I6b9216e10aff1013071f9238b3e1ebbdd205bd80
diff --git a/src/vnet/gre/interface.c b/src/vnet/gre/interface.c
index 3ea13e1..92e4f74 100644
--- a/src/vnet/gre/interface.c
+++ b/src/vnet/gre/interface.c
@@ -18,8 +18,7 @@
#include <vnet/vnet.h>
#include <vnet/gre/gre.h>
#include <vnet/ip/format.h>
-#include <vnet/fib/ip4_fib.h>
-#include <vnet/fib/ip6_fib.h>
+#include <vnet/fib/fib_table.h>
#include <vnet/adj/adj_midchain.h>
#include <vnet/adj/adj_nbr.h>
#include <vnet/mpls/mpls.h>
@@ -529,10 +528,9 @@
{
u32 outer_fib_index;
- if (!a->is_ipv6)
- outer_fib_index = ip4_fib_index_from_table_id (a->outer_table_id);
- else
- outer_fib_index = ip6_fib_index_from_table_id (a->outer_table_id);
+ outer_fib_index = fib_table_find ((a->is_ipv6 ?
+ FIB_PROTOCOL_IP6 :
+ FIB_PROTOCOL_IP4), a->outer_table_id);
if (~0 == outer_fib_index)
return VNET_API_ERROR_NO_SUCH_FIB;