Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
FIB: store the node type not the function pointer.
[vpp.git]
/
src
/
vnet
/
gre
/
interface.c
diff --git
a/src/vnet/gre/interface.c
b/src/vnet/gre/interface.c
index
91a3899
..
ae5da93
100644
(file)
--- a/
src/vnet/gre/interface.c
+++ b/
src/vnet/gre/interface.c
@@
-153,9
+153,7
@@
gre_tunnel_db_remove (const gre_tunnel_t *t)
static gre_tunnel_t *
gre_tunnel_from_fib_node (fib_node_t *node)
{
static gre_tunnel_t *
gre_tunnel_from_fib_node (fib_node_t *node)
{
-#if (CLIB_DEBUG > 0)
ASSERT(FIB_NODE_TYPE_GRE_TUNNEL == node->fn_type);
ASSERT(FIB_NODE_TYPE_GRE_TUNNEL == node->fn_type);
-#endif
return ((gre_tunnel_t*) (((char*)node) -
STRUCT_OFFSET_OF(gre_tunnel_t, node)));
}
return ((gre_tunnel_t*) (((char*)node) -
STRUCT_OFFSET_OF(gre_tunnel_t, node)));
}
@@
-427,8
+425,7
@@
vnet_gre_tunnel_add (vnet_gre_add_del_tunnel_args_t *a,
fib_table_entry_special_add(outer_fib_index,
&t->tunnel_dst,
FIB_SOURCE_RR,
fib_table_entry_special_add(outer_fib_index,
&t->tunnel_dst,
FIB_SOURCE_RR,
- FIB_ENTRY_FLAG_NONE,
- ADJ_INDEX_INVALID);
+ FIB_ENTRY_FLAG_NONE);
t->sibling_index =
fib_entry_child_add(t->fib_entry_index,
FIB_NODE_TYPE_GRE_TUNNEL,
t->sibling_index =
fib_entry_child_add(t->fib_entry_index,
FIB_NODE_TYPE_GRE_TUNNEL,