aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/gre/interface.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2020-10-19 14:47:20 +0000
committerDamjan Marion <dmarion@me.com>2020-10-19 20:59:54 +0000
commit5a59b2bac48611a316adf128bdb0e1e2fe889656 (patch)
tree37e51dbf5d97fda9d9deee2d08e4b18a29981c5f /src/vnet/gre/interface.c
parent710d78074e07ffb5006ad01a0da4c1b6dc3de38b (diff)
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
Diffstat (limited to 'src/vnet/gre/interface.c')
-rw-r--r--src/vnet/gre/interface.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/vnet/gre/interface.c b/src/vnet/gre/interface.c
index 3ea13e1676b..92e4f7469ac 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 @@ vnet_gre_tunnel_add_del (vnet_gre_tunnel_add_del_args_t * a,
{
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;